summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-01 10:06:06 +0200
committerJoas Schilling <coding@schilljs.com>2016-09-01 10:06:06 +0200
commit7cd86cfe596cb6564bfd889c0f931211067379b5 (patch)
tree6dfcc4d2ba1adf31ddff90fd050b358203345699 /apps/files/js
parent4a5cd74fb29b19c975f893e0289b1b34bf5e8a62 (diff)
downloadnextcloud-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.js7
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;
},
/**