From 2f0fbaa1365174712971473001e88936705706eb Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 27 Nov 2026 23:13:19 +0100 Subject: [PATCH] fix crash for parameter --- internal/backend/rest/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/backend/rest/config.go b/internal/backend/rest/config.go index 8f17d444a..f61a0ee04 100644 --- a/internal/backend/rest/config.go +++ b/internal/backend/rest/config.go @@ -49,6 +49,9 @@ func ParseConfig(s string) (*Config, error) { // If the repository location cannot be parsed as a valid URL, it will be returned as is // (it's because this function is used for logging errors) func StripPassword(s string) string { + if len(s) < 5 { + return s + } scheme := s[:5] s = prepareURL(s)