Repository navigation
Conversation
Signed-off-by: si1k <19499950+si1k@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Mzack9999
approved these changes
Oct 23, 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.
Fixes #1490
Summary
/registercurrently accepts correlation IDs that the callback handlers cannot recognize. For example, a 20-character ID containingwregisters successfully, but subsequent callbacks are silently dropped becausewis outside the xid alphabet. Uppercase registration IDs also create unusable storage keys: callback handlers lowercase DNS names before looking them up.Validate the registered ID's configured length, xid alphabet, and lowercase storage-key form before creating storage or incrementing session metrics. Return HTTP 400 with the expected format when it is incompatible. Reuse the prefix predicate in callback recognition so registration and delivery use the same length/alphabet definition. The existing callback alphabets, case-insensitive DNS handling, nonce validation, and custom-length behavior remain unchanged.
Document the format and add regression tests for rejected registrations, unchanged storage/metrics, valid default and custom lengths, uppercase callback hostnames, and both HTTP/HTTPS handlers. Registration does not receive the per-callback nonce, so it cannot validate that future value; the documentation and tests retain that distinction.
Related: #1373, which tightened callback recognition. The separate ZAP client fix uses the native alphabets; this server fix makes incompatible registrations fail visibly rather than loosening callback recognition.
Validation
devand pass with this fix.go build ./...passes, including the example package.abc/extra-labela.prefixes. Consumed callbacks are not replayed. The same client also passes against original Interactsh 1.3.1 and 1.4.1.go build ./... go test -race -count=1 ./...The full matrix was run locally on macOS; upstream CI provides the additional platform checks. This PR does not change SMTP listeners, TLS, or client token generation.