diff --git a/internal/httpd/httpd.go b/internal/httpd/httpd.go index 957dbe96..0d437ea3 100644 --- a/internal/httpd/httpd.go +++ b/internal/httpd/httpd.go @@ -415,7 +415,7 @@ type UIBranding struct { ExtraCSS []string `json:"extra_css" mapstructure:"extra_css"` } -func (b *UIBranding) check(isWebClient bool) { +func (b *UIBranding) check() { if b.LogoPath != "" { b.LogoPath = util.CleanPath(b.LogoPath) } else { @@ -543,8 +543,8 @@ type Binding struct { } func (b *Binding) checkBranding() { - b.Branding.WebAdmin.check(false) - b.Branding.WebClient.check(true) + b.Branding.WebAdmin.check() + b.Branding.WebClient.check() if b.Branding.WebAdmin.Name == "" { b.Branding.WebAdmin.Name = "SFTPGo WebAdmin" } diff --git a/internal/httpd/server.go b/internal/httpd/server.go index 1912c60f..8ee0f509 100644 --- a/internal/httpd/server.go +++ b/internal/httpd/server.go @@ -578,7 +578,7 @@ func (s *httpdServer) handleWebAdminLoginPost(w http.ResponseWriter, r *http.Req } admin, err := dataprovider.CheckAdminAndPass(username, password, ipAddr) if err != nil { - handleDefenderEventLoginFailed(ipAddr, err) + handleDefenderEventLoginFailed(ipAddr, err) //nolint:errcheck s.renderAdminLoginPage(w, r, util.NewI18nError(dataprovider.ErrInvalidCredentials, util.I18nErrorInvalidCredentials), ipAddr) return diff --git a/templates/common/base.html b/templates/common/base.html index b515c172..9535e043 100644 --- a/templates/common/base.html +++ b/templates/common/base.html @@ -628,4 +628,357 @@ explicit grant from the SFTPGo Team (support@sftpgo.com). unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } +{{- end}} + +{{- define "theme-switcher"}} +
+{{- end}} + +{{- define "base"}} + + + +