Implemented: editor uploads are constrained to safe image files inside

the upload tree, and public form submissions are
size-bounded and rate-limited
This commit is contained in:
2026-11-30 16:51:15 +01:00
parent e1767dcd2c
commit 25030638a4
11 changed files with 417 additions and 23 deletions
+8 -1
View File
@@ -1,7 +1,14 @@
<?php
$handler = new \Plugi\Extensions\Form\SubmissionHandler();
$result = $handler->handle($_GET['id'] ?? null, file_get_contents('php://input') ?: '');
$rawData = file_get_contents(
'php://input',
false,
null,
0,
\Plugi\Extensions\Form\SubmissionHandler::MAX_REQUEST_BYTES + 1
);
$result = $handler->handle($_GET['id'] ?? null, is_string($rawData) ? $rawData : '');
http_response_code($result['status']);
header('Content-Type: application/json; charset=utf-8');