mirror of
https://github.com/filegator/filegator.git
synced 2025-08-12 15:44:10 +02:00
path traversal fix
This commit is contained in:
@@ -461,6 +461,18 @@ class FilesystemTest extends TestCase
|
||||
$this->assertEquals('/john/', $this->invokeMethod($this->storage, 'applyPathPrefix', ['..']));
|
||||
$this->assertEquals('/john/', $this->invokeMethod($this->storage, 'applyPathPrefix', ['../']));
|
||||
$this->assertEquals('/john/', $this->invokeMethod($this->storage, 'applyPathPrefix', ['/sub/../../']));
|
||||
$this->assertEquals('/john/', $this->invokeMethod($this->storage, 'applyPathPrefix', ['..\\']));
|
||||
$this->assertEquals('/john/', $this->invokeMethod($this->storage, 'applyPathPrefix', ['..\\\\']));
|
||||
$this->assertEquals('/john/', $this->invokeMethod($this->storage, 'applyPathPrefix', ['..\\..\\']));
|
||||
$this->assertEquals('/john/', $this->invokeMethod($this->storage, 'applyPathPrefix', ['\\\\..']));
|
||||
$this->assertEquals('/john/', $this->invokeMethod($this->storage, 'applyPathPrefix', ['\\..\\..']));
|
||||
$this->assertEquals('/john/\\.', $this->invokeMethod($this->storage, 'applyPathPrefix', ['\\.\\...']));
|
||||
$this->assertEquals('/john/\\.', $this->invokeMethod($this->storage, 'applyPathPrefix', ['\\.\\....']));
|
||||
$this->assertEquals('/john/.\\.', $this->invokeMethod($this->storage, 'applyPathPrefix', ['.\\.\\...']));
|
||||
$this->assertEquals('/john/.', $this->invokeMethod($this->storage, 'applyPathPrefix', ['..\\.\\...']));
|
||||
$this->assertEquals('/john/.', $this->invokeMethod($this->storage, 'applyPathPrefix', ['..\\.\\...']));
|
||||
$this->assertEquals('/john/.', $this->invokeMethod($this->storage, 'applyPathPrefix', ['..\\.\\......']));
|
||||
$this->assertEquals('/john/.\\', $this->invokeMethod($this->storage, 'applyPathPrefix', ['...\\.\\......\\']));
|
||||
}
|
||||
|
||||
public function testStripPathPrefix()
|
||||
|
Reference in New Issue
Block a user