Page MenuHomePhabricator

html upload fails even when extension .html is whitelisted
Closed, ResolvedPublic

Description

Author: chris

Description:
The UploadForm::Verify() method will still fail really basic html files, even
when the extension is whitelisted, removed from the blacklist, and file
extensions aren't checked nor strict. The only way to upload html files was to
comment out the $this->verify() section of SpecialUpload.php (lines 210-212).
I'm deploying this mediawiki on my corporate intranet, so all users are trusted.
There should be some way to express this trust in the user settings, without
commenting out useful code like verify().


Version: 1.17.x
Severity: normal

Details

Reference
bz1672

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 8:15 PM
bzimport set Reference to bz1672.
bzimport added a subscriber: Unknown Object (MLST).

avarab wrote:

I've done this recently in HEAD and REL1_4, please confirm whether or not the
problem persists.

Marking this as WORKSFORME.

There's still no way to disable UploadForm::detectScript() without commenting out code.

Adds a new global, $wgDisableUploadScriptChecks, which will disable the checks

Attached:

(In reply to comment #3)

Created an attachment (id=6233) [details]
Adds a new global, $wgDisableUploadScriptChecks, which will disable the checks

Cf bug 18684.

*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*

Modified patch committed in r103772.