mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 18:48:31 +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: {
|
let validated: {
|
||||||
valid: boolean,
|
valid: boolean,
|
||||||
reason?: string | null,
|
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 {
|
return {
|
||||||
available: true,
|
available: true,
|
||||||
reason: null,
|
reason: null,
|
||||||
|
|
Loading…
Reference in a new issue