feat: fix MFA bug, revert PR: "feat: don't send verification code if failed signin limit is reached" (#3627)

This commit is contained in:
hsluoyz
2025-03-01 12:58:28 +08:00
committed by GitHub
parent 41d9422687
commit cb1882e589
2 changed files with 7 additions and 12 deletions

View File

@ -258,7 +258,7 @@ func (c *ApiController) SendVerificationCode() {
return
}
sendResp = object.SendVerificationCodeToEmail(organization, user, provider, clientIp, vform.Dest, c.GetAcceptLanguage())
sendResp = object.SendVerificationCodeToEmail(organization, user, provider, clientIp, vform.Dest)
case object.VerifyTypePhone:
if vform.Method == LoginVerification || vform.Method == ForgetVerification {
if user != nil && util.GetMaskedPhone(user.Phone) == vform.Dest {
@ -304,7 +304,7 @@ func (c *ApiController) SendVerificationCode() {
c.ResponseError(fmt.Sprintf(c.T("verification:Phone number is invalid in your region %s"), vform.CountryCode))
return
} else {
sendResp = object.SendVerificationCodeToPhone(organization, user, provider, clientIp, phone, c.GetAcceptLanguage())
sendResp = object.SendVerificationCodeToPhone(organization, user, provider, clientIp, phone)
}
}