Comment by addaon

Comment by addaon 10 months ago

9 replies

Slightly off-topic, but it would be nice if HN interpreted punycode in link descriptions. Especially given that the links go through a redirect, which means that the browser status bar sees them as part of the query and not the domain, so the browser's own interpretation of punycode never gets applied.

zahlman 10 months ago

Seeing the Punycode link is actually a security feature, because it means you aren't tricked into visiting, say, pple-06g.com (apple with a Cyrillic a).

  • smallerize 10 months ago

    There are conventions around that. https://chromium.googlesource.com/chromium/src/+/main/docs/i... Generally, if all the characters are from one script, then it is decoded. There are lots of exceptions detailed there, but it's harder to make a homoglyph attack work using only characters from one script to impersonate another.

    • dmurray 10 months ago

      That's not a convention, it's a specification for how Google Chrome does it.

      And it's not even a full specification. Several of its 13 steps link to other documents that need to be read to implement the spec fully. Step 12 refers to a list of "dangerous patterns" which appears only to exist in the Chromium source. Step 5 refers vaguely to "any characters used in an unusual way".

      It's not OK to say that because Chromium does it, it's some internet standard that random website maintainers should implement.

      • smallerize 10 months ago

        I think you're ignoring the conversation. There is a lot of discussion to be had, and we don't have to say that decoding punycode is a security risk and simply do without. I also said "conventions" specifically to avoid meaning that these are hard-and-fast rules. And Firefox does something pretty similar. https://wiki.mozilla.org/IDN_Display_Algorithm#Algorithm

lpapez 10 months ago

You can easily write a Tampermonkey Userscript for that. As HN doesn't update the CSS that often, should be quite low-maintenance solution.

samatman 10 months ago

Someone always says this when a punycode link shows up.

I'm glad they don't. What you see? That's the link. It's what the browser sends, it's what DNS resolves: it's the link. Displaying it as Unicode is just a display option, and it's one which opens up all manner of mischief through confusables.

It's a hacker culture choice, and it's one I appreciate.

  • TRiG_Ireland 10 months ago

    On the other hand, that's a rather ango-centric viewpoint.

    • samatman 10 months ago

      It is! So kind of you to notice. Perhaps you could also notice that English is the language used on Hacker News.

      I'm quite sure a website centered in a different cultural landscape might choose a different convention. Good for them, I say.

      If URLs start being Unicode, and not an ASCII encoding which is sometimes displayed as Unicode, that would be a different story. But that's not how things are.

[removed] 10 months ago
[deleted]