fix(auth): reject email domains with error website responses - #1188
Open
AM-young-fun wants to merge 1 commit into
Open
AM-young-fun wants to merge 1 commit into
AM-young-fun wants to merge 1 commit into
Conversation
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.
Problem
Registration treated any HTTP response from an email domain root as a reachable website. Domains returning 400, 403, 500, or 502 could therefore pass the website gate and register.
Root cause
emailDomainWebsiteReachablereturnedtruewhenever the HTTP client received a response, regardless of status code. The registration policy also exempted domains whose MX belonged to a major provider, even when the root website was unavailable.Change
Validation
go test ./service -run 'TestRegistrationSecurity|TestEmailDomainWebsiteStatus' -count=1— 21 passed.go test ./controller -run 'TestRegister|TestOAuth|RegistrationSecurity' -count=1— 25 passed.go test ./service/... -count=1— 6 unrelated pre-existing failures in asset-binding tests, including restricted-port listener setup; registration security tests pass.git diff --checkpasses.Deployment
Router deploy required because registration routes are served on router nodes. Console/staging Go services should receive the same backend build; website, Terraform, and Cloudflare are not involved.