mirror of https://github.com/gogs/gogs.git
install: no need to check SMTPFrom is not set (#4118)
parent
1c87b082c1
commit
d02e7d9e6a
2
gogs.go
2
gogs.go
|
@ -16,7 +16,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.9.145.0212"
|
const APP_VER = "0.9.145.0213"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
setting.AppVer = APP_VER
|
setting.AppVer = APP_VER
|
||||||
|
|
|
@ -249,12 +249,14 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure FROM field is valid
|
// Make sure FROM field is valid
|
||||||
_, err := mail.ParseAddress(form.SMTPFrom)
|
if len(form.SMTPFrom) > 0 {
|
||||||
if err != nil {
|
_, err := mail.ParseAddress(form.SMTPFrom)
|
||||||
ctx.Data["Err_SMTP"] = true
|
if err != nil {
|
||||||
ctx.Data["Err_SMTPFrom"] = true
|
ctx.Data["Err_SMTP"] = true
|
||||||
ctx.RenderWithErr(ctx.Tr("install.invalid_smtp_from", err), INSTALL, &form)
|
ctx.Data["Err_SMTPFrom"] = true
|
||||||
return
|
ctx.RenderWithErr(ctx.Tr("install.invalid_smtp_from", err), INSTALL, &form)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check logic loophole between disable self-registration and no admin account.
|
// Check logic loophole between disable self-registration and no admin account.
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.9.145.0212
|
0.9.145.0213
|
Loading…
Reference in New Issue