fix: 修改 token 检验
This commit is contained in:
@@ -74,7 +74,7 @@ public class EnvironmentWebSocketHandler extends TextWebSocketHandler {
|
||||
EnvironmentEntity deviceEntity = environmentService.queryInfo(envId);
|
||||
JSONObject paramJSONObject = deviceEntity.getParamJSONObject();
|
||||
|
||||
if (T.StrUtil.equals(token, paramJSONObject.getStr("token"))) {
|
||||
if (!T.StrUtil.equals(token, paramJSONObject.getStr("token"))) {
|
||||
log.warn("WebSocket connectioned error. env token exception. env id: {}, token: {}", envId, token);
|
||||
session.sendMessage(new TextMessage("Token error, Please config env token"));
|
||||
session.close();
|
||||
|
||||
Reference in New Issue
Block a user