From 5edf7d0e61e7a0297ddb047d1068758e49752b3d Mon Sep 17 00:00:00 2001 From: erik Date: Tue, 2 Apr 2024 17:33:32 +0200 Subject: [PATCH] Also trim whitespaces within the list items --- routers/web/repo/setting/setting.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/routers/web/repo/setting/setting.go b/routers/web/repo/setting/setting.go index a6ac273e84..0d5be5e8b8 100644 --- a/routers/web/repo/setting/setting.go +++ b/routers/web/repo/setting/setting.go @@ -209,6 +209,9 @@ func SettingsPost(ctx *context.Context) { if strings.TrimSpace(federationRepos) == "" { federationRepoSplit = []string{} } + for idx, repo := range federationRepoSplit { + federationRepoSplit[idx] = strings.TrimSpace(repo) + } if _, _, err := federation.StoreFederatedRepoList(ctx, ctx.Repo.Repository.ID, federationRepoSplit); err != nil { ctx.ServerError("UpdateRepository", err)