Hi, 

On Thu, 2019-09-12 at 08:12 +0200, Willy Tarreau wrote:
> Hi Conrad,
> 
> On Wed, Sep 11, 2019 at 04:53:18PM +0200, Conrad Hoffmann wrote:
> > Hey again,
> > 
> > sorry for reviving an old(ish) thread, but I would love to get some
> > kind of feedback, even if it's just that this will stay this way
> > and I
> > need to deal with it.
> > 
> > I also tried with the payload syntax in the meantime, but to no
> > avail.
> > Is there any supported way of adding patterns with spaces to an ACL
> > over the command socket at all in 2.0?
> 
> I didn't notice this thread last week, thanks for reviving it. Well
> your report and your attempt at fixing it perfectly illustrate why
> I absolutely never use such functions like strcspn(). The reason is
> that such functions tend to make you write context-unaware parsers.
> It's like looking for a closing parethesis without counting the
> number of opening ones.
> 
> Instead we should use the same tokenizer as the config parser uses,
> it's quite simple and not prone to such issues. Plus we'd even get
> support for quotes and hex characters as a bonus (though we could
> imagine not supporting some of them in the backported version, but
> I'm not sure of the benefit of *not* supporting them).

That's great to hear! I trust your judgement there, and it would
probably be the cleaner solution (as it re-enables the previous
behavior), but I'll just mention that I'd be perfectly fine with using
the payload syntax if that worked for "acl add" in case that's easier
to implement.

Anyways, thanks for picking that up, looking forward to whatever
solution :)

Thanks a lot,
Conrad


> 
> Maybe we should do that before issuing 2.0.6 so that we don't keep
> the CLI broken for too long.
> 
> Willy
-- 
Conrad Hoffmann
Systems and Traffic Engineering

SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany

Managing Director: Artem Fishman | Incorporated in England & Wales
with Company No. 6343600 | Local Branch Office | AG
Charlottenburg  | HRB 110657B  


Reply via email to