WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
272745
VT (0x0b) stripped from XFO/CSP even though only HTTP-/ascii-whitespace should be stripped
https://bugs.webkit.org/show_bug.cgi?id=272745
Summary
VT (0x0b) stripped from XFO/CSP even though only HTTP-/ascii-whitespace shoul...
jannis.rautenstrauch
Reported
2024-04-16 05:18:01 PDT
Vertical Tabs (0x0b) are interpreted as whitespace for both XFO and CSP even though the specification require ascii-whitespace [CSP](
https://w3c.github.io/webappsec-csp/#framework-infrastructure
) or HTTP whitespace [XFO](
https://fetch.spec.whatwg.org/#http-whitespace
) that both do not contain VT. - Example 1: `CSP: \vframe-ancestors 'none'` [URL](
http://sub.headers.websec.saarland/_hp/tests/framing.sub.html?resp_type=parsing&browser_id=1&label=CSP-FA&first_id=6265&last_id=6269&scheme=http&t_resp_id=6269&t_element_relation=iframe_direct&t_resp_origin=https://headers.webappsec.eu
) - Example 2: `CSP: img-src\v 'self'`[URL](
http://sub.headers.websec.saarland/_hp/tests/subresource-loading-csp.sub.html?resp_type=parsing&browser_id=1&label=CSP-IMG&first_id=29354&last_id=29358&scheme=http&t_resp_id=29354&t_element_relation=iframe_direct&t_resp_origin=https://headers.webappsec.eu
) - Example 3: `XFO: DENY\v`[URL](
http://sub.headers.websec.saarland/_hp/tests/framing.sub.html?resp_type=parsing&browser_id=1&label=XFO&first_id=3630&last_id=3634&scheme=http&t_resp_id=3633&t_element_relation=iframe_direct&t_resp_origin=https://headers.webappsec.eu
) Chromium has the same issue. Firefox does not strip \v and interprets all these examples as invalid.
Attachments
Add attachment
proposed patch, testcase, etc.
Anne van Kesteren
Comment 1
2024-04-17 08:34:05 PDT
Is there web-platform-tests coverage for this by any chance?
Darin Adler
Comment 2
2024-04-17 14:03:17 PDT
This will be straightforward to fix but we will need a test of course!
Darin Adler
Comment 3
2024-04-17 14:03:47 PDT
An automated regression test, so WPT would be amazing.
Radar WebKit Bug Importer
Comment 4
2024-04-23 05:18:58 PDT
<
rdar://problem/126915315
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug