Skip to content

Commit

Permalink
Version: 3.4 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
gh0stkey committed Nov 16, 2024
1 parent 8ef98d2 commit fa35b0a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/hae/instances/http/HttpMessagePassiveHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ public class HttpMessagePassiveHandler implements ScanCheck {
private final MessageTableModel messageTableModel;
private final MessageProcessor messageProcessor;

private final List<String> colorList = new ArrayList<>();
private final List<String> commentList = new ArrayList<>();

public HttpMessagePassiveHandler(MontoyaApi api, ConfigLoader configLoader, MessageTableModel messageTableModel) {
this.api = api;
this.configLoader = configLoader;
Expand All @@ -50,6 +47,9 @@ public AuditResult activeAudit(HttpRequestResponse httpRequestResponse, AuditIns

@Override
public AuditResult passiveAudit(HttpRequestResponse httpRequestResponse) {
List<String> colorList = new ArrayList<>();
List<String> commentList = new ArrayList<>();

HttpRequest request = httpRequestResponse.request();
HttpResponse response = httpRequestResponse.response();

Expand All @@ -58,8 +58,8 @@ public AuditResult passiveAudit(HttpRequestResponse httpRequestResponse) {
if (!matches) {
try {
String host = StringProcessor.getHostByUrl(request.url());
setColorAndCommentList(messageProcessor.processRequest(host, request, true));
setColorAndCommentList(messageProcessor.processResponse(host, response, true));
setColorAndCommentList(messageProcessor.processRequest(host, request, true), colorList, commentList);
setColorAndCommentList(messageProcessor.processResponse(host, response, true), colorList, commentList);

String url = request.url();
String method = request.method();
Expand All @@ -83,7 +83,7 @@ protected Void doInBackground() {
return auditResult(emptyList());
}

private void setColorAndCommentList(List<Map<String, String>> result) {
private void setColorAndCommentList(List<Map<String, String>> result, List<String> colorList, List<String> commentList) {
if (result != null && !result.isEmpty()) {
colorList.add(result.get(0).get("color"));
commentList.add(result.get(1).get("comment"));
Expand Down

0 comments on commit fa35b0a

Please sign in to comment.