Skip to content

Backport(v1.19): parser_syslog: fix NameError when RFC5424 timestamp has repeated spaces (#5496) - #5500

Merged
Watson1978 merged 1 commit into
v1.19from
backport-to-v1.19/pr5496
Sep 20, 2026
Merged

Watson1978 merged 1 commit into
v1.19from
backport-to-v1.19/pr5496

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 20, 2026

Copy link
Copy Markdown

Which issue(s) this PR fixes:
Backport #5496
Fixes #

What this PR does / why we need it:

The RFC5424 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, for example the RFC3164 style %b %d %H:%M:%S with a space-padded day. #5449 fixed the same mistake on the RFC3164 side, and this PR does the rest.

Docs Changes:

N/A

Release Note:

parser_syslog: fix NameError when RFC5424 timestamp has repeated spaces

…es (#5496)

**Which issue(s) this PR fixes**:
Fixes #

**What this PR does / why we need it**:

The RFC5424 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, for example
the RFC3164 style `%b %d %H:%M:%S` with a space-padded day. #5449 fixed
the same mistake on the RFC3164 side, and this PR does the rest.

**Docs Changes**:

N/A

**Release Note**:

parser_syslog: fix NameError when RFC5424 timestamp has repeated spaces

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@Watson1978 Watson1978 added this to the v1.19.4 milestone Sep 20, 2026
@Watson1978
Watson1978 merged commit 3498b99 into v1.19 Sep 20, 2026
21 checks passed
@Watson1978
Watson1978 deleted the backport-to-v1.19/pr5496 branch September 20, 2026 05:35
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.

1 participant