fix: 泛域名邮箱(+别名/Gmail点号)拦截提前,不受白名单开关影响
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 5m38s
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 5m38s
This commit is contained in:
parent
2c9833df58
commit
4b73cd4d3c
@ -32,6 +32,10 @@ func ShouldGrantTrialForEmail(register config.RegisterConfig, email string) bool
|
|||||||
if !register.EnableTrial {
|
if !register.EnableTrial {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
// 无论白名单是否启用,泛域名邮箱(含 + 别名或 Gmail 点号)始终拒绝赠送
|
||||||
|
if IsDisposableAlias(email) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
if !register.EnableTrialEmailWhitelist {
|
if !register.EnableTrialEmailWhitelist {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -41,10 +45,6 @@ func ShouldGrantTrialForEmail(register config.RegisterConfig, email string) bool
|
|||||||
if !IsEmailDomainWhitelisted(email, register.TrialEmailDomainWhitelist) {
|
if !IsEmailDomainWhitelisted(email, register.TrialEmailDomainWhitelist) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// Gmail 系域名:local part 含点号或 + 别名的视为泛域名,直接拒绝赠送
|
|
||||||
if IsDisposableAlias(email) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user