fix(std): match a group name literally in user.group - #668
Merged
Merged
Conversation
haribo
force-pushed
the
fix/660-user-group-literal
branch
from
September 13, 2026 15:40
0ea19ff to
81cc694
Compare
haribo
force-pushed
the
fix/660-user-group-literal
branch
from
September 13, 2026 15:41
81cc694 to
d25fc65
Compare
This was referenced Sep 13, 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.
Summary
user.shellf:56observed membership withgrep -qx "$group"— a basic regular expression,not a literal. Debian allows
.in a group name, so a request foradvg.bwas satisfied bymembership of
advgxb, and the def reportedalreadyover a user it never added.grep -qxF -- "$group"now.--as well, for the reason #639 needed it: a name starting with adash is otherwise read as options.
The same class as #598, which fixed exactly this in
htpasswd.entrywherea.bread anotheraccount's hash. The shape survived here.
Test plan
test/e2e/plans/adverse-user.group-regex.shellf, verified red first:Convergence proven on a second run with an ordinary group name:
ok.addedthenok.already.The case also asserts the look-alike group is still there —
usermod -aGappends.One thing worth recording about writing the case. The setup's own guard — "assert the user is
not in
advg.bbefore calling the def" — was writtengrep -qxand therefore reproduced thebug under test: it matched
advgxb, and failed the setup instead of the def. It isgrep -qxFnow, with a comment saying why. A guard written with the defect it guards against is a case that
can only fail for the wrong reason.
go test ./...,test/changelog-rule.sh,test/e2e/def-coverage.shgreen.Also here: a misfiled changelog entry, moved
#667's entry for #658 landed in the published
[0.14.0]section instead of[Unreleased].Cause: since the v0.14.0 roll,
[Unreleased]carries only### Added, so "the first### Fixedin the file" is 0.14.0's. This PR gives
[Unreleased]its own### Fixedand moves the entrythere.
This is the same defect as #630, in the same place, four days later. Worth naming rather than
quietly fixing, along with why nothing caught it:
test/changelog-rule.shvalidates entriesinside
[Unreleased]only, so an entry filed into a released section is invisible to it.That gap is not closed here — it is a check worth writing on its own, and this PR is not it.
Closes #660