jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arvindn05 <notificati...@github.com>
Subject Re: [jclouds] Fix bug where password information is printed in logs in case of exce… (#830)
Date Thu, 30 Jul 2015 05:30:14 GMT
> @@ -83,8 +83,13 @@ static String requestPayloadIfStringOrFormIfNotReturnEmptyString(HttpRequest
req
>              && request.getPayload().getContentMetadata().getContentLength()
!= null
>              && request.getPayload().getContentMetadata().getContentLength()
< 1024) {
>           try {
> -            return String.format(" [%s] ", request.getPayload() instanceof StringPayload
? request.getPayload()
> -                  .getRawContent() : Strings2.toStringAndClose(request.getPayload().openStream()));
> +            String logStatement;
> +            if (request.getPayload() instanceof StringPayload) {
> +               logStatement = request.getPayload().isSensitive() ? "---- SENSITIVE INFORMATION
----" : request.getPayload().getRawContent().toString();

will make the change

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/830/files#r35839307
Mime
View raw message