<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>26081</bug_id>
          
          <creation_ts>2014-06-13 06:25:39 +0000</creation_ts>
          <short_desc>Consider defining or mentioning the nonce attribute</short_desc>
          <delta_ts>2015-08-30 01:40:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          <see_also>https://github.com/whatwg/html/pull/49</see_also>
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#the-style-element</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2020 Q1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>dveditz</cc>
    
    <cc>hillbrad</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>mkwst</cc>
    
    <cc>w3c</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>107768</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-06-13 06:25:39 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html
Multipage: http://www.whatwg.org/C#the-style-element
Complete: http://www.whatwg.org/c#the-style-element
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
Consider defining or mentioning the nonce attribute

Posted from: 77.57.114.66 by annevk@annevk.nl
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:33.0) Gecko/20100101 Firefox/33.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107769</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-06-13 06:26:46 +0000</bug_when>
    <thetext>It&apos;s in https://w3c.github.io/webappsec/specs/content-security-policy/#script-src-the-nonce-attribute on &lt;style&gt; and &lt;script&gt;.

Having HTML attributes defined in HTML seems better. We should at least keep a complete list somewhere outside of browsers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107794</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-06-13 18:31:32 +0000</bug_when>
    <thetext>what are the authoring and UA conformance requirements?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109630</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-07-31 07:38:19 +0000</bug_when>
    <thetext>I&apos;m not sure. Just trying to keep the list of HTML attributes we support in a single place. Mike or Daniel should know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109666</commentid>
    <comment_count>4</comment_count>
    <who name="Daniel Veditz">dveditz</who>
    <bug_when>2014-07-31 15:04:01 +0000</bug_when>
    <thetext>Could it be defined by external reference to the CSP spec? I agree it would help authors to have a complete list of attributes in one place but I don&apos;t think we want duplicate definitions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109671</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-07-31 15:29:57 +0000</bug_when>
    <thetext>The definition should only be in one place, certainly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109672</commentid>
    <comment_count>6</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2014-07-31 15:31:33 +0000</bug_when>
    <thetext>It&apos;s currently defined at http://www.w3.org/TR/CSP2/#script-src-the-nonce-attribute

What should we add to that to make the requirements clear?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109723</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-07-31 23:20:03 +0000</bug_when>
    <thetext>Pointing to that is probably sufficient, though maybe we should move the IDL stuff from CSP to HTML entirely, since that&apos;s not really what CSP is about anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111208</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-08 22:58:43 +0000</bug_when>
    <thetext>Looking at this more closely, I realise that this integrates pretty closely with the &lt;script&gt; processing algorithm. It seems like the right solution here would be to put the logic in the HTML spec, and have the CSP spec provide a hook by which the nonce and hash values can be obtained for checking. Is that a plausible plan?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111241</commentid>
    <comment_count>9</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2014-09-09 09:13:56 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #8)
&gt; Looking at this more closely, I realise that this integrates pretty closely
&gt; with the &lt;script&gt; processing algorithm. It seems like the right solution
&gt; here would be to put the logic in the HTML spec, and have the CSP spec
&gt; provide a hook by which the nonce and hash values can be obtained for
&gt; checking. Is that a plausible plan?

Sure. Happy to make that change in the CSP spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111242</commentid>
    <comment_count>10</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2014-09-09 09:14:44 +0000</bug_when>
    <thetext>Sorry, hit submit too quickly: what would you like such a hook to provide? Just a sequence of string values you could compare against?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111274</commentid>
    <comment_count>11</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-09 15:55:14 +0000</bug_when>
    <thetext>Yeah, probably. There&apos;s no attempt to map specific elements to specific strings right? There&apos;s just a list of nonces and a list of hashes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111337</commentid>
    <comment_count>12</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2014-09-10 10:45:51 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #11)
&gt; Yeah, probably. There&apos;s no attempt to map specific elements to specific
&gt; strings right? There&apos;s just a list of nonces and a list of hashes?

I think you&apos;ll need the following:

* Valid nonces for script
* Valid nonces for style
* Pairs of (algorithm, hash) for script
* Pairs of (algorithm, hash) for style

See https://w3c.github.io/webappsec/specs/content-security-policy/#source-list-valid-nonces and https://w3c.github.io/webappsec/specs/content-security-policy/#source-list-valid-hashes for the currently defined algorithms for nonces and hashes respectively.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112966</commentid>
    <comment_count>13</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-10-10 18:12:56 +0000</bug_when>
    <thetext>I think for now I&apos;m going to punt on this. The way it&apos;s specified works, this would just be editorial.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114689</commentid>
    <comment_count>14</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-11-07 21:43:17 +0000</bug_when>
    <thetext>Let me know if there&apos;s an important reason to prioritise this earlier.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122899</commentid>
    <comment_count>15</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2015-08-30 01:40:30 +0000</bug_when>
    <thetext>Moved to https://github.com/whatwg/html/pull/49</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>