From: Eric Covener Date: Fri, 5 Jun 2026 10:06:53 +0000 (+0000) Subject: ap_proxy_cookie_revers: fix dup path/domain X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=a70753d294292e8c9f68758cfe3550d83f812129;p=thirdparty%2Fapache%2Fhttpd.git ap_proxy_cookie_revers: fix dup path/domain git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1935007 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 2613a243f8..a57c35ce0d 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1040,6 +1040,12 @@ PROXY_DECLARE(const char *) ap_proxy_cookie_reverse_map(request_rec *r, poffs = pathp - tmpstr_orig; l1 = strlen(pathp); pathe = str + poffs + l1; + /* + * RFC 6265 § 5.3 7): Only the last path= should be meaningful + * so reset anything previously found. + */ + newpath = NULL; + pdiff = 0; if (conf->interpolate_env == 1) { ent = (struct proxy_alias *)rconf->cookie_paths->elts; } @@ -1060,6 +1066,12 @@ PROXY_DECLARE(const char *) ap_proxy_cookie_reverse_map(request_rec *r, doffs = domainp - tmpstr_orig; l1 = strlen(domainp); domaine = str + doffs + l1; + /* + * RFC 6265 § 5.3 4): Only the last domain= should be meaningful + * so reset anything previously found. + */ + newdomain = NULL; + ddiff = 0; if (conf->interpolate_env == 1) { ent = (struct proxy_alias *)rconf->cookie_domains->elts; }