This is an automated email from the ASF dual-hosted git repository.
kusal pushed a commit to branch WW-5343-sec-extend
in repository https://gitbox.apache.org/repos/asf/struts.git
The following commit(s) were added to refs/heads/WW-5343-sec-extend by this
push:
new 85d2c742c WW-5343 Clean up bootstrap constants
85d2c742c is described below
commit 85d2c742cda110182a5e864751926ff0302124a9
Author: Kusal Kithul-Godage
AuthorDate: Sun Nov 26 16:52:07 2023 +1100
WW-5343 Clean up bootstrap constants
---
.../xwork2/config/impl/DefaultConfiguration.java | 5 +---
.../xwork2/config/impl/MockConfiguration.java | 2 --
.../StrutsDefaultConfigurationProvider.java| 4 ---
.../com/opensymphony/xwork2/ognl/OgnlUtil.java | 4 +--
.../xwork2/ognl/SecurityMemberAccess.java | 31 +-
.../org/apache/struts2/default.properties | 7 -
.../xwork2/ognl/OgnlValueStackTest.java| 23
.../xwork2/ognl/SecurityMemberAccessTest.java | 6 -
8 files changed, 37 insertions(+), 45 deletions(-)
diff --git
a/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
b/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
index d0cbcef1c..3715c3bae 100644
---
a/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
+++
b/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
@@ -133,16 +133,13 @@ public class DefaultConfiguration implements
Configuration {
static {
Map constants = new HashMap<>();
constants.put(StrutsConstants.STRUTS_DEVMODE, Boolean.FALSE);
-constants.put(StrutsConstants.STRUTS_OGNL_LOG_MISSING_PROPERTIES,
Boolean.FALSE);
-constants.put(StrutsConstants.STRUTS_OGNL_ENABLE_EXPRESSION_CACHE,
Boolean.TRUE);
constants.put(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD,
Boolean.FALSE);
-constants.put(StrutsConstants.STRUTS_I18N_RELOAD, Boolean.FALSE);
constants.put(StrutsConstants.STRUTS_MATCHER_APPEND_NAMED_PARAMETERS,
Boolean.TRUE);
constants.put(StrutsConstants.STRUTS_OGNL_EXPRESSION_CACHE_TYPE,
OgnlCacheFactory.CacheType.BASIC);
constants.put(StrutsConstants.STRUTS_OGNL_EXPRESSION_CACHE_MAXSIZE,
1);
constants.put(StrutsConstants.STRUTS_OGNL_BEANINFO_CACHE_TYPE,
OgnlCacheFactory.CacheType.BASIC);
constants.put(StrutsConstants.STRUTS_OGNL_BEANINFO_CACHE_MAXSIZE,
1);
-constants.put(StrutsConstants.STRUTS_ALLOW_STATIC_FIELD_ACCESS,
Boolean.TRUE);
+constants.put(StrutsConstants.STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION,
Boolean.FALSE);
BOOTSTRAP_CONSTANTS = Collections.unmodifiableMap(constants);
}
diff --git
a/core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java
b/core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java
index d245ccf4b..30eee9566 100644
---
a/core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java
+++
b/core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java
@@ -30,7 +30,6 @@ import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.ContainerBuilder;
import com.opensymphony.xwork2.inject.Scope;
import com.opensymphony.xwork2.util.location.LocatableProperties;
-import org.apache.struts2.StrutsConstants;
import java.util.HashMap;
import java.util.HashSet;
@@ -62,7 +61,6 @@ public class MockConfiguration implements Configuration {
for (Map.Entry entry :
DefaultConfiguration.BOOTSTRAP_CONSTANTS.entrySet()) {
builder.constant(entry.getKey(), String.valueOf(entry.getValue()));
}
-
builder.constant(StrutsConstants.STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION,
"false");
container = builder.create(true);
}
diff --git
a/core/src/main/java/com/opensymphony/xwork2/config/providers/StrutsDefaultConfigurationProvider.java
b/core/src/main/java/com/opensymphony/xwork2/config/providers/StrutsDefaultConfigurationProvider.java
index 09eeb7c85..af2eff4d8 100644
---
a/core/src/main/java/com/opensymphony/xwork2/config/providers/StrutsDefaultConfigurationProvider.java
+++
b/core/src/main/java/com/opensymphony/xwork2/config/providers/StrutsDefaultConfigurationProvider.java
@@ -114,7 +114,6 @@ import com.opensymphony.xwork2.validator.ValidatorFactory;
import com.opensymphony.xwork2.validator.ValidatorFileParser;
import ognl.MethodAccessor;
import ognl.PropertyAccessor;
-import org.apache.struts2.StrutsConstants;
import org.apache.struts2.conversion.StrutsConversionPropertiesProcessor;
import org.apache.struts2.conversion.StrutsTypeConverterCreator;
import org.apache.struts2.conversion.StrutsTypeConverterHolder;
@@ -257,8 +256,5 @@ public class StrutsDefaultConfigurationProvider implements
ConfigurationProvider
for (Map.Entry entry :
DefaultConfiguration.BOOTSTRAP_CONST