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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user