diff --git a/src/main/java/co/casterlabs/katana/Katana.java b/src/main/java/co/casterlabs/katana/Katana.java index b82685c..a3600e6 100644 --- a/src/main/java/co/casterlabs/katana/Katana.java +++ b/src/main/java/co/casterlabs/katana/Katana.java @@ -23,7 +23,7 @@ @Getter public class Katana { - public static final String VERSION = "1.27.0"; + public static final String VERSION = "1.27.1"; public static final String SERVER_DECLARATION = String.format("Katana/%s (%s)", Katana.VERSION, System.getProperty("os.name", "Generic")); private CommandRegistry commandRegistry = new CommandRegistry<>(); diff --git a/src/main/java/co/casterlabs/katana/router/http/servlets/WebhookToWSServlet.java b/src/main/java/co/casterlabs/katana/router/http/servlets/WebhookToWSServlet.java index dea03c1..bacc0d3 100644 --- a/src/main/java/co/casterlabs/katana/router/http/servlets/WebhookToWSServlet.java +++ b/src/main/java/co/casterlabs/katana/router/http/servlets/WebhookToWSServlet.java @@ -138,7 +138,12 @@ public HttpResponse serveHttp(HttpSession session, HttpRouter router) { @Override public WebsocketListener serveWebsocket(WebsocketSession session, HttpRouter router) { - // If the path + secret doesn't match don't handle. + // If the path doesn't match don't handle. + if (!session.getUri().startsWith(this.config.path)) { + return null; + } + + // If the secret doesn't match don't handle. if (!session.getUri().startsWith(this.config.path + '/' + this.config.websocketSecret)) { throw new DropConnectionException(); }