Page MenuHomePhabricator

Unrecoverable Fatal Error on uploading certain .ico files
Closed, DuplicatePublic

Description

I have been testing migration from Bugzilla, and I seem to get errors when it comes to certain types of icon attachments. At first I thought it was only via API and was some base64 encoding issue or something but if I go to https://bugzilla.wikimedia.org/show_bug.cgi?id=40186 and download the Wiktionary Logo (mini).ico (1.84 KB, image/x-icon) attachment and try to upload it to any 3 of the phab instances I have at the moment get the same issue:

Screen_Shot_2014-11-17_at_11.58.03_AM.png (182×1 px, 26 KB)

Attachment should link direct: https://bugzilla.wikimedia.org/attachment.cgi?id=11105

This seems to happen for some, not sure if all, attachments of type .ico ( image/x-icon and image/icon)

Event Timeline

chasemp raised the priority of this task from to Needs Triage.
chasemp updated the task description. (Show Details)
chasemp added projects: Wikimedia, Files.
chasemp added a subscriber: chasemp.

I think we're trying to thumbnail these since they're marked as a viewable image, but gd doesn't support .ico.

See some similar discussion in T5258, T2479 (same issue, although less specific).

Removing these MIME types from files.image-mime-types and files.viewable-mime-types might work around the thumbnailing issue, at the cost of some features (like showing these images in diff views).

The workaround :)

files.viewable-mime-types

{ "image/jpeg" : "image/jpeg", "image/jpg" : "image/jpg", "image/png" : "image/png", "image/gif" : "image/gif", "text/plain" : "text/plain; charset=utf-8", "text/x-diff" : "text/plain; charset=utf-8", "image/vnd.microsoft.icon" : "image/x-icon", "audio/x-wav" : "audio/x-wav", "application/ogg" : "application/ogg", "audio/mpeg" : "audio/mpeg" }

files.image-mime-types

{ "image/jpeg" : true, "image/jpg" : true, "image/png" : true, "image/gif" : true, "image/vnd.microsoft.icon" : true }

Basically just removing icon/x-icon allows me to upload icon file happily :) They are, as expected, treated like normal files and not images, but if I download them I can view them fine.

Thanks @epriestley. Not sure whether to close this or leave open for future icon work?

I'll just merge this into T2479, which is very similar.

epriestley closed this task as a duplicate of Restricted Maniphest Task.Nov 17 2014, 7:11 PM