Improve PSL parser unicode and wildcard handling#107
Merged
jared-daniels merged 3 commits intomasterfrom Mar 27, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves Public Suffix List (PSL) parsing behavior around Unicode/punycode handling and expands unit test coverage for Unicode scripts, wildcard/exception rules, comment/empty-line skipping, and private-domain section parsing.
Changes:
- Update PSL parsing to attempt punycode insertion using
IDN.toASCII(..., IDN.ALLOW_UNASSIGNED)and warn (instead of failing) when conversion throws. - Expand
PslDataParserTestwith parameterized tests covering Unicode scripts, wildcards/exceptions, comments/empty lines, and private domains. - Refactor test imports to support the expanded assertions and parameterized test infrastructure.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| library/src/main/java/com/digicert/validation/psl/PslDataParser.java | Adds punycode conversion flags and warning behavior on conversion failures. |
| library/src/test/java/com/digicert/validation/psl/PslDataParserTest.java | Adds parameterized tests for Unicode, wildcards/exceptions, comments, and private domain sections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
library/src/test/java/com/digicert/validation/psl/PslDataParserTest.java
Show resolved
Hide resolved
library/src/main/java/com/digicert/validation/psl/PslDataParser.java
Outdated
Show resolved
Hide resolved
jared-daniels
previously approved these changes
Mar 25, 2026
jared-daniels
previously approved these changes
Mar 25, 2026
jared-daniels
approved these changes
Mar 25, 2026
yunruiwatts
approved these changes
Mar 25, 2026
jared-daniels
approved these changes
Mar 26, 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
Validation