1
0
mirror of https://github.com/gamaio/lobli.git synced 2024-12-22 19:52:40 +00:00

Reload page if token invalid

This isn't the most graceful way to do it, but better than nothing I guess.
This commit is contained in:
alopexc0de 2014-08-29 14:24:02 -04:00
parent cb3008536d
commit 298b2606ea
No known key found for this signature in database
GPG Key ID: 48E847F18074C953

View File

@ -87,9 +87,8 @@
} }
if(!$redis->exists("tokens:".$_SESSION['token']) || $redis->get("tokens:".$_SESSION['token']) == 1){ if(!$redis->exists("tokens:".$_SESSION['token']) || $redis->get("tokens:".$_SESSION['token']) == 1){
echo "<script>alert('Invalid or expired token. Please try again');</script>";
include("Include/PHP/token.php"); include("Include/PHP/token.php");
header("location:index.php"); echo "<script>window.location = \"index.php\";</script>";
} }
$redis->set("tokens:".$_SESSION['token'], 1); $redis->set("tokens:".$_SESSION['token'], 1);