Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing password with an username that contains special character does not work #17347

Open
Arlanet-Emre opened this issue Oct 23, 2024 · 5 comments

Comments

@Arlanet-Emre
Copy link

Arlanet-Emre commented Oct 23, 2024

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

13.5.2

Bug summary

Trying to change the password of a member with a username that contains a special character like '&' gives the following error:

Could not reset user password "Invalid username"

Specifics

image

Steps to reproduce

  1. Navigate to the backoffice and open the Members tab.
  2. Create and save member with a username that contains a special character like umbraco&[email protected].
    image
  3. Press the change password button
  4. Enter a valid password
  5. Press Save to save member

Expected result / actual result

The member should be saved, just like when creating the member with a username that contains a special character.

Instead the save button stays stuck on the loading animation. When navigating to the Log Viewer a warning shows up, explaining that the member password could not be changed (just like in the first screenshot).

@bielu
Copy link
Contributor

bielu commented Oct 24, 2024

@Arlanet-Emre #14823 I reported this issue sometime ago and partially fixed it but yeah I didn't touch the of validation to fully fix.

@Arlanet-Emre
Copy link
Author

Arlanet-Emre commented Oct 25, 2024

Small update thanks to @bielu related issue; the error can be fixed by adding '&' character to the AllowedUserNameCharacters. However, it does not explain the inconsistency between being able to save a username containing a special character, but not resetting the password without using this option.

@bielu
Copy link
Contributor

bielu commented Oct 25, 2024

@Arlanet-Emre the other ticket mentioned does explain it. It use different validations systems and unless it get unified it will be the case, but it is not that easy to do 🤷

@Arlanet-Emre
Copy link
Author

@bielu You're right. What I meant was the reason for it being different, but you mentioned it not easy to combine it to one validation system.

@NguyenThuyLan
Copy link
Contributor

I was able to reproduce it on v13.5.2, v14.3.1 and v15.1.1
When creating a new member with username = umbraco&[email protected], it returns Invalid username,
When updating a member username from [email protected] to umbraco&[email protected], it can be saved
Then do change the password, and it returns 'PasswordChangeFailed'
The reason seems to be the validation between Create and Update is not consistent

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

No branches or pull requests

3 participants