From 29e2f2d5e634e4871e721290e9e39442944ee7fe Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 7 Jun 2022 00:14:18 -0600 Subject: [PATCH] chore: rename handleDNSRoutes to handleACMEChallengeRoutes --- internal/mgmt/acmeroutes.go | 2 +- internal/mgmt/route.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/mgmt/acmeroutes.go b/internal/mgmt/acmeroutes.go index 091c968..e3610ae 100644 --- a/internal/mgmt/acmeroutes.go +++ b/internal/mgmt/acmeroutes.go @@ -50,7 +50,7 @@ func (p *acmeProvider) CleanUp(domain, token, keyAuth string) error { return p.provider.CleanUp(domain, token, keyAuth) } -func handleDNSRoutes(r chi.Router) { +func handleACMEChallengeRoutes(r chi.Router) { handleACMEChallenges := func(r chi.Router) { r.Post("/{domain}", createChallenge) diff --git a/internal/mgmt/route.go b/internal/mgmt/route.go index 95e963b..6007021 100644 --- a/internal/mgmt/route.go +++ b/internal/mgmt/route.go @@ -53,6 +53,7 @@ func getACMEChallenges(w http.ResponseWriter, r *http.Request) { } */ + // disallow FS characters if strings.ContainsAny(host, "/:|\\") { host = "" } @@ -186,7 +187,7 @@ func RouteAll(r chi.Router) { }) }) - handleDNSRoutes(r) + handleACMEChallengeRoutes(r) handleDeviceRoutes(r) r.Get("/inspect", func(w http.ResponseWriter, r *http.Request) {