Welcome Guest, Not a member yet? Register   Sign In
[resolved] CSRF Error in CodeIgniter 2.1.0
#1

[eluser]kirkaracha[/eluser]
If I submit a form with csrf_protection turned on in CI 2.1.0 I get an error: "The action you have requested is not allowed."

In config/config.php:
Code:
$config['csrf_protection'] = TRUE;

In my form view (not using form helper):
Code:
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name; ?>" value="<?php echo $this->security->get_csrf_hash; ?>" />

Errors reported in the log:
Code:
Severity: Notice  --> Undefined property: CI_Security::$get_csrf_token_name
Severity: Notice  --> Undefined property: CI_Security::$get_csrf_hash




Theme © iAndrew 2016 - Forum software by © MyBB