summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2008-09-21 21:06:53 +0200
committerRick Ellis <rick.ellis@ellislab.com>2008-09-21 21:06:53 +0200
commit3204f1f9c5dc0fe687e824fa4ff1816484b8a18f (patch)
tree927c08a7713e4acc8a4725b2422e8b1d4282cfe8
parent53b70e19ae8685a95a5d6b7651746279d350407e (diff)
removed a call to the validation class, as it's overkill for a simple preg_match
-rw-r--r--system/libraries/Encrypt.php4
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;
}