mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Parse the correct header list for CSP-Report-Only
Fixes a regression from a copy-paste mistake in commit:
ed27eea091
The regressed CSP tests aren't able to be imported, unfortunately. They
do not work with the file-based test-web infra.
This commit is contained in:
parent
693dd7b6f6
commit
00070455fd
Notes:
github-actions[bot]
2025-11-27 02:23:51 +00:00
Author: https://github.com/trflynn89
Commit: 00070455fd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6949
1 changed files with 1 additions and 1 deletions
|
|
@ -118,7 +118,7 @@ GC::Ref<PolicyList> Policy::parse_a_responses_content_security_policies(GC::Heap
|
||||||
// response’s header list:
|
// response’s header list:
|
||||||
auto report_policy_tokens_or_failure = response->header_list()->extract_header_list_values("Content-Security-Policy-Report-Only"sv);
|
auto report_policy_tokens_or_failure = response->header_list()->extract_header_list_values("Content-Security-Policy-Report-Only"sv);
|
||||||
|
|
||||||
if (auto const* report_policy_tokens = enforce_policy_tokens_or_failure.get_pointer<Vector<ByteString>>()) {
|
if (auto const* report_policy_tokens = report_policy_tokens_or_failure.get_pointer<Vector<ByteString>>()) {
|
||||||
for (auto const& report_policy_token : *report_policy_tokens) {
|
for (auto const& report_policy_token : *report_policy_tokens) {
|
||||||
// 1. Let policy be the result of parsing token, with a source of "header", and a disposition of "report".
|
// 1. Let policy be the result of parsing token, with a source of "header", and a disposition of "report".
|
||||||
auto policy = parse_a_serialized_csp(heap, report_policy_token, Policy::Source::Header, Policy::Disposition::Report);
|
auto policy = parse_a_serialized_csp(heap, report_policy_token, Policy::Source::Header, Policy::Disposition::Report);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue