diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-01-03 13:07:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-03 13:07:26 +0100 |
commit | a8ab67ff48aa425edd1d86b4a3b5855150bb2ac1 (patch) | |
tree | d9f316c13fcf73aa349ed02b383d171788a598b3 /apps/files/js | |
parent | 02b092f35830b916c4fc61413600f5ca86d1630a (diff) | |
parent | 0b4d18673e50a5c4f271a7fdfc1de47b47342942 (diff) | |
download | nextcloud-server-a8ab67ff48aa425edd1d86b4a3b5855150bb2ac1.tar.gz nextcloud-server-a8ab67ff48aa425edd1d86b4a3b5855150bb2ac1.zip |
Merge pull request #7676 from nextcloud/fix-slash-in-filename
Show warning if slash is entered as filename
Diffstat (limited to 'apps/files/js')
-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}); } |