From fb7eeef427351f4746ce8111ba91d18076680339 Mon Sep 17 00:00:00 2001 From: steering7253 Date: Wed, 24 Jun 2026 04:36:04 -0400 Subject: ignore non-posts (i.e. for missing files like favicon) --- upload.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/upload.php b/upload.php index 3c0c3a7..34c7668 100644 --- a/upload.php +++ b/upload.php @@ -6,6 +6,9 @@ if (isset($_GET['df'])) { system("df -h --output=avail / | tail -1"); exit; } +if ($_SERVER['REQUEST_METHOD'] != 'POST') { + exit; +} $c_t = strtolower($_SERVER['HTTP_CONTENT_TYPE'] ?? ''); if ($c_t == 'multipart/form-data' || 0 === strpos($c_t, 'multipart/form-data;')) { -- cgit v1.3.1-10-gc9f91