Update upload.php

This commit is contained in:
Go Johansson 2022-12-24 18:12:50 +01:00
parent c8a58be885
commit 928e83e1ab
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@
$response->error(400, 'No input file(s)'); $response->error(400, 'No input file(s)');
} }
if (isset($_GET['output']) and !empty($_GET['output'])) { if (isset($_GET['output']) and !empty($_GET['output'])) {
$resType = filter_var($_GET['output'], FILTER_SANITIZE_SPECIAL_CHARS); $resType = strtolower(preg_replace('/[^a-zA-Z]/', '', $_GET['output']));
} else { } else {
$resType = 'json'; $resType = 'json';
} }