Browse Source

Show warning if slash is entered as filename

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
pull/7676/head
Morris Jobke 8 years ago
parent
commit
31c0efc299
No known key found for this signature in database GPG Key ID: FE03C3A163FEDE68
  1. 2
      apps/files/js/files.js

2
apps/files/js/files.js

@ -128,6 +128,8 @@
throw t('files', '"{name}" is an invalid file name.', {name: name});
} else if (trimmedName.length === 0) {
throw t('files', 'File name cannot be empty.');
} else if (trimmedName.indexOf('/') !== -1) {
throw t('files', '"/" is not allowed inside a file name.');
} else if (OC.fileIsBlacklisted(trimmedName)) {
throw t('files', '"{name}" is not an allowed filetype', {name: name});
}

Loading…
Cancel
Save