Skip to content

Commit 0007045

Browse files
committed
LibWeb: Parse the correct header list for CSP-Report-Only
Fixes a regression from a copy-paste mistake in commit: ed27eea The regressed CSP tests aren't able to be imported, unfortunately. They do not work with the file-based test-web infra.
1 parent 693dd7b commit 0007045

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/LibWeb/ContentSecurityPolicy/Policy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ GC::Ref<PolicyList> Policy::parse_a_responses_content_security_policies(GC::Heap
118118
// response’s header list:
119119
auto report_policy_tokens_or_failure = response->header_list()->extract_header_list_values("Content-Security-Policy-Report-Only"sv);
120120

121-
if (auto const* report_policy_tokens = enforce_policy_tokens_or_failure.get_pointer<Vector<ByteString>>()) {
121+
if (auto const* report_policy_tokens = report_policy_tokens_or_failure.get_pointer<Vector<ByteString>>()) {
122122
for (auto const& report_policy_token : *report_policy_tokens) {
123123
// 1. Let policy be the result of parsing token, with a source of "header", and a disposition of "report".
124124
auto policy = parse_a_serialized_csp(heap, report_policy_token, Policy::Source::Header, Policy::Disposition::Report);

0 commit comments

Comments
 (0)