diff --git a/internal/dataprovider/iplist.go b/internal/dataprovider/iplist.go index 16c68b1b..739ef472 100644 --- a/internal/dataprovider/iplist.go +++ b/internal/dataprovider/iplist.go @@ -214,7 +214,7 @@ func (e *IPListEntry) validate() error { // parse as IP parsed, err := netip.ParseAddr(e.IPOrNet) if err != nil { - return util.NewI18nError(util.NewValidationError(fmt.Sprintf("invalid IP %q", e.IPOrNet)), util.I18nErrorIpInvalid) + return util.NewI18nError(util.NewValidationError(fmt.Sprintf("invalid IP %q", e.IPOrNet)), util.I18nErrorIPInvalid) } if parsed.Is4() { e.IPOrNet += "/32" diff --git a/internal/util/i18n.go b/internal/util/i18n.go index 340973fd..b0c8865a 100644 --- a/internal/util/i18n.go +++ b/internal/util/i18n.go @@ -224,7 +224,7 @@ const ( I18nErrorAdminSelfPerms = "admin.self_permissions" I18nErrorAdminSelfDisable = "admin.self_disable" I18nErrorAdminSelfRole = "admin.self_role" - I18nErrorIpInvalid = "ip_list.ip_invalid" + I18nErrorIPInvalid = "ip_list.ip_invalid" I18nErrorNetInvalid = "ip_list.net_invalid" I18nFTPTLSDisabled = "status.tls_disabled" I18nFTPTLSExplicit = "status.tls_explicit" diff --git a/templates/common/base.html b/templates/common/base.html index 54005e8e..78b4778f 100644 --- a/templates/common/base.html +++ b/templates/common/base.html @@ -726,6 +726,16 @@ explicit grant from the SFTPGo Team (support@sftpgo.com). {{- end}} +{{- define "infomsg"}} +