Upload via GUI (396 Dateien)
This commit is contained in:
@@ -47,7 +47,10 @@ if (!$apiKey) {
|
||||
if ($method === 'POST') {
|
||||
if (!$apiKey['can_create_tickets']) public_api_fail(403, 'FORBIDDEN', 'Dieser Schlüssel darf keine Tickets anlegen.');
|
||||
$raw = file_get_contents('php://input') ?: '';
|
||||
if (strlen($raw) > 200000) public_api_fail(413, 'TOO_LARGE', 'Die Anfrage ist zu groß.');
|
||||
// Normale Anfragen höchstens 200 KB; mit Dateianhängen (Base64) mehr: bis zu 10 MB Dateien, Base64 macht rund ein Drittel mehr daraus
|
||||
if (strlen($raw) > 200000 && (strlen($raw) > 200000 + (int) (PUBLIC_ATTACHMENT_TOTAL_BYTES * 1.4) || !str_contains($raw, '"attachments"'))) {
|
||||
public_api_fail(413, 'TOO_LARGE', 'Die Anfrage ist zu groß.');
|
||||
}
|
||||
$body = json_decode($raw, true);
|
||||
if (!is_array($body)) public_api_fail(400, 'INVALID_JSON', 'Der Anfragekörper muss gültiges JSON sein.');
|
||||
if (($body['action'] ?? '') === 'resolve') {
|
||||
|
||||
Reference in New Issue
Block a user