mirror of
https://git.sr.ht/~iwakuralain/text0Nly
synced 2025-07-27 15:36:11 +00:00
fixed something
This commit is contained in:
parent
8945109728
commit
f1a6426e22
@ -27,7 +27,7 @@ if (!$input) {
|
|||||||
$username = filter_var($input['username'] ?? '', FILTER_SANITIZE_STRING);
|
$username = filter_var($input['username'] ?? '', FILTER_SANITIZE_STRING);
|
||||||
$message = $input['message'] ?? '';
|
$message = $input['message'] ?? '';
|
||||||
$signature = $input['signature'] ?? '';
|
$signature = $input['signature'] ?? '';
|
||||||
$is_encrypted = !empty($input['encrypted']);
|
$is_encrypted = !empty($input['encrypted']) ? 1 : 0;
|
||||||
|
|
||||||
if (!$username || !$message) {
|
if (!$username || !$message) {
|
||||||
http_response_code(400);
|
http_response_code(400);
|
||||||
|
@ -21,7 +21,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||||||
$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);
|
$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);
|
||||||
$message = filter_input(INPUT_POST, 'message', FILTER_SANITIZE_STRING);
|
$message = filter_input(INPUT_POST, 'message', FILTER_SANITIZE_STRING);
|
||||||
$signature = $_POST['signature'] ?? '';
|
$signature = $_POST['signature'] ?? '';
|
||||||
$is_encrypted = isset($_POST['encrypted']);
|
$is_encrypted = isset($_POST['encrypted']) ? 1 : 0;
|
||||||
|
|
||||||
if ($username && $message) {
|
if ($username && $message) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user