Skip to content

Commit

Permalink
Sanitize classic script's base URL to about:blank when muted errors f…
Browse files Browse the repository at this point in the history
…lag is set

Fixes whatwg#5751.
  • Loading branch information
hiroshige-g committed Jul 22, 2020
1 parent d033d58 commit d2cadb6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -89218,6 +89218,18 @@ document.querySelector("button").addEventListener("click", bound);
<ol>
<li><p>If <var>muted errors</var> was not provided, let it be false.</p></li>

<li>
<p>If <var>muted errors</var> is true, then set <var>baseURL</var> to <code>about:blank</code>.
</p>

<p class="note">
When <var>muted errors</var> is true, <var>baseURL</var> is script's <span>CORS-cross-origin
</span> <span data-x="concept-response">response</span>'s <span data-x="concept-response-url">
url</span>, which shouldn't be exposed to JavaScript.
Therefore, <var>baseURL</var> is sanitized here.
</p>
</li>

<li><p>If <span data-x="concept-environment-noscript">scripting is disabled</span> for
<var>settings</var>, then set <var>source</var> to the empty string.</p></li>

Expand Down

0 comments on commit d2cadb6

Please sign in to comment.