Files
notes/work/移动杭研/问题处理/2023-04/0423-信安附件上传失败.md
2026-03-01 01:43:46 +08:00

32 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 问题截图
![](../../../../attachment/images-uuid/9e0ff870e9984910b8d11f84deb8cc76.png)
![](../../../../attachment/images-uuid/a13edb9f20d74e7e91f0b5fb3a59f822.png)
![](../../../../attachment/images-uuid/4509e1e3b3f14378b3bc6cf3aed180d9.png)
# 问题分析
1、首先附件中回源域名不可填写汉字。
2、如果要填写 IPV6 域名需要携带 [] 括号
3、目前主站的回源域名必须要填写,因为如果不填写的话,在域名信息校验的时候客户虽然写的是 ip 的校验,但是代码会判断为域名校验,这时候造成了校验失败。
主要判断逻辑:
```java
if (LoopDomainTypeEnum.IP.getDesc().equalsIgnoreCase(batchDomain.getLoopType())
&& StringUtils.isNotBlank(batchDomain.getLoopType()) && StringUtils.isNotBlank(batchDomain.getLoopDomain())){
```
关于那个附件的问题。我认为是我们代码的问题。因客户为【直播回源类型】为 ip,他【回源域名或 IP】就未填写。
在我们校验中是根据这个三个来判断是进 ip 校验还是域名校验。因为客户未填写【回源域名或 IP】被系统认定为进域名校验,但此时客户需要的是 ip 校验。
# 注:
主站会有信安同步动作。
![](../../../../attachment/images-uuid/723b279719e0494da260e7478df713b7.png)