Repository navigation
wolfsshd: config file parser fixes - #1347
Open
ejohnstown wants to merge 4 commits into
Open
ejohnstown wants to merge 4 commits into
ejohnstown wants to merge 4 commits into
Conversation
GetConfigInt() now requires the whole value to be decimal digits, apart from one time-unit suffix for LoginGraceTime, so "Port 22abc" and "LoginGraceTime 2junk" fail to load instead of reading 22 and 2. - accept the s, m, h, d and w time suffixes in either case, as OpenSSH does - reject values above 0x7FFFFFFF, before and after the multiplier - add Port, Protocol and LoginGraceTime cases to the parser test Issue: F-10549
HandleInclude() now checks the first character of the pattern for a '*', so a pattern with no directory part, such as "Include *.conf", is expanded rather than opened as a literal file. The '*' may match an empty sequence, but the fixed prefix and postfix may not overlap. - skip names with a leading '.' unless the pattern starts with '.', as glob(3) does - add tests for foo*, *foo, f*o, a*a and the overlapping ab*ba - add a leading-wildcard pattern that matches nothing Issue: F-10550, F-14632
Match User and Match Group now take a comma separated list of exact names and apply when any entry equals the user or one of the user's groups. - reject '*', '?', '!' and empty entries in a Match name list - add parser cases and a Match list lookup test Issue: F-11661
ConfigLoad() reads lines of up to 1023 bytes and drains the rest of a longer one, so its tail is never parsed as a line of its own. - skip an over-long comment whole and fail the load on an over-long directive, also one pushed out by leading whitespace - ignore whitespace past the end of the buffer - move the limit to WOLFSSHD_MAX_LINE_SIZE in configuration.h, raised from 160 to 1024 - add a long-line load test Issue: F-14395
ejohnstown
force-pushed
the
sshd-parser
branch
from
October 28, 2026 22:07
c4d31e3 to
cb1501d
Compare
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.
Four fixes to how wolfsshd parses its config file.
This overlaps the long-line change in #1344; whichever merges second
will be rebased onto the other.
Issue: F-10549, F-10550, F-14632, F-11661, F-14395