Skip to content

Improve PSL parser unicode and wildcard handling#107

Merged
jared-daniels merged 3 commits intomasterfrom
psl-data-parser-public-library
Mar 27, 2026
Merged

Improve PSL parser unicode and wildcard handling#107
jared-daniels merged 3 commits intomasterfrom
psl-data-parser-public-library

Conversation

@digilob
Copy link
Copy Markdown
Collaborator

@digilob digilob commented Mar 25, 2026

Summary

  • Squashes prior multi-commit history into a single clean commit
  • Improves PSL parser behavior for unicode/punycode parsing and wildcard/exception handling
  • Expands test coverage for unicode scripts, wildcard/exception rules, comments, and private domains

Validation

  • Focused PSL test suite passed in local verification

Copilot AI review requested due to automatic review settings March 25, 2026 19:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 PslDataParserTest with 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.

jared-daniels
jared-daniels previously approved these changes Mar 25, 2026
jared-daniels
jared-daniels previously approved these changes Mar 25, 2026
@jared-daniels jared-daniels merged commit e76abf4 into master Mar 27, 2026
3 checks passed
@jared-daniels jared-daniels deleted the psl-data-parser-public-library branch March 27, 2026 17:24
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.

4 participants