summaryrefslogtreecommitdiffstats
path: root/routers/user/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/auth.go')
-rw-r--r--routers/user/auth.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/user/auth.go b/routers/user/auth.go
index 25aa437efd..24b35e6f62 100644
--- a/routers/user/auth.go
+++ b/routers/user/auth.go
@@ -948,6 +948,11 @@ func SignUpPost(ctx *context.Context, cpt *captcha.Captcha, form auth.RegisterFo
}
}
+ if !form.IsEmailDomainWhitelisted() {
+ ctx.RenderWithErr(ctx.Tr("auth.email_domain_blacklisted"), tplSignUp, &form)
+ return
+ }
+
if form.Password != form.Retype {
ctx.Data["Err_Password"] = true
ctx.RenderWithErr(ctx.Tr("form.password_not_match"), tplSignUp, &form)