Skip to content

Commit 6f520a5

Browse files
committed
Merge pull request #26 from ziadoz/patch-1
Fixed bug in CSRFGuard session checking code.
2 parents 5c55089 + 50efe4d commit 6f520a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Middleware/CsrfGuard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function call() {
5454
*/
5555
public function check() {
5656
// Create token
57-
if ( session_id() === "" ){
57+
if ( session_id() !== "" ){
5858
if ( ! isset( $_SESSION[ $this->key ] ) ){
5959
$_SESSION[ $this->key ] = sha1( serialize( $_SERVER ) . rand( 0, 0xffffffff ) );
6060
}

0 commit comments

Comments
 (0)