Page MenuHomePhabricator

This file contains HTML or script code that may be erroneously interpreted by a web browser
Closed, DeclinedPublic

Description

Author: camjsb7j9g

Description:
Wikimedia Commons reports "This file contains HTML or script code that may be erroneously interpreted by a web browser" on certain image uploads.

Example: [[:Commons:File:Shimon_Peres_-_World_Economic_Forum_on_the_Middle_East_2009.jpg]]

When I (and others) try to upload the original size image from [http://farm4.static.flickr.com/3314/3538858190_071e0a49bb_o.jpg] linked from http://www.flickr.com/photos/worldeconomicforum/3538858190/sizes/o/, then Wikimedia Commons always reports the above error. I believe this is a known problem but could not find a bugzilla report for it.


Version: unspecified
Severity: major

Details

Reference
bz23270

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:10 PM
bzimport set Reference to bz23270.
bzimport added a subscriber: Unknown Object (MLST).

camjsb7j9g wrote:

See http://commons.wikimedia.org/wiki/Commons:Village_pump#File:Shimon_Peres_-_World_Economic_Forum_on_the_Middle_East_2009.jpg

I had to remove all the markers from the JPG file before mediawiki upload would accept it. [[Bugzilla:16583]] "MIME type detection of "application/x-php" gives false positives on any file with "<?" in it" describes a similar problem, that might have the same cause as this one, except the first "<?" in the Shimon_Peres image does not appear until byte 16401. Note I have since uploaded two versions of the image.

camjsb7j9g wrote:

Note: this particular image file was finally uploaded together with its EXIF and IPTC data by manually editing the embedded HTML code: "<a href" and "</a>" changed to "[a href" and "[/a]" respectively. The first "<a href" occurred at byte 407.

Bryan.TongMinh wrote:

Unfortunately, Internet Explorer will detect this file as HTML and thus execute any containing scripts etc. Therefore we have to reject these files.