Auto-extract value from ParamFlowArgument when blocked in ParamFlowSlot (#2776)

* Assign actual value with the result of paramFlowKey method
This commit is contained in:
benyamin2014 2022-08-08 11:20:42 +08:00 committed by GitHub
parent e0eb63e80e
commit 0bd27fb80a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -82,6 +82,10 @@ public class ParamFlowSlot extends AbstractLinkedProcessorSlot<DefaultNode> {
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);