mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-05 07:37:37 +02:00
Adding configuration item to set what valid characters are for the image
filename.
This commit is contained in:
@@ -133,11 +133,12 @@ Revision history
|
|||||||
|
|
||||||
v0.5.x (latest)
|
v0.5.x (latest)
|
||||||
|
|
||||||
|
* Adding configuration item in `img_config.php` for setting valid characters in image filename.
|
||||||
|
* Moving `webroot/test*` into directory `webroot/test`.
|
||||||
* `webroot/check_system.php` now outputs if extension for exif is loaded.
|
* `webroot/check_system.php` now outputs if extension for exif is loaded.
|
||||||
* Broke API when `initDimensions()` split into two methods, new `initDimensions()` and `loadImageDetails()`.
|
* Broke API when `initDimensions()` split into two methods, new `initDimensions()` and `loadImageDetails()`.
|
||||||
* Added `autoRotate,`aro` to auto rotate image based on EXIF information.
|
* Added `autoRotate,`aro` to auto rotate image based on EXIF information.
|
||||||
* Added `bgColor,`bgc` to use as backgroundcolor when needing a filler color, for example rotate 45.
|
* Added `bgColor,`bgc` to use as backgroundcolor when needing a filler color, for example rotate 45.
|
||||||
* Added `rotate,`r` as an alias to `rotateAfter`.
|
|
||||||
* Added `rotateBefore,`rb` to rotate image a certain angle before processing.
|
* Added `rotateBefore,`rb` to rotate image a certain angle before processing.
|
||||||
* Added `rotateAfter,`ra` to rotate image a certain angle after processing.
|
* Added `rotateAfter,`ra` to rotate image a certain angle after processing.
|
||||||
* Cleaned up code formatting, removed trailing spaces.
|
* Cleaned up code formatting, removed trailing spaces.
|
||||||
|
@@ -128,7 +128,7 @@ $verbose = getDefined(array('verbose', 'v'), true, false);
|
|||||||
$srcImage = get('src')
|
$srcImage = get('src')
|
||||||
or errorPage('Must set src-attribute.');
|
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.');
|
or errorPage('Filename contains invalid characters.');
|
||||||
|
|
||||||
verbose("src = $srcImage");
|
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.
|
* Set default timezone, it defaults to UTC if not specified otherwise.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user