diff options
author | Andrey Andreev <narf@devilix.net> | 2016-03-22 10:24:14 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-03-22 10:24:14 +0100 |
commit | eac4adfc24d1ad60af2bc3e08222ee7e5858f638 (patch) | |
tree | 70c58fc020c91f3d5f5fd6b5cc323bcb198802d5 /system/libraries | |
parent | 951a4d5c76a5b6403b40bcaff326cf8dbedcbca6 (diff) |
[ci skip] Validate width, height config values
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Image_lib.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index f594b7125..edd13372d 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -456,7 +456,7 @@ class CI_Image_lib { { if (property_exists($this, $key)) { - if (in_array($key, array('wm_font_color', 'wm_shadow_color'))) + if (in_array($key, array('wm_font_color', 'wm_shadow_color'), TRUE)) { if (preg_match('/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i', $val, $matches)) { @@ -478,6 +478,10 @@ class CI_Image_lib { continue; } } + elseif (in_array($key, array('width', 'height'), TRUE) && ! ctype_digit((string) $val)) + { + continue; + } $this->$key = $val; } |