From cd9797a210089ea65b4d4b16db051d06188b66ed Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 28 Jun 2013 14:03:48 +0300 Subject: Fix #2498 --- system/libraries/Form_validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') 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); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b