mirror of
https://github.com/gamaio/lobli.git
synced 2024-12-22 19:52:40 +00:00
Make generated tokens expire now.
These don't do anything other than slow down the requests by a little bit. They store no information and are not needed.
This commit is contained in:
parent
3cc8511a91
commit
f72ec8f685
@ -12,6 +12,8 @@
|
|||||||
}
|
}
|
||||||
} while(1);
|
} while(1);
|
||||||
|
|
||||||
$redis->set("tokens:$token", 0); // Store the token forever, when set to 1, don't allow token to be used anymore.
|
$now = time(null);
|
||||||
|
$redis->set("tokens:$token", 0); // Store the token, when set to 1, don't allow token to be used anymore.
|
||||||
|
$redis->expire("tokens:$token", $now+60) // Expire the token after 1 minute on the server
|
||||||
$_SESSION['token'] = $token;
|
$_SESSION['token'] = $token;
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user