mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-12 07:36:07 +00:00
feat: MD5 passwords exchanged for bcrypt ones
This commit is contained in:
@@ -85,7 +85,7 @@ else
|
||||
else
|
||||
{
|
||||
// Register them and build the village
|
||||
$uid = $database->register($userName, md5($password), $email, $tribe ,$act);
|
||||
$uid = $database->register($userName, password_hash($password, PASSWORD_BCRYPT, ['cost' => 12]), $email, $tribe ,$act);
|
||||
if($uid)
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -17,7 +17,7 @@ mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = (int) $_POST['admid'];
|
||||
$id = (int) $_POST['uid'];
|
||||
$pass = md5($_POST['newpw']);
|
||||
$pass = password_hash($_POST['newpw'], PASSWORD_BCRYPT, ['cost' => 12]);
|
||||
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
|
||||
Reference in New Issue
Block a user