Skip to content
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

homograph attack prevention by toASCII option #108

Closed
nodabladam opened this issue Apr 24, 2020 · 1 comment
Closed

homograph attack prevention by toASCII option #108

nodabladam opened this issue Apr 24, 2020 · 1 comment

Comments

@nodabladam
Copy link

nodabladam commented Apr 24, 2020

I am using quill-magic-url which uses normalize-url (and lets me pass in options through to it).

I am trying to figure out the best way in this setup to prevent homograph attack where a bad user enters something that looks like http://ebаy.com (hover over) but is actually linking to equivalent IDN (punycode): http://xn--eby-7cd.com
https://blog.blazeinfosec.com/what-you-see-is-not-what-you-get-when-homographs-attack/

I believe it might be ideal if the browser safe version of normalize-url optionally converted url to ascii format to prevent this.

import punycode from "punycode";
...
if(toASCII) {
punycode.toASCII(url);
}

Thoughts?

sindresorhus added a commit that referenced this issue Apr 25, 2020
@sindresorhus
Copy link
Owner

This package already does this. I added a test to prove it: e69796d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants