From 42126e88ba1e3508e2c5a36e49c23bfaf4a4262c Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 12 Feb 2006 01:44:52 +0000 Subject: Implemented cookie HMAC check. --- framework/Security/TSecurityManager.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'framework/Security') diff --git a/framework/Security/TSecurityManager.php b/framework/Security/TSecurityManager.php index bc77c1b6..46ad4575 100644 --- a/framework/Security/TSecurityManager.php +++ b/framework/Security/TSecurityManager.php @@ -204,7 +204,7 @@ class TSecurityManager extends TModule * Validates if data is tampered. * @param string data to be validated. The data must be previously * generated using {@link hashData()}. - * @return string the real data with HMAC stripped off. Null if the data + * @return string the real data with HMAC stripped off. False if the data * is tampered. */ public function validateData($data) @@ -214,10 +214,10 @@ class TSecurityManager extends TModule { $hmac=substr($data,0,$len); $data2=substr($data,$len); - return $hmac===$this->computeHMAC($data2)?$data2:null; + return $hmac===$this->computeHMAC($data2)?$data2:false; } else - return null; + return false; } /** -- cgit v1.2.3