yasserzamani commented on a change in pull request #483:
URL: https://github.com/apache/struts/pull/483#discussion_r615237515



##########
File path: 
core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java
##########
@@ -167,7 +182,13 @@ public void setAliasesKey(String aliasesKey) {
                 for (Object o : aliases.entrySet()) {
                     Map.Entry entry = (Map.Entry) o;
                     String name = entry.getKey().toString();
+                    if (isNotAcceptableExpression(name)) {
+                        continue;
+                    }
                     String alias = (String) entry.getValue();
+                    if (isNotAcceptableExpression(alias)) {
+                        continue;
+                    }

Review comment:
       I think it will work. On first evaluation (where I don't disturb), the 
result will be same as always, a java map with key `application.myName` and 
value `myName`. On second evaluation (here that I've added above codes), I 
validate the both key and value are valid and they're.
   
   I think this answers the second part, right? I don't restrict the whole 
expression, I restrict key and value in the result Map individually to be valid 
because they're going to go for another evaluation.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to