Skip to content

Commit

Permalink
Merge pull request #1850 from akto-api-security/hotfix/fix_replace_ad…
Browse files Browse the repository at this point in the history
…vanced_settings

Fixing placement of advanced configs
  • Loading branch information
notshivansh authored Dec 23, 2024
2 parents 39d352c + 63f1358 commit 4c98538
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/utils/src/main/java/com/akto/testing/ApiExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ private static void addHeaders(OriginalHttpRequest request, Request.Builder buil
public static OriginalHttpResponse sendRequest(OriginalHttpRequest request, boolean followRedirects, TestingRunConfig testingRunConfig, boolean debug, List<TestingRunResult.TestLog> testLogs, boolean skipSSRFCheck) throws Exception {
// don't lowercase url because query params will change and will result in incorrect request

if(testingRunConfig != null && testingRunConfig.getConfigsAdvancedSettings() != null && !testingRunConfig.getConfigsAdvancedSettings().isEmpty()){
calculateFinalRequestFromAdvancedSettings(request, testingRunConfig.getConfigsAdvancedSettings());
}

String url = prepareUrl(request, testingRunConfig);

if (!(url.contains("insertRuntimeLog") || url.contains("insertTestingLog") || url.contains("insertProtectionLog"))) {
Expand All @@ -308,10 +312,6 @@ public static OriginalHttpResponse sendRequest(OriginalHttpRequest request, bool
boolean executeScript = testingRunConfig != null;
//calculateHashAndAddAuth(request, executeScript);

if(testingRunConfig != null && testingRunConfig.getConfigsAdvancedSettings() != null && !testingRunConfig.getConfigsAdvancedSettings().isEmpty()){
calculateFinalRequestFromAdvancedSettings(request, testingRunConfig.getConfigsAdvancedSettings());
}

OriginalHttpResponse response = null;
HostValidator.validate(url);

Expand Down

0 comments on commit 4c98538

Please sign in to comment.