From 52da5f834bf0da69ec2d6d54133894295da27675 Mon Sep 17 00:00:00 2001 From: lookshe Date: Sat, 4 Jan 2025 22:31:03 +0100 Subject: [PATCH] disable check of content type implementation to determine content type of files in android/java differ from php .amr files do not work example: http://up.picn.de/files/56e2d7b9-9847-4596-803c-e5b37f9b089f/good%20bad%20ugly.amr --- storage-backend/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage-backend/index.php b/storage-backend/index.php index 3dd9a8f..41bf84a 100644 --- a/storage-backend/index.php +++ b/storage-backend/index.php @@ -147,7 +147,7 @@ switch ($method) { } // check actual mime type with registered mime type $uploadedContentType = mime_content_type($uploadFilePath); - if (!is_null($slotParameters['content_type']) && !empty($slotParameters['content_type']) && $uploadedContentType != $slotParameters['content_type']) { + if (false && !is_null($slotParameters['content_type']) && !empty($slotParameters['content_type']) && $uploadedContentType != $slotParameters['content_type']) { unlink($uploadFilePath); sendHttpReturnCodeAndJson(403, "Uploaded file content type differs from requested slot content type."); }