From: Thomas Müller Date: Fri, 23 Nov 2012 11:05:52 +0000 (-0800) Subject: Merge pull request #480 from owncloud/fix_435_and_437 X-Git-Tag: v5.0.0alpha1~411 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b5b7a67f8a56fb866fe8690ce7573231ea29b989;p=nextcloud-server.git Merge pull request #480 from owncloud/fix_435_and_437 Also reject names with \ in the name --- b5b7a67f8a56fb866fe8690ce7573231ea29b989 diff --cc apps/files/js/files.js index 2b250e0c7c5,9fa2a384b5d..28d4b49670d --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@@ -505,14 -517,8 +517,12 @@@ $(document).ready(function() $(this).append(input); input.focus(); input.change(function(){ - if(type != 'web' && $(this).val().indexOf('/')!=-1){ - $('#notification').text(t('files','Invalid name, \'/\' is not allowed.')); - $('#notification').fadeIn(); + if (type != 'web' && Files.containsInvalidCharacters($(this).val())) { return; + } else if( type == 'folder' && $('#dir').val() == '/' && $(this).val() == 'Shared') { + $('#notification').text(t('files','Invalid folder name. Usage of "Shared" is reserved by Owncloud')); + $('#notification').fadeIn(); + return; } var name = getUniqueName($(this).val()); if (name != $(this).val()) {