summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar steering72532026-06-24 04:36:04 -0400
committerGravatar steering72532026-06-24 04:36:04 -0400
commitfb7eeef427351f4746ce8111ba91d18076680339 (patch)
tree8d64dd5e428624bd83b376ac999b2a6d3a6bbf3e
parentinit (diff)
ignore non-posts (i.e. for missing files like favicon)
-rw-r--r--upload.php3
1 files changed, 3 insertions, 0 deletions
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;')) {