Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Illegal symbol / minus in username shows as "Username taken" #459

Open
PhoenixIV opened this issue Nov 7, 2019 · 3 comments
Open

Illegal symbol / minus in username shows as "Username taken" #459

PhoenixIV opened this issue Nov 7, 2019 · 3 comments

Comments

@PhoenixIV
Copy link

PhoenixIV commented Nov 7, 2019

Android, German

When changing my username (@ xxx) I tried to put a name with a - (minus). The result was the error message "Benutzername @ xy-z ist bereits vergeben" (En: Username taken). This applied to random usernames with - in it, there is no way these usernames were actually taken.

Expected behavior:
The error message says "Only xyz allowed", "You used an illegal character"
OR
Allow minus in usernames

This is about the German localization of the Okuna App. I did not try anything in other languages.

@PhoenixIV PhoenixIV changed the title Illegal symbol in username shows as "Username taken" Illegal symbol / minus in username shows as "Username taken" Nov 7, 2019
@duichwer
Copy link
Contributor

@PhoenixIV does this still happen with the current release?

@PhoenixIV
Copy link
Author

IMG_20200530_194843
IMG_20200530_194811

Yes

@duichwer
Copy link
Contributor

duichwer commented May 31, 2020

Thanks for the reply. That helped me finding the correct trace:
The Api class that is called is checking if the username is taken, and if the characters are valid.
https://github.com/OkunaOrg/okuna-api/blob/9f3a0187df9cf7e3229ced2d8c45c348e126fabf/openbook_auth/views/auth/views.py#L85

Maybe the check inside the app should be turned around tho check at first the characters and then if the username is taken.

For Reference:
Have a look at the creation of an account e.g. :

String validateUsernameResult = _validationService.validateUserUsername(username.trim());

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants