Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 获取服务器端请求伪造(SSRF)(CWE ID 918)restTemplate.getForEntity_Java_Spring Boot_Resttemplate_Veracode_Ssrf - Fatal编程技术网

Java 获取服务器端请求伪造(SSRF)(CWE ID 918)restTemplate.getForEntity

Java 获取服务器端请求伪造(SSRF)(CWE ID 918)restTemplate.getForEntity,java,spring-boot,resttemplate,veracode,ssrf,Java,Spring Boot,Resttemplate,Veracode,Ssrf,我正在使用restemplate进行微服务体系结构中的同步服务间通信 当我们完成Veracode扫描时,我们在getForEntity方法中获得服务器端请求伪造(SSRF)(CWE ID 918) restTemplate.getForEntity(URL, Entity.class); 不确定我为什么会收到这个SSRF问题? 对此可能的修复方法是什么?在restTemplate中使用URL之前,我已通过使用UriComponents构建URL解决了此问题 UriComponents uriC

我正在使用
restemplate
进行微服务体系结构中的同步服务间通信

当我们完成
Veracode
扫描时,我们在
getForEntity
方法中获得
服务器端请求伪造(SSRF)(CWE ID 918)

restTemplate.getForEntity(URL, Entity.class);
不确定我为什么会收到这个
SSRF
问题?

对此可能的修复方法是什么?

在restTemplate中使用URL之前,我已通过使用UriComponents构建URL解决了此问题

UriComponents uriComponents = UriComponentsBuilder.newInstance()
  .scheme("http").host("www.yourdomain.com").path("/yourPath").build();
请参阅此链接以使用组件