From a930cddd1f54737577455b7917c32d1416080876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B4=87=E5=B3=B0=20=E6=9C=94=E8=8F=AF?= Date: Sun, 24 Nov 2024 21:15:21 +0900 Subject: [PATCH] =?UTF-8?q?Mod:=20=E3=83=A1=E3=83=BC=E3=83=AB=E3=83=89?= =?UTF-8?q?=E3=83=A1=E3=82=A4=E3=83=B3=E3=83=96=E3=83=A9=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E3=82=92=E3=83=90=E3=83=AA=E3=83=87?= =?UTF-8?q?=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E3=82=88=E3=82=8A=E5=85=88?= =?UTF-8?q?=E3=81=AB=E8=A9=95=E4=BE=A1=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/EmailService.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/backend/src/core/EmailService.ts b/packages/backend/src/core/EmailService.ts index da198d0e42..df6b981b69 100644 --- a/packages/backend/src/core/EmailService.ts +++ b/packages/backend/src/core/EmailService.ts @@ -176,6 +176,16 @@ export class EmailService { }; } + const emailDomain: string = emailAddress.split('@')[1]; + const isBanned = this.utilityService.isBlockedHost(this.meta.bannedEmailDomains, emailDomain); + + if (isBanned) { + return { + available: false, + reason: 'banned', + }; + } + let validated: { valid: boolean, reason?: string | null, @@ -214,16 +224,6 @@ export class EmailService { }; } - const emailDomain: string = emailAddress.split('@')[1]; - const isBanned = this.utilityService.isBlockedHost(this.meta.bannedEmailDomains, emailDomain); - - if (isBanned) { - return { - available: false, - reason: 'banned', - }; - } - return { available: true, reason: null,