fix: tighten URL detection in email connector to avoid false positives#8747
Merged
charIeszhao merged 3 commits intoMay 20, 2026
Merged
Conversation
COMPARE TO
|
| Name | Diff |
|---|---|
| .changeset/nervous-bats-bow.md | 📈 +97 Bytes |
| packages/toolkit/connector-kit/src/types/passwordless.test.ts | 📈 +2.19 KB |
| packages/toolkit/connector-kit/src/types/passwordless.ts | 📈 +199 Bytes |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts URL detection used by the connector-kit email branding validators to avoid incorrectly flagging dotted abbreviations (e.g. p.s.a.) as URLs, and adds regression tests for the reported configuration failure (issue #8589).
Changes:
- Tightened
urlRegExto only matchhttp(s)://URLs orwww.-prefixed hostnames. - Added Vitest coverage to ensure dotted abbreviations aren’t treated as URLs and the branding guard accepts the reported Polish company info.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/toolkit/connector-kit/src/types/passwordless.ts | Narrows URL-detection regex used by emailServiceBrandingGuard to avoid false positives on dotted abbreviations. |
| packages/toolkit/connector-kit/src/types/passwordless.test.ts | Adds tests covering the new URL detection behavior and a regression case for companyInformation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bc78ae9 to
c234a54
Compare
c234a54 to
4eaa26e
Compare
charIeszhao
approved these changes
May 19, 2026
gao-sun
approved these changes
May 19, 2026
Member
|
@aayushbaluni Thank you for your PR. We've made some modifications to your original commit and it's now merged to master. |
4 tasks
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
Email connector settings validation incorrectly rejects company information like "Company p.s.a." as a URL, preventing valid configuration.
Change
Tighten the URL detection pattern to require explicit URL schemes or sufficient structural evidence, avoiding false positives on dotted abbreviations.
Fixes #8589.
Made with Cursor