summaryrefslogtreecommitdiffstats
path: root/system/core/Security.php
diff options
context:
space:
mode:
authorAlex Bilbie <alex@alexbilbie.com>2012-06-02 12:07:47 +0200
committerAlex Bilbie <alex@alexbilbie.com>2012-06-02 12:07:47 +0200
commited944a3c70a0bad158cd5a6ca5ce1f2e717aff5d (patch)
treeefe969ad1ab4c8eec3f9af743f49a51c82a13a93 /system/core/Security.php
parentf3b95d383806a9366de9a526a37d78287a09d8b6 (diff)
Replaced `==` with `===` and `!=` with `!==` in /system/core
Diffstat (limited to 'system/core/Security.php')
-rwxr-xr-xsystem/core/Security.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/core/Security.php b/system/core/Security.php
index 9b7ba5799..9cbcd9248 100755
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -162,7 +162,7 @@ class CI_Security {
// Do the tokens exist in both the _POST and _COOKIE arrays?
if ( ! isset($_POST[$this->_csrf_token_name]) OR ! isset($_COOKIE[$this->_csrf_cookie_name])
- OR $_POST[$this->_csrf_token_name] != $_COOKIE[$this->_csrf_cookie_name]) // Do the tokens match?
+ OR $_POST[$this->_csrf_token_name] !== $_COOKIE[$this->_csrf_cookie_name]) // Do the tokens match?
{
$this->csrf_show_error();
}
@@ -408,7 +408,7 @@ class CI_Security {
$str = preg_replace('#<(/*)(script|xss)(.*?)\>#si', '[removed]', $str);
}
}
- while($original != $str);
+ while($original !== $str);
unset($original);
@@ -475,7 +475,7 @@ class CI_Security {
*/
public function xss_hash()
{
- if ($this->_xss_hash == '')
+ if ($this->_xss_hash === '')
{
mt_srand();
$this->_xss_hash = md5(time() + mt_rand(0, 1999999999));
@@ -825,7 +825,7 @@ class CI_Security {
*/
protected function _csrf_set_hash()
{
- if ($this->_csrf_hash == '')
+ if ($this->_csrf_hash === '')
{
// If the cookie exists we will use it's value.
// We don't necessarily want to regenerate it with