Skip to content

ResetPassword code should be HtmlDecoded #8325

Closed
@westonsoftware

Description

@westonsoftware

An "invalid token" message is displayed periodically on the ResetPassword page after using the ForgotPassword page to send the user an email, and clicking on that link.

https://github.com/aspnet/AspNetCore/blob/bfec2c14be1e65f7dd361a43950d4c848ad0cd35/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ResetPassword.cshtml.cs#L120

I believe the fix should be to decode the code like this ...

var decoded = System.Web.HttpUtility.HtmlDecode(Input.Code);
var result = await _userManager.ResetPasswordAsync(user, decoded, Input.Password);

I would do a PR for this but I have never contributed before and I thought someone could squeeze this in.
Thanks
--Andy

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedarea-identityIncludes: Identity and providersbugThis issue describes a behavior which is not expected - a bug.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions