struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [4/8] git commit: Sets excluded classes during injecting OgnlUtil
Date Sat, 03 May 2014 18:18:58 GMT
Sets excluded classes during injecting OgnlUtil


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/2180b06f
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/2180b06f
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/2180b06f

Branch: refs/heads/feature/exclude-object-class
Commit: 2180b06f7d1d38e7701e72123e57208feb4cb444
Parents: 2798057
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Sat May 3 20:16:33 2014 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Sat May 3 20:16:33 2014 +0200

----------------------------------------------------------------------
 .../main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/2180b06f/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
index 76f0d3f..83be3ed 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
@@ -79,6 +79,7 @@ public class OgnlValueStack implements Serializable, ValueStack, ClearableValueS
     @Inject
     public void setOgnlUtil(OgnlUtil ognlUtil) {
         this.ognlUtil = ognlUtil;
+        securityMemberAccess.setExcludedClasses(ognlUtil.getExcludedClasses());
     }
 
     protected void setRoot(XWorkConverter xworkConverter, CompoundRootAccessor accessor,
CompoundRoot compoundRoot,
@@ -446,7 +447,7 @@ public class OgnlValueStack implements Serializable, ValueStack, ClearableValueS
         XWorkConverter xworkConverter = cont.getInstance(XWorkConverter.class);
         CompoundRootAccessor accessor = (CompoundRootAccessor) cont.getInstance(PropertyAccessor.class,
CompoundRoot.class.getName());
         TextProvider prov = cont.getInstance(TextProvider.class, "system");
-        boolean allow = "true".equals(cont.getInstance(String.class, "allowStaticMethodAccess"));
+        boolean allow = "true".equals(cont.getInstance(String.class, XWorkConstants.ALLOW_STATIC_METHOD_ACCESS));
         OgnlValueStack aStack = new OgnlValueStack(xworkConverter, accessor, prov, allow);
         aStack.setOgnlUtil(cont.getInstance(OgnlUtil.class));
         aStack.setRoot(xworkConverter, accessor, this.root, allow);


Mime
View raw message