Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2889 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 114 114
Lines 2599 2601 +2
Branches 658 659 +1
=========================================
+ Hits 2599 2601 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
smoelius
force-pushed
the
fix-isFQDN
branch
from
September 16, 2026 17:04
f75c95c to
a8c3632
Compare
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.
Following an internal review, we noticed that PR #2822 contained an incomplete fix. Specifically, it caused default
isEmailvalidation to accept email addresses whose domains contain unpaired UTF-16 surrogates, such asuser@\uD800.com. This PR addresses that.Recall, PR #2822 made
isByteLengthtolerate unpaired surrogates. Before #2822, defaultisEmailvalidation threwURIErrorfor these inputs. But with the change toisByteLength, execution reachesisFQDNwhich accepts unpaired surrogates.The present PR causes
isFQDNto reject unpaired surrogates, so affected email addresses returnfalsewithout throwing, including whenignore_max_lengthis set totrue. Valid surrogate pairs retain their existing behavior, andisByteLengthcontinues to count unpaired surrogates as three bytes, matching the UTF-8 encoding of the replacement character (U+FFFD).Regression tests cover both
isFQDNandisEmail, with default options andignore_max_length: true. The test cases include: