Comment #2 on issue 83 by excors: DOS vulnerability when using HTML5
Sanitization
http://code.google.com/p/html5lib/issues/detail?id=83
This problem affects the Python implementation too.
In the Python version, it looks like the problem is the line
if not re.match("^(\s*[-\w]+\s*:\s*[^:;]*(;|$))*$", style): return ''
which can seemingly take exponential time to run. (As an example, see
re.match("^(\s*[-\w]+\s*:\s*[^:;]*(;|$))*$", 'x: y; ' * 21)
which is really slow. The space at the end of the expression makes it not
match the
pattern, and so it does a load of backtracking and takes forever.)
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"html5lib-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/html5lib-discuss?hl=en-GB
-~----------~----~----~----~------~----~------~--~---