Skip to content

Conversation

@nicktrn
Copy link
Collaborator

@nicktrn nicktrn commented Dec 4, 2025

The previous examples lacked start and end anchors

@changeset-bot
Copy link

changeset-bot bot commented Dec 4, 2025

⚠️ No Changeset found

Latest commit: 3aaa17a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

Walkthrough

This pull request updates email validation regex patterns across configuration and documentation files. Four files are modified to add anchors and grouping to regex patterns used for email whitelisting: .env.example, docs/open-source-self-hosting.mdx, docs/self-hosting/docker.mdx, and docs/self-hosting/kubernetes.mdx. The changes convert unanchored alternation patterns (e.g., authorized@yahoo\.com|authorized@gmail\.com) to anchored, grouped patterns (e.g., ^(authorized@yahoo\.com|authorized@gmail\.com)$), which enforces exact full-string matching instead of substring matching.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that the regex patterns are syntactically correct and achieve the intended behavior of exact full-string email matching
  • Confirm the anchors (^ and $) and grouping are applied consistently across all occurrences
  • Consider whether this change to strict full-string matching is compatible with the existing authentication flow and won't inadvertently reject valid email addresses
  • Ensure documentation accurately reflects the new regex behavior and its security implications for email whitelisting

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is minimal and does not follow the provided template structure, lacking required sections like Testing, Changelog, and the checklist. Add missing sections: checklist items, Testing section describing steps taken to verify the regex changes work correctly, and a Changelog entry explaining the improvement to email validation patterns.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: update email regex examples' is clear and directly summarizes the main change of updating documentation with improved email regex patterns.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/email-regex-examples

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4dc9564 and 3aaa17a.

📒 Files selected for processing (4)
  • .env.example (1 hunks)
  • docs/open-source-self-hosting.mdx (1 hunks)
  • docs/self-hosting/docker.mdx (1 hunks)
  • docs/self-hosting/kubernetes.mdx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (23)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
.env.example (1)

36-39: Review the regex example patterns in .env.example for accuracy.

The email validation patterns are correctly using anchors (^...$) for full-string matching. JavaScript's RegExp.test() method (used in both apps/webapp/app/utils/email.ts and apps/webapp/app/models/user.server.ts) properly respects these anchors. The patterns are validated as syntactically correct regex via isValidRegex() in apps/webapp/app/utils/regex.ts. No breaking change concerns exist—these patterns were designed with anchors from the initial configuration.

docs/self-hosting/kubernetes.mdx (1)

479-479: Fix incorrect YAML escaping in regex pattern.

Line 479 uses double backslash \\. in the YAML string, which produces a literal backslash in the resulting regex, causing the pattern to fail. The pattern should use a single backslash \. to properly escape the dots, matching the conventions used in .env.example and other documentation files.

-      value: "^(user1@company\\.com|user2@company\\.com)$"
+      value: "^(user1@company\.com|user2@company\.com)$"

Likely an incorrect or invalid review comment.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nicktrn nicktrn merged commit 3f982ed into main Dec 4, 2025
31 of 32 checks passed
@nicktrn nicktrn deleted the docs/email-regex-examples branch December 4, 2025 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants