mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibURL: Use a nonce to distinguish opaque origins
Opaque origins are meant to be unique in terms of equality from one another. Since this uniqueness needs to be across processes, use a nonce to implement the uniqueness check.
This commit is contained in:
parent
ee8e4d1eec
commit
38765fd617
Notes:
github-actions[bot]
2025-06-25 15:48:27 +00:00
Author: https://github.com/shannonbooth
Commit: 38765fd617
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5193
Reviewed-by: https://github.com/tcl3 ✅
7 changed files with 77 additions and 24 deletions
|
@ -105,8 +105,10 @@ template<>
|
|||
ErrorOr<URL::Origin> decode(Decoder& decoder)
|
||||
{
|
||||
auto is_opaque = TRY(decoder.decode<bool>());
|
||||
if (is_opaque)
|
||||
return URL::Origin::create_opaque();
|
||||
if (is_opaque) {
|
||||
auto nonce = TRY(decoder.decode<URL::Origin::Nonce>());
|
||||
return URL::Origin { nonce };
|
||||
}
|
||||
|
||||
auto scheme = TRY(decoder.decode<Optional<String>>());
|
||||
auto host = TRY(decoder.decode<URL::Host>());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue