mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 03:10:09 +02:00
Fix bug where absolute paths with dots/double-dots were not collapsed.
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
@@ -59,6 +59,14 @@ class HTMLPurifier_URIFilter_MakeAbsoluteTest extends HTMLPurifier_URIFilterHarn
|
||||
$this->assertFiltering('././foo/./bar/.././baz', 'http://example.com/foo/foo/baz');
|
||||
}
|
||||
|
||||
function testFilterAbsolutePathWithDot() {
|
||||
$this->assertFiltering('/./foo', 'http://example.com/foo');
|
||||
}
|
||||
|
||||
function testFilterAbsolutePathWithMultiDot() {
|
||||
$this->assertFiltering('/./foo/../bar/.', 'http://example.com/bar/');
|
||||
}
|
||||
|
||||
function testFilterRelativePathWithInternalDotDot() {
|
||||
$this->assertFiltering('../baz.txt', 'http://example.com/baz.txt');
|
||||
}
|
||||
|
Reference in New Issue
Block a user