1.3.1 — SwiftPublicSuffixList 3.1.0 compatibility
Changed
- SwiftPublicSuffixList dependency bumped to 3.1.0. v3.0 tightened
PublicSuffixList.isUnrestricted(_:)/match(_:)to reject non-ASCII hostnames — IDN labels must be in ACE (Punycode) form. The defaultdomainValidatorclosure now callsPublicSuffixList.ace(_:)on the domain before dispatching toisUnrestricted(_:), so Unicode IDN domains continue to validate exactly as they did on 1.3.0 with PSL 2.x. Mailbox.Host.domain(...)still carries the original user-facing string; only the validator dispatch uses the ACE form.
Migration
Callers who pass a custom domainValidator closure to correctlyFormatted(_:) / mailbox(from:) and rely on the PSL default behavior via PublicSuffixList.isUnrestricted(_:) should wrap their call site with PublicSuffixList.ace(_:) if the closure receives Unicode IDN domains — e.g. { PublicSuffixList.isUnrestricted(PublicSuffixList.ace($0), rules: myRules) }.