[Pkg-owncloud-commits] [owncloud] 137/394: some more invalid characters have been added
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:11:47 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.
commit 3c5470358e65e511a75ef0bcb843964385467977
Author: Thomas Mueller <thomas.mueller at tmit.eu>
Date: Thu Nov 22 11:22:16 2012 +0100
some more invalid characters have been added
Conflicts:
apps/files/js/files.js
---
apps/files/js/files.js | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 9c71a59..ed3aa76 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -510,16 +510,21 @@ $(document).ready(function() {
$(this).append(input);
input.focus();
input.change(function(){
- if(type != 'web' && ($(this).val().indexOf('/')!=-1 || $(this).val().indexOf('\\')!=-1)) {
- $('#notification').text(t('files', 'Invalid name, \'/\' or \'\\\' is not allowed.'));
- $('#notification').fadeIn();
- 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 (type != 'web') {
+ var invalid_characters = ['\\', '/', '<', '>', ':', '"', '|', '?', '*'];
+ for (var i = 0; i < invalid_characters.length; i++) {
+ if ($(this).val().indexOf(invalid_characters[i]) != -1) {
+ $('#notification').text(t('files', "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed."));
+ $('#notification').fadeIn();
+ 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()) {
FileList.checkName(name, $(this).val(), true);
var hidden = true;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list