php - Can i remove the csfr thing so it would work? Or must i have it there to work? -
code:
error_reporting(e_all); include("gameengine/account.php"); if(isset($_get['del_cookie'])) { setcookie("cookusr","",time()-3600*24,"/"); header("location: login.php"); } if(!isset($_cookie['cookusr'])) { $_cookie['cookusr'] = ""; } if ( $_server[ 'request_method' ] == 'post' ) { if ( !isset( $_session[ 'csrf' ] ) || $_session[ 'csrf' ] !== $_post[ 'csrf' ] ) throw new runtimeexception( 'csrf attack' ); } $key = sha1( microtime() ); $_session[ 'csrf' ] = $key;
error:
( ! ) fatal error: uncaught exception 'runtimeexception' message 'csrf attack' in c:\wamp64\www\login.php on line 26 ( ! ) runtimeexception: csrf attack in c:\wamp64\www\login.php on line 26 call stack # time memory function location 1 0.0010 278680 {main}( ) ...\login.php:0
Comments
Post a Comment