Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions application/include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,15 @@ function getRegistrationData($username, $password)
//From TrinityCore/AOWOW
function verifySRP6($user, $pass, $salt, $verifier)
{
$g = gmp_init(7);
$N = gmp_init('894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7', 16);
$x = gmp_import(
sha1($salt . sha1(strtoupper($user . ':' . $pass), TRUE), TRUE),
1,
GMP_LSW_FIRST
);
$v = gmp_powm($g, $x, $N);
return ($verifier === str_pad(gmp_export($v, 1, GMP_LSW_FIRST), 32, chr(0), STR_PAD_RIGHT));
$s = $salt;
if(get_config('server_core') == 5)
{
$s = pack("H*",strtolower($salt));
$v = strtoupper(bin2hex(calculateSRP6Verifier($user, $pass, $s)));
return ($verifier === $v);
}
$v = calculateSRP6Verifier($user, $pass, $s);
return ($verifier === $v);
}

// Get language text
Expand Down