[struts] branch struts-2-5-x updated (f4d7dbe -> 8293add)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git. from f4d7dbe [maven-release-plugin] prepare for next development iteration add 567fae9 WW-4971 Fix broken s:includes for non-UTF8 content. The low-risk fix retains existing behaviour by default, but provides a configuration flag users can set (to true) in order to enable usage of response (page) encoding for s:include tags. A WARN level log output is also generated for failed FastByteArrayOutputStream decoding (can be suppressed by log configuration). add 7bca982 Fix typos and whitespace (on top of WW-4971 Fix broken s:includes for non-UTF8 content). new 8293add Merge pull request #257 from JCgH4164838Gh792C124B5/localS2_2_5_x_Branch The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../java/org/apache/struts2/StrutsConstants.java | 65 +++--- .../org/apache/struts2/components/Include.java | 36 +--- .../struts2/util/FastByteArrayOutputStream.java| 24 ++-- .../apache/struts2/views/jsp/IncludeTagTest.java | 60 +++- 4 files changed, 138 insertions(+), 47 deletions(-)
[struts] 01/01: Merge pull request #257 from JCgH4164838Gh792C124B5/localS2_2_5_x_Branch
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch struts-2-5-x in repository https://gitbox.apache.org/repos/asf/struts.git commit 8293add6aaa6f496c636f39982d99950621d44a5 Merge: f4d7dbe 7bca982 Author: Aleksandr Mashchenko AuthorDate: Thu Nov 1 21:53:04 2018 +0200 Merge pull request #257 from JCgH4164838Gh792C124B5/localS2_2_5_x_Branch Fix WW-4971 (broken includes for non-UTF8 content). .../java/org/apache/struts2/StrutsConstants.java | 65 +++--- .../org/apache/struts2/components/Include.java | 36 +--- .../struts2/util/FastByteArrayOutputStream.java| 24 ++-- .../apache/struts2/views/jsp/IncludeTagTest.java | 60 +++- 4 files changed, 138 insertions(+), 47 deletions(-)
[struts] 02/02: WW-4971 Use response encoding for include by default
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 9fd8d6fa8019e7a15ee3dfb9fba17aca36ff0b20 Author: Aleksandr Mashchenko AuthorDate: Thu Nov 1 22:05:47 2018 +0200 WW-4971 Use response encoding for include by default --- core/src/main/java/org/apache/struts2/components/Include.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/components/Include.java b/core/src/main/java/org/apache/struts2/components/Include.java index 616aa18..70692bf 100644 --- a/core/src/main/java/org/apache/struts2/components/Include.java +++ b/core/src/main/java/org/apache/struts2/components/Include.java @@ -98,13 +98,12 @@ public class Include extends Component { private HttpServletRequest req; private HttpServletResponse res; private String defaultEncoding; // Made non-static (during WW-4971 fix) -private boolean useResponseEncoding; // Added with WW-4971 fix (allows switch between usage of response or default encoding) +private boolean useResponseEncoding = true; // Added with WW-4971 fix (allows switch between usage of response or default encoding) public Include(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { super(stack); this.req = req; this.res = res; -useResponseEncoding = false; // By default use defaultEncoding (vs. response/page encoding) } @Inject(StrutsConstants.STRUTS_I18N_ENCODING)
[struts] branch master updated (b82db24 -> 9fd8d6f)
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git. from b82db24 [WW-4973] Upgrades to OGNL 3.2.8 (#258) new 9fa53dd Merge pull request #257 from JCgH4164838Gh792C124B5/localS2_2_5_x_Branch new 9fd8d6f WW-4971 Use response encoding for include by default The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../java/org/apache/struts2/StrutsConstants.java | 65 +++--- .../org/apache/struts2/components/Include.java | 35 +--- .../struts2/util/FastByteArrayOutputStream.java| 24 ++-- .../apache/struts2/views/jsp/IncludeTagTest.java | 60 +++- 4 files changed, 137 insertions(+), 47 deletions(-)
[struts] 01/02: Merge pull request #257 from JCgH4164838Gh792C124B5/localS2_2_5_x_Branch
This is an automated email from the ASF dual-hosted git repository. amashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 9fa53dddb92c6eea59396d9505c467acb1d74d97 Author: Aleksandr Mashchenko AuthorDate: Thu Nov 1 21:53:04 2018 +0200 Merge pull request #257 from JCgH4164838Gh792C124B5/localS2_2_5_x_Branch Fix WW-4971 (broken includes for non-UTF8 content). --- .../java/org/apache/struts2/StrutsConstants.java | 65 +++--- .../org/apache/struts2/components/Include.java | 36 +--- .../struts2/util/FastByteArrayOutputStream.java| 24 ++-- .../apache/struts2/views/jsp/IncludeTagTest.java | 60 +++- 4 files changed, 138 insertions(+), 47 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/StrutsConstants.java b/core/src/main/java/org/apache/struts2/StrutsConstants.java index 81a4f80..f786305 100644 --- a/core/src/main/java/org/apache/struts2/StrutsConstants.java +++ b/core/src/main/java/org/apache/struts2/StrutsConstants.java @@ -41,12 +41,15 @@ public final class StrutsConstants { /** The URL extension to use to determine if the request is meant for a Struts action */ public static final String STRUTS_ACTION_EXTENSION = "struts.action.extension"; - /** Comma separated list of patterns (java.util.regex.Pattern) to be excluded from Struts2-processing */ - public static final String STRUTS_ACTION_EXCLUDE_PATTERN = "struts.action.excludePattern"; +/** Comma separated list of patterns (java.util.regex.Pattern) to be excluded from Struts2-processing */ +public static final String STRUTS_ACTION_EXCLUDE_PATTERN = "struts.action.excludePattern"; -/** Whether to use the alterative syntax for the tags or not */ +/** Whether to use the alternative syntax for the tags or not */ public static final String STRUTS_TAG_ALTSYNTAX = "struts.tag.altSyntax"; +/** Whether to use the response encoding (JSP page encoding) for s:include tag processing (false - use STRUTS_I18N_ENCODING - by default) */ +public static final String STRUTS_TAG_INCLUDETAG_USERESPONSEENCODING = "struts.tag.includetag.useResponseEncoding"; + /** The HTTP port used by Struts URLs */ public static final String STRUTS_URL_HTTP_PORT = "struts.url.http.port"; @@ -56,7 +59,7 @@ public final class StrutsConstants { /** The default includeParams method to generate Struts URLs */ public static final String STRUTS_URL_INCLUDEPARAMS = "struts.url.includeParams"; - public static final String STRUTS_URL_RENDERER = "struts.urlRenderer"; +public static final String STRUTS_URL_RENDERER = "struts.urlRenderer"; /** The com.opensymphony.xwork2.ObjectFactory implementation class */ public static final String STRUTS_OBJECTFACTORY = "struts.objectFactory"; @@ -91,7 +94,7 @@ public final class StrutsConstants { /** The org.apache.struts2.views.freemarker.FreemarkerManager implementation class */ public static final String STRUTS_FREEMARKER_MANAGER_CLASSNAME = "struts.freemarker.manager.classname"; -/** Update freemarker templates cache in seconds*/ +/** Update freemarker templates cache in seconds */ public static final String STRUTS_FREEMARKER_TEMPLATES_CACHE_UPDATE_DELAY = "struts.freemarker.templatesCache.updateDelay"; /** Cache model instances at BeanWrapper level */ @@ -220,12 +223,12 @@ public final class StrutsConstants { public static final String STRUTS_LOCALE_PROVIDER_FACTORY = "struts.localeProviderFactory"; /** The name of the parameter to create when mapping an id (used by some action mappers) */ - public static final String STRUTS_ID_PARAMETER_NAME = "struts.mapper.idParameterName"; - - /** The name of the parameter to determine whether static method access will be allowed in OGNL expressions or not */ - public static final String STRUTS_ALLOW_STATIC_METHOD_ACCESS = "struts.ognl.allowStaticMethodAccess"; +public static final String STRUTS_ID_PARAMETER_NAME = "struts.mapper.idParameterName"; + +/** The name of the parameter to determine whether static method access will be allowed in OGNL expressions or not */ +public static final String STRUTS_ALLOW_STATIC_METHOD_ACCESS = "struts.ognl.allowStaticMethodAccess"; - /** The com.opensymphony.xwork2.validator.ActionValidatorManager implementation class */ +/** The com.opensymphony.xwork2.validator.ActionValidatorManager implementation class */ public static final String STRUTS_ACTIONVALIDATORMANAGER = "struts.actionValidatorManager"; /** The {@link com.opensymphony.xwork2.util.ValueStackFactory} implementation class */ @@ -236,7 +239,7 @@ public final class StrutsConstants { /** The {@link com.opensymphony.xwork2.util.reflection.ReflectionContextFactory} implementation class */ public static final String STRUTS_REFLECTIONCONTEXTFACTOR