<?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>28961</bug_id>
          
          <creation_ts>2015-07-16 17:33:52 +0000</creation_ts>
          <short_desc>importScripts needs to consider the muted errors flag before propagating exceptions</short_desc>
          <delta_ts>2015-09-22 06:56:00 +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>
          
          
          <bug_file_loc>https://html.spec.whatwg.org/#importing-scripts-and-libraries</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>122153</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2015-07-16 17:33:52 +0000</bug_when>
    <thetext>Specification: https://html.spec.whatwg.org/multipage/workers.html
Multipage: https://html.spec.whatwg.org/multipage/#importing-scripts-and-libraries
Complete: https://html.spec.whatwg.org/#importing-scripts-and-libraries
Referrer: https://html.spec.whatwg.org/multipage/

Comment:
importScripts needs to consider the muted errors flag before propagating
exceptions

Posted from: 98.110.194.132
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:42.0) Gecko/20100101 Firefox/42.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122154</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2015-07-16 17:36:14 +0000</bug_when>
    <thetext>importScripts in a worker will rethrow exceptions caused by executing the script.

This gives it an attack vector that does not exist for &lt;script&gt; tags, which can only get at exceptions thrown by a random script&apos;s execution via window.onerror.  The spec has provisions for not leaking information to window.onerror: the muted errors flag.  But in the importScripts case, the caller of importScripts can simply catch the propagated exception and examine it.

What needs to happen is that in the cases when importScripts passes the muted errors flag to script creation it also needs to catch any exceptions thrown by the script and report generic exceptions to the caller in their place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123271</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-09-22 06:56:00 +0000</bug_when>
    <thetext>https://github.com/whatwg/html/pull/166</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>