From cbadf5f2010dcc1d0bcdc06495e2eb6815c9db25 Mon Sep 17 00:00:00 2001 From: lub Date: Sun, 3 Aug 2025 10:43:41 +0200 Subject: [PATCH] fix PUT requests --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index f605f3e..8a926c2 100644 --- a/index.php +++ b/index.php @@ -44,7 +44,7 @@ if (isset($_GET['secret']) && $_GET['secret'] === REGISTRATION_PASSWORD) { # send admin message $ch = curl_init(); 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_PUT, true); + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([ 'body' => '@'.$username.':imninja.net just registered', 'msgtype' => 'm.text'