mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-12 09:03:42 +08:00
fix: log page type error (close #154)
This commit is contained in:
@@ -120,14 +120,14 @@ func SendEmailVerification(c *gin.Context) {
|
||||
})
|
||||
return
|
||||
}
|
||||
if config.EmailDomainRestrictionEnabled {
|
||||
if common.EmailDomainRestrictionEnabled {
|
||||
parts := strings.Split(email, "@")
|
||||
localPart := parts[0]
|
||||
domainPart := parts[1]
|
||||
|
||||
containsSpecialSymbols := strings.Contains(localPart, "+") || strings.Count(localPart, ".") > 1
|
||||
allowed := false
|
||||
for _, domain := range config.EmailDomainWhitelist {
|
||||
for _, domain := range common.EmailDomainWhitelist {
|
||||
if domainPart == domain {
|
||||
allowed = true
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user