Skip to content

Commit

Permalink
Auto-extract value from ParamFlowArgument when blocked in ParamFlowSl…
Browse files Browse the repository at this point in the history
…ot (#2776)

* Assign actual value with the result of paramFlowKey method
  • Loading branch information
benyamin2014 authored Aug 8, 2022
1 parent e0eb63e commit 0bd27fb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ void checkFlow(ResourceWrapper resourceWrapper, int count, Object... args) throw
String triggeredParam = "";
if (args.length > rule.getParamIdx()) {
Object value = args[rule.getParamIdx()];
// Assign actual value with the result of paramFlowKey method
if (value instanceof ParamFlowArgument) {
value = ((ParamFlowArgument) value).paramFlowKey();
}
triggeredParam = String.valueOf(value);
}
throw new ParamFlowException(resourceWrapper.getName(), triggeredParam, rule);
Expand Down

0 comments on commit 0bd27fb

Please sign in to comment.