Skip to content

Backport(v1.19): parser_syslog: fix NameError when RFC3164 timestamp has repeated spaces (#5449) - #5497

Merged
kenhys merged 1 commit into
fluent:v1.19from
Watson1978:backport-v1.19-rfc3164-nameerror
Sep 15, 2026
Merged

kenhys merged 1 commit into
fluent:v1.19from
Watson1978:backport-v1.19-rfc3164-nameerror

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:
Partial backport of #5449
Related to #5496
Fixes #

What this PR does / why we need it:
The RFC3164 string parser slices the timestamp with an idx variable that only exists in the regexp parser, so any message taking the repeated-space branch raised NameError instead of being parsed. That branch is reached whenever time_format contains a space and the timestamp is space-padded, for example %Y-%m-%d %H:%M:%S against <14>2026-04-25 16:43:29 host app: msg.

This backports only the NameError fix. The rest of #5449 makes the parser accept a space after the priority, which changes behavior, so it is left out.

Docs Changes:
N/A

Release Note:

  • parser_syslog: fix NameError when RFC3164 timestamp has repeated spaces

The string parser's RFC3164 path slices the timestamp with an `idx`
variable that only exists in the regexp parser, so any input taking the
repeated-space branch raised NameError instead of being parsed. This
branch is reachable whenever `time_format` contains a space and the
timestamp is space-padded, for example `%Y-%m-%d %H:%M:%S` against
`<14>2026-04-25  16:43:29 host app: msg`.

This is the NameError part of fluent#5449 only. The rest of that PR makes the
parser accept a space after the priority, which changes behavior, so it
is left out of this backport.

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978 Watson1978 added this to the v1.19.4 milestone Sep 15, 2026
@Watson1978
Watson1978 requested a review from kenhys September 15, 2026 02:33
@kenhys
kenhys merged commit dcf7690 into fluent:v1.19 Sep 15, 2026
18 checks passed
@Watson1978
Watson1978 deleted the backport-v1.19-rfc3164-nameerror branch September 15, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants