-
Notifications
You must be signed in to change notification settings - Fork 68
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
do not allow utf-8 in domains to avoid lookalike character attacks #63
base: master
Are you sure you want to change the base?
Conversation
Looking at zendesk#5 I think there's still an edge case here that I failed to capture in the tests. Note that I also changed: if (!isalnum(data[0])) return 0;
for (i = 1; i < size - 1; ++i) {
... to if (data[0] == '.' || data[0] == '-') return 0;
for (i = 0; i < size - 1; i++) { I think the first character still has a chance to be exploited here. |
that change seems weird ... a strange e would not be . or - ... so I remove On Tue, Oct 4, 2016 at 2:46 PM, Jonathan Cheatham [email protected]
|
right, but notice that it also bumps the for loop forward by one, so if you had a strange 'e', |
Thanks for the PR! This would be a lovely thing to get going, and I think it's important, but there's some bits missing to apply this to our fork.
It's notable that the tests are broken, because of complicating factors:
|
Ah, I had thought |
41bd324
to
dab47aa
Compare
dab47aa
to
b5659b2
Compare
... a little bit better now ... only thing failing is utf8-space ... does the direction look ok / any good idea how to fix that ?
|
stil and issue ... we use a fork to get around it :( |
Not particularly, at least by me! rinku is from an earlier era of Rails development, and there are most likely better options today. |
Wow, thanks for the quick response! 😆 From what I see, there's this, Zendesk's fork, and the original. Maybe the latter is the best at this point - I assume a 30x increase in speed from the already miniscule timing won't really make much of a difference in the long run. |
http://www.irongeek.com/homoglyph-attack-generator.php
trying to port over zendesk#5
but does not work ... missing something :/
@jcheatham
/fyi @vmg sounds like a good feature ?