Skip to content

Commit 8133ade

Browse files
committed
!isset($_REQUEST["csrf"]) is extra fail cond
1 parent a470daf commit 8133ade

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/headers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
$_SESSION["csrf"] = md5(uniqid(mt_rand(), true));
88
}
99

10-
if (($_GET || $_POST) && $_REQUEST["csrf"] !== $_SESSION["csrf"]) {
10+
if (($_GET || $_POST) && (!isset($_REQUEST["csrf"]) || $_REQUEST["csrf"] !== $_SESSION["csrf"])) {
1111
die("Bad CSRF token. Please report the error info at https://github.com/mattpass/ICEcoder so it can be fixed.<br><br>
1212
CSRF issue:<br>
1313
REQUEST: ".$_REQUEST["csrf"]."<br>

0 commit comments

Comments
 (0)