Skip to content

Commit

Permalink
Fixed parenthesis mismatch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibaut Despoulain authored and Thibaut Despoulain committed Feb 26, 2012
1 parent c7255ca commit b48a6e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/nocsrf.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static function check( $key, $origin, $throwException=false, $timespan=nu
$_SESSION[ 'csrf_' . $key ] = null;

// Origin checks
if( self::$doOriginCheck && sha1( $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] ) != substr( base64_decode( $hash ), 10, 40 ) ) )
if( self::$doOriginCheck && sha1( $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] ) != substr( base64_decode( $hash ), 10, 40 ) )
{
if($throwException)
throw new Exception( 'Form origin does not match token origin.' );
Expand Down
2 changes: 1 addition & 1 deletion nocsrf.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static function check( $key, $origin, $throwException=false, $timespan=nu
$_SESSION[ 'csrf_' . $key ] = null;

// Origin checks
if( self::$doOriginCheck && sha1( $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] ) != substr( base64_decode( $hash ), 10, 40 ) ) )
if( self::$doOriginCheck && sha1( $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] ) != substr( base64_decode( $hash ), 10, 40 ) )
{
if($throwException)
throw new Exception( 'Form origin does not match token origin.' );
Expand Down

0 comments on commit b48a6e9

Please sign in to comment.