From 864315d5f759c7ae040cf13d672a39d5f67cf522 Mon Sep 17 00:00:00 2001 From: Terence Eden Date: Sat, 16 Mar 2024 20:43:43 +0000 Subject: [PATCH] Fix sending --- index.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 6c57b5c..fcfceb4 100644 --- a/index.php +++ b/index.php @@ -791,8 +791,10 @@ die(); } // User Interface for Writing: - // This creates a basic HTML form. Type in your message and your password. It then POSTs the data to the `/send` endpoint. + // This creates a basic HTML form. Type in your message and your password. It then POSTs the data to the `/action/send` endpoint. function write() { + $send = "/action/send"; + if ( isset( $_GET["announce"] ) && filter_var( $_GET["announce"], FILTER_VALIDATE_URL ) ) { $announceURl = $_GET["announce"]; } else { @@ -823,7 +825,7 @@ echo <<< HTML
Send a message -
+

@@ -840,7 +842,7 @@ echo <<< HTML
Like a post - +
@@ -851,7 +853,7 @@ echo <<< HTML
Boost a post - +
@@ -875,7 +877,7 @@ HTML; global $password, $server, $username, $key_private, $directories; // Does the posted password match the stored password? - if( $password != $_POST["password"] ) { die(); } + if( $password != $_POST["password"] ) { echo "Wrong password."; die(); } // What sort of message is being sent? $type = $_POST["type"];