Last modified: 2008-08-31 17:11:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17392, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15392 - Use $wgUrlProtocols API protocol whitelist
Use $wgUrlProtocols API protocol whitelist
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.14.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-31 14:29 UTC by Platonides
Modified: 2008-08-31 17:11 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch using $wgUrlProtocols in the API (1.08 KB, patch)
2008-08-31 14:29 UTC, Platonides
Details

Description Platonides 2008-08-31 14:29:52 UTC
Created attachment 5232 [details]
Patch using $wgUrlProtocols in the API

formatHTML() uses a protocol whitelist to avoid protocol injections (such as javascript:, see r17105).
However, this list is arbitrary. It should be detecting the same protocols accepted into the wiki ie. $wgUrlProtocols
Comment 1 Bryan Tong Minh 2008-08-31 16:52:45 UTC
Why was ://.*? replaced by .*? in preg_replace?
Comment 2 Platonides 2008-08-31 17:01:04 UTC
Because $wgUrlProtocols already contains the :// for the which need it (it also has protocols, such as mailto: which don't have slashes, i think supporting them is also ok).
Comment 3 Bryan Tong Minh 2008-08-31 17:11:59 UTC
Patch committed in r40278.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links