Fix: codeigniter-reactor/199 cookie name was overwritten with token name
diff --git a/system/core/Security.php b/system/core/Security.php
index 73a3cfb..4f91572 100644
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -67,8 +67,10 @@
}
}
- // Append application specific cookie prefix to token name
- $this->_csrf_cookie_name = (config_item('cookie_prefix')) ? config_item('cookie_prefix').$this->_csrf_token_name : $this->_csrf_token_name;
+ // Append application specific cookie prefix
+ if (config_item('cookie_prefix')) {
+ $this->_csrf_cookie_name = config_item('cookie_prefix').$this->_csrf_cookie_name;
+ }
// Set the CSRF hash
$this->_csrf_set_hash();