Skip to content

Commit 039c184

Browse files
orthaghtrasher
authored andcommitted
improve csrf token generation
1 parent 6dc5cb6 commit 039c184

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: inc/session.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ static public function getNewCSRFToken() {
11381138

11391139
if (empty($CURRENTCSRFTOKEN)) {
11401140
do {
1141-
$CURRENTCSRFTOKEN = md5(uniqid(rand(), true));
1141+
$CURRENTCSRFTOKEN = bin2hex(random_bytes(32));
11421142
} while ($CURRENTCSRFTOKEN == '');
11431143
}
11441144

0 commit comments

Comments
 (0)