mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 13:45:42 +12:00
make hmac cross site login more secure
This commit is contained in:
parent
b2ce6be543
commit
1460c93d11
2 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ if(isset($_GET['CONNECT']))
|
|||
{
|
||||
$playerId = $_SESSION['PLAYER_ID'];
|
||||
|
||||
$hmac = hash_hmac('sha256', (string)$playerId, $hmac_secret."CrossSiteLogin");
|
||||
$hmac = hash_hmac('sha256', (string)$playerId, $hmac_secret."CrossSiteLogin".$_SERVER['REMOTE_ADDR'].date('m/d/Y'));
|
||||
$redirectUrl = $server['site'];
|
||||
|
||||
if(!endsWith($redirectUrl, '/'))
|
||||
|
|
|
@ -18,7 +18,7 @@ if(isset($_GET['SERVER']))
|
|||
{
|
||||
createAccountOnServer($server['database']);
|
||||
|
||||
$hmac = hash_hmac('sha256', (string)$playerId, $hmac_secret."CrossSiteLogin");
|
||||
$hmac = hash_hmac('sha256', (string)$playerId, $hmac_secret."CrossSiteLogin".$_SERVER['REMOTE_ADDR'].date('m/d/Y'));
|
||||
$redirectUrl = $server['site'];
|
||||
|
||||
if(!endsWith($redirectUrl, '/'))
|
||||
|
|
Loading…
Add table
Reference in a new issue