fix(q): reject oversized credential strings - #13
Merged
protocolstardust merged 1 commit intoSep 25, 2026
Merged
Conversation
Collaborator
|
Not merged as is: this overlaps #10, which landed on master today (e08ab96) and already covers most of it:
The branch now conflicts in What is still new here and worth keeping
What I would not take over #10
Please rebase onto master and reduce the PR to the length check plus one test line, then it can go in quickly. Leaving this open for that. |
belowzeroff
force-pushed
the
fix/q-strict-arg-validation
branch
from
September 25, 2026 15:36
99f8fae to
8288945
Compare
Contributor
Author
|
Addressed:
|
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.
What changes for users
.q.connectnow rejectsuserorpasswordstrings longer than 127 bytes with alengtherror instead of silently truncating them and later reporting a misleading authentication failure.Valid credentials and all existing valid
.q.*calls keep their behavior.Why
The credential buffers are 128 bytes including the terminating NUL. Previously, oversized credentials were truncated before the handshake, which could make a valid user input fail with an unrelated
autherror.Validation
master(92e0d91)make test: codec, CLI, server, malformed-frame, real-q interop, all client suites, poll, and push tests passedmake testclient regression includes a 128-byte username and expectslengthgit diff --check: passedThis PR intentionally contains only the length validation and its regression test; the overlapping type, timeout, and handle checks are already in PR #10.