@@ -29,7 +29,7 @@ into all contexts with the extension's origin.
29
29
30
30
#### Use Cases
31
31
32
- Greater availability and beter ergonomics of Origin and Deprecation tokens.
32
+ Greater availability and better ergonomics of Origin and Deprecation tokens.
33
33
34
34
##### Participation in Origin and Deprecation Trials for Open Web APIs
35
35
@@ -41,15 +41,15 @@ legacy behaviors and deprecated APIs.
41
41
##### Creation of Origin and Deprecation Trials for WebExtension APIs
42
42
43
43
As of writing, WebExtension system does not have a convenient way of shipping
44
- changes to WebExtension APIs. In leu of Origin Trials framework browsers resort
44
+ changes to WebExtension APIs. In lieu of Origin Trials framework browsers resort
45
45
to workarounds (or their combination):
46
- - make the change backwards-compatiable , if possible, with perpetually
46
+ - make the change backwards-compatible , if possible, with perpetually
47
47
deprecated legacy behavior. This keeps around deprecated code paths and
48
- behaviors indefinitelly . This could be resolved via deprecation trials.
49
- - launch an enirely different API under a new name, keeping around the old
50
- code paths and behaviors indefinitelly .
48
+ behaviors indefinitely . This could be resolved via deprecation trials.
49
+ - launch an entirely different API under a new name, keeping around the old
50
+ code paths and behaviors indefinitely .
51
51
- launch a change to pre-release Canary/Nightly and Beta channels and
52
- and ask for developer feedback prior to launch to Stable. Some issues slip
52
+ ask for developer feedback prior to launch to Stable. Some issues slip
53
53
through this testing and get fossilized in the final API. This could be
54
54
resolved via origin trails.
55
55
- limit the change via allow- and block-lists specified at in browser source
@@ -93,33 +93,33 @@ Upon manifest parsing, browser should parse `trial_tokens` like so:
93
93
warnings
94
94
- browsers can limit the total number of parsed and/or accepted tokens
95
95
- browsers can limit the length of each token
96
- - browsers can limit the the total length of all parsed and/or accepted tokens
96
+ - browsers can limit the total length of all parsed and/or accepted tokens
97
97
- browsers can validate token structure, content, and signature at parse time;
98
- in particular, tokens should not contain conrol characters like new lines
99
- and charaxter returns which could affect HTTP header serealization and
98
+ in particular, tokens should not contain control characters like new lines
99
+ and charaxter returns which could affect HTTP header serialization and
100
100
parsing
101
101
102
102
#### Manifest parsing algorithm
103
103
1 . if ` trial_tokens ` is not present, return
104
104
2 . if ` trial_tokens ` is not an array or if ` trial_tokens ` is an empty array,
105
105
(optionally) log a benign warning and return
106
106
3 . for every element ` token ` of ` trial_tokens ` :
107
- 3. 1. (optionally) if the maximum number of accepted tokens is reached,
108
- skip all other tokens
109
- 3. 2. if ` token ` is not a string, skip it and (optionally) log a benign
110
- warning
111
- 3.2 . if ` token ` is an empty string, skip it and (optionally) log a benign
112
- warning
113
- 3.3 . (optionally) if ` token ` is too long to be parsed, skip it and
114
- (optionally) log a benign warning
115
- 3.4 . if token has been encountered before, skip it and (optionally) log
116
- a benign warning
117
- 3.5 . (optionally) attempt to parse the token and validate it. If validation
118
- fails, skip the token and (optionally) log a benign warning.
119
- Note: browsers may disregard token expiration errors, if they are not
120
- sure about the corrctness of system timestamp at the time of token
121
- validation
122
- 3.6 . append token to the collection of accepted tokens
107
+ 1 . (optionally) if the maximum number of accepted tokens is reached,
108
+ skip all other tokens
109
+ 2 . if ` token ` is not a string, skip it and (optionally) log a benign
110
+ warning
111
+ 3 . if ` token ` is an empty string, skip it and (optionally) log a benign
112
+ warning
113
+ 4 . (optionally) if ` token ` is too long to be parsed, skip it and
114
+ (optionally) log a benign warning
115
+ 5 . if token has been encountered before, skip it and (optionally) log
116
+ a benign warning
117
+ 6 . (optionally) attempt to parse the token and validate it. If validation
118
+ fails, skip the token and (optionally) log a benign warning.
119
+ Note: browsers may disregard token expiration errors if they are not
120
+ sure about the correctness of system timestamp at the time of token
121
+ validation
122
+ 7 . append token to the collection of accepted tokens
123
123
4 . if at least one token is accepted in step 3, save the token collection in
124
124
parsed manifest under ` trial_tokens ` key
125
125
@@ -153,10 +153,10 @@ Trial tokens system already incorporate some degree of abuse mitigations:
153
153
154
154
This new manifest key contains values which will be inserted into headers of
155
155
local HTTP-like responses. Browsers must ensure that the provided tokens can
156
- not escape header serealization . Browsers also must ensure that tokens do not
156
+ not escape header serialization . Browsers also must ensure that tokens do not
157
157
cause headers to exceed implementation-specific limits so that response is
158
- processed in different way (e.g., adding a large number of tokens must not
159
- cuase removal of security headers like CSP ).
158
+ processed in different way (e.g., a large number of long tokens must not
159
+ cuase removal of other headers or response content ).
160
160
161
161
## Alternatives
162
162
@@ -167,7 +167,7 @@ cuase removal of security headers like CSP).
167
167
Document contexts can activate tokens by
168
168
[ embedding them in DOM] ( < meta http-equiv="origin-trial" content="TOKEN_GOES_HERE" > )
169
169
` <meta> ` tag, both statically and dynamically. Extension service workers can
170
- spawn documents and with embedded tokens and proxy calls to trial features via
170
+ spawn documents and embedded tokens and proxy calls to trial features via
171
171
the said document.
172
172
173
173
## Implementation Notes
0 commit comments