From 59dc400c613771b736296092710a62fd601ba5bc Mon Sep 17 00:00:00 2001 From: Daniel Orr Date: Thu, 17 Oct 2024 19:58:15 +0100 Subject: [PATCH] Return on empty path --- .../dev/andante/audience/resource/ResourcePackHandler.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/kotlin/dev/andante/audience/resource/ResourcePackHandler.kt b/src/main/kotlin/dev/andante/audience/resource/ResourcePackHandler.kt index 6a07aa2..ede42d4 100644 --- a/src/main/kotlin/dev/andante/audience/resource/ResourcePackHandler.kt +++ b/src/main/kotlin/dev/andante/audience/resource/ResourcePackHandler.kt @@ -18,6 +18,11 @@ object ResourcePackHandler : HttpInjector() { val response = ctx.httpBuffer() val path = request.requestURI.removePrefix("/") + + if (path.isEmpty()) { + return response + } + if (!path.matches(SHA1_REGEX)) { return response }