[PATCH] MINOR: Add support for http 413 status

2020-06-22 Thread Anthonin Bonnefoy
From: Anthonin Bonnefoy Add 413 http status code. This will allow 413 to be used in deny_status and errorfile. --- doc/configuration.txt| 40 include/haproxy/http-t.h | 1 + src/http.c | 10 ++ 3 files changed, 31 insertions(+),

Re: [PATCH] BUG/MEDIUM: sink: fix crash when null sink is used in __do_send_log

2020-06-22 Thread Emeric Brun
Hi Daniel, Willy, On 6/19/20 9:22 PM, Willy Tarreau wrote: > Hi Daniel, > > On Thu, Jun 18, 2020 at 12:35:29AM -0400, Daniel Corbett wrote: >> Hello, >> >> >> When using a ring log in combination with proto fcgi, it was possible >> to cause a crash by sending a request for a non-existent fastcgi

Re: [PATCH] BUG/MEDIUM: sink: fix crash when null sink is used in __do_send_log

2020-06-22 Thread Christopher Faulet
Le 22/06/2020 à 10:56, Emeric Brun a écrit : Hi Daniel, Willy, On 6/19/20 9:22 PM, Willy Tarreau wrote: Hi Daniel, On Thu, Jun 18, 2020 at 12:35:29AM -0400, Daniel Corbett wrote: Hello, When using a ring log in combination with proto fcgi, it was possible to cause a crash by sending a reque

Re: [PATCH] BUG/MINOR: spoe: correction of setting bits for analyzer

2020-06-22 Thread Christopher Faulet
Le 19/06/2020 à 22:21, Miroslav Zagorac a écrit : Hello everyone, somehow it seems to me that this is a bug when setting bits for the channel analyzer in the spoe filter.. in this case the attached patch can be applied. I adjusted the commit message to add a short description and info about t

[PATCH] BUG/MINOR: cfgparse: Support configurations without newline at EOF

2020-06-22 Thread Tim Duesterhus
Fix parsing of configurations if the configuration file does not end with an LF. This patch fixes GitHub issue #704. It's a regression in 9e1758efbd68c8b1d27e17e2abee110f3ebe which is 2.2 specific. No backport needed. --- src/cfgparse.c | 11 +-- 1 file changed, 9 insertions(+), 2 del

Re: [PATCH] BUG/MINOR: cfgparse: Support configurations without newline at EOF

2020-06-22 Thread Lukas Tribus
Hello, On Mon, 22 Jun 2020 at 18:16, Tim Duesterhus wrote: > > Fix parsing of configurations if the configuration file does not end with > an LF. ... but it's also warning about it at the same time. So it's unclear to me: Do we support a configuration without trailing LF or not? If yes, there

Re: [PATCH] BUG/MINOR: cfgparse: Support configurations without newline at EOF

2020-06-22 Thread Tim Düsterhus
Lukas, Am 22.06.20 um 18:41 schrieb Lukas Tribus: > On Mon, 22 Jun 2020 at 18:16, Tim Duesterhus wrote: >> >> Fix parsing of configurations if the configuration file does not end with >> an LF. > > ... but it's also warning about it at the same time. > > So it's unclear to me: > > Do we suppor

Re: [PATCH] BUG/MINOR: cfgparse: Support configurations without newline at EOF

2020-06-22 Thread Lukas Tribus
Hello Tim, On Mon, 22 Jun 2020 at 18:56, Tim Düsterhus wrote: > > Lukas, > > Am 22.06.20 um 18:41 schrieb Lukas Tribus: > > On Mon, 22 Jun 2020 at 18:16, Tim Duesterhus wrote: > >> > >> Fix parsing of configurations if the configuration file does not end with > >> an LF. > > > > ... but it's als

Doing directory based access control (Survey / Poll of admin expectations)

2020-06-22 Thread Tim Düsterhus
Hi List, I was having a bit of off-list disagreement with Willy regarding how HAProxy ACLs should work and what (experienced) administrators may or may expect from them. I am arguing about something I believe many administrators might accidentally do incorrectly. I'm intentionally being vague here

Re: [PATCH] BUG/MINOR: cfgparse: Support configurations without newline at EOF

2020-06-22 Thread Willy Tarreau
Hi guys, On Mon, Jun 22, 2020 at 07:49:34PM +0200, Lukas Tribus wrote: > Hello Tim, > > On Mon, 22 Jun 2020 at 18:56, Tim Düsterhus wrote: > > > > Lukas, > > > > Am 22.06.20 um 18:41 schrieb Lukas Tribus: > > > On Mon, 22 Jun 2020 at 18:16, Tim Duesterhus wrote: > > >> > > >> Fix parsing of con

Re: [PATCH] BUG/MINOR: cfgparse: Support configurations without newline at EOF

2020-06-22 Thread Lukas Tribus
On Mon, 22 Jun 2020 at 21:21, Willy Tarreau wrote: > > Hi guys, > > On Mon, Jun 22, 2020 at 07:49:34PM +0200, Lukas Tribus wrote: > > Hello Tim, > > > > On Mon, 22 Jun 2020 at 18:56, Tim Düsterhus wrote: > > > > > > Lukas, > > > > > > Am 22.06.20 um 18:41 schrieb Lukas Tribus: > > > > On Mon, 22

Re: Doing directory based access control (Survey / Poll of admin expectations)

2020-06-22 Thread Илья Шипицин
вт, 23 июн. 2020 г. в 00:16, Tim Düsterhus : > Hi List, > > I was having a bit of off-list disagreement with Willy regarding how > HAProxy ACLs should work and what (experienced) administrators may or > may expect from them. I am arguing about something I believe many > administrators might accide

[PATCH v2 0/2] Warnings for truncated lines

2020-06-22 Thread Tim Duesterhus
Willy, Lukas, Am 22.06.20 um 22:10 schrieb Lukas Tribus: > On Mon, 22 Jun 2020 at 21:21, Willy Tarreau wrote: >> >> Hi guys, >> >> On Mon, Jun 22, 2020 at 07:49:34PM +0200, Lukas Tribus wrote: >>> Hello Tim, >>> >>> On Mon, 22 Jun 2020 at 18:56, Tim Düsterhus wrote: Lukas,

[PATCH v2 2/2] MINOR: cfgparse: Warn on truncated lines / files

2020-06-22 Thread Tim Duesterhus
As discussed on the list: https://www.mail-archive.com/haproxy@formilux.org/msg37698.html This patch adds warnings to the configuration parser that detect the following situations: - A line being truncated by a null byte in the middle. - A file not ending in a new line (and possibly being trunca

[PATCH v2 1/2] BUG/MINOR: cfgparse: Support configurations without newline at EOF

2020-06-22 Thread Tim Duesterhus
Fix parsing of configurations if the configuration file does not end with an LF. This patch fixes GitHub issue #704. It's a regression in 9e1758efbd68c8b1d27e17e2abee110f3ebe which is 2.2 specific. No backport needed. --- src/cfgparse.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions

Re: [PATCH v2 0/2] Warnings for truncated lines

2020-06-22 Thread Tim Düsterhus
Willy, Lukas, sorry, I forgot to hit save on my cover-letter before running git send-email. Here's what I *actually* wanted to say: Am 22.06.20 um 22:10 schrieb Lukas Tribus: >> So what we could do if we want to do something clean is the following: >> - detect \0 or truncation on a line and note

Re: [PATCH v2 0/2] Warnings for truncated lines

2020-06-22 Thread Willy Tarreau
On Mon, Jun 22, 2020 at 11:00:09PM +0200, Tim Düsterhus wrote: > I tested this with: > > printf "listen foo\nbind *:8080\x00test\nmode http\x00stuff\nlog > global\x00bad\n" > > And this is the result: > > $ ./haproxy -c -f ./example.cfg > [WARNING] 173/225406 (30776) : parsing [./exa

Re: [PATCH v2 0/2] Warnings for truncated lines

2020-06-22 Thread Lukas Tribus
Hello, On Monday, 22 June 2020, Willy Tarreau wrote: > > > Configuration file is valid > > Looks good to me. > > > I guess a truncated last line cannot be differentiated from file that > > does not > > end with a new line, because fgets() consumes the full line (triggering > the > > eof), ev

Re: Doing directory based access control (Survey / Poll of admin expectations)

2020-06-22 Thread Jonathan Matthews
On Mon, 22 Jun 2020 at 20:16, Tim Düsterhus wrote: > This off-the-shelf PHP application has an integrated admin control panel > within the /admin/ directory. The frontend consists of several "old > style" PHP files, handling the various paths (e.g. login.php, > register.php, create-thread.php). Du

Re: [PATCH v2 0/2] Warnings for truncated lines

2020-06-22 Thread Willy Tarreau
On Mon, Jun 22, 2020 at 11:23:41PM +0200, Lukas Tribus wrote: > > Lukas is that also OK for you ? > > Yes, looks good to me. OK, now applied, thanks! Willy