Welcome Guest, Not a member yet? Register   Sign In
CSRF makes problem on search page
#1

Hey guys,

I've created a search engine for my project and the CSRF_protection is TRUE for whole project.
At the menu bar i have login and signup button, which is needs CSRF to of the action.

I've disable the CSRF for search page because users will search for few things then maybe user wants to click on previous button (from browser) to see the previous search. If CSRF be TRUE will show the error page and i don't want it.
i disable the CSRF for only search page like this:
PHP Code:
$last_segment explode('/'$_SERVER["REQUEST_URI"]);
if (
end($last_segment) === 'results')
    { 
        
$config['csrf_protection'] = FALSE
    }else{ 
        
$config['csrf_protection'] = TRUE
    } 

now after doing this my login and signup doesn't works because the CSRF is FALSE.

who can help me in this to have search "without" CSRF and login/signup "with" CSRF ?

Thanks
Reply


Messages In This Thread
CSRF makes problem on search page - by ardavan - 12-12-2015, 01:41 AM
RE: CSRF makes problem on search page - by scion - 12-13-2015, 05:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB