Commit a6004b6e by CaIon

feat: 限制邮箱别名

parent f6056cb2
...@@ -147,7 +147,7 @@ func SendEmailVerification(c *gin.Context) { ...@@ -147,7 +147,7 @@ func SendEmailVerification(c *gin.Context) {
} }
} }
if common.EmailAliasRestrictionEnabled { if common.EmailAliasRestrictionEnabled {
containsSpecialSymbols := strings.Contains(localPart, "+") || strings.Count(localPart, ".") > 1 containsSpecialSymbols := strings.Contains(localPart, "+") || strings.Contains(localPart, ".")
if containsSpecialSymbols { if containsSpecialSymbols {
c.JSON(http.StatusOK, gin.H{ c.JSON(http.StatusOK, gin.H{
"success": false, "success": false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment