Last modified: 2014-02-12 23:35:48 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 T46262, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44262 - Magic word to escape HTML attributes
Magic word to escape HTML attributes
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.21.x
All All
: Low enhancement (vote)
: ---
Assigned To: Pavel Selitskas [wizardist]
http://lists.wikimedia.org/pipermail/...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-23 00:50 UTC by Pavel Selitskas [wizardist]
Modified: 2014-02-12 23:35 UTC (History)
3 users (show)

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


Attachments

Description Pavel Selitskas [wizardist] 2013-01-23 00:50:53 UTC
As long as HTML5 has been rolled out, data attributes are coming into our houses, and into Wikimedia projects too (at least, some people desire them).

There are some urlencoding magic words, but there is no specific magic words for HTML attributes. Should we have one, or if not, what can you suggest to use instead?

I'm not very confident with what should be escaped so that we don't worry much about its security. If no one is interested in _coding_, I can assign this to myself, but I'd like some security guidance (like this: <http://wonko.com/post/html-escaping>).
Comment 1 Chris Steipp 2013-01-23 01:31:00 UTC
This is probably the best list:
https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet#XSS_Prevention_Rules_Summary

This is general, so in our specific case we could probably get away with a different list. But this should probably be your target.
Comment 2 Matthew Flaschen 2013-01-23 02:25:14 UTC
This particular bug is orthogonal to which attributes to allow.  As far as escaping, that page says:

"HTML Attribute Encoding 	Except for alphanumeric characters, escape all characters with the HTML Entity &#xHH; format, including spaces. (HH = Hex Value)"

That's more escaping then I would expect but I have no reason to doubt it, and it shouldn't cause problems.

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


Navigation
Links