|
|
@ -46,7 +46,7 @@ if (isset($_GET['secret']) && $_GET['secret'] === REGISTRATION_PASSWORD) {
|
|
|
|
curl_setopt($ch, CURLOPT_URL, SYNAPSE_URL.'/_matrix/client/v3/rooms/'.ROOM_ID.'/send/m.room.message/'.filter_var($_POST['nonce'], FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
|
|
|
curl_setopt($ch, CURLOPT_URL, SYNAPSE_URL.'/_matrix/client/v3/rooms/'.ROOM_ID.'/send/m.room.message/'.filter_var($_POST['nonce'], FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
|
|
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
|
|
|
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
|
|
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
|
|
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
|
|
|
|
'body' => '@'.$username.':imninja.net just registered',
|
|
|
|
'body' => '@'.$username.':imninja.net just tried to register',
|
|
|
|
'msgtype' => 'm.text'
|
|
|
|
'msgtype' => 'm.text'
|
|
|
|
]));
|
|
|
|
]));
|
|
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
|
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
|
|
@ -60,6 +60,7 @@ if (isset($_GET['secret']) && $_GET['secret'] === REGISTRATION_PASSWORD) {
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# actual registration
|
|
|
|
$content = [
|
|
|
|
$content = [
|
|
|
|
'nonce' => $_POST['nonce'],
|
|
|
|
'nonce' => $_POST['nonce'],
|
|
|
|
'username' => $username,
|
|
|
|
'username' => $username,
|
|
|
|