Skip to content
Permalink
Browse files

Also prevent null byte character

  • Loading branch information...
nickvergessen committed Sep 1, 2016
1 parent 778ae8a commit 5dd211cc8845fd4533966bf8d7a7f2a6359ea013
Showing with 3 additions and 1 deletion.
  1. +2 −1 apps/files/js/filelist.js
  2. +1 −0 apps/files/tests/js/filelistSpec.js
@@ -1339,7 +1339,8 @@
}
}

return path.toLowerCase().indexOf(decodeURI('%0a')) === -1;
return path.toLowerCase().indexOf(decodeURI('%0a')) === -1 &&
path.toLowerCase().indexOf(decodeURI('%00')) === -1;
},

/**
@@ -1334,6 +1334,7 @@ describe('OCA.Files.FileList tests', function() {
'/abc/../',
'/../abc/',
'/foo%0Abar/',
'/foo%00bar/',
'/another\\subdir/../foo\\../bar\\..\\file/..\\folder/../'
], function(path) {
fileList.changeDirectory(decodeURI(path));

0 comments on commit 5dd211c

Please sign in to comment.
You can’t perform that action at this time.