mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-19 06:11:27 +02:00
Add permalink to setup for comparing images with webroot/compare/compare.php, fix #92.
This commit is contained in:
@@ -340,13 +340,13 @@ if (isset($shortcut)
|
||||
/**
|
||||
* src - the source image file.
|
||||
*/
|
||||
$srcImage = get('src')
|
||||
$srcImage = urldecode(get('src'))
|
||||
or errorPage('Must set src-attribute.');
|
||||
|
||||
// Check for valid/invalid characters
|
||||
$imagePath = getConfig('image_path', __DIR__ . '/img/');
|
||||
$imagePathConstraint = getConfig('image_path_constraint', true);
|
||||
$validFilename = getConfig('valid_filename', '#^[a-z0-9A-Z-/_\.:]+$#');
|
||||
$validFilename = getConfig('valid_filename', '#^[a-z0-9A-Z-/_ \.:]+$#');
|
||||
|
||||
preg_match($validFilename, $srcImage)
|
||||
or errorPage('Filename contains invalid characters.');
|
||||
|
@@ -94,10 +94,10 @@ return array(
|
||||
* A regexp for validating characters in the image or alias filename.
|
||||
*
|
||||
* Default value:
|
||||
* valid_filename: '#^[a-z0-9A-Z-/_\.:]+$#'
|
||||
* valid_filename: '#^[a-z0-9A-Z-/_ \.:]+$#'
|
||||
* valid_aliasname: '#^[a-z0-9A-Z-_]+$#'
|
||||
*/
|
||||
//'valid_filename' => '#^[a-z0-9A-Z-/_\.:]+$#',
|
||||
//'valid_filename' => '#^[a-z0-9A-Z-/_ \.:]+$#',
|
||||
//'valid_aliasname' => '#^[a-z0-9A-Z-_]+$#',
|
||||
|
||||
|
||||
|
@@ -3382,13 +3382,13 @@ if (isset($shortcut)
|
||||
/**
|
||||
* src - the source image file.
|
||||
*/
|
||||
$srcImage = get('src')
|
||||
$srcImage = urldecode(get('src'))
|
||||
or errorPage('Must set src-attribute.');
|
||||
|
||||
// Check for valid/invalid characters
|
||||
$imagePath = getConfig('image_path', __DIR__ . '/img/');
|
||||
$imagePathConstraint = getConfig('image_path_constraint', true);
|
||||
$validFilename = getConfig('valid_filename', '#^[a-z0-9A-Z-/_\.:]+$#');
|
||||
$validFilename = getConfig('valid_filename', '#^[a-z0-9A-Z-/_ \.:]+$#');
|
||||
|
||||
preg_match($validFilename, $srcImage)
|
||||
or errorPage('Filename contains invalid characters.');
|
||||
|
@@ -3382,13 +3382,13 @@ if (isset($shortcut)
|
||||
/**
|
||||
* src - the source image file.
|
||||
*/
|
||||
$srcImage = get('src')
|
||||
$srcImage = urldecode(get('src'))
|
||||
or errorPage('Must set src-attribute.');
|
||||
|
||||
// Check for valid/invalid characters
|
||||
$imagePath = getConfig('image_path', __DIR__ . '/img/');
|
||||
$imagePathConstraint = getConfig('image_path_constraint', true);
|
||||
$validFilename = getConfig('valid_filename', '#^[a-z0-9A-Z-/_\.:]+$#');
|
||||
$validFilename = getConfig('valid_filename', '#^[a-z0-9A-Z-/_ \.:]+$#');
|
||||
|
||||
preg_match($validFilename, $srcImage)
|
||||
or errorPage('Filename contains invalid characters.');
|
||||
|
@@ -3382,13 +3382,13 @@ if (isset($shortcut)
|
||||
/**
|
||||
* src - the source image file.
|
||||
*/
|
||||
$srcImage = get('src')
|
||||
$srcImage = urldecode(get('src'))
|
||||
or errorPage('Must set src-attribute.');
|
||||
|
||||
// Check for valid/invalid characters
|
||||
$imagePath = getConfig('image_path', __DIR__ . '/img/');
|
||||
$imagePathConstraint = getConfig('image_path_constraint', true);
|
||||
$validFilename = getConfig('valid_filename', '#^[a-z0-9A-Z-/_\.:]+$#');
|
||||
$validFilename = getConfig('valid_filename', '#^[a-z0-9A-Z-/_ \.:]+$#');
|
||||
|
||||
preg_match($validFilename, $srcImage)
|
||||
or errorPage('Filename contains invalid characters.');
|
||||
|
Reference in New Issue
Block a user