]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
urlapi: compare zone-id in Curl_url_same_origin()
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Tue, 19 May 2026 23:03:31 +0000 (01:03 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 20 May 2026 09:53:29 +0000 (11:53 +0200)
Closes #21686

lib/urlapi.c

index dfb106dd2f0ac0d9a15d31996fe2d43eb119a690..21f4bbfab1be22f396560ddea9bbeb0e1142d2a0 100644 (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. */