mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibURL: Differentiate cross site opaque origins
Previously if we had two opaque origins both URLs were being treated as same site.
This commit is contained in:
parent
1a3a9eee7a
commit
bd67a5afaa
Notes:
github-actions[bot]
2025-06-30 07:07:49 +00:00
Author: https://github.com/shannonbooth
Commit: bd67a5afaa
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5245
Reviewed-by: https://github.com/tcl3 ✅
2 changed files with 21 additions and 2 deletions
|
@ -36,9 +36,8 @@ bool Site::is_same_site(Site const& other) const
|
|||
{
|
||||
// 1. If A and B are the same opaque origin, then return true.
|
||||
// NOTE: Origins in sites are always opaque.
|
||||
// FIXME: Currently all opaque origins are identical, how should we distinguish them?
|
||||
if (m_value.has<Origin>() && other.m_value.has<Origin>())
|
||||
return true;
|
||||
return m_value.get<Origin>().nonce() == other.m_value.get<Origin>().nonce();
|
||||
|
||||
// 2. If A or B is an opaque origin, then return false.
|
||||
if (m_value.has<Origin>() || other.m_value.has<Origin>())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue