Skip to content

Commit

Permalink
Merge pull request #810 from akto-api-security/feature_test_chaining_…
Browse files Browse the repository at this point in the history
…fixes

Feature test chaining fixes
  • Loading branch information
ankush-jain-akto authored Jan 11, 2024
2 parents c6e9a22 + b3bfd96 commit 842f4bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public static String resolveAuthContext(String expression, Map<String, List<Stri
}

public static Boolean isWordListVariable(Object key, Map<String, Object> varMap) {
if (key == null || !(key instanceof String)) {
if (key == null) {
return false;
}

Expand Down Expand Up @@ -363,7 +363,7 @@ public static Map<String, List<String>> resolveWordList(Map<String, List<String>
}


public static void resolveWordList(Map<String, Object> varMap, Map<ApiInfoKey, List<String>> sampleDataMap, ApiInfo.ApiInfoKey apiInfoKey) {
public static void resolveWordList(Map<String, Object> varMap, Map<ApiInfoKey, List<String>> sampleDataMap, ApiInfo.ApiInfoKey apiInfoKey) {

for (String k: varMap.keySet()) {
if (!k.contains("wordList_")) {
Expand Down Expand Up @@ -404,9 +404,9 @@ public static void resolveWordList(Map<String, Object> varMap, Map<ApiInfoKey, L
if (infoKey.getApiCollectionId() != apiInfoKey.getApiCollectionId()) {
continue;
}
if (infoKey.equals(apiInfoKey)) {
sample.remove(0);
}
// if (infoKey.equals(apiInfoKey)) {
// sample.remove(0);
// }
modifiedSampleDataMap.put(infoKey, sample);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,8 @@ public void extractQueryParams(FilterActionRequest filterActionRequest, Map<Stri

Object val = null;
List<String> querySet = (List<String>) filterActionRequest.getQuerySet();
String key = querySet.get(0);
Object k = querySet.get(0);
String key = k.toString();

String queryParams = rawApi.getRequest().getQueryParams();
String url = filterActionRequest.getApiInfoKey().getUrl();
Expand Down

0 comments on commit 842f4bb

Please sign in to comment.