mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-25 17:00:44 +02:00
Adding configuration item to set what valid characters are for the image
filename.
This commit is contained in:
@@ -128,7 +128,7 @@ $verbose = getDefined(array('verbose', 'v'), true, false);
|
||||
$srcImage = get('src')
|
||||
or errorPage('Must set src-attribute.');
|
||||
|
||||
preg_match('#^[a-z0-9A-Z-/_\.]+$#', $srcImage)
|
||||
preg_match($config['error_reporting'], $srcImage)
|
||||
or errorPage('Filename contains invalid characters.');
|
||||
|
||||
verbose("src = $srcImage");
|
||||
|
@@ -17,6 +17,13 @@ return array(
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Check image filename that it only contain valid characters.
|
||||
*/
|
||||
'valid_filename' => '#^[a-z0-9A-Z-/_\.]+$#',
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Set default timezone, it defaults to UTC if not specified otherwise.
|
||||
*
|
||||
|
Reference in New Issue
Block a user