BobbyWibowo / lolisafe

Blazing fast file uploader and awesome bunker written in node! 🚀
MIT License
329 stars 56 forks source link

Make usernames case-sensitive. #528

Closed breachedvince closed 2 years ago

breachedvince commented 2 years ago

Make the usernames case-sensitve when registering and logging in. You can have an account named " root " and another named " Root" or an account named " bobby " and another one named " Bobby " it is very annoying when dealing with stuff in admin panel etc.

BobbyWibowo commented 2 years ago

What you want isn't case-sensitivity, but the opposite As it currently is, it already is case-sensitive, hence why you can create dupe users like that But all operations involving users are also already case-sensitive and will thus only affect users with the exact same case

It's a very old custom so it's not going to change But feel free to modify your own register() and createUser() functions in authController.js to do the duplicate username check case-insensitively