Re: [PATCH] Limit X-Forwarded-For growth

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 11 Jul 2009 16:07:01 +1200

Alex Rousskov wrote:
> Hello,
>
> Should the attached patch go in? It prevents assertions (or worse)
> during forwarding loops or carefully crafted messages. Production-tested
> in Squid 3.0, although I do not know whether the code was ever triggered
> outside the lab.
>
> This change also prevents most cases of pointless computation of the
> original X-Forwarded-For value list in Squid 3.1. That computation can
> be quite expensive.
>
>
> Thank you,
>
> Alex.
>

I think it should. Just one thing:

On the error case adds: strFwd = "unknowns";

IIRC 'unknown' is specified, but maybe wrong.
  If any text is able to be added there "loop error" may be better to
set to show whats gone wrong.

If this is just a typo of 'unknown' please correct on commit.

bb:approve

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE6 or 3.0.STABLE16
   Current Beta Squid 3.1.0.9
Received on Sat Jul 11 2009 - 04:07:10 MDT

This archive was generated by hypermail 2.2.0 : Sat Jul 11 2009 - 12:00:04 MDT