Anwiki CMS

Anwiki CMS : the first wiki/CMS dedicated to multilingual contents
| Tasklist |

FS#131 - Better detection for "potentially unsafe contents"

Attached to Project: Anwiki CMS
Opened by anw (anw) - Saturday, 18 September 2010, 16:06 GMT
Task Type Bug Report
Category Security
Status New
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version Anwiki 0.2.2
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

As suggested by trev, detection of "potentially unsafe contents" could be better:

A script tag isn't the only way to insert "dangerous content" into the page. Consider the following examples:

<img src="dummy" onerror="alert('dangerous code')" />
<object data="malicious.html" type="text/html"></object>
<meta http-equiv="refresh" content="15;url=malicious.html"/>
<div style="top: expression(alert('dangerous code'))" />
<a href="javascript:alert('dangerous code')">Click me</a>

Properly sanitizing HTML code takes a whole lot more effort, typically it is about whitelisting a certain set of tags and attributes as well as additional checks for attribute that could contain URLs. See for example http://hg.mozilla.org/mozilla-central/file/c1bb86ae655a/content/base/src/nsContentSink.cpp#l1728
This task depends upon

Loading...