1
0
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:
David Todd 2014-10-20 20:36:15 -05:00
parent 3cc8511a91
commit f72ec8f685
No known key found for this signature in database
GPG Key ID: 48E847F18074C953

View File

@ -12,6 +12,8 @@
}
} 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;
?>
?>