Skip to content

Commit

Permalink
Return on empty path
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Oct 17, 2024
1 parent c239bad commit 59dc400
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 59dc400

Please sign in to comment.