Page MenuHomePhabricator

Unable to upload .woff and .woff2 files: "File extension .woff does not match the detected MIME type of the file"
Closed, ResolvedPublic

Description

I was directed here from Miraheze to file a task.

I am unable to upload .woff or .woff2 files to our Miraheze wiki. All other file types, including .ttf, are fine.

image.png (72×1 px, 20 KB)

image.png (72×1 px, 18 KB)

Thank you for any help.

Event Timeline

Restricted Application added subscribers: Reception123, Aklapper. · View Herald Transcript
Aklapper renamed this task from MIRAHEZE: Unable to upload .woff and .woff2 files to Unable to upload .woff and .woff2 files: "File extension .woff does not match the detected MIME type of the file".Jan 3 2024, 2:19 PM
Aklapper added a project: MediaWiki-Uploading.

Thanks for correcting the tagging @Aklapper.

I suspect this is the usual issue we've had and the MIME map needs updating.

Change 987739 had a related patch set uploaded (by RhinosF1; author: Richika Rana):

[mediawiki/core@REL1_40] mime: Add support for 'font/woff' and 'font/woff2' mime type

https://gerrit.wikimedia.org/r/987739

Thanks for pointing the patch. I've put a backport for 1.40 up so this can be fixed for earlier versions.

Change 987739 merged by jenkins-bot:

[mediawiki/core@REL1_40] mime: Add support for 'font/woff' and 'font/woff2' mime type

https://gerrit.wikimedia.org/r/987739

RhinosF1 claimed this task.

This has now been fixed in Wikimedia's codebase. I am closing this task as there is nothing further that should be tracked on Wikimedia Phabricator.

I have asked the Miraheze SRE team to pull the change into our repository but in a worse case this will land in the next MediaWiki security & maintenance update.