Validate chatroom report content

This commit is contained in:
Lncvrt committed 2025-09-09 22:49:06 -07:00
1 parent b3463ef5ec
commit 14f046f71a
1 file changed
+4
+4
View File
@@ -9,6 +9,10 @@ $reason = $post['reason'] ?? '';
$token = $post['token'] ?? '';
$username = $post['username'] ?? '';
if (!preg_match('/^[ a-zA-Z0-9!@#\$%\^&\*\(\)_\+\-=\[\]\{\};\':",\.<>\/\?\\\\|`~]+$/', $reason)) {
exitWithMessage(json_encode(["success" => false]));
}
$conn = newConnection();
$stmt = $conn->prepare("SELECT * FROM users WHERE token = ? AND username = ?");