|
|
|
@ -48,6 +48,11 @@ if (isset($_GET['secret']) && $_GET['secret'] === REGISTRATION_PASSWORD) {
|
|
|
|
|
];
|
|
|
|
|
$content['mac'] = hash_hmac('sha1', $content['nonce']."\0".$content['username']."\0".$content['password']."\0".$content['admin'], REGISTRATION_SHARED_SECRET);
|
|
|
|
|
|
|
|
|
|
# debug
|
|
|
|
|
echo '<!--';
|
|
|
|
|
var_dump($content);
|
|
|
|
|
echo '-->';
|
|
|
|
|
|
|
|
|
|
$ch = curl_init();
|
|
|
|
|
curl_setopt($ch, CURLOPT_URL, SYNAPSE_URL.'/_synapse/admin/v1/register');
|
|
|
|
|
curl_setopt($ch, CURLOPT_POST, true);
|
|
|
|
|