This is designed for fresh installs and should be added to the original v3, for live sites see 2nd post
This updates the out dated passhash/md5 to PASSWORD_BCRYPT or PASSWORD_ARGON2I making passwords more secure
This code is BCRYPT but you can change in sql 7.3 to ARGON2I by replacing in edits
First in myphpadmin in user table stucture increase length from 40 to 255
[color=rgb(251, 160, 38)]backend/functions.php find[/color]
replace with
find
replace with
find
replace with
[color=rgb(251, 160, 38)]account-recover.php find[/color]
replace with
[color=rgb(251, 160, 38)]admin-modtasks.php find[/color]
replace with
[color=rgb(251, 160, 38)]account.php find[/color]
replace with
[color=rgb(251, 160, 38)]account-login.php[/color]
replace with
find
replace with
[color=rgb(251, 160, 38)]account-signup.php find[/color]
replace with
find
replace with
find
replace with
This updates the out dated passhash/md5 to PASSWORD_BCRYPT or PASSWORD_ARGON2I making passwords more secure
This code is BCRYPT but you can change in sql 7.3 to ARGON2I by replacing in edits
First in myphpadmin in user table stucture increase length from 40 to 255
[color=rgb(251, 160, 38)]backend/functions.php find[/color]
if (strlen($_COOKIE["pass"]) != 40 || !is_numeric($_COOKIE["uid"])) {replace with
if (strlen($_COOKIE["pass"]) != 60 || !is_numeric($_COOKIE["uid"])) {find
if (!$row || sha1($row["id"].$row["secret"].$row["password"].$ip.$row["secret"]) != $_COOKIE["pass"]) {replace with
$hash = $row["id"].$row["secret"].$row["password"].$ip.$row["secret"];
if (!$row || !password_verify($hash,$_COOKIE["pass"])){find
$hash = sha1($id.$secret.$password.getip().$secret);replace with
$hash = $id.$secret.$password.getip().$secret;
$hash = password_hash($hash, PASSWORD_BCRYPT);[color=rgb(251, 160, 38)]account-recover.php find[/color]
SQL_Query_exec("UPDATE `users` SET `password` = '".passhash($password)."', `secret` = $newsec WHERE `id`=".intval($_POST['id'])." AND MD5(`secret`) = ".sqlesc($_POST["secret"]));
replace with
$wantpassword = password_hash($password, PASSWORD_BCRYPT);
SQL_Query_exec("UPDATE `users` SET `password` = '".$wantpassword."', `secret` = $newsec WHERE `id`=".intval($_POST['id'])." AND MD5(`secret`) = ".sqlesc($_POST["secret"]));
[color=rgb(251, 160, 38)]admin-modtasks.php find[/color]
$password = passhash($password);replace with
$password = password_hash($password, PASSWORD_BCRYPT);[color=rgb(251, 160, 38)]account.php find[/color]
$chpassword = passhash($chpassword);replace with
$chpassword = password_hash($chpassword, PASSWORD_BCRYPT);[color=rgb(251, 160, 38)]account-login.php[/color]
$password = passhash($_POST["password"]);replace with
$password = $_POST["password"];find
if ( ! $row || $row["password"] != $password )replace with
if ( !$row || !password_verify($password,$row["password"]))[color=rgb(251, 160, 38)]account-signup.php find[/color]
$password_maxlength = 40;replace with
$password_maxlength = 60;find
$res = SQL_Query_exec("SELECT id FROM users WHERE id = $_REQUEST[invite] AND MD5(secret) = ".sqlesc($_REQUEST["secret"]));replace with
$res = SQL_Query_exec("SELECT id FROM users WHERE id = $_REQUEST[invite] AND secret = ".sqlesc($_REQUEST["secret"]));
find
$wantpassword = passhash($wantpassword);// hash the passwordreplace with
$wantpassword = password_hash($wantpassword, PASSWORD_BCRYPT); // hash the password
