umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.54k stars 2.71k forks source link

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

Open Arlanet-Emre opened 1 month ago

Arlanet-Emre commented 1 month ago

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&test@umbraco.com. 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 commented 1 month ago

@Arlanet-Emre https://github.com/umbraco/Umbraco-CMS/issues/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 commented 1 month ago

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 commented 1 month ago

@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 commented 1 month ago

@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.