Hello everyone, here’s an interesting headscratcher for you.
I am working on a website that should allow for users to register a login name but that will allow them to pick any display name they want for the forum. It has been decided that we do not want to limit them too much in what they can choose. If they want to be called _Holy Zarquon's Singing Fish_ [1] I do not want to get in their way.
However, how do you keep them from spoofing eachother when you open-up the unicode bucket? In other words, how should names be cleaned up before using them in our system?
Some of the things I think will be important:
1. Whitespace should be removed from the beginning and end of the name.
2. Whitespace in the middle of the name should be normalised to normal spaces only.
3. Break ligatures into separate letters so `ij` can’t be spoofed with `ij`.
4. Replace ‘letterlike symbols’, e.g. replace `K` with `K`.
How would you do this in PHP? See the first reply in this thread which illustrates a problem NoNonsense Forum has with this.
---