Hi Adrian,

On Thu, Feb 23, 2017 at 11:23:42AM +0000, Fitzpatrick, Adrian wrote:
> Hi,
> 
> Note I am not subscribed to the mail list - per comment at 
> http://discourse.haproxy.org/t/possible-minor-bug-configuration-validation, 
> just wanted to flag a possible bug we spotted:
> The issue appears to be with a change made back in
> 2014/04/23 : 1.5-dev23
> MEDIUM: config: relax use_backend check to make the condition optional
> I haven't checked the source code (wouldn't know how to read it!) but from 
> behaviour it appears that the above change is actually also hiding errors in 
> conditions on use_backend. for example, we had an issue where there was a 
> typo in config of the form:
> use_backend x of acl_y
> i.e. "of" in place of "if". In pre 1.5 version this config is rejected at
> start up ('use_backend' requires either 'if' or 'unless' followed by a
> condition) but in 1.7.1, system starts, reports no error and routes all
> traffic to backend x. Seems that the check is a bit too relaxed! I would have
> thought if anything present where a condition would be, then it should be
> validated - i.e. only a blank rest of line should be construed as no
> condition

You're absolutely right, thanks for reporting this. I've just fixed it now,
it will be in 1.7.3.

Thanks!
Willy

Reply via email to