LibURL: Set IDNA's IgnoreInvalidPunycode to false

See: https://github.com/whatwg/url/commit/a6e449 - which should have no
functional change.
This commit is contained in:
Shannon Booth 2024-12-01 22:56:27 +13:00 committed by Alexander Kalenik
commit 87c8ae31d3
Notes: github-actions[bot] 2024-12-05 16:30:37 +00:00

View file

@ -506,7 +506,8 @@ static ErrorOr<String> domain_to_ascii(StringView domain, bool be_strict)
// CheckJoiners set to true,
// UseSTD3ASCIIRules set to beStrict,
// Transitional_Processing set to false,
// VerifyDnsLength set to beStrict. [UTS46].
// VerifyDnsLength set to beStrict,
// and IgnoreInvalidPunycode set to false. [UTS46]
// 2. If result is a failure value, domain-to-ASCII validation error, return failure.
@ -538,7 +539,8 @@ static ErrorOr<String> domain_to_ascii(StringView domain, bool be_strict)
Unicode::IDNA::CheckJoiners::Yes,
be_strict ? Unicode::IDNA::UseStd3AsciiRules::Yes : Unicode::IDNA::UseStd3AsciiRules::No,
Unicode::IDNA::TransitionalProcessing::No,
be_strict ? Unicode::IDNA::VerifyDnsLength::Yes : Unicode::IDNA::VerifyDnsLength::No
be_strict ? Unicode::IDNA::VerifyDnsLength::Yes : Unicode::IDNA::VerifyDnsLength::No,
Unicode::IDNA::IgnoreInvalidPunycode::No,
};
auto result = TRY(Unicode::IDNA::to_ascii(Utf8View(domain), options));