urlapi: compare zone-id in Curl_url_same_origin()

Closes #21686
This commit is contained in:
Joshua Rogers 2026-05-20 01:03:31 +02:00 committed by Daniel Stenberg
parent 77e4e5b86d
commit edfc80c7c4
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -2024,6 +2024,9 @@ bool Curl_url_same_origin(CURLU *base, CURLU *href)
if(href->host) {
if(!curl_strequal(base->host, href->host))
return FALSE;
if(!curl_strequal(base->zoneid ? base->zoneid : "",
href->zoneid ? href->zoneid : ""))
return FALSE;
if(!curl_strequal(base->port, href->port)) {
/* This may still match if only one has an explicit port
* and it is the default for the scheme. */