From b3c4f7eddc4d97e15077f1e9041c5abecc184afb Mon Sep 17 00:00:00 2001 From: Nya Candy Date: Sat, 23 Dec 2023 10:00:14 +0800 Subject: [PATCH] fix: email verify enable logic (#12743) --- packages/backend/src/core/EmailService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/core/EmailService.ts b/packages/backend/src/core/EmailService.ts index f31cec2b3..d4508d531 100644 --- a/packages/backend/src/core/EmailService.ts +++ b/packages/backend/src/core/EmailService.ts @@ -167,18 +167,18 @@ export class EmailService { const verifymailApi = meta.enableVerifymailApi && meta.verifymailAuthKey != null; let validated; - if (meta.enableActiveEmailValidation && meta.verifymailAuthKey) { + if (meta.enableActiveEmailValidation) { if (verifymailApi) { validated = await this.verifyMail(emailAddress, meta.verifymailAuthKey); } else { - validated = meta.enableActiveEmailValidation ? await validateEmail({ + validated = await validateEmail({ email: emailAddress, validateRegex: true, validateMx: true, validateTypo: false, // TLDを見ているみたいだけどclubとか弾かれるので validateDisposable: true, // 捨てアドかどうかチェック validateSMTP: false, // 日本だと25ポートが殆どのプロバイダーで塞がれていてタイムアウトになるので - }) : { valid: true, reason: null }; + }); } } else { validated = { valid: true, reason: null };