mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-24 05:57:49 +08:00
Compare commits
3 Commits
90c61c206b
...
97e8ebad0b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97e8ebad0b | ||
|
|
4e602713d4 | ||
|
|
c011389c3f |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18
pom.xml
18
pom.xml
@ -178,24 +178,6 @@
|
||||
</dependency>
|
||||
|
||||
<!-- kingbase人大金仓 -->
|
||||
<!-- 手动下载驱动后安装 -->
|
||||
<!-- mvn install:install-file -Dfile=/home/lin/soft/kingbase/jdbc-aarch/kingbase8-8.6.0.jar -DgroupId=com.kingbase -DartifactId=kingbase8 -Dversion=8.6.0 -Dpackaging=jar
|
||||
-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.kingbase</groupId>-->
|
||||
<!-- <artifactId>kingbase8</artifactId>-->
|
||||
<!-- <version>8.6.0</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${basedir}/libs/jdbc-aarch/kingbase8-8.6.0.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.kingbase</groupId>-->
|
||||
<!-- <artifactId>kingbase8</artifactId>-->
|
||||
<!-- <version>8.6.0</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${basedir}/libs/jdbc-x86/kingbase8-8.6.0.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.com.kingbase</groupId>
|
||||
<artifactId>kingbase8</artifactId>
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class InviteDecodeException extends RuntimeException{
|
||||
private int code;
|
||||
private String msg;
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class PlayException extends RuntimeException{
|
||||
private int code;
|
||||
private String msg;
|
||||
|
||||
@ -233,7 +233,13 @@ public class DeviceServiceImpl implements IDeviceService, CommandLineRunner {
|
||||
log.info("[更新多个离线设备信息] 参数为空");
|
||||
return;
|
||||
}
|
||||
deviceMapper.offlineByList(offlineDevices);
|
||||
int limitCount = 400;
|
||||
for (int i = 0; i < offlineDevices.size(); i += limitCount) {
|
||||
int end = Math.min(i + limitCount, offlineDevices.size());
|
||||
List<Device> batchList = offlineDevices.subList(i, end);
|
||||
deviceMapper.offlineByList(batchList);
|
||||
}
|
||||
|
||||
for (Device device : offlineDevices) {
|
||||
device.setOnLine(false);
|
||||
redisCatchStorage.updateDevice(device);
|
||||
|
||||
@ -204,6 +204,21 @@ public class SipUtils {
|
||||
}
|
||||
|
||||
public static Gb28181Sdp parseSDP(String sdpStr) throws SdpParseException {
|
||||
|
||||
// 校验:拦截空内容与注入攻击特征
|
||||
if (sdpStr == null || sdpStr.trim().isEmpty()) {
|
||||
throw new SdpParseException(0, 0, "SDP内容为空");
|
||||
}
|
||||
// 标准SDP每行格式固定为 "x=value",不存在SQL关键字;出现则视为注入攻击
|
||||
String sdpUpper = sdpStr.toUpperCase();
|
||||
if (sdpUpper.contains("' OR '") || sdpUpper.contains("' OR 1") || sdpUpper.contains(" OR 1=1")
|
||||
|| sdpUpper.contains("--") || sdpUpper.contains("/*") || sdpUpper.contains("*/")
|
||||
|| sdpUpper.contains("DROP ") || sdpUpper.contains("INSERT ") || sdpUpper.contains("UPDATE ")
|
||||
|| sdpUpper.contains("DELETE ") || sdpUpper.contains("UNION ") || sdpUpper.contains("SELECT ")) {
|
||||
log.error("[SDP注入攻击] 检测到非法SDP内容,已拒绝解析,内容长度: {}", sdpStr.length());
|
||||
throw new SdpParseException(0, 0, "非法SDP内容");
|
||||
}
|
||||
//校验结束
|
||||
|
||||
// jainSip不支持y= f=字段, 移除以解析。
|
||||
int ssrcIndex = sdpStr.indexOf("y=");
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
package com.genersoft.iot.vmp.media.event.hook;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* zlm hook事件的参数
|
||||
* @author lin
|
||||
*/
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class Hook {
|
||||
|
||||
private HookType hookType;
|
||||
|
||||
@ -29,6 +29,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.context.request.async.DeferredResult;
|
||||
|
||||
@ -361,11 +362,12 @@ public class CloudRecordController {
|
||||
@ResponseBody
|
||||
@GetMapping("/download/zip")
|
||||
public void downloadZipFileFromUrl(HttpServletResponse response, Integer[] ids) {
|
||||
log.info("[下载指定录像文件的压缩包] 查询 ids->{}", ids);
|
||||
String idsStr = StringUtils.arrayToCommaDelimitedString(ids);
|
||||
log.info("[下载指定录像文件的压缩包] 查询 ids->{}", idsStr);
|
||||
List<Integer> arrayList = new ArrayList<>(List.of(ids));
|
||||
List<CloudRecordUrl> cloudRecordItemList = cloudRecordService.getUrlListByIds(arrayList);
|
||||
if (ObjectUtils.isEmpty(cloudRecordItemList)) {
|
||||
log.warn("[下载指定录像文件的压缩包] 未找到录像文件,ids->{}", ids);
|
||||
log.warn("[下载指定录像文件的压缩包] 未找到录像文件,ids->{}", idsStr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user