From e8b2ca46862565b7b6d2f05c3f45f7873afe044e Mon Sep 17 00:00:00 2001 From: xubinbin <1323875150@qq.com> Date: 星期四, 31 八月 2023 16:39:18 +0800 Subject: [PATCH] 将生成jwt令牌和验证jwt令牌时使用的公钥私钥由固定值修改为每次启动服务时动态生产;剔除jwt token中包含的password和roleId,防止密码泄露。 --- src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java old mode 100644 new mode 100755 index 7bb131c..8648dc4 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java @@ -116,18 +116,18 @@ if (channelDeviceElement == null) { continue; } - DeviceChannel deviceChannel = XmlUtil.channelContentHandler(itemDevice, device, null, civilCodeFileConf); - if (deviceChannel == null) { + DeviceChannel channel = XmlUtil.channelContentHandler(itemDevice, device, null, civilCodeFileConf); + if (channel == null) { logger.info("[鏀跺埌鐩綍璁㈤槄]锛氫絾鏄В鏋愬け璐� {}", new String(evt.getRequest().getRawContent())); continue; } - if (deviceChannel.getParentId().equals(sipConfig.getId())) { - deviceChannel.setParentId(null); + if (channel.getParentId() != null && channel.getParentId().equals(sipConfig.getId())) { + channel.setParentId(null); } - SipUtils.updateGps(deviceChannel, device.getGeoCoordSys()); - deviceChannel.setDeviceId(take.getDevice().getDeviceId()); + SipUtils.updateGps(channel, device.getGeoCoordSys()); + channel.setDeviceId(take.getDevice().getDeviceId()); - channelList.add(deviceChannel); + channelList.add(channel); } int sn = Integer.parseInt(snElement.getText()); catalogDataCatch.put(take.getDevice().getDeviceId(), sn, sumNum, take.getDevice(), channelList); -- Gitblit v1.8.0