Skip to content
Permalink
Browse files

Also prevent null byte character

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

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

/**
@@ -1380,6 +1380,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 c3ae21f

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