Skip to content

Commit

Permalink
finish review commits
Browse files Browse the repository at this point in the history
  • Loading branch information
am0o0 committed Nov 22, 2024
1 parent 230203d commit ec69b34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import java.io.IOException;
import java.time.Clock;
import java.time.Instant;
import java.util.NoSuchElementException;
import javax.inject.Inject;

/** A {@link VulnDetector} that detects the CVE-2023-23752 vulnerability. */
Expand Down Expand Up @@ -136,7 +137,7 @@ private boolean isServiceVulnerable(NetworkService networkService) {

// Check if body values match our detection rules
if (!appConfHttpResponse.bodyString().get().contains("password")
|| !appConfHttpResponse.bodyString().get().contains("user")) {
|| !appConfHttpResponse.bodyString().get().contains("user")) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public MockResponse dispatch(RecordedRequest request) throws InterruptedExceptio
if (request.getPath().equals("/api/index.php/v1/config/application?public=true")) {
return new MockResponse()
.addHeader("Content-Type", "application/json; charset=utf-8")
.setBody(LeakedDataJsonSample)
.setBody(LEAKED_DATA_JSON_SAMPLE)
.setResponseCode(HttpStatus.OK.code());
}
return new MockResponse().setResponseCode(404);
Expand Down Expand Up @@ -167,7 +167,7 @@ public void detect_whenVulnerable_returnsVulnerability() {
.setRecommendation("Upgrade Joomla to 4.2.8 and above versions.")
.addAdditionalDetails(
AdditionalDetail.newBuilder()
.setTextData(TextData.newBuilder().setText(LeakedDataJsonSample))))
.setTextData(TextData.newBuilder().setText(LEAKED_DATA_JSON_SAMPLE))))
.build();

// Vulnerable to CVE202323752
Expand Down

0 comments on commit ec69b34

Please sign in to comment.