WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
272745
X-Frame-Options should only strip tab or space
https://bugs.webkit.org/show_bug.cgi?id=272745
Summary
X-Frame-Options should only strip tab or space
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
>
Anne van Kesteren
Comment 5
2026-01-26 12:18:16 PST
I fixed CSP in
bug 255990
so retitling this accordingly.
Anne van Kesteren
Comment 6
2026-01-26 12:22:46 PST
Pull request:
https://github.com/WebKit/WebKit/pull/57273
Anne van Kesteren
Comment 7
2026-01-26 12:23:24 PST
***
Bug 285666
has been marked as a duplicate of this bug. ***
EWS
Comment 8
2026-01-27 08:17:40 PST
Committed
306279@main
(a9bbaa7e6d3e): <
https://commits.webkit.org/306279@main
> Reviewed commits have been landed. Closing PR #57273 and removing active labels.
Anne van Kesteren
Comment 9
2026-01-27 08:23:38 PST
Jannis, thanks again for your work in this area, hope you'll be able to return to it some day!
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