Commits

patwork committed caf7640

Fix: codeigniter-reactor/199 cookie name was overwritten with token name

  • Participants
  • Parent commits 4c88c81

Comments (0)

Files changed (1)

File system/core/Security.php

 			}
 		}
 
-		// 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();