Skip to content

Commit

Permalink
Hotfix for the previous release.
Browse files Browse the repository at this point in the history
  • Loading branch information
e3ndr committed Jun 7, 2024
1 parent 4bdf46c commit 8d6dd39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/co/casterlabs/katana/Katana.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Void> commandRegistry = new CommandRegistry<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 8d6dd39

Please sign in to comment.