mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
LibWeb: Do not release_value twice parsing a referrer policy
This fixes a bug introduced in ab6b687d4c
which was causing many live
sites (such as chat.openai.com and github.com/serenityos/serenity) to
crash.
This commit is contained in:
parent
2f68e36137
commit
7a77130923
Notes:
sideshowbarker
2024-07-16 18:06:41 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/7a77130923 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/112 Reviewed-by: https://github.com/tcl3 ✅
@ -30,7 +30,7 @@ ReferrerPolicy parse_a_referrer_policy_from_a_referrer_policy_header(Fetch::Infr
|
||||
// 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token.
|
||||
for (auto token : policy_tokens) {
|
||||
auto referrer_policy = from_string(token);
|
||||
if (referrer_policy.has_value() && referrer_policy.release_value() != ReferrerPolicy::EmptyString)
|
||||
if (referrer_policy.has_value() && referrer_policy.value() != ReferrerPolicy::EmptyString)
|
||||
policy = referrer_policy.release_value();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user