From f5dcdfd8de40bdf96a87ba41a80b20cf3d1b9b60 Mon Sep 17 00:00:00 2001 From: Jass Bagga Date: Tue, 5 Dec 2017 12:38:19 -0800 Subject: [PATCH] Encode ForgotPassword email link (#179) --- .../Areas/Identity/Controllers/AccountController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Areas/Identity/Controllers/AccountController.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Areas/Identity/Controllers/AccountController.cs index 02250ce380..905a9f7fcf 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Areas/Identity/Controllers/AccountController.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Areas/Identity/Controllers/AccountController.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Security.Claims; +using System.Text.Encodings.Web; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authorization; @@ -374,7 +375,7 @@ namespace Company.WebApplication1.Identity.Controllers var code = await _userManager.GeneratePasswordResetTokenAsync(user); var callbackUrl = Url.ResetPasswordCallbackLink(user.Id, code, Request.Scheme); await _emailSender.SendEmailAsync(model.Email, "Reset Password", - $"Please reset your password by clicking here: link"); + $"Please reset your password by clicking here: link"); return RedirectToAction(nameof(ForgotPasswordConfirmation)); }