summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-06-28 13:03:48 +0200
committerAndrey Andreev <narf@devilix.net>2013-06-28 13:03:48 +0200
commitcd9797a210089ea65b4d4b16db051d06188b66ed (patch)
tree2239f27e8bfc79857d860c6e14c4dc24817c5b34 /system/libraries/Form_validation.php
parentb9e090e5f4ddb72aef6cf7f36cb17b842885d53e (diff)
Fix #2498
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 1ed50844c..40ba01202 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1405,7 +1405,7 @@ class CI_Form_validation {
*/
public function valid_base64($str)
{
- return ! preg_match('/[^a-zA-Z0-9\/\+=]/', $str);
+ return (base64_encode(base64_decode($str)) === $str);
}
// --------------------------------------------------------------------