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 2017/02/02 10:56:47 UTC
[1/3] struts git commit: Adds additional packages to be excluded from
evaluation
Repository: struts
Updated Branches:
refs/heads/master 47a415ac5 -> ad367777c
Adds additional packages to be excluded from evaluation
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/1a8111e0
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/1a8111e0
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/1a8111e0
Branch: refs/heads/master
Commit: 1a8111e0ea8d5183b830ea73352a2e0b0cbe3d86
Parents: 47a415a
Author: Lukasz Lenart <lu...@apache.org>
Authored: Thu Feb 2 11:37:05 2017 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Thu Feb 2 11:37:05 2017 +0100
----------------------------------------------------------------------
core/src/main/resources/struts-default.xml | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/1a8111e0/core/src/main/resources/struts-default.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/struts-default.xml b/core/src/main/resources/struts-default.xml
index 005714d..a6f69a2 100644
--- a/core/src/main/resources/struts-default.xml
+++ b/core/src/main/resources/struts-default.xml
@@ -60,7 +60,16 @@
<!-- constant name="struts.excludedPackageNamePatterns" value="^java\.lang\..*,^ognl.*,^(?!javax\.servlet\..+)(javax\..+)" / -->
<!-- this is simpler version of the above used with string comparison -->
- <constant name="struts.excludedPackageNames" value="java.lang.,ognl,javax,freemarker.core,freemarker.template" />
+ <constant name="struts.excludedPackageNames"
+ value="
+ java.lang.,
+ ognl.,
+ javax,
+ freemarker.core.,
+ freemarker.template.,
+ freemarker.ext.,
+ sun.reflect.,
+ javassist." />
<bean class="com.opensymphony.xwork2.ObjectFactory" name="struts"/>
<bean type="com.opensymphony.xwork2.factory.ResultFactory" name="struts" class="org.apache.struts2.factory.StrutsResultFactory" />
[2/3] struts git commit: Narrows class resolver
Posted by lu...@apache.org.
Narrows class resolver
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/637ad1c3
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/637ad1c3
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/637ad1c3
Branch: refs/heads/master
Commit: 637ad1c3707266c33daabb18d7754e795e6681f3
Parents: 1a8111e
Author: Lukasz Lenart <lu...@apache.org>
Authored: Thu Feb 2 11:37:29 2017 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Thu Feb 2 11:37:29 2017 +0100
----------------------------------------------------------------------
.../apache/struts2/views/freemarker/FreemarkerManager.java | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/637ad1c3/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
index 3323302..b1010c3 100644
--- a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
+++ b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
@@ -28,6 +28,7 @@ import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStack;
import freemarker.cache.*;
+import freemarker.core.TemplateClassResolver;
import freemarker.ext.jsp.TaglibFactory;
import freemarker.ext.servlet.HttpRequestHashModel;
import freemarker.ext.servlet.HttpRequestParametersHashModel;
@@ -318,16 +319,23 @@ public class FreemarkerManager {
configuration.setTemplateExceptionHandler(TemplateExceptionHandler.HTML_DEBUG_HANDLER);
if (mruMaxStrongSize > 0) {
+ LOG.debug("Sets Configuration.CACHE_STORAGE_KEY to strong:{}", mruMaxStrongSize);
configuration.setSetting(Configuration.CACHE_STORAGE_KEY, "strong:" + mruMaxStrongSize);
}
if (templateUpdateDelay != null) {
+ LOG.debug("Sets Configuration.TEMPLATE_UPDATE_DELAY_KEY to {}", templateUpdateDelay);
configuration.setSetting(Configuration.TEMPLATE_UPDATE_DELAY_KEY, templateUpdateDelay);
}
if (encoding != null) {
+ LOG.debug("Sets DefaultEncoding to {}", encoding);
configuration.setDefaultEncoding(encoding);
}
+ LOG.debug("Disabled localized lookups");
configuration.setLocalizedLookup(false);
+ LOG.debug("Enabled whitespace stripping");
configuration.setWhitespaceStripping(true);
+ LOG.debug("Sets NewBuiltinClassResolver to TemplateClassResolver.SAFER_RESOLVER");
+ configuration.setNewBuiltinClassResolver(TemplateClassResolver.SAFER_RESOLVER);
return configuration;
}
[3/3] struts git commit: Excludes dedicated ext packages
Posted by lu...@apache.org.
Excludes dedicated ext packages
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/ad367777
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/ad367777
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/ad367777
Branch: refs/heads/master
Commit: ad367777cb4d1aa8a588da3a87915a3291fd5d01
Parents: 637ad1c
Author: Lukasz Lenart <lu...@apache.org>
Authored: Thu Feb 2 11:56:30 2017 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Thu Feb 2 11:56:30 2017 +0100
----------------------------------------------------------------------
core/src/main/resources/struts-default.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/ad367777/core/src/main/resources/struts-default.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/struts-default.xml b/core/src/main/resources/struts-default.xml
index a6f69a2..26c89ea 100644
--- a/core/src/main/resources/struts-default.xml
+++ b/core/src/main/resources/struts-default.xml
@@ -67,7 +67,8 @@
javax,
freemarker.core.,
freemarker.template.,
- freemarker.ext.,
+ freemarker.ext.rhino.,
+ freemarker.ext.beans.,
sun.reflect.,
javassist." />