diff --git a/CHANGELOG.md b/CHANGELOG.md index 51ec57b2b..b72a93c28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,18 @@ Each release usually includes various fixes and improvements. The most noteworthy of these, as well as any features and breaking changes, are listed here. -## v3.2.1 +## v3.2.1.1 +* Updated Lavaplayer to 1.3.19. This release includes a patch which fixes loading youtube URLs. +https://github.com/sedmelluq/lavaplayer/pull/199 +* Made the WebSocket handshake return code 401 instead of 200 on bad auth. #208 + +Contributors: +[@Frederikam](https://github.com/Frederikam) and +[@Devoxin](https://github.com/Devoxin) + + +## v3.2.1 * Update dependencies -- fixes frequent youtube HTTP errors * Return `FriendlyException` message on `LOAD_FAILED` #174 * Add option to disable `ytsearch` and `scsearch` #194 diff --git a/LavalinkServer/src/main/java/lavalink/server/io/HandshakeInterceptorImpl.kt b/LavalinkServer/src/main/java/lavalink/server/io/HandshakeInterceptorImpl.kt index 723757291..8e703b3fb 100644 --- a/LavalinkServer/src/main/java/lavalink/server/io/HandshakeInterceptorImpl.kt +++ b/LavalinkServer/src/main/java/lavalink/server/io/HandshakeInterceptorImpl.kt @@ -4,6 +4,7 @@ import lavalink.server.config.ServerConfig import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.beans.factory.annotation.Autowired +import org.springframework.http.HttpStatus import org.springframework.http.server.ServerHttpRequest import org.springframework.http.server.ServerHttpResponse import org.springframework.stereotype.Controller @@ -26,8 +27,6 @@ constructor(private val serverConfig: ServerConfig, private val socketServer: So */ override fun beforeHandshake(request: ServerHttpRequest, response: ServerHttpResponse, wsHandler: WebSocketHandler, attributes: Map): Boolean { - response.headers.add("Lavalink-Major-Version", "3") - val password = request.headers.getFirst("Authorization") val matches = password == serverConfig.password @@ -35,6 +34,7 @@ constructor(private val serverConfig: ServerConfig, private val socketServer: So log.info("Incoming connection from " + request.remoteAddress) } else { log.error("Authentication failed from " + request.remoteAddress) + response.setStatusCode(HttpStatus.UNAUTHORIZED) } val resumeKey = request.headers.getFirst("Resume-Key") diff --git a/build.gradle b/build.gradle index 16b5cb12d..14926f5a8 100644 --- a/build.gradle +++ b/build.gradle @@ -51,7 +51,7 @@ subprojects { ext { //@formatter:off - lavaplayerVersion = '1.3.17' + lavaplayerVersion = '1.3.19' magmaVersion = '0.9.0' jdaNasVersion = '1.0.6' jappVersion = '1.3'