mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-02 22:27:44 +02:00
clear whitespace
This commit is contained in:
@@ -400,7 +400,7 @@ class CImage
|
|||||||
*/
|
*/
|
||||||
const RESIZE = 1;
|
const RESIZE = 1;
|
||||||
const RESAMPLE = 2;
|
const RESAMPLE = 2;
|
||||||
private $copyStrategy = NULL;
|
private $copyStrategy = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@ class CImageRemoteDownloadTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testAllowRemoteDownloadDefaultPatternValid($source)
|
public function testAllowRemoteDownloadDefaultPatternValid($source)
|
||||||
{
|
{
|
||||||
$img = new CImage();
|
$img = new CImage();
|
||||||
$img->setRemoteDownload(true);
|
$img->setRemoteDownload(true, "");
|
||||||
|
|
||||||
$res = $img->isRemoteSource($source);
|
$res = $img->isRemoteSource($source);
|
||||||
$this->assertTrue($res, "Should be a valid remote source: '$source'.");
|
$this->assertTrue($res, "Should be a valid remote source: '$source'.");
|
||||||
@@ -79,7 +79,7 @@ class CImageRemoteDownloadTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testAllowRemoteDownloadDefaultPatternInvalid($source)
|
public function testAllowRemoteDownloadDefaultPatternInvalid($source)
|
||||||
{
|
{
|
||||||
$img = new CImage();
|
$img = new CImage();
|
||||||
$img->setRemoteDownload(true);
|
$img->setRemoteDownload(true, "");
|
||||||
|
|
||||||
$res = $img->isRemoteSource($source);
|
$res = $img->isRemoteSource($source);
|
||||||
$this->assertFalse($res, "Should not be a valid remote source: '$source'.");
|
$this->assertFalse($res, "Should not be a valid remote source: '$source'.");
|
||||||
|
@@ -63,8 +63,9 @@ set_exception_handler(function ($exception) {
|
|||||||
. $exception->getMessage()
|
. $exception->getMessage()
|
||||||
. "</p><pre>"
|
. "</p><pre>"
|
||||||
. $exception->getTraceAsString()
|
. $exception->getTraceAsString()
|
||||||
. "</pre>"
|
. "</pre>",
|
||||||
, 500);
|
500
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -439,14 +440,16 @@ if ($dummyEnabled && $srcImage === $dummyFilename) {
|
|||||||
is_file($pathToImage)
|
is_file($pathToImage)
|
||||||
or errorPage(
|
or errorPage(
|
||||||
'Source image is not a valid file, check the filename and that a
|
'Source image is not a valid file, check the filename and that a
|
||||||
matching file exists on the filesystem.'
|
matching file exists on the filesystem.',
|
||||||
, 404);
|
404
|
||||||
|
);
|
||||||
|
|
||||||
substr_compare($imageDir, $pathToImage, 0, strlen($imageDir)) == 0
|
substr_compare($imageDir, $pathToImage, 0, strlen($imageDir)) == 0
|
||||||
or errorPage(
|
or errorPage(
|
||||||
'Security constraint: Source image is not below the directory "image_path"
|
'Security constraint: Source image is not below the directory "image_path"
|
||||||
as specified in the config file img_config.php.'
|
as specified in the config file img_config.php.',
|
||||||
, 404);
|
404
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
verbose("src = $srcImage");
|
verbose("src = $srcImage");
|
||||||
|
Reference in New Issue
Block a user