diff options
author | Joas Schilling <coding@schilljs.com> | 2016-09-01 10:06:06 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-09-01 10:06:06 +0200 |
commit | 7cd86cfe596cb6564bfd889c0f931211067379b5 (patch) | |
tree | 6dfcc4d2ba1adf31ddff90fd050b358203345699 /apps/files/js | |
parent | 4a5cd74fb29b19c975f893e0289b1b34bf5e8a62 (diff) | |
download | nextcloud-server-7cd86cfe596cb6564bfd889c0f931211067379b5.tar.gz nextcloud-server-7cd86cfe596cb6564bfd889c0f931211067379b5.zip |
Filter out %0A from paths
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/filelist.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index ca41012764a..52486df91c9 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1407,6 +1407,10 @@ return OC.linkTo('files', 'index.php')+"?dir="+ encodeURIComponent(dir).replace(/%2F/g, '/'); }, + /** + * @param {string} path + * @returns {boolean} + */ _isValidPath: function(path) { var sections = path.split('/'); for (var i = 0; i < sections.length; i++) { @@ -1414,7 +1418,8 @@ return false; } } - return true; + + return path.toLowerCase().indexOf(decodeURI('%0a')) === -1; }, /** |