mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Check for invalid characters before trimming
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
11be6bf4ec
commit
4736bba7f6
1 changed files with 1 additions and 1 deletions
|
|
@ -554,8 +554,8 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
|
|||
* @throws InvalidPathException
|
||||
*/
|
||||
protected function verifyPosixPath($fileName) {
|
||||
$fileName = trim($fileName);
|
||||
$this->scanForInvalidCharacters($fileName, "\\/");
|
||||
$fileName = trim($fileName);
|
||||
$reservedNames = ['*'];
|
||||
if (in_array($fileName, $reservedNames)) {
|
||||
throw new ReservedWordException();
|
||||
|
|
|
|||
Loading…
Reference in a new issue