You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Christophe Jaillet <ch...@wanadoo.fr> on 2018/05/25 22:36:42 UTC

Re: svn commit: r1832280 - in /httpd/httpd/trunk: CHANGES modules/proxy/proxy_util.c

Le 26/05/2018 à 00:27, jailletc36@apache.org a écrit :
 > Author: jailletc36
 > Date: Fri May 25 22:27:53 2018
 > New Revision: 1832280
 >
 > URL: http://svn.apache.org/viewvc?rev=1832280&view=rev
 > Log:
 > In 'ap_proxy_cookie_reverse_map', iterate over each token of the 
'Set-Cookie' header field in order to avoid updating the wrong one.
 >
 > This could happen if the header field has something like 
'fakepath=foo;path=bar". In this case fakepath would be updated instead 
of path.
 >
 >
 > We don't need regex anymore in order to parse the field values and 
'ap_proxy_strmatch_domain' and 'ap_proxy_strmatch_path' are now useless. 
(and should be axed IMHO)
 >
 > PR 61560
 >
[...]
 > Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
 > URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1832280&r1=1832279&r2=1832280&view=diff
 > 
==============================================================================
 > --- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
 > +++ httpd/httpd/trunk/modules/proxy/proxy_util.c Fri May 25 22:27:53 2018
[...]
 > +            if (conf->interpolate_env == 1) {
 > +                ent = (struct proxy_alias *)rconf->cookie_paths->elts;
 > +            }
 > +            else {
 > +                ent = (struct proxy_alias *)conf->cookie_paths->elts;
 > +            }
 > +            for (i = 0; i < conf->cookie_paths->nelts; i++) {
 > +                l2 = strlen(ent[i].fake);
I'm puzzled by this (untouched) part of the code. 'ent' can come from 
'conf' or 'rconf'. But we iterate over 'conf->cookie_paths->nelts' 
unconditionally. (same a few lines below for cookie_domains)

Are we sure that the 2 arrays have the same number of elements, or 
should we also use either 'onf' or 'rconf'?

This looks spurious to me.

Any thought?

CJ