From: Jeff King Date: Fri, 09 Nov 2012 16:37:10 GMT Subject: Re: [PATCH] gitweb: make remote_heads config setting work. Message-ID: <20121109163710.GD19725@sigill.intra.peff.net> In-Reply-To: <7vk3tvqthw.fsf@alter.siamese.dyndns.org> On Thu, Nov 08, 2012 at 08:40:11PM -0800, Junio C Hamano wrote: > Looking at the code before this part: > > if (my ($hi, $mi, $lo) = ($key =~ /^([^.]*)\.(.*)\.([^.]*)$/)) { > $key = join(".", lc($hi), $mi, lc($lo)); > } else { > $key = lc($key); > } > $key =~ s/^gitweb\.//; > return if ($key =~ m/\W/); > > the new code is munding the $hi and $mi parts, while the mistaken > configuration this patch is trying to correct is about the $lo part, > and possibly the $hi part, but never the $mi part. Good catch. I think the "return" in the existing code suffers from the same problem: it will bail on non-word characters in the $mi part, but that part should allow arbitrary characters. -Peff