Add missing return to handleError in admin server
Some checks failed
Tests / test (s390x on IBM Z) (push) Has been skipped
Tests / goreleaser-check (push) Has been skipped
Cross-Build / build (~1.26.0, 1.26, illumos) (push) Failing after 1m28s
Cross-Build / build (~1.26.0, 1.26, netbsd) (push) Failing after 1m28s
Cross-Build / build (~1.26.0, 1.26, dragonfly) (push) Failing after 1m38s
Tests / test (./cmd/caddy/caddy, ~1.26.0, ubuntu-latest, 0, 1.26, linux) (push) Failing after 2m27s
Cross-Build / build (~1.26.0, 1.26, freebsd) (push) Successful in 2m27s
Cross-Build / build (~1.26.0, 1.26, aix) (push) Successful in 2m30s
Cross-Build / build (~1.26.0, 1.26, linux) (push) Successful in 2m50s
Cross-Build / build (~1.26.0, 1.26, darwin) (push) Successful in 2m58s
Cross-Build / build (~1.26.0, 1.26, openbsd) (push) Successful in 1m27s
Cross-Build / build (~1.26.0, 1.26, solaris) (push) Successful in 1m26s
Cross-Build / build (~1.26.0, 1.26, windows) (push) Successful in 1m27s
Lint / dependency-review (push) Failing after 1m44s
Lint / govulncheck (push) Failing after 1m58s
Lint / lint (ubuntu-latest, linux) (push) Failing after 2m5s
OpenSSF Scorecard supply-chain security / Scorecard analysis (push) Failing after 6m39s
Tests / test (./cmd/caddy/caddy, ~1.26.0, macos-14, 0, 1.26, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.26.0, windows-latest, True, 1.26, windows) (push) Has been cancelled
Lint / lint (macos-14, mac) (push) Has been cancelled
Lint / lint (windows-latest, windows) (push) Has been cancelled

Thanks to @Wernerina's LLM for finding this bug
This commit is contained in:
Matthew Holt 2026-03-25 16:33:24 -06:00
parent 5d189aff40
commit c35ba5588d
No known key found for this signature in database

View File

@ -859,6 +859,7 @@ func (h adminHandler) serveHTTP(w http.ResponseWriter, r *http.Request) {
Err: errors.New("invalid origin 'null'"),
Message: "Buggy browser is sending null Origin header.",
})
return
}
if h.enforceHost {