Allow + in email addresses for @kilocode.ai domain#26
Merged
markijbema merged 2 commits intomainfrom Feb 5, 2026
Merged
Conversation
- Modified validateMagicLinkSignupEmail to allow + for @kilocode.ai emails - Updated magicLinkSignupEmailSchema to allow + for @kilocode.ai emails - Added tests for the new behavior - Kept restriction in place for all other domains
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
|
The previous implementation used endsWith('@kilocode.ai') which incorrectly
allowed emails like mark+klaas@henkkilocode.ai to pass validation.
Changed isKilocodeDomain() to extract the domain portion after the @ symbol
and compare it exactly against '@kilocode.ai'.
Added test cases for lookalike domains to prevent regression.
markijbema
approved these changes
Feb 5, 2026
RSO
approved these changes
Feb 5, 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
This PR allows the
+character in email addresses (email subaddressing likeuser+test@kilocode.ai) but only for emails with the@kilocode.aidomain.Context
The team previously disabled
+in email addresses to prevent abuse (people creating multiple accounts). However, for internal testing purposes, team members with@kilocode.aiemails should be able to use the+syntax to create test accounts (e.g.,job+test1@kilocode.ai).Changes
validateMagicLinkSignupEmailto allow+for@kilocode.aiemailsmagicLinkSignupEmailSchemato allow+for@kilocode.aiemailsisKilocodeDomain()to check if an email is from the kilocode.ai domainFix: Strict Domain Matching
Fixed the
isKilocodeDomain()helper to strictly match only@kilocode.aidomain. The previous implementation usedendsWith("@kilocode.ai")which incorrectly allowed lookalike domains like@henkkilocode.aito pass validation.The fix extracts the domain portion after the
@symbol and compares it exactly:job+test1@kilocode.ai✅ allowedmark+klaas@henkkilocode.ai❌ rejectedTesting
should allow email with + character for @kilocode.ai domain(validateMagicLinkSignupEmail)should reject uppercase @kilocode.ai email even with +(validateMagicLinkSignupEmail)should reject email with + character for lookalike domains ending in kilocode.ai(validateMagicLinkSignupEmail)should allow email with + character for @kilocode.ai domain(magicLinkSignupEmailSchema)should reject email with + character for lookalike domains ending in kilocode.ai(magicLinkSignupEmailSchema)Built for Mark by Kilo for Slack