You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2014/03/02 21:06:20 UTC
[1/3] git commit: Reverts validation of properties via dedicated
SecurityJudge interface
Repository: struts
Updated Branches:
refs/heads/feature/move-jsps-under-webinf 6f43464fc -> 4360a0666
Reverts validation of properties via dedicated SecurityJudge interface
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/5d0cf8ba
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/5d0cf8ba
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/5d0cf8ba
Branch: refs/heads/feature/move-jsps-under-webinf
Commit: 5d0cf8baca45594ca7b6b4e7160e03f59cb258de
Parents: 7d383d6
Author: Lukasz Lenart <lu...@apache.org>
Authored: Tue Feb 25 11:08:29 2014 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Tue Feb 25 11:08:29 2014 +0100
----------------------------------------------------------------------
.../xwork2/interceptor/ParametersInterceptor.java | 8 --------
.../com/opensymphony/xwork2/ognl/OgnlValueStack.java | 4 ----
.../com/opensymphony/xwork2/ognl/PropertiesJudge.java | 7 -------
.../opensymphony/xwork2/ognl/SecurityMemberAccess.java | 13 +------------
.../xwork2/util/MemberAccessValueStack.java | 4 ----
5 files changed, 1 insertion(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/5d0cf8ba/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
index 9dfae95..75911a8 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
@@ -22,7 +22,6 @@ import com.opensymphony.xwork2.XWorkConstants;
import com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler;
import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.ognl.PropertiesJudge;
import com.opensymphony.xwork2.util.ArrayUtils;
import com.opensymphony.xwork2.util.ClearableValueStack;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
@@ -313,13 +312,6 @@ public class ParametersInterceptor extends MethodFilterInterceptor {
MemberAccessValueStack accessValueStack = (MemberAccessValueStack) newStack;
accessValueStack.setAcceptProperties(acceptParams);
accessValueStack.setExcludeProperties(excludeParams);
- if (action instanceof ParameterNameAware) {
- accessValueStack.setPropertiesJudge(new PropertiesJudge() {
- public boolean acceptProperty(String propertyName) {
- return ((ParameterNameAware) action).acceptableParameterName(propertyName);
- }
- });
- }
}
for (Map.Entry<String, Object> entry : acceptableParameters.entrySet()) {
http://git-wip-us.apache.org/repos/asf/struts/blob/5d0cf8ba/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 138db58..76f0d3f 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
@@ -465,10 +465,6 @@ public class OgnlValueStack implements Serializable, ValueStack, ClearableValueS
securityMemberAccess.setAcceptProperties(acceptedProperties);
}
- public void setPropertiesJudge(PropertiesJudge judge) {
- securityMemberAccess.setPropertiesJudge(judge);
- }
-
public void setExcludeProperties(Set<Pattern> excludeProperties) {
securityMemberAccess.setExcludeProperties(excludeProperties);
}
http://git-wip-us.apache.org/repos/asf/struts/blob/5d0cf8ba/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/PropertiesJudge.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/PropertiesJudge.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/PropertiesJudge.java
deleted file mode 100644
index ed27c0f..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/PropertiesJudge.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.opensymphony.xwork2.ognl;
-
-public interface PropertiesJudge {
-
- boolean acceptProperty(String propertyName);
-
-}
http://git-wip-us.apache.org/repos/asf/struts/blob/5d0cf8ba/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
index b6d3d3f..7bbcbda 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
@@ -35,7 +35,6 @@ public class SecurityMemberAccess extends DefaultMemberAccess {
private final boolean allowStaticMethodAccess;
private Set<Pattern> excludeProperties = Collections.emptySet();
private Set<Pattern> acceptProperties = Collections.emptySet();
- private PropertiesJudge propertiesJudge;
public SecurityMemberAccess(boolean method) {
super(false);
@@ -76,14 +75,7 @@ public class SecurityMemberAccess extends DefaultMemberAccess {
}
protected boolean isAcceptableProperty(String name) {
- if ( name == null) {
- return true;
- }
-
- if ((!isExcluded(name)) && isAccepted(name) && (propertiesJudge == null || propertiesJudge.acceptProperty(name))) {
- return true;
- }
- return false;
+ return name == null || ((!isExcluded(name)) && isAccepted(name));
}
protected boolean isAccepted(String paramName) {
@@ -123,7 +115,4 @@ public class SecurityMemberAccess extends DefaultMemberAccess {
this.acceptProperties = acceptedProperties;
}
- public void setPropertiesJudge(PropertiesJudge judge) {
- this.propertiesJudge = judge;
- }
}
http://git-wip-us.apache.org/repos/asf/struts/blob/5d0cf8ba/xwork-core/src/main/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java
index 210d67f..51f4e48 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java
@@ -1,7 +1,5 @@
package com.opensymphony.xwork2.util;
-import com.opensymphony.xwork2.ognl.PropertiesJudge;
-
import java.util.Set;
import java.util.regex.Pattern;
@@ -15,6 +13,4 @@ public interface MemberAccessValueStack {
void setAcceptProperties(Set<Pattern> acceptedProperties);
- void setPropertiesJudge(PropertiesJudge judge);
-
}
[3/3] git commit: Merge branch 'develop' into
feature/move-jsps-under-webinf
Posted by lu...@apache.org.
Merge branch 'develop' into feature/move-jsps-under-webinf
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/4360a066
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/4360a066
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/4360a066
Branch: refs/heads/feature/move-jsps-under-webinf
Commit: 4360a06662dcdb3c08d4ba9c3f8e2679eecddad1
Parents: 6f43464 9c5177c
Author: Lukasz Lenart <lu...@apache.org>
Authored: Fri Feb 28 10:17:19 2014 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Fri Feb 28 10:17:19 2014 +0100
----------------------------------------------------------------------
.../xwork2/interceptor/ParametersInterceptor.java | 8 --------
.../com/opensymphony/xwork2/ognl/OgnlValueStack.java | 4 ----
.../com/opensymphony/xwork2/ognl/PropertiesJudge.java | 7 -------
.../opensymphony/xwork2/ognl/SecurityMemberAccess.java | 13 +------------
.../opensymphony/xwork2/util/LocalizedTextUtil.java | 9 ++++++++-
.../xwork2/util/MemberAccessValueStack.java | 4 ----
6 files changed, 9 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
[2/3] git commit: WW-4266 Adds support for IBM JVM to reload resources
Posted by lu...@apache.org.
WW-4266 Adds support for IBM JVM to reload resources
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/9c5177c9
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/9c5177c9
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/9c5177c9
Branch: refs/heads/feature/move-jsps-under-webinf
Commit: 9c5177c961fb850b80089ef4113a17d361c23fa6
Parents: 5d0cf8b
Author: Lukasz Lenart <lu...@apache.org>
Authored: Fri Feb 28 10:11:46 2014 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Fri Feb 28 10:11:46 2014 +0100
----------------------------------------------------------------------
.../com/opensymphony/xwork2/util/LocalizedTextUtil.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/9c5177c9/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
index 1f77428..8256cfb 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
@@ -791,7 +791,14 @@ public class LocalizedTextUtil {
}
if (!reloaded) {
bundlesMap.clear();
- clearMap(ResourceBundle.class, null, "cacheList");
+ try {
+ clearMap(ResourceBundle.class, null, "cacheList");
+ } catch (NoSuchFieldException e) {
+ // happens in IBM JVM, that has a different ResourceBundle impl
+ // it has a 'cache' member
+ clearMap(ResourceBundle.class, null, "cache");
+ }
+
// now, for the true and utter hack, if we're running in tomcat, clear
// it's class loader resource cache as well.
clearTomcatCache();