1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-08-05 23:57:30 +02:00

* Using CWhitelist for checking hotlinking to images, fix #88.

* Added mode for `test` which enables logging verbose mode to file, fix #97.
This commit is contained in:
Mikael Roos
2015-07-25 22:21:12 +02:00
parent 01a868d925
commit 8bc710f3b8
9 changed files with 467 additions and 150 deletions

View File

@@ -162,4 +162,19 @@ class CImageRemoteDownloadTest extends \PHPUnit_Framework_TestCase
$res = $img->isRemoteSourceOnWhitelist("http://$hostname/img.jpg");
$this->assertFalse($res, "Should not be a valid hostname on the whitelist: '$hostname'.");
}
/**
* Test
*
* @return void
*
*/
public function testRemoteHostWhitelistNotConfigured()
{
$img = new CImage();
$res = $img->isRemoteSourceOnWhitelist(null);
$this->assertTrue($res, "Should allow when whitelist not configured.");
}
}