From e6c4e53486b7c1a2f9da7b3ebca3b2581406fb92 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 6 Jun 2012 00:02:13 +0200 Subject: prevent creating files with a / the name --- apps/files/js/files.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/files/js/files.js') 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( -- cgit v1.2.3