diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2008-09-21 21:06:53 +0200 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2008-09-21 21:06:53 +0200 |
commit | 3204f1f9c5dc0fe687e824fa4ff1816484b8a18f (patch) | |
tree | 927c08a7713e4acc8a4725b2422e8b1d4282cfe8 | |
parent | 53b70e19ae8685a95a5d6b7651746279d350407e (diff) |
removed a call to the validation class, as it's overkill for a simple preg_match
-rw-r--r-- | system/libraries/Encrypt.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php index 6d0735a09..aabf90d08 100644 --- a/system/libraries/Encrypt.php +++ b/system/libraries/Encrypt.php @@ -141,9 +141,7 @@ class CI_Encrypt { {
$key = $this->get_key($key);
- $this->CI->load->library('validation');
-
- if ($this->CI->validation->valid_base64($string) === FALSE)
+ if ( ! preg_match('/[^a-zA-Z0-9\/\+=]/', $string))
{
return FALSE;
}
|