|
|
|
@ -249,6 +249,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Make sure FROM field is valid
|
|
|
|
|
if len(form.SMTPFrom) > 0 { |
|
|
|
|
_, err := mail.ParseAddress(form.SMTPFrom) |
|
|
|
|
if err != nil { |
|
|
|
|
ctx.Data["Err_SMTP"] = true |
|
|
|
@ -256,6 +257,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
|
|
|
|
|
ctx.RenderWithErr(ctx.Tr("install.invalid_smtp_from", err), INSTALL, &form) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Check logic loophole between disable self-registration and no admin account.
|
|
|
|
|
if form.DisableRegistration && len(form.AdminName) == 0 { |
|
|
|
|