mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
fix: check cn phone regex bug and add check to verification code
Signed-off-by: Kininaru <shiftregister233@outlook.com>
This commit is contained in:
@ -17,7 +17,6 @@ package object
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -30,9 +29,6 @@ type VerificationRecord struct {
|
||||
}
|
||||
|
||||
func SendVerificationCodeToEmail(remoteAddr, dest string) string {
|
||||
if strings.Index(dest, "@") < 0 {
|
||||
return "Invalid Email address"
|
||||
}
|
||||
title := "Casdoor Code"
|
||||
sender := "Casdoor Admin"
|
||||
code := getRandomCode(5)
|
||||
|
Reference in New Issue
Block a user