diff options
author | xue <> | 2006-02-12 01:44:52 +0000 |
---|---|---|
committer | xue <> | 2006-02-12 01:44:52 +0000 |
commit | 42126e88ba1e3508e2c5a36e49c23bfaf4a4262c (patch) | |
tree | f29b10f0e58a5d09592232363d34a9d5ed51c8d1 /framework/Security/TSecurityManager.php | |
parent | 9c559fd4e87a208a460255703d9b050988e12775 (diff) |
Implemented cookie HMAC check.
Diffstat (limited to 'framework/Security/TSecurityManager.php')
-rw-r--r-- | framework/Security/TSecurityManager.php | 6 |
1 files changed, 3 insertions, 3 deletions
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;
}
/**
|