Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should Unicode be allowed in usernames? [closed]

Why do most (all?) websites only support usernames in ASCII? Are there any security considerations if an admin decides to start accepting Unicode usernames?

like image 587
banx Avatar asked Aug 12 '10 18:08

banx


People also ask

What characters should be allowed in username?

Usernames can contain letters (a-z), numbers (0-9), and periods (.). Usernames cannot contain an ampersand (&), equals sign (=), underscore (_), apostrophe ('), dash (-), plus sign (+), comma (,), brackets (<,>), or more than one period (.)

What characters are illegal usernames?

Many web based user authentication systems don't allow usernames that contain characters other than letters, numbers and underscores.

Are hyphens allowed in usernames?

It is said that in UNIX and other alike systems, we can use hyphen for username in addition to Latin characters, numerics and underscore. On the other hand, the hyphen character is used as operator in so many programming languages.

Can you use Unicode in passwords?

It is 2018 and Google's Authentication API now supports unicode passwords.


2 Answers

Homoglyph attacks. User 'cat' and 'сat' are different unicode strings although they look the same. The first letter in the second 'сat' is Russian 'с' - "CYRILLIC SMALL LETTER ES" to be exact. The system can't easily tell that you're spoofing another user's name - to the computer the nicks are different.

Edit: Preventing mixed scripts does not solve the problem. For example 'сосо' is pure Cyryllic and can be used to spoof ascii 'coco'.

Also, left-to-right override (and friends.) Leave them unsanitized and they'll mess up your whole page.

like image 112
Rafał Dowgird Avatar answered Sep 29 '22 18:09

Rafał Dowgird


HTTP authentication? There could be some problems with sending the unicode username (and/or password) over existing protocols. One case that I have run into before is with Basic authentication. There is no well defined way to handle sending these unicode usernames/passwords in the basic auth headers.

like image 20
Mike Avatar answered Sep 29 '22 19:09

Mike