From 79857a8733c6a151527e4712b48e57bd34b34417 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sun, 27 Feb 2022 14:16:38 +0100 Subject: [PATCH] config: restore defaults for smtp templates path It was mistakenly deleted in the previous commit Signed-off-by: Nicola Murino --- config/config.go | 1 + httpd/server.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index dbf92946..de341ddb 100644 --- a/config/config.go +++ b/config/config.go @@ -1603,6 +1603,7 @@ func setViperDefaults() { viper.SetDefault("smtp.auth_type", globalConf.SMTPConfig.AuthType) viper.SetDefault("smtp.encryption", globalConf.SMTPConfig.Encryption) viper.SetDefault("smtp.domain", globalConf.SMTPConfig.Domain) + viper.SetDefault("smtp.templates_path", globalConf.SMTPConfig.TemplatesPath) } func lookupBoolFromEnv(envName string) (bool, bool) { diff --git a/httpd/server.go b/httpd/server.go index 3083879c..831f813c 100644 --- a/httpd/server.go +++ b/httpd/server.go @@ -603,12 +603,12 @@ func (s *httpdServer) handleWebAdminSetupPost(w http.ResponseWriter, r *http.Req } username := r.Form.Get("username") password := r.Form.Get("password") + confirmPassword := r.Form.Get("confirm_password") installCode := r.Form.Get("install_code") if installationCode != "" && installCode != installationCode { renderAdminSetupPage(w, r, username, fmt.Sprintf("%v mismatch", installationCodeHint)) return } - confirmPassword := r.Form.Get("confirm_password") if username == "" { renderAdminSetupPage(w, r, username, "Please set a username") return