Repository navigation
[ANCHOR-1401]: Reject a wildcard home domain over the DNS length limits and pin the SEP-10 PoC - #2088
Merged
Merged
Conversation
… SEP-10 challenge request
…SEP-10 challenge validation
… and host length limits
…P-10 challenge request
…P-45 challenge and validation
amandagonsalves
approved these changes
Nov 12, 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.
Description
home_domainsmatch whose host has a label longer than 63 characters or is longer than 253 characters (the:portis not counted). The check lives inClientDomainHelper.hasValidHostLabels, so SEP-10 and SEP-45 both get it. Exactly 63 and exactly 253 are still accepted. The exact-match branch is unchanged.*.wildcard.stellar.org) and strings:evil.com/x.wildcard.stellar.organda.wildcard.stellar.org/evilare rejected,abc.def.wildcard.stellar.organda.wildcard.stellar.orgare accepted.createChallenge(GET/auth)validateChallenge(POST/auth, operation key name check)validateChallengeTransactionHomeDomainContext
home_domainon a wildcard config becauseisDomainNameMatchexpanded*to.*, soevil.com/x.wildcard.stellar.orgmatched*.wildcard.stellar.org.*limited to[A-Za-z0-9_.-], plus empty/hyphen-edged label rejection) is already in [ANCHOR-1400]: Validate the SEP-45 home domain with the shared matcher and restrict wildcard matching #2087 (ANCHOR-1400), which this branch is stacked on. This PR does not touch it.createChallengehad a test with a slash payload, and with another fixture; the POST/authsites had none. (2) The assessment promised to reject ahome_domainthat is not a syntactically valid host, but a label over 63 characters or a host over 253 still matched under*.sdp.stellar.org, which no DNS host can have.Testing
./gradlew test./gradlew :core:testpasses in full (1168 tests); 14 tests added inClientDomainHelperTest(7),Sep10ServiceTest(6) andSep45ServiceTest(1).:8080port pattern)../gradlew :core:spotlessCheckpasses.>to>=on each limit, dropping the port strip) and 15 more throwaway ones (including*back to.*) were all caught by the tests.Documentation
N/A: internal validation change, no feature or public API change.
Known limitations
fix/anchor-1400): retarget this PR todeveloponce [ANCHOR-1400]: Validate the SEP-45 home domain with the shared matcher and restrict wildcard matching #2087 merges._is still accepted in wildcard labels (kept on purpose in ANCHOR-1400)./authendpoints.