Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
entrix
WoWSimpleRegistration
Commits
72f3ab1c
Unverified
Commit
72f3ab1c
authored
Aug 20, 2020
by
Stefano Borzì
Committed by
GitHub
Aug 20, 2020
Browse files
Merge pull request #4 from masterking32/master
Update
parents
5bd6c14c
fd1a4261
Changes
2
Hide whitespace changes
Inline
Side-by-side
application/config/config.php.sample
View file @
72f3ab1c
...
...
@@ -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
;
/*===================================================================
...
...
application/include/user.php
View file @
72f3ab1c
...
...
@@ -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'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment