aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/files.js
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-06-06 00:02:13 +0200
committerRobin Appelman <icewind@owncloud.com>2012-06-06 00:02:51 +0200
commite6c4e53486b7c1a2f9da7b3ebca3b2581406fb92 (patch)
treed1588e49eea8e5cc1380b7f6d00be09c00b0911a /apps/files/js/files.js
parent3ce6344d40385e38335fb9716233cbf7c5241860 (diff)
downloadnextcloud-server-e6c4e53486b7c1a2f9da7b3ebca3b2581406fb92.tar.gz
nextcloud-server-e6c4e53486b7c1a2f9da7b3ebca3b2581406fb92.zip
prevent creating files with a / the name
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r--apps/files/js/files.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 7cd0f388a3c..a079deb9539 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -452,6 +452,11 @@ $(document).ready(function() {
input.focus();
input.change(function(){
var name=$(this).val();
+ if(name.indexOf('/')!=-1){
+ $('#notification').text(t('files','Invalid name, \'/\' is not allowed.'));
+ $('#notification').fadeIn();
+ return;
+ }
switch(type){
case 'file':
$.post(