summaryrefslogtreecommitdiffstats
path: root/apps/files/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-07-01 15:00:31 +0200
committerLukas Reschke <lukas@owncloud.com>2016-07-01 15:01:48 +0200
commit4ac9eaab0379cc0535a6ab18be0fa147facf1bd5 (patch)
tree4416c8478e9ad1bb388f23006ee8da749a3bf95b /apps/files/tests
parent5b65591d84a0dafb9415539eef75424004f6a4f6 (diff)
downloadnextcloud-server-4ac9eaab0379cc0535a6ab18be0fa147facf1bd5.tar.gz
nextcloud-server-4ac9eaab0379cc0535a6ab18be0fa147facf1bd5.zip
Match for /../
Diffstat (limited to 'apps/files/tests')
-rw-r--r--apps/files/tests/js/filelistSpec.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index baf071af9bd..a9b6a1ac1c8 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -1338,6 +1338,10 @@ describe('OCA.Files.FileList tests', function() {
fileList.changeDirectory('/another\\subdir/../foo\\../bar\\..\\file/..\\folder/../');
expect(fileList.getCurrentDirectory()).toEqual('/another/subdir/foo/bar/file/folder/');
});
+ it('does not convert folders with a ".." in the name', function() {
+ fileList.changeDirectory('/abc../def');
+ expect(fileList.getCurrentDirectory()).toEqual('/abc../def');
+ });
it('switches to root dir when current directory does not exist', function() {
fileList.changeDirectory('/unexist');
deferredList.reject(404);