Changed hash to a even more random hash

This commit is contained in:
Jeroen De Meerleer 2017-05-16 16:05:01 +02:00
parent 3e1f837e7b
commit c9e8b5fcd4
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6

View File

@ -75,7 +75,7 @@ elseif ($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION['userID'] = $user[0]['userID']; $_SESSION['userID'] = $user[0]['userID'];
if ($autologin = "autologin") { if ($autologin = "autologin") {
$autologin = hash("sha512", $user[0]["name"] . $user[0]["password"] . session_id()); $autologin = hash("sha512", time() . $user[0]["name"] . $user[0]["password"] . session_id());
setcookie("secure_auth", $autologin, time() + (60 * 60 * 24 * 365)); setcookie("secure_auth", $autologin, time() + (60 * 60 * 24 * 365));
setcookie("secure_auth_name", $user[0]["name"] , time() + (60 * 60 * 24 * 365)); setcookie("secure_auth_name", $user[0]["name"] , time() + (60 * 60 * 24 * 365));