make ppemu secure

This commit is contained in:
Bluzume 2021-08-09 19:58:55 +12:00
parent d5e5f03ef5
commit 2570a4702a
4 changed files with 21 additions and 7 deletions

View file

@ -8,7 +8,7 @@ function GenHmacMessage(string $data, string $channel)
echo("<h1>Set \$hmac_secret in config.php!</h1>");
exit();
}
$hmac = hash_hmac('sha256', $data, $hmac_secret.$channel.$_SERVER['REMOTE_ADDR'].date('mdYhi'));
$hmac = hash_hmac('sha256', $data, $hmac_secret.$channel.$_SERVER['REMOTE_ADDR'].date('mdy'));
return $hmac;
}