diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-03 11:42:49 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-03 11:42:49 +0100 |
commit | 31c0efc29982516409982e325cc2f74cb0c9b3ab (patch) | |
tree | 3daa2e6d5891a09194945383eb84276bd40ff9b3 /apps | |
parent | 86d33cf50ffff86a6641ab113bce6801802f19cb (diff) | |
download | nextcloud-server-31c0efc29982516409982e325cc2f74cb0c9b3ab.tar.gz nextcloud-server-31c0efc29982516409982e325cc2f74cb0c9b3ab.zip |
Show warning if slash is entered as filename
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/files.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 153307fec52..a1e59015b1d 100644 --- a/apps/files/js/files.js +++ b/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}); } |