Unverified Commit 72f3ab1c authored by Stefano Borzì's avatar Stefano Borzì Committed by GitHub
Browse files

Merge pull request #4 from masterking32/master

Update
parents 5bd6c14c fd1a4261
......@@ -51,6 +51,8 @@ $config['battlenet_support'] = false;
/*===================================================================
If your core password encryption is SRP6, you need to enable it.
For last versions of the TrinityCore(3.3.5/master) you need to enable it. https://git.io/JJRH4 and https://git.io/JJrxq
Enable that if you use the last version of TC.
You need to enable the GMP extension for PHP.
=====================================================================*/
$config['srp6_support'] = false;
/*===================================================================
......
......@@ -287,7 +287,7 @@ class user
'id[=]' => $userinfo['id']
]);
} else {
if (verifySRP6($userinfo['username'], $_POST['old_password'], $userinfo['salt'], $userinfo['verifier'])) {
if (!verifySRP6($userinfo['username'], $_POST['old_password'], $userinfo['salt'], $userinfo['verifier'])) {
error_msg('Old password is not valid.');
return false;
}
......@@ -295,10 +295,7 @@ class user
list($salt, $verifier) = getRegistrationData(strtoupper($userinfo['username']), $_POST['password']);
database::$auth->update('account', [
'salt' => $salt,
'verifier' => $verifier,
'sessionkey' => '',
'v' => '',
's' => ''
'verifier' => $verifier
], [
'id[=]' => $userinfo['id']
]);
......@@ -370,7 +367,7 @@ class user
'id[=]' => $userinfo['id']
]);
} else {
if (verifySRP6($userinfo['username'], $_POST['old_password'], $userinfo['salt'], $userinfo['verifier'])) {
if (!verifySRP6($userinfo['username'], $_POST['old_password'], $userinfo['salt'], $userinfo['verifier'])) {
error_msg('Old password is not valid.');
return false;
}
......@@ -378,10 +375,7 @@ class user
list($salt, $verifier) = getRegistrationData(strtoupper($userinfo['username']), $_POST['password']);
database::$auth->update('account', [
'salt' => $salt,
'verifier' => $verifier,
'sessionkey' => '',
'v' => '',
's' => ''
'verifier' => $verifier
], [
'id[=]' => $userinfo['id']
]);
......@@ -512,9 +506,6 @@ class user
database::$auth->update('account', [
'salt' => $salt,
'verifier' => $verifier,
'sessionkey' => '',
'v' => '',
's' => '',
'restore_key' => '1'
], [
'id[=]' => $userinfo['id']
......@@ -546,9 +537,6 @@ class user
database::$auth->update('account', [
'salt' => $salt,
'verifier' => $verifier,
'sessionkey' => '',
'v' => '',
's' => '',
'restore_key' => '1'
], [
'id[=]' => $userinfo['id']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment