Hi Egor,
On Thu, Jan 15, 2026 at 03:41:37PM +0000, Egor Shestakov wrote:
> Hi HAProxy team!
>
> While examining the code, I found a bug. Hope I've formulated the fix
> properly:)
>
> -- >8 --
>
> Fix the left shift of args when "default" prefix matches. The cause of the
> bug was the absence of zeroing of the right element during the shift. The
> same bug for "no" prefix was fixed by commit 0f99e3497, but missed for
> "default".
>
> The shift of ("default", "option", "dontlog-normal")
> produced ("option", "dontlog-normal", "dontlog-normal")
> instead of ("option", "dontlog-normal", "")
>
> As an example, a valid config line:
> default option dontlog-normal
>
> caused a parse error:
> [ALERT] (32914) : config : parsing [bug-default-prefix.cfg:22] : 'option
> dontlog-normal' cannot handle unexpected argument 'dontlog-normal'.
>
> The patch should be backported to all stable versions, since the absence of
> zeroing was introduced with "default" keyword.
Oh, good catch, thank you for this and for hte subsequent cleanup! Both
patches now merged!
Willy