Welcome Guest, Not a member yet? Register   Sign In
CSRF and Browser Cookie Settings
#5

(11-18-2017, 09:38 AM)skunkbad Wrote: I never use CodeIgniter's CSRF protection feature. I ended up making my own and using a rotating array of tokens. It helped solve some problems for me. It is part of Community Auth. See the library here:

https://bitbucket.org/skunkbad/community...ew-default

Checking if request is good as needed:

PHP Code:
if( $this->tokens->match ){
    // ...


Get a token manually:


PHP Code:
$token $this->tokens->token(); 


I extended the form helper too so that my token is injected into the form by form_open. That'd be located here:

https://bitbucket.org/skunkbad/community...ew-default

Thanks Skunkbad, I actually already use Community Auth on my site for autentication. I see that the Token class is present (Form Tokens Library - V1.0.2). I will give this a try.

So, is there a manual on how to implement and start using this class in place of CSRF?
Reply


Messages In This Thread
RE: CSRF and Browser Cookie Settings - by PaulD - 11-18-2017, 05:34 AM
RE: CSRF and Browser Cookie Settings - by Narf - 11-19-2017, 05:29 AM
RE: CSRF and Browser Cookie Settings - by reesethebeast - 11-18-2017, 10:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB