Pint
This commit is contained in:
@@ -14,8 +14,8 @@ class MatrixRegistrationService
|
||||
// Get nonce from Synapse
|
||||
$nonceResponse = Http::get("$server/_synapse/admin/v1/register");
|
||||
|
||||
if (!$nonceResponse->ok()) {
|
||||
throw new \Exception("Could not fetch nonce from Matrix.");
|
||||
if (! $nonceResponse->ok()) {
|
||||
throw new \Exception('Could not fetch nonce from Matrix.');
|
||||
}
|
||||
|
||||
$nonce = $nonceResponse->json()['nonce'];
|
||||
@@ -23,10 +23,10 @@ class MatrixRegistrationService
|
||||
// Generate MAC
|
||||
$mac = hash_hmac(
|
||||
'sha1',
|
||||
$nonce . "\0" .
|
||||
$username . "\0" .
|
||||
$password . "\0" .
|
||||
"notadmin",
|
||||
$nonce."\0".
|
||||
$username."\0".
|
||||
$password."\0".
|
||||
'notadmin',
|
||||
$secret
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user