Last Comment Bug 598090 - Sync up the list of white-listed HTML tags and attributes in the sanitizing fragment sink with the HTML5 spec
: Sync up the list of white-listed HTML tags and attributes in the sanitizing f...
Status: RESOLVED FIXED
[tb31needed]
: html5
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal with 1 vote (vote)
: mozilla2.0b7
Assigned To: :Ehsan Akhgari (away Aug 1-5)
:
Mentors:
Depends on:
Blocks: CVE-2010-2769 596300
  Show dependency treegraph
 
Reported: 2010-09-20 11:16 PDT by :Ehsan Akhgari (away Aug 1-5)
Modified: 2011-01-03 14:38 PST (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
final+
.11+
.11-fixed
.14+
.14-fixed


Attachments
Patch (v1) (13.44 KB, patch)
2010-09-20 12:05 PDT, :Ehsan Akhgari (away Aug 1-5)
no flags Details | Diff | Splinter Review
Patch (v2) (13.28 KB, patch)
2010-09-20 12:46 PDT, :Ehsan Akhgari (away Aug 1-5)
bzbarsky: review+
bzbarsky: approval2.0+
christian: approval1.9.2.11+
christian: approval1.9.1.14+
Details | Diff | Splinter Review

Description :Ehsan Akhgari (away Aug 1-5) 2010-09-20 11:16:31 PDT
The list of tags and attributes that we use for the white-list used in the sanitizing fragment sink is out of date.  I'm filing this bug so that I can go through it and add any missing HTML5 tags/attrs in order for us to comply with HTML5.
Comment 2 :Ehsan Akhgari (away Aug 1-5) 2010-09-20 12:05:19 PDT
Created attachment 476876 [details] [diff] [review]
Patch (v1)
Comment 3 Boris Zbarsky [:bz] 2010-09-20 12:26:46 PDT
Is @autofocus safe?

Is @form safe if it points outside the editable area?  What about the other @form* attributes?

What about @radiogroup?

Not sure what @pattern, @optimum, @scoped really do.
Comment 4 :Ehsan Akhgari (away Aug 1-5) 2010-09-20 12:40:45 PDT
(In reply to comment #3)
> Is @autofocus safe?

Yes, it doesn't run any scripts.

> Is @form safe if it points outside the editable area?  What about the other
> @form* attributes?

Hmm, good point.  I think we should not allow those attributes...  Will submit a new patch soon.

> What about @radiogroup?

Looks safe to me.

> Not sure what @pattern, @optimum, @scoped really do.

@pattern allows one to specify the valid patterns of text that an input control accepts.  @optimum allows one to specify the optimum value in the gague for a <meter> element.  @scoped allows one to specify that a <style> element only affects its parent subtree.  We don't generally allow the style element, so this is useless most of the time, except when we specifically allow the paranoid fragment sink to accept <style> elements, which would cause this to come to play.
Comment 5 :Ehsan Akhgari (away Aug 1-5) 2010-09-20 12:46:08 PDT
Created attachment 476891 [details] [diff] [review]
Patch (v2)

With @form* attributes removed.
Comment 6 Boris Zbarsky [:bz] 2010-09-20 13:11:10 PDT
Comment on attachment 476891 [details] [diff] [review]
Patch (v2)

r=me
Comment 7 :Ehsan Akhgari (away Aug 1-5) 2010-09-20 14:39:24 PDT
http://hg.mozilla.org/mozilla-central/rev/0fb87b689b2c
Comment 8 christian 2010-09-22 10:58:50 PDT
Comment on attachment 476891 [details] [diff] [review]
Patch (v2)

a=LegNeato for 1.9.2.11 and 1.9.1.14
Comment 11 Al Billings [:abillings] 2010-09-22 15:15:51 PDT
Is there going to be an automated test included with this?
Comment 12 :Ehsan Akhgari (away Aug 1-5) 2010-09-22 15:34:08 PDT
(In reply to comment #11)
> Is there going to be an automated test included with this?

Not really.  The benefit of automated tests here is very low, and the cost of creating one is actually really high (the number of possible combinations to test is scary).
Comment 13 Al Billings [:abillings] 2010-09-22 15:44:42 PDT
I know. Imagine having to test them all by hand because there is no automated test.
Comment 14 :Ehsan Akhgari (away Aug 1-5) 2010-09-22 16:01:26 PDT
As a way to test it, you can open a tab with data:text/html,<input autofocus value=test>, and another with http://www.mozilla.org/editor/midasdemo/.  In the former, click the body, Cmd+A and Cmd+C, then go to midasdemo and paste inside the editable area, then click View HTML Source and make sure that the autofocus attribute is there.

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