File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
core/src/main/java/org/apache/struts2/interceptor/parameter Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -400,7 +400,15 @@ protected void allowlistParameterizedTypeArg(Type genericType) {
400400 if (!(genericType instanceof ParameterizedType )) {
401401 return ;
402402 }
403- Type paramType = ((ParameterizedType ) genericType ).getActualTypeArguments ()[0 ];
403+ Type [] paramTypes = ((ParameterizedType ) genericType ).getActualTypeArguments ();
404+ allowlistParamType (paramTypes [0 ]);
405+ if (paramTypes .length > 1 ) {
406+ // Probably useful for Map or Map-like classes
407+ allowlistParamType (paramTypes [1 ]);
408+ }
409+ }
410+
411+ protected void allowlistParamType (Type paramType ) {
404412 if (paramType instanceof Class ) {
405413 threadAllowlist .allowClass ((Class <?>) paramType );
406414 }
You can’t perform that action at this time.
0 commit comments