summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-08 11:01:52 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-08 11:01:52 +0100
commit5d27c43d29fc049497010ea62ac7877a64bfed92 (patch)
tree17d786d0dd1444b288dc6db1309ba679fc17cab5 /system/core
parentad9cd5938fe3c0859445e43c893c18ed172a33ce (diff)
Fix issue #940
Diffstat (limited to 'system/core')
-rwxr-xr-xsystem/core/Security.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/core/Security.php b/system/core/Security.php
index 6f25fb5bb..2bffa41b7 100755
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -138,8 +138,8 @@ class CI_Security {
*/
public function csrf_verify()
{
- // If no POST data exists we will set the CSRF cookie
- if (count($_POST) === 0)
+ // If it's not a POST request we will set the CSRF cookie
+ if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST')
{
return $this->csrf_set_cookie();
}