Skip to content

Commit 021e3ae

Browse files
linnan-githubapasel422
authored andcommitted
Check with source time for rate-limits on trigger registrations (#1502)
Co-authored-by: Andrew Paseltiner <[email protected]>
1 parent fbbff29 commit 021e3ae

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

index.bs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3874,22 +3874,20 @@ To <dfn>check if an aggregatable attribution report should be unconditionally se
38743874

38753875
<h3 id="should-block-attribution-for-rate-limits">Should attribution be blocked by rate limits</h3>
38763876

3877-
To <dfn>check if attribution should be blocked by attribution rate limit</dfn> given an [=attribution trigger=] |trigger|, an [=attribution source=] |sourceToAttribute|, and a [=attribution rate-limit record/scope=] |rateLimitScope|:
3877+
To <dfn>check if attribution should be blocked by attribution rate limit</dfn> given an [=attribution rate-limit record=] |newRecord|:
38783878

38793879
1. Let |matchingRateLimitRecords| be all [=attribution rate-limit records=] |record| of [=attribution rate-limit cache=] where all of the following are true:
3880-
* |record|'s [=attribution rate-limit record/scope=] is |rateLimitScope|
3881-
* |record|'s [=attribution rate-limit record/source site=] and |sourceToAttribute|'s [=attribution source/source site=] are equal
3882-
* |record|'s [=attribution rate-limit record/attribution destination=] and |trigger|'s [=attribution trigger/attribution destination=] are equal
3883-
* |record|'s [=attribution rate-limit record/reporting origin=] and |trigger|'s [=attribution trigger/reporting origin=] are [=same site=]
3884-
* |record|'s [=attribution rate-limit record/time=] is greater than [=attribution rate-limit window=] before |trigger|'s [=attribution trigger/trigger time=]
3880+
* |record|'s [=attribution rate-limit record/scope=] is |newRecord|'s [=attribution rate-limit record/scope=]
3881+
* |record|'s [=attribution rate-limit record/source site=] and |newRecord|'s [=attribution rate-limit record/source site=] are equal
3882+
* |record|'s [=attribution rate-limit record/attribution destination=] and |newRecord|'s [=attribution rate-limit record/attribution destination=] are equal
3883+
* |record|'s [=attribution rate-limit record/reporting origin=] and |newRecord|'s [=attribution rate-limit record/reporting origin=] are [=same site=]
3884+
* |record|'s [=attribution rate-limit record/time=] is greater than [=attribution rate-limit window=] before |newRecord|'s [=attribution rate-limit record/time=]
38853885
1. If |matchingRateLimitRecords|'s [=list/size=] is greater than or equal to [=max attributions per rate-limit window=], return <strong>blocked</strong>.
38863886
1. Return <strong>allowed</strong>.
38873887

3888-
To <dfn>check if attribution should be blocked by rate limits</dfn> given an [=attribution trigger=] |trigger|, an [=attribution source=]
3889-
|sourceToAttribute|, and an [=attribution rate-limit record=] |newRecord|:
3888+
To <dfn>check if attribution should be blocked by rate limits</dfn> given an [=attribution rate-limit record=] |newRecord|:
38903889

3891-
1. If the result of running [=check if attribution should be blocked by attribution rate limit=] with |trigger|, |sourceToAttribute|,
3892-
and |newRecord|'s [=attribution rate-limit record/scope=] is <strong>blocked</strong>:
3890+
1. If the result of running [=check if attribution should be blocked by attribution rate limit=] with |newRecord| is <strong>blocked</strong>:
38933891
1. Let |debugDataType| be "<code>[=trigger debug data type/trigger-event-attributions-per-source-destination-limit=]</code>".
38943892
1. If |newRecord|'s [=attribution rate-limit record/scope=] is "<code>[=rate-limit scope/aggregatable-attribution=]</code>",
38953893
set |debugDataType| to "<code>[=trigger debug data type/trigger-aggregate-attributions-per-source-destination-limit=]</code>".
@@ -4190,7 +4188,7 @@ To <dfn>trigger event-level attribution</dfn> given an [=attribution trigger=] |
41904188
: [=attribution rate-limit record/entity ID=]
41914189
:: |report|'s [=event-level report/internal ID=]
41924190
1. If the result of running [=check if attribution should be blocked by rate limits=]
4193-
with |trigger|, |sourceToAttribute|, and |rateLimitRecord| is not null, return it.
4191+
with |rateLimitRecord| is not null, return it.
41944192
1. Let |numMatchingReports| be the number of entries in the [=event-level report cache=] whose
41954193
[=event-level report/attribution destinations=] [=set/contains=] |trigger|'s [=attribution trigger/attribution destination=].
41964194
1. If |numMatchingReports| is greater than or equal to the user agent's [=max event-level reports per attribution destination=]:
@@ -4271,8 +4269,7 @@ To <dfn>trigger aggregatable attribution</dfn> given an [=attribution trigger=]
42714269
: [=attribution rate-limit record/entity ID=]
42724270
:: null
42734271
1. If the result of running [=check if attribution should be blocked by rate limits=]
4274-
with |trigger|, |sourceToAttribute|, and |rateLimitRecord| is not null,
4275-
return it.
4272+
with |rateLimitRecord| is not null, return it.
42764273
1. If |sourceToAttribute|'s [=attribution source/number of aggregatable attribution reports=] value is equal to [=max aggregatable reports per source=][0] and |trigger|'s [=attribution trigger/trigger context ID=] is null, then:
42774274
1. Return the [=triggering result=] ("<code>[=triggering status/dropped=]</code>",
42784275
("<code>[=trigger debug data type/trigger-aggregate-excessive-reports=]</code>", null)).

0 commit comments

Comments
 (0)