Repository navigation
Validate syslog_path when the configuration loads - #50
Merged
Merged
Conversation
ricklambrechts
previously approved these changes
Nov 9, 2026
thomas-samoht
force-pushed
the
fix/validate-syslog-path
branch
from
November 9, 2026 15:57
96fb88e to
8130ed7
Compare
thomas-samoht
changed the base branch from
main
to
fix/stream-names-as-literals
November 9, 2026 15:57
ricklambrechts
previously approved these changes
Nov 9, 2026
thomas-samoht
dismissed
ricklambrechts’s stale review
November 10, 2026 08:51
The merge-base changed after approval.
thomas-samoht
force-pushed
the
fix/validate-syslog-path
branch
3 times, most recently
from
November 10, 2026 09:11
69084f1 to
f65d1ce
Compare
ricklambrechts
previously approved these changes
Nov 10, 2026
thomas-samoht
dismissed
ricklambrechts’s stale review
November 10, 2026 09:12
The merge-base changed after approval.
thomas-samoht
force-pushed
the
fix/validate-syslog-path
branch
from
November 10, 2026 09:13
f65d1ce to
f7edf72
Compare
Problem: ConfigLogging accepted any string as syslog_path. The builder
split it with rsplit(":", 1) and int(), outside the try block that turns
handler failures into an error naming syslog_path. A path without a port
failed at configure() with "not enough values to unpack (expected 2, got
1)", and a port that is not a number with an int() error, neither saying
which setting was wrong. A bracketed IPv6 host kept its brackets and could
not be resolved.
Fix: syslog_address() in config.py parses host:port once, strips the
brackets off an IPv6 host and requires a port from 1 to 65535. A field
validator on ConfigLogging runs it, so a bad value fails where the
configuration is loaded with an error naming syslog_path and the value.
The builder uses the same function for the handler address. An empty
syslog_path still means console only, as INI files tend to give one.
thomas-samoht
force-pushed
the
fix/validate-syslog-path
branch
from
November 10, 2026 09:14
f7edf72 to
4469e51
Compare
ricklambrechts
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ConfigLoggingnow rejects asyslog_paththat isn'thost:portwith a port from 1 to 65535, and the error names the bad value. Before this, a path without a port failed later atconfigure()withnot enough values to unpack, and a port that wasn't a number failed with anint()error. Bracketed IPv6 hosts such as[fd00::1]:5514now work.