diff options
author | pickupman <jomcfred@gmail.com> | 2012-08-19 21:33:43 +0200 |
---|---|---|
committer | pickupman <jomcfred@gmail.com> | 2012-08-19 21:33:43 +0200 |
commit | 07cdcf8bb2af1c18aa93ea3c39bee8dcdf7d047e (patch) | |
tree | 8c0b4899b0e12b817da975916419824a37c5e654 /system/helpers/captcha_helper.php | |
parent | 0f8a7930fef43f26a856035be1922577722bf51e (diff) |
Fixes issue #1678
Diffstat (limited to 'system/helpers/captcha_helper.php')
-rw-r--r-- | system/helpers/captcha_helper.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index a4383c9d3..57ef9e2fa 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -80,8 +80,7 @@ if ( ! function_exists('create_captcha')) $current_dir = @opendir($img_path); while ($filename = @readdir($current_dir)) { - if ($filename !== '.' && $filename !== '..' && $filename !== 'index.html' - && (str_replace('.jpg', '', $filename) + $expiration) < $now) + if (strpos($filename, ".jpg") !== FALSE && (str_replace('.jpg', '', $filename) + $expiration) < $now) { @unlink($img_path.$filename); } |