Skip to content

Commit

Permalink
Block access to 0.0.0.0
Browse files Browse the repository at this point in the history
Fixes #1117.
  • Loading branch information
annevk committed Jul 10, 2024
1 parent 4cb3cf2 commit ca2c938
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2744,8 +2744,15 @@ functionality.
<!-- Should we assert the scheme here to be an HTTP(S) scheme or a WebRTC scheme? -->

<ol>
<li><p>If <var>origin</var>'s <a for=origin>host</a> is an <a for=/>IP address</a>, then return
« <var>origin</var>'s <a for=origin>host</a> ».
<li>
<p>If <var>origin</var>'s <a for=origin>host</a> is an <a for=/>IP address</a>:

<ol>
<li><p>If <var>origin</var>'s <a for=origin>host</a> is <code>0.0.0.0</code>, then return
failure.

<li><p>Return « <var>origin</var>'s <a for=origin>host</a> ».
</ol>

<li><p>If <var>origin</var>'s <a for=origin>host</a>'s <a for=host>public suffix</a> is
"<code>localhost</code>" or "<code>localhost.</code>", then return « <code>::1</code>,
Expand Down

0 comments on commit ca2c938

Please sign in to comment.