When creating (or adding to) an issue it would be nice to include the Joomla systeminfo file.
In issue 'Add files' > browse to systeminfo_etc.json > file type not allowed.
browse to systeminfo_etc.txt > incorrect MIME-type.
Correctly attaching systeminfo-file.
In case of .json : file type not allowed
In case of .txt : incorrect MIME-type.
It is.
That's interesting - I have no problem adding it on my testing server.
Nor me locally.
Found the issue. At least in my case, the server is uploading it with a text/x-c++
MIME.
Labels |
Added:
server issue
|
Well I've added some logging to the uploader so now in the app.log we'll get some data on why uploads fail.
I've attached here the file I'm testing with (which is coming out of Joomla via the system info export feature). It uploads fine in GitHub and on my localhost. @b2z I couldn't upload it on your system, got the MIME error. So my guess is some kind of PHP or Apache setting is giving us issues, I just don't know what. I also filed a ticket with hosting to see if they have any ideas.
Interestingly enough, Joomla's LICENSE.txt file wouldn't upload either; that tried to upload with a text/x-pascal
MIME.
So, random question. Do we actually NEED the MIME type validation? https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/ seems to imply the answer is no.
It's the libmagic library that makes a difference. With it, uploads with different MIME types on .txt files is fine. Without it, basically whatever MIME the file has is what gets used in the end. So it's definitely environmental.
Now the issue is how do we deal with not having that library consistently available? The MIME validations we have are going to be too strict with what the CMS is exporting right now.
Lets drop the validation completely or for .txt
only?
For .txt I'd say skip it for the short term. The Joomla servers running PHP 5.6 have libmagic installed so they wouldn't hit this issue (and it looks like it might be a general PHP change between 5.5 and 5.6; all my 5.5 environments don't have that library yet 5.6 does). So once the server gets upgraded we're good.
Workaround merged.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-25 19:58:21 |
Closed_By | ⇒ | mbabker |
The application only supports uploads for what GitHub will support. GitHub doesn't support JSON files right now so that error's to be expected. Still looking on the TXT file issue.