[PATCH 1/2] MINOR: jwt: Make invalid static JWT algorithms an error in `jwt_verify` converter

2021-10-29 Thread Tim Duesterhus
It is not useful to start a configuration where an invalid static string is provided as the JWT algorithm. Better make the administrator aware of the suspected typo by failing to start. --- src/sample.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sample.c b/src/sa

Re: [PATCH 1/2] MINOR: jwt: Make invalid static JWT algorithms an error in `jwt_verify` converter

2021-11-02 Thread Willy Tarreau
Tim, On Fri, Oct 29, 2021 at 06:06:55PM +0200, Tim Duesterhus wrote: > It is not useful to start a configuration where an invalid static string is > provided as the JWT algorithm. Better make the administrator aware of the > suspected typo by failing to start. I'm hopeful that I can finally emit

Re: [EXTERNAL] Re: [PATCH 1/2] MINOR: jwt: Make invalid static JWT algorithms an error in `jwt_verify` converter

2021-11-03 Thread Remi Tricot-Le Breton
Hello, On 02/11/2021 16:50, Willy Tarreau wrote: Tim, On Fri, Oct 29, 2021 at 06:06:55PM +0200, Tim Duesterhus wrote: It is not useful to start a configuration where an invalid static string is provided as the JWT algorithm. Better make the administrator aware of the suspected typo by failing

Re: [EXTERNAL] Re: [PATCH 1/2] MINOR: jwt: Make invalid static JWT algorithms an error in `jwt_verify` converter

2021-11-03 Thread Willy Tarreau
Hi Rémi, On Wed, Nov 03, 2021 at 09:47:36AM +0100, Remi Tricot-Le Breton wrote: > Hello, > > On 02/11/2021 16:50, Willy Tarreau wrote: > > Tim, > > > > On Fri, Oct 29, 2021 at 06:06:55PM +0200, Tim Duesterhus wrote: > > > It is not useful to start a configuration where an invalid static string

Re: [EXTERNAL] Re: [PATCH 1/2] MINOR: jwt: Make invalid static JWT algorithms an error in `jwt_verify` converter

2021-11-04 Thread Tim Düsterhus
Remi, On 11/3/21 9:47 AM, Remi Tricot-Le Breton wrote: As for the second one, it would have been easier to simply add a string length comparison before the strcmp in my opinion. We would have had a one line fix instead of a full conversion of strXXX calls into ist equivalents (most of which work

Re: [EXTERNAL] Re: [PATCH 1/2] MINOR: jwt: Make invalid static JWT algorithms an error in `jwt_verify` converter

2021-11-05 Thread Willy Tarreau
Hi Tim, On Thu, Nov 04, 2021 at 07:12:04PM +0100, Tim Düsterhus wrote: > Your patch is already merged and the bug is fixed. However I'd like to > comment on the reasons behind why I refactored the whole function to use the > ist API: > > I *strongly* dislike code that just works because of some i

Re: [EXTERNAL] Re: [PATCH 1/2] MINOR: jwt: Make invalid static JWT algorithms an error in `jwt_verify` converter

2021-11-05 Thread Remi Tricot-Le Breton
Hello, On 05/11/2021 08:48, Willy Tarreau wrote: Hi Tim, On Thu, Nov 04, 2021 at 07:12:04PM +0100, Tim Düsterhus wrote: Your patch is already merged and the bug is fixed. However I'd like to comment on the reasons behind why I refactored the whole function to use the ist API: I *strongly* dis