From 379260d6e5ccf68f10a16b89e35a13784b7651bf Mon Sep 17 00:00:00 2001 From: Bracken Dawson Date: Sat, 7 Jan 2023 21:00:17 +0000 Subject: [PATCH] Don't leak the connection error It might be disallowed IP, and we don't want to make it easier to discern connection errors from banned IPs. --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index b5c65f8..7ca4381 100644 --- a/server.go +++ b/server.go @@ -91,7 +91,7 @@ func (s *Server) HandleWebcal(w http.ResponseWriter, r *http.Request) { upstream, err := s.fetch(upstreamURL) if err != nil { log.Errorf("Failed to fetch %q: %s", upstreamURL, err) - http.Error(w, "Failed to fetch calendar: "+err.Error(), http.StatusBadGateway) + http.Error(w, "Failed to fetch calendar.", http.StatusBadGateway) return }