mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 03:10:09 +02:00
avoid exif_imagetype exception with small files/corrupt data URI
This commit is contained in:
committed by
Edward Z. Yang
parent
0166c3728b
commit
3747cb7efb
@@ -252,6 +252,16 @@ class HTMLPurifier_URISchemeTest extends HTMLPurifier_URIHarness
|
||||
$this->assertValidation('ftp:///example.com', false);
|
||||
}
|
||||
|
||||
public function test_data_bad_base64()
|
||||
{
|
||||
$this->assertValidation('data:image/png;base64,aGVsbG90aGVyZXk|', false);
|
||||
}
|
||||
|
||||
public function test_data_too_short()
|
||||
{
|
||||
$this->assertValidation('data:image/png;base64,aGVsbG90aGVyZXk=', false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
|
Reference in New Issue
Block a user