diff --git a/aspnet-core/framework/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Dto/ValueType.cs b/aspnet-core/framework/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Dto/ValueType.cs
index 4ad54a458..000cc6c14 100644
--- a/aspnet-core/framework/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Dto/ValueType.cs
+++ b/aspnet-core/framework/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Dto/ValueType.cs
@@ -2,6 +2,10 @@
public enum ValueType
{
+ ///
+ /// 不加入设置管理(配合前端请勿传递设置值)
+ ///
+ NoSet = -1,
///
/// 字符
///
diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/Emailing/AccountEmailSender.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/Emailing/AccountEmailSender.cs
index de699ed62..e14118a2c 100644
--- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/Emailing/AccountEmailSender.cs
+++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/Emailing/AccountEmailSender.cs
@@ -66,7 +66,7 @@ public class AccountEmailSender :
var url = await AppUrlProvider.GetUrlAsync(appName, AccountUrlNames.EmailConfirm);
- var link = $"{url}?userId={user.Id}&{TenantResolverConsts.DefaultTenantKey}={user.TenantId}&confirmToken={UrlEncoder.Default.Encode(confirmToken)}";
+ var link = $"{url}?userId={user.Id}&{TenantResolverConsts.DefaultTenantKey}={user.TenantId}&confirmToken={confirmToken}";
if (!returnUrl.IsNullOrEmpty())
{
diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs
index fc9e32a5f..0b77eb666 100644
--- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs
+++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/MyProfileAppService.cs
@@ -9,8 +9,11 @@ using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Net;
using System.Text;
+using System.Text.Encodings.Web;
using System.Threading.Tasks;
+using System.Web;
using Volo.Abp;
using Volo.Abp.Account.Localization;
using Volo.Abp.Application.Dtos;
@@ -165,11 +168,12 @@ public class MyProfileAppService : AccountApplicationServiceBase, IMyProfileAppS
}
var token = await UserManager.GenerateEmailConfirmationTokenAsync(user);
+ var confirmToken = WebUtility.UrlEncode(token);
var sender = LazyServiceProvider.LazyGetRequiredService();
await sender.SendEmailConfirmLinkAsync(
user,
- token,
+ confirmToken,
input.AppName,
input.ReturnUrl,
input.ReturnUrlHash);
@@ -181,7 +185,9 @@ public class MyProfileAppService : AccountApplicationServiceBase, IMyProfileAppS
var user = await UserManager.GetByIdAsync(CurrentUser.GetId());
- (await UserManager.ConfirmEmailAsync(user, input.ConfirmToken)).CheckErrors();
+ // 字符编码错误
+ var confirmToken = WebUtility.UrlDecode(input.ConfirmToken.Replace("%20", "%2B"));
+ (await UserManager.ConfirmEmailAsync(user, confirmToken)).CheckErrors();
await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext
{
diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs
index 825061745..3c3a4b019 100644
--- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs
+++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs
@@ -477,7 +477,7 @@ public class SettingAppService : ApplicationService, ISettingAppService, ISettin
description: LocalizableString.Create("Description:Emailing.SendTestEmail")),
StringLocalizerFactory,
"",
- ValueType.String,
+ ValueType.NoSet,
providerName)
.WithSlot("send-test-email")
.RequiredPermission("SettingManagement.Emailing");