Skip to content

Commit 2cb35d5

Browse files
committed
Check ranges
1 parent ddd0bc6 commit 2cb35d5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

api.bs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,7 +2080,7 @@ optional keys are populated the same way as the corresponding
20802080
<dd>
20812081
A [=structured header/string=] containing the [=potentially trustworthy URL=]
20822082
to which the resulting report, if any, will be `POST`ed. The URL may be
2083-
relative to the request URL, and its [=url/scheme=] must be "`http`" or "`https`".
2083+
relative to the response URL. Its [=url/scheme=] must be "`http`" or "`https`".
20842084
This key is required.
20852085
</dd>
20862086
</dl>
@@ -2096,7 +2096,7 @@ To <dfn noexport>parse a `Measure-Conversion` header</dfn> given a [=header valu
20962096
1. Let |aggregationService| be |dict|["<code>[=measure-conversion/aggregation-service=]</code>"] [=map/with default=] `undefined`.
20972097
1. If |aggregationService| is not a [=structured header/string=], return an error.
20982098
1. Let |histogramSize| be |dict|["<code>[=measure-conversion/histogram-size=]</code>"] [=map/with default=] `undefined`.
2099-
1. If |histogramSize| is not a positive [=structured header/integer=], return an error.
2099+
1. If |histogramSize| is not a positive [=structured header/integer=] in the [=32-bit unsigned integer=] range, return an error.
21002100
1. Let |reportUrlString| be |dict|["<code>[=measure-conversion/report-url=]</code>"] [=map/with default=] `undefined`.
21012101
1. If |reportUrlString| is not a [=structured header/string=], return an error.
21022102
1. Let |reportUrl| be the result of applying the [=URL parser=] to |reportUrlString|, with |baseUrl|.
@@ -2119,8 +2119,8 @@ To <dfn noexport>parse a `Measure-Conversion` header</dfn> given a [=header valu
21192119
1. If |dict|["<code>[=measure-conversion/match-values=]</code>"] [=map/exists=]:
21202120
1. Let |matchValues| be its [=map/value=].
21212121
1. If |matchValues| is not an [=structured header/inner list=], or if any of
2122-
|matchValues|' [=list/items=] is not a non-negative [=structured header/integer=],
2123-
return an error.
2122+
|matchValues|' [=list/items=] is not a [=structured header/integer=] in
2123+
the [=32-bit unsigned integer=] range, return an error.
21242124
1. Set |opts|.{{AttributionConversionOptions/matchValues}} to |matchValues|.
21252125
1. If |dict|["<code>[=measure-conversion/impression-sites=]</code>"] [=map/exists=]:
21262126
1. Let |impressionSites| be its [=map/value=].
@@ -2142,11 +2142,13 @@ To <dfn noexport>parse a `Measure-Conversion` header</dfn> given a [=header valu
21422142
1. Set |opts|.{{AttributionConversionOptions/credit}} to |credit|.
21432143
1. If |dict|["<code>[=measure-conversion/value=]</code>"] [=map/exists=]:
21442144
1. Let |value| be its [=map/value=].
2145-
1. If |value| is not a positive [=structured header/integer=], return an error.
2145+
1. If |value| is not a positive [=structured header/integer=] in the
2146+
[=32-bit unsigned integer=] range, return an error.
21462147
1. Set |opts|.{{AttributionConversionOptions/value}} to |value|.
21472148
1. If |dict|["<code>[=measure-conversion/max-value=]</code>"] [=map/exists=]:
21482149
1. Let |maxValue| be its [=map/value=].
2149-
1. If |maxValue| is not a positive [=structured header/integer=], return an error.
2150+
1. If |maxValue| is not a positive [=structured header/integer=] in the
2151+
[=32-bit unsigned integer=] range, return an error.
21502152
1. Set |opts|.{{AttributionConversionOptions/maxValue}} to |maxValue|.
21512153
1. Return (|opts|, |reportUrl|).
21522154

0 commit comments

Comments
 (0)