Files
linamh/dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20240528-gcc14.patch
Mario Fetka 05f2bfed14 Bump
2026-04-14 20:15:00 +02:00

16 lines
882 B
Diff

diff --git a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
index 9e726d5..4876f0f 100644
--- a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
+++ b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp
@@ -231,8 +231,9 @@ bool isAllowedByAllWithHashFromContent(const CSPDirectiveListVector& policies, c
auto cryptoDigest = CryptoDigest::create(toCryptoDigestAlgorithm(algorithm));
cryptoDigest->addBytes(contentCString.data(), contentCString.length());
Vector<uint8_t> digest = cryptoDigest->computeHash();
+ ContentSecurityPolicyHash hash = std::make_pair(algorithm, digest);
for (auto& policy : policies) {
- if ((policy.get()->*allowed)(std::make_pair(algorithm, digest)))
+ if ((policy.get()->*allowed)(hash))
return true;
}
}