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
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with
2 additions and
0 deletions
-
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}); |
|
|
|
} |
|
|
|
|