Skip to content

Commit 56fdd4c

Browse files
authored
Add extra constraints to report generation algorithm (#91)
- We don't need to downgrade a report to `dns` if it's already `dns`. - We don't need to follow the special `include_subdomains` logic if the report and policy have the same origin (i.e., if the policy would've still been used had `include_subdomains` not been set).
1 parent cc4ac39 commit 56fdd4c

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

index.html

+9-6
Original file line numberDiff line numberDiff line change
@@ -944,9 +944,10 @@ <h2>Generate a network error report</h2>
944944
</li>
945945

946946
<li>
947-
If <var>report body</var>'s <code>server_ip</code> property is
948-
non-empty, and not equal to <var>policy</var>'s <a>received IP
949-
address</a>:
947+
If <var>report body</var>'s <code>phase</code> property is not
948+
<code>dns</code>, and <var>report body</var>'s <code>server_ip</code>
949+
property is non-empty and not equal to <var>policy</var>'s <a>received
950+
IP address</a>:
950951

951952
<ol>
952953
<li>
@@ -983,9 +984,11 @@ <h2>Generate a network error report</h2>
983984
</li>
984985

985986
<li>
986-
If <var>policy</var>'s <a>subdomains</a> flag is <code>include</code>,
987-
and <var>request body</var>'s <code>phase</code> property is not
988-
<code>dns</code>, abort these steps.
987+
If <var>origin</var> is not equal to <var>policy</var>'s <a
988+
data-lt="policy origin">origin</a>, <var>policy</var>'s
989+
<a>subdomains</a> flag is <code>include</code>, and <var>report
990+
body</var>'s <code>phase</code> property is not <code>dns</code>,
991+
abort these steps.
989992
</li>
990993

991994
<li>

0 commit comments

Comments
 (0)