Skip to content

Commit

Permalink
remove body from exception for security reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
chDame committed Apr 4, 2023
1 parent da268f0 commit a406482
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ You can import it to your maven or gradle project as a dependency
<dependency>
<groupId>io.camunda</groupId>
<artifactId>camunda-operate-client-java</artifactId>
<version>8.1.7.1</version>
<version>8.1.7.2</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

group = 'io.camunda'
version = '8.1.7.1'
version = '8.1.7.2'
sourceCompatibility = '8'

repositories {
Expand Down
11 changes: 1 addition & 10 deletions src/main/java/io/camunda/operate/CamundaOperateClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,7 @@ private CloseableHttpResponse execute(CloseableHttpClient httpClient, ClassicHtt
}

private OperateException createDetailedException(CloseableHttpResponse response, ClassicHttpRequest request) throws IOException {
String details = "";
if (request instanceof HttpPost) {
InputStream content = ((HttpPost) request).getEntity().getContent();
String body = new BufferedReader(
new InputStreamReader(content, StandardCharsets.UTF_8))
.lines()
.collect(Collectors.joining("\n"));
details+= "; Body : " + body;
}
return new OperateException(request.getPath()+" : "+response.getCode()+" "+response.getReasonPhrase()+details);
return new OperateException(request.getPath()+" : "+response.getCode()+" "+response.getReasonPhrase());
}

public ProcessInstance getProcessInstance(Long key) throws OperateException {
Expand Down

0 comments on commit a406482

Please sign in to comment.