enhance(Email Validation): deep-email-validatorを通ったメアドのみverifymail.ioで確認するように (MisskeyIO#294)

This commit is contained in:
まっちゃとーにゅ 2023-12-28 10:29:56 +09:00 committed by GitHub
parent bd265caf65
commit 44c10ea991
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,9 +171,6 @@ export class EmailService {
};
if (meta.enableActiveEmailValidation) {
if (meta.enableVerifymailApi && meta.verifymailAuthKey != null) {
validated = await this.verifyMail(emailAddress, meta.verifymailAuthKey);
} else {
validated = await validateEmail({
email: emailAddress,
validateRegex: true,
@ -182,6 +179,9 @@ export class EmailService {
validateDisposable: true, // 捨てアドかどうかチェック
validateSMTP: false, // 日本だと25ポートが殆どのプロバイダーで塞がれていてタイムアウトになるので
});
if (validated.valid && meta.enableVerifymailApi && meta.verifymailAuthKey != null) {
validated = await this.verifyMail(emailAddress, meta.verifymailAuthKey);
}
} else {
validated = { valid: true, reason: null };