mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-12 23:56:08 +00:00
feat: MD5 passwords exchanged for bcrypt ones
This commit is contained in:
@@ -1542,6 +1542,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%users` (
|
||||
`vac_time` varchar(255) NULL DEFAULT '0',
|
||||
`vac_mode` int(2) NULL DEFAULT '0',
|
||||
`vactwoweeks` varchar(255) NULL DEFAULT '0',
|
||||
`is_bcrypt` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `invited` (`invited`),
|
||||
KEY `lastupdate` (`lastupdate`),
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
if(isset($_POST['mhpw'])) {
|
||||
$password = $_POST['mhpw'];
|
||||
mysqli_query($conn, "UPDATE " . TB_PREFIX . "users SET password = '" . md5($password) . "' WHERE username = 'Multihunter'");
|
||||
mysqli_query($conn, "UPDATE " . TB_PREFIX . "users SET password = '" . password_hash($password, PASSWORD_BCRYPT,['cost' => 12]) . "' WHERE username = 'Multihunter'");
|
||||
$wid = $admin->getWref(0, 0);
|
||||
$uid = 5;
|
||||
$status = $database->getVillageState($wid);
|
||||
|
||||
Reference in New Issue
Block a user