Warning: Non-US characters in user name (General)

by Auge ⌂, Thursday, May 04, 2017, 07:35 (2537 days ago) @ Micha

Hello Milo

$update['errors'][] .= '<p>Please make the names unique and inform the users in question about the changes.</p>';

Hmm, I don't like this proposal. If once the user-name was valid, it should be valid all the time (like the Password: md5 --> sha1).

The problem with it is the possibility of non-uniqueness of names. It came up, that the used collation utf8_general_ci does not distinct between "a" and "ä" or "o" and "ø" and so on. So two different names could be realised as identically by the database. To change this I want to change the collation of only the column mlf2_userdata.user_name to utf8_bin.

Because of the existing check for uniqueness of a user name during the registration it is very unlikely to duplicate a user name, but it is not impossible. It's possible, even it's very improbable, that the check failed. Thatswhy, only for safety reasons, I want to add the check in the update script. I do not expect to find doublettes at all because (Daniels example) after the change of the collation the users "daniel" and "däniel" would never again found as identical and a second user with the name "daniel" or "däniel" would already now be rejected during the <del>installation</del><ins>registration</ins> when other user(s) are registered under this/these name(s).

So this would be a safety net for the hypothetical case of a bitwise non-unique user name. This case has to be prevented because the users with the questionable name have the real chance of not to be able to log in again.

Again, this is a very hypothetical case in my eyes.

Tschö, Auge

Trenne niemals Müll, denn er hat nur eine Silbe!

Complete thread:

 RSS Feed of thread