Indice.AspNet icon indicating copy to clipboard operation
Indice.AspNet copied to clipboard

/api/account/validate-password does not take into account the request.userName

Open perisdr opened this issue 3 years ago • 1 comments

When there is no available user (e.g. the user is registering) the /api/account/validate-password endpoint does not take into account the userName from the request payload.

image

Therefore irrespectively of the MaxAllowedUserNameSubset the password rule always returns valid.

Expected behavior: When there is no user, the user instance that gets created needs to have the userName initialized from the request value.

perisdr avatar Jul 21 '21 14:07 perisdr

As I recall this is an improvement we made as a result from a Pen TEST security finding because it is leaking the usernames that the store already has in case of anonymous access. I thing the validation error should show up on the change password POST method just fine with 400 BadRequest but not on the hint list.

@perisdr check the change password post to see my asumption please

cleftheris avatar Jul 21 '21 14:07 cleftheris