Last modified: 2014-02-12 23:52:38 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 T34160, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32160 - MobileFrontend search suggestions formatting looks like it's full of XSS/HTML injection vectors
MobileFrontend search suggestions formatting looks like it's full of XSS/HTML...
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-02 22:47 UTC by Brion Vibber
Modified: 2014-02-12 23:52 UTC (History)
9 users (show)

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


Attachments

Description Brion Vibber 2011-11-02 22:47:07 UTC
This seems rather frightening...

			html = html + "<div class=\"suggestions-result\" rel=\"" + rel + "\" title=\"" + section.label + "\"><a class=\"sq-val-update\" href=\"javascript:sqValUpdate('" + section.label + "');\">+</a><a class=\"search-result-item\" href='" + section.value + "'>" + section.label + "</a></div>";

There's no HTML escaping on strings being placed into HTML output, nor any JavaScript escaping of strings being placed into JavaScript source code (which itself is being placed in HTML output).

Page titles can contain ", ', and things like onclick="blah blah" so you really need to be escaping your output before little bobby tables comes to play...
Comment 1 Patrick Reilly 2011-11-03 00:27:13 UTC
Fix for this issue is in r101761.

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


Navigation
Links