title: getting error in rest api while logging the response
body: <p>I have the below java code in which i making use of an rest template to exchange some data and getting response from third party service as shown below </p>
  
  <pre><code> ResponseEntity&lt;String&gt; response = restTemplate.exchange(restApiUrl,
                  HttpMethod.POST, entity, String.class);
          LOGGER.info("XML Response from UIDAI :" + response.getBody()); //** Error**//
  </code></pre>
  
  <p>but upon scanning with fortify it is showing he method restTemplateCall() in java class writes unvalidated user input to the log . An attacker could take advantage of this behavior to forge log entries or inject malicious content into the log</p>
  
  <p>Please advise how to overcome from this .</p>