Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.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 Spring中的WebRequest在sonar qube中引发漏洞_Java_Spring_Spring Mvc_Sonarqube - Fatal编程技术网

Java Spring中的WebRequest在sonar qube中引发漏洞

Java Spring中的WebRequest在sonar qube中引发漏洞,java,spring,spring-mvc,sonarqube,Java,Spring,Spring Mvc,Sonarqube,在我的代码中,我实现了ResponseEntityExceptionHandle来处理异常 当我重写handleMissingServletRequestParameter方法时。Sonar qube抱怨可变WebRequest请求存在漏洞问题 方法定义 @Override protected ResponseEntity<Object> handleMissingServletRequestParameter( final MissingServletRequestPara

在我的代码中,我实现了ResponseEntityExceptionHandle来处理异常

当我重写handleMissingServletRequestParameter方法时。Sonar qube抱怨可变WebRequest请求存在漏洞问题

方法定义

 @Override
 protected ResponseEntity<Object> handleMissingServletRequestParameter(
  final MissingServletRequestParameterException ex, final HttpHeaders 
 headers,
  final HttpStatus status, final WebRequest request) {

final String error = ex.getParameterName() + " parameter is missing";
final ExceptionResponse exceptionResponse =
    new ExceptionResponse(HttpStatus.BAD_REQUEST, ex.getLocalizedMessage(), error);
return constructResponseEntity(exceptionResponse, headers, request, ex);
如何解决这个问题

[request] not sanitized with standard sanitization methods: normalize, 
encode [Note: As applicable, validate class member variables of type String, 
StringBuffer, CharSequence]