mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb/Fetch: Use origins in Cross-Origin-Embedder-Policy
algorithm
This commit is contained in:
parent
b33a71a35e
commit
4533794c32
Notes:
sideshowbarker
2024-07-17 00:25:35 +09:00
Author: https://github.com/kemzeb
Commit: 4533794c32
Pull-request: https://github.com/SerenityOS/serenity/pull/20777
Reviewed-by: https://github.com/trflynn89
1 changed files with 5 additions and 5 deletions
|
@ -364,12 +364,12 @@ bool Request::cross_origin_embedder_policy_allows_credentials() const
|
|||
// FIXME: 3. If request’s client’s policy container’s embedder policy’s value is not "credentialless", then return true.
|
||||
|
||||
// 4. If request’s origin is same origin with request’s current URL’s origin and request does not have a redirect-tainted origin, then return true.
|
||||
// FIXME: Actually use the given origins once we have https://url.spec.whatwg.org/#concept-url-origin.
|
||||
if (HTML::Origin().is_same_origin(HTML::Origin()) && !has_redirect_tainted_origin())
|
||||
return true;
|
||||
|
||||
// 5. Return false.
|
||||
return false;
|
||||
auto const* request_origin = m_origin.get_pointer<HTML::Origin>();
|
||||
if (request_origin == nullptr)
|
||||
return false;
|
||||
|
||||
return request_origin->is_same_origin(URL::url_origin(current_url())) && !has_redirect_tainted_origin();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue