From 87be9973b47521da315368483503e0ef27989122 Mon Sep 17 00:00:00 2001 From: Catherine Date: Mon, 15 Sep 2025 14:56:01 +0000 Subject: [PATCH] Compare repository URLs with casefolding. Codeberg repository URLs are equal modulo case, and without this normalization step some repositories can't be published. --- src/pages.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages.go b/src/pages.go index eac9964..da6f14a 100644 --- a/src/pages.go +++ b/src/pages.go @@ -210,7 +210,7 @@ func postPage(w http.ResponseWriter, r *http.Request) error { webRoot := fmt.Sprintf("%s/%s", host, projectName) repoURL := event["repository"].(map[string]any)["clone_url"].(string) - if allowRepoURL != "" && repoURL != allowRepoURL { + if allowRepoURL != "" && !strings.EqualFold(repoURL, allowRepoURL) { http.Error(w, fmt.Sprintf("wildcard domain requires repository to be %s", allowRepoURL), http.StatusUnauthorized,