Also prevent null byte character
This commit is contained in:
parent
26c03524e7
commit
6c81c65eea
|
@ -1419,7 +1419,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
return path.toLowerCase().indexOf(decodeURI('%0a')) === -1;
|
||||
return path.toLowerCase().indexOf(decodeURI('%0a')) === -1 &&
|
||||
path.toLowerCase().indexOf(decodeURI('%00')) === -1;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1402,6 +1402,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));
|
||||
|
|
Loading…
Reference in New Issue