mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-08-17 09:26:04 +00:00
Compare repository URLs with casefolding.
Codeberg repository URLs are equal modulo case, and without this normalization step some repositories can't be published.
This commit is contained in:
+1
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user