Should Unicode be allowed in usernames?

后端 未结 8 1835
感情败类
感情败类 2020-12-25 09:58

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

相关标签:
8条回答
  • 2020-12-25 10:36

    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.

    0 讨论(0)
  • 2020-12-25 10:37

    I would say a big reason is the lack of support for unicode in most PHP installations. It isn't easy to work with, so why allow it when the possibilities in ASCII are sufficient to cover your entire user base?

    0 讨论(0)
提交回复
热议问题