Skip to content

Commit

Permalink
fixed token error : login
Browse files Browse the repository at this point in the history
  • Loading branch information
kujirahand committed Jun 26, 2024
1 parent 7018d44 commit d14c969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kona3engine/kona3lib.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -695,11 +695,11 @@ function kona3_getEditTokenForceUpdate($key = 'default') {
$sname = kona3_getEditTokenKeyName($key);
$sname_time = "{$sname}.time";
// update token
if (empty($kona3conf[$sname])) {
if (empty($kona3conf["{$sname}_token"])) {
$token = bin2hex(random_bytes(32));
$_SESSION[$sname] = $token;
$_SESSION[$sname_time] = time();
$kona3conf[$sname] = $token;
$kona3conf["{$sname}_token"] = $token;
}
return $kona3conf[$sname];
}
Expand Down

0 comments on commit d14c969

Please sign in to comment.