This commit is contained in:
2026-04-18 14:18:52 +02:00
parent 5b4d3d435e
commit f3e5100d5d
126 changed files with 743 additions and 795 deletions

View File

@@ -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
);