From 28ce6cfb7ac99fbf4734b8645a7db9409c447dd7 Mon Sep 17 00:00:00 2001 From: andrewheadricke Date: Thu, 20 Mar 2025 17:08:55 +1100 Subject: [PATCH] ensure suspected blossom request hash does not have slashes in it --- blossom/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blossom/server.go b/blossom/server.go index 61d4f3d..4e1c7b4 100644 --- a/blossom/server.go +++ b/blossom/server.go @@ -49,7 +49,7 @@ func New(rl *khatru.Relay, serviceURL string) *BlossomServer { return } - if len(strings.SplitN(r.URL.Path, ".", 2)[0]) == 65 { + if (len(r.URL.Path) == 65 || strings.Index(r.URL.Path, ".") == 65) && strings.Index(r.URL.Path[1:], "/") == -1 { if r.Method == "HEAD" { bs.handleHasBlob(w, r) return