mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 10:20:27 +01:00
Mod: メールドメインブラックリストをバリデーションより先に評価する
This commit is contained in:
parent
eddf6a2319
commit
a930cddd1f
1 changed files with 10 additions and 10 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue