mathiasbynens / punycode.js

A robust Punycode converter that fully complies to RFC 3492 and RFC 5891.
https://mths.be/punycode
MIT License
1.6k stars 159 forks source link

I believe punycode.decode("ls8h=") should be an error #129

Closed domenic closed 1 year ago

domenic commented 1 year ago

I don't know the actual punycode algorithm, but based on the URL Standard test cases expecting https://xn--ls8h=/ to be an error, and jsdom/whatwg-url not passing this, I think the issue is with Punycode. punycode.decode("ls8h=") gives me "💧💩" instead of erroring.

/cc @karwa who seems to have enough of the Punycode algorithm in their head to be able to contribute fixes, potentially 🙏

karwa commented 1 year ago

I think I fixed this already 😊 - https://github.com/mathiasbynens/punycode.js/pull/124

When I try it on the RunKit NodeJS playground, the example does throw an error: https://runkit.com/embed/2b1uqmww0euj

domenic commented 1 year ago

Hmm, I was pretty sure I had updated my dependencies, but I guess not!