Browse Source

install: no need to check SMTPFrom is not set (#4118)

pull/4121/head
Unknwon 8 years ago
parent
commit
d02e7d9e6a
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      gogs.go
  2. 2
      routers/install.go
  3. 2
      templates/.VERSION

2
gogs.go

@ -16,7 +16,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
const APP_VER = "0.9.145.0212"
const APP_VER = "0.9.145.0213"
func init() {
setting.AppVer = APP_VER

2
routers/install.go

@ -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 {

2
templates/.VERSION

@ -1 +1 @@
0.9.145.0212
0.9.145.0213
Loading…
Cancel
Save