From dc0199aa46a7c5a3db1ad4b6a0639fc59cfb5cc5 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Thu, 13 Dec 2018 17:23:12 +0000 Subject: [PATCH] Fixes the request scheme, that's https. --- Yavsc/Controllers/Accounting/AccountController.cs | 6 +++--- Yavsc/Views/Shared/_LoginPartial.cshtml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Yavsc/Controllers/Accounting/AccountController.cs b/Yavsc/Controllers/Accounting/AccountController.cs index cb523558..15efe626 100644 --- a/Yavsc/Controllers/Accounting/AccountController.cs +++ b/Yavsc/Controllers/Accounting/AccountController.cs @@ -236,7 +236,7 @@ namespace Yavsc.Controllers // For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=532713 // Send an email with this link var code = await _userManager.GenerateEmailConfirmationTokenAsync(user); - var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme); + var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: "https"); var emailSent = await _emailSender.SendEmailAsync(model.UserName, model.Email, _localizer["ConfirmYourAccountTitle"], string.Format(_localizer["ConfirmYourAccountBody"], _siteSettings.Title, callbackUrl, _siteSettings.Slogan, _siteSettings.Audience)); // No, wait for more than a login pass submission: @@ -276,7 +276,7 @@ namespace Yavsc.Controllers { var code = await _userManager.GenerateEmailConfirmationTokenAsync(user); var callbackUrl = Url.Action("ConfirmEmail", "Account", - new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme); + new { userId = user.Id, code = code }, protocol: "https"); var res = await _emailSender.SendEmailAsync(user.UserName, user.Email, this._localizer["ConfirmYourAccountTitle"], string.Format(this._localizer["ConfirmYourAccountBody"], @@ -471,7 +471,7 @@ namespace Yavsc.Controllers // For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=532713 // Send an email with this link var code = await _userManager.GeneratePasswordResetTokenAsync(user); - var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme); + var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: "https"); await _emailSender.SendEmailAsync(user.UserName, user.Email, _localizer["Reset Password"], _localizer["Please reset your password by following this link:"] + " <" + callbackUrl + ">"); return View("ForgotPasswordConfirmation"); diff --git a/Yavsc/Views/Shared/_LoginPartial.cshtml b/Yavsc/Views/Shared/_LoginPartial.cshtml index d176440b..d821fa9e 100755 --- a/Yavsc/Views/Shared/_LoginPartial.cshtml +++ b/Yavsc/Views/Shared/_LoginPartial.cshtml @@ -37,7 +37,7 @@
- +