]> jfr.im git - uguu.git/commitdiff
Update upload.php
authorGo Johansson <redacted>
Sat, 24 Dec 2022 17:12:50 +0000 (18:12 +0100)
committerGo Johansson <redacted>
Sat, 24 Dec 2022 17:12:50 +0000 (18:12 +0100)
src/static/php/upload.php

index 6d608009eacd5ac2bf32633af6c5b1debef5e086..ee6048ec6429a9627a25304aef290870fc0838be 100644 (file)
@@ -46,7 +46,7 @@
         $response->error(400, 'No input file(s)');
     }
     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 {
         $resType = 'json';
     }