Use `FILTER_UNSAFE_RAW` instead of `FILTER_SANITIZE_STRING`

`FILTER_SANITIZE_STRING` will still encode everything else.
This commit is contained in:
Lukas Reschke 2015-03-17 21:56:16 +01:00
parent e50f13d46b
commit f13216d275
1 changed files with 1 additions and 1 deletions

View File

@ -512,7 +512,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
} }
} }
$sanitizedFileName = filter_var($fileName, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW); $sanitizedFileName = filter_var($fileName, FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW);
if($sanitizedFileName !== $fileName) { if($sanitizedFileName !== $fileName) {
throw new InvalidCharacterInPathException(); throw new InvalidCharacterInPathException();
} }