-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homoglyphs in URL tooltips #15432
Comments
I should add, I'm quite impressed that it decoded the punycode URL in the first place, and I think it's a good thing that we don't discriminate against non-Latin languages. However, there should at least be some indication when a URL contains characters that aren't ASCII. |
I can reproduce this in Windows 11 (10.0.22621.1702), so it doesn't seem to be Windows 10 specific. (Edited to include version number) |
Ah, you know what? I was totally wrong about what we prevented. Great catch. (The change actually prevents the display of URLs with an RTL/LTR override in them, which can be used to mask the destination.) |
For reference: https://chromium.googlesource.com/chromium/src/+/main/docs/idn.md |
If you mean we shouldn't convert the punycode version to Unicode, that wouldn't help, because it could just as easily have been Unicode to start with. I only used the punycode encoding in my example to make it obvious it was doing something dodgy. A simple solution could be to check if the URL has anything other than ASCII, and if so, add a little warning in the tooltip saying exactly that (e.g. "Warning: this URL contains characters that aren't ASCII"). |
Oh, I meant that we could actively encode any non-ASCII URL as punycode ourselves. It's what a hypothetical domain would actually be named anyways after all. Edit: Actually, we should probably show both: https://www.unicode.org/reports/tr36/#Punycode_Spoofs |
OK, that makes sense. I thought you were saying there wasn't an API for that. I realise now you were talking about Chrome's IDN policy algorithm.
Yep. I was just going to recommend that. |
06174a9 didn't properly fix the issue of us showing homoglyphs in our URI tooltip. This commit introduces a different approach where we display both, the Punycode and Unicode encoding, whenever we encounter an IDN. This isn't perfect but simple to implement. Closes #15432 ## Validation Steps Performed * `https://www.xn--fcbook-3nf5b.com/` (which contains confusing glyphs) is shown both in its Punycode and Unicode form simultaneously. ✅ --------- Co-authored-by: Carlos Zamora <[email protected]>
06174a9 didn't properly fix the issue of us showing homoglyphs in our URI tooltip. This commit introduces a different approach where we display both, the Punycode and Unicode encoding, whenever we encounter an IDN. This isn't perfect but simple to implement. Closes #15432 ## Validation Steps Performed * `https://www.xn--fcbook-3nf5b.com/` (which contains confusing glyphs) is shown both in its Punycode and Unicode form simultaneously. ✅ --------- Co-authored-by: Carlos Zamora <[email protected]> (cherry picked from commit f1aa699) Service-Card-Id: 90012448 Service-Version: 1.17
06174a9 didn't properly fix the issue of us showing homoglyphs in our URI tooltip. This commit introduces a different approach where we display both, the Punycode and Unicode encoding, whenever we encounter an IDN. This isn't perfect but simple to implement. Closes #15432 ## Validation Steps Performed * `https://www.xn--fcbook-3nf5b.com/` (which contains confusing glyphs) is shown both in its Punycode and Unicode form simultaneously. ✅ --------- Co-authored-by: Carlos Zamora <[email protected]> (cherry picked from commit f1aa699) Service-Card-Id: 90012449 Service-Version: 1.18
Windows Terminal version
1.18.1421.0
Windows build number
10.0.19045.2913
Other Software
No response
Steps to reproduce
Expected Behavior
There was a new feature advertised in the v1.18.1421.0 release notes that said "when you're hovering over a URL, we now display it in a partially-encoded form to help you avoid homoglyph attacks". So I expected there would be something in the tooltip indicating that this link was not exactly what it seemed.
Actual Behavior
The URL displayed in the tooltip gives the impression that it's linking to
https://www.facebook.com/
, which is very misleading.Does PR #15095 perhaps rely on functionality that's only available in Windows 11?
The text was updated successfully, but these errors were encountered: