From a8d671fa051be5915be5697e24823fdd683faf09 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 14 Aug 2023 11:07:05 +0800 Subject: [PATCH] Encode the `returnUrl` if it start with `/connect/authorize?`. --- .../Volo/Abp/Account/Emailing/AccountEmailer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/Emailing/AccountEmailer.cs b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/Emailing/AccountEmailer.cs index a997435168..4c5ab17ef3 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/Emailing/AccountEmailer.cs +++ b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/Emailing/AccountEmailer.cs @@ -101,6 +101,11 @@ public class AccountEmailer : IAccountEmailer, ITransientDependency } } + if (returnUrl.StartsWith("/connect/authorize?", StringComparison.OrdinalIgnoreCase)) + { + return HttpUtility.UrlEncode(returnUrl); + } + return returnUrl; } }