[struts] branch WW-5077-better-logs updated (c290b0a -> 043814b)

2020-05-24 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch WW-5077-better-logs
in repository https://gitbox.apache.org/repos/asf/struts.git.


 discard c290b0a  WW-5077 Uses better logging to inform user about excluded 
params
 add 043814b  WW-5077 Uses better logging to inform user about excluded 
params

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (c290b0a)
\
 N -- N -- N   refs/heads/WW-5077-better-logs (043814b)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 .../com/opensymphony/xwork2/interceptor/ParametersInterceptor.java   | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)



[struts] 01/01: Merge pull request #419 from apache/WW-5077-better-logs

2020-05-24 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch struts-2-5-x
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 7f10ed505f76c70d4db362ad6483245a3b392db1
Merge: 0fabde9 043814b
Author: Lukasz Lenart 
AuthorDate: Sun May 24 09:32:56 2020 +0200

Merge pull request #419 from apache/WW-5077-better-logs

[WW-5077] Better logs

 .../xwork2/interceptor/ParametersInterceptor.java  | 45 --
 1 file changed, 33 insertions(+), 12 deletions(-)



[struts] branch struts-2-5-x updated (0fabde9 -> 7f10ed5)

2020-05-24 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch struts-2-5-x
in repository https://gitbox.apache.org/repos/asf/struts.git.


from 0fabde9  Merge pull request #417 from 
JCgH4164838Gh792C124B5/LL_tiny-improvements_unittest
 add 043814b  WW-5077 Uses better logging to inform user about excluded 
params
 new 7f10ed5  Merge pull request #419 from apache/WW-5077-better-logs

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:
 .../xwork2/interceptor/ParametersInterceptor.java  | 45 --
 1 file changed, 33 insertions(+), 12 deletions(-)



[struts] 01/01: WW-5077 Uses better logging to inform user about excluded params

2020-05-24 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5077-better-logs
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 880d3b7ab19ff460b1997656706b716a90f42bbf
Author: Lukasz Lenart 
AuthorDate: Thu May 21 08:11:20 2020 +0200

WW-5077 Uses better logging to inform user about excluded params
---
 .../xwork2/interceptor/ParametersInterceptor.java  | 43 --
 1 file changed, 32 insertions(+), 11 deletions(-)

diff --git 
a/core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
 
b/core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
index 1310588..a8f7176 100644
--- 
a/core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
+++ 
b/core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
@@ -24,7 +24,10 @@ import com.opensymphony.xwork2.TextProvider;
 import com.opensymphony.xwork2.inject.Inject;
 import com.opensymphony.xwork2.security.AcceptedPatternsChecker;
 import com.opensymphony.xwork2.security.ExcludedPatternsChecker;
-import com.opensymphony.xwork2.util.*;
+import com.opensymphony.xwork2.util.ClearableValueStack;
+import com.opensymphony.xwork2.util.MemberAccessValueStack;
+import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.ValueStackFactory;
 import com.opensymphony.xwork2.util.reflection.ReflectionContextState;
 import org.apache.commons.lang3.BooleanUtils;
 import org.apache.logging.log4j.LogManager;
@@ -100,8 +103,8 @@ public class ParametersInterceptor extends 
MethodFilterInterceptor {
  */
 static final Comparator rbCollator = new Comparator() {
 public int compare(String s1, String s2) {
-int l1 = countOGNLCharacters(s1),
-l2 = countOGNLCharacters(s2);
+int l1 = countOGNLCharacters(s1);
+int l2 = countOGNLCharacters(s2);
 return l1 < l2 ? -1 : (l2 < l1 ? 1 : s1.compareTo(s2));
 }
 
@@ -185,7 +188,7 @@ public class ParametersInterceptor extends 
MethodFilterInterceptor {
 if (clearableStack) {
 //if the stack's context can be cleared, do that to prevent OGNL
 //from having access to objects in the stack, see XW-641
-((ClearableValueStack)newStack).clearContextValues();
+((ClearableValueStack) newStack).clearContextValues();
 Map context = newStack.getContext();
 ReflectionContextState.setCreatingNullObjects(context, true);
 ReflectionContextState.setDenyMethodExecution(context, true);
@@ -229,7 +232,7 @@ public class ParametersInterceptor extends 
MethodFilterInterceptor {
 TextProvider tp = (TextProvider) action;
 developerNotification = tp.getText("devmode.notification",
 "Developer Notification:\n{0}",
-new String[]{ developerNotification }
+new String[]{developerNotification}
 );
 }
 
@@ -246,7 +249,7 @@ public class ParametersInterceptor extends 
MethodFilterInterceptor {
 /**
  * Checks if name of parameter can be accepted or thrown away
  *
- * @param name parameter name
+ * @param name   parameter name
  * @param action current action
  * @return true if parameter is accepted
  */
@@ -290,27 +293,45 @@ public class ParametersInterceptor extends 
MethodFilterInterceptor {
 return accepted;
 }
 
-   protected boolean isWithinLengthLimit( String name ) {
+protected boolean isWithinLengthLimit(String name) {
 boolean matchLength = name.length() <= paramNameMaxLength;
 if (!matchLength) {
-LOG.debug("Parameter [{}] is too long, allowed length is [{}]", 
name, String.valueOf(paramNameMaxLength));
+if (devMode) { // warn only when in devMode
+LOG.warn("Parameter [{}] is too long, allowed length is [{}]. 
Use Interceptor Parameter Overriding " +
+"to override the limit, see more at\n" +
+
"https://struts.apache.org/core-developers/interceptors.html#interceptor-parameter-overriding";,
+name, paramNameMaxLength);
+} else {
+LOG.warn("Parameter [{}] is too long, allowed length is [{}]", 
name, paramNameMaxLength);
+}
 }
 return matchLength;
-   }
+}
 
 protected boolean isAccepted(String paramName) {
 AcceptedPatternsChecker.IsAccepted result = 
acceptedPatterns.isAccepted(paramName);
 if (result.isAccepted()) {
 return true;
+} else if (devMode) { // warn only when in devMode
+LOG.warn("Parameter [{}] didn't match accepted pattern [{}]! See 
Accepted / Excluded patterns at\n" +
+
"https://struts.apache.org/security/#accepted--excluded-patterns";,
+

[struts] branch WW-5077-better-logs created (now 880d3b7)

2020-05-24 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch WW-5077-better-logs
in repository https://gitbox.apache.org/repos/asf/struts.git.


  at 880d3b7  WW-5077 Uses better logging to inform user about excluded 
params

This branch includes the following new commits:

 new 880d3b7  WW-5077 Uses better logging to inform user about excluded 
params

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.




[struts-archetypes] branch master updated: [maven-release-plugin] prepare release STRUTS_ARCHETYPES_2_5_22

2020-05-24 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts-archetypes.git


The following commit(s) were added to refs/heads/master by this push:
 new 4f76a2d  [maven-release-plugin] prepare release 
STRUTS_ARCHETYPES_2_5_22
4f76a2d is described below

commit 4f76a2deb52e08afff7aa54f7f7494a95d3f6393
Author: Lukasz Lenart 
AuthorDate: Mon May 25 08:50:49 2020 +0200

[maven-release-plugin] prepare release STRUTS_ARCHETYPES_2_5_22
---
 pom.xml  | 4 ++--
 struts2-archetype-angularjs/pom.xml  | 5 ++---
 struts2-archetype-blank/pom.xml  | 2 +-
 struts2-archetype-convention/pom.xml | 2 +-
 struts2-archetype-dbportlet/pom.xml  | 2 +-
 struts2-archetype-plugin/pom.xml | 5 ++---
 struts2-archetype-portlet/pom.xml| 2 +-
 struts2-archetype-starter/pom.xml| 2 +-
 8 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/pom.xml b/pom.xml
index ccd0060..be7cc25 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
 
 
 struts-archetypes
-2.5.21-SNAPSHOT
+2.5.22
 pom
 Struts 2 Maven Archetypes
 Collection of Apache Struts Maven Archetypes
@@ -37,7 +37,7 @@
 
scm:git:https://gitbox.apache.org/struts-archetypes.git
 
scm:git:https://gitbox.apache.org/repos/asf/struts-archetypes.git
 https://github.com/apache/struts-archetypes.git
-HEAD
+STRUTS_ARCHETYPES_2_5_22
 
 
 
diff --git a/struts2-archetype-angularjs/pom.xml 
b/struts2-archetype-angularjs/pom.xml
index 3f56599..0afe08a 100644
--- a/struts2-archetype-angularjs/pom.xml
+++ b/struts2-archetype-angularjs/pom.xml
@@ -1,9 +1,8 @@
-http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
 
 org.apache.struts
 struts-archetypes
-2.5.21-SNAPSHOT
+2.5.22
 
 
 4.0.0
diff --git a/struts2-archetype-blank/pom.xml b/struts2-archetype-blank/pom.xml
index 7d69a8a..4e1175f 100644
--- a/struts2-archetype-blank/pom.xml
+++ b/struts2-archetype-blank/pom.xml
@@ -3,7 +3,7 @@
 
 org.apache.struts
 struts-archetypes
-2.5.21-SNAPSHOT
+2.5.22
 
 
 4.0.0
diff --git a/struts2-archetype-convention/pom.xml 
b/struts2-archetype-convention/pom.xml
index 3e81682..686f148 100644
--- a/struts2-archetype-convention/pom.xml
+++ b/struts2-archetype-convention/pom.xml
@@ -2,7 +2,7 @@
 
 org.apache.struts
 struts-archetypes
-2.5.21-SNAPSHOT
+2.5.22
 
 
 4.0.0
diff --git a/struts2-archetype-dbportlet/pom.xml 
b/struts2-archetype-dbportlet/pom.xml
index c0bc862..e9e86e2 100644
--- a/struts2-archetype-dbportlet/pom.xml
+++ b/struts2-archetype-dbportlet/pom.xml
@@ -2,7 +2,7 @@
 
 org.apache.struts
 struts-archetypes
-2.5.21-SNAPSHOT
+2.5.22
 
 
 4.0.0
diff --git a/struts2-archetype-plugin/pom.xml b/struts2-archetype-plugin/pom.xml
index d399dbd..4dfcd7e 100644
--- a/struts2-archetype-plugin/pom.xml
+++ b/struts2-archetype-plugin/pom.xml
@@ -1,9 +1,8 @@
-http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
 
 org.apache.struts
 struts-archetypes
-2.5.21-SNAPSHOT
+2.5.22
 
 
 4.0.0
diff --git a/struts2-archetype-portlet/pom.xml 
b/struts2-archetype-portlet/pom.xml
index 9fe3b8e..14ca5c6 100644
--- a/struts2-archetype-portlet/pom.xml
+++ b/struts2-archetype-portlet/pom.xml
@@ -2,7 +2,7 @@
 
 org.apache.struts
 struts-archetypes
-2.5.21-SNAPSHOT
+2.5.22
 
 
 4.0.0
diff --git a/struts2-archetype-starter/pom.xml 
b/struts2-archetype-starter/pom.xml
index 3dbe1ef..da9c518 100644
--- a/struts2-archetype-starter/pom.xml
+++ b/struts2-archetype-starter/pom.xml
@@ -4,7 +4,7 @@
 
 org.apache.struts
 struts-archetypes
-2.5.21-SNAPSHOT
+2.5.22
 
 
 4.0.0



[struts-archetypes] annotated tag STRUTS_ARCHETYPES_2_5_22 created (now c539bd9)

2020-05-24 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to annotated tag STRUTS_ARCHETYPES_2_5_22
in repository https://gitbox.apache.org/repos/asf/struts-archetypes.git.


  at c539bd9  (tag)
 tagging 4f76a2deb52e08afff7aa54f7f7494a95d3f6393 (commit)
 replaces STRUTS_ARCHETYPES_2_5_20
  by Lukasz Lenart
  on Mon May 25 08:50:57 2020 +0200

- Log -
[maven-release-plugin] copy for tag STRUTS_ARCHETYPES_2_5_22
---

No new revisions were added by this update.



[struts-archetypes] branch master updated: [maven-release-plugin] prepare for next development iteration

2020-05-24 Thread lukaszlenart
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts-archetypes.git


The following commit(s) were added to refs/heads/master by this push:
 new f7e405d  [maven-release-plugin] prepare for next development iteration
f7e405d is described below

commit f7e405d771a29d8837533c3a9cc305e510c1df73
Author: Lukasz Lenart 
AuthorDate: Mon May 25 08:51:03 2020 +0200

[maven-release-plugin] prepare for next development iteration
---
 pom.xml  | 4 ++--
 struts2-archetype-angularjs/pom.xml  | 2 +-
 struts2-archetype-blank/pom.xml  | 2 +-
 struts2-archetype-convention/pom.xml | 2 +-
 struts2-archetype-dbportlet/pom.xml  | 2 +-
 struts2-archetype-plugin/pom.xml | 2 +-
 struts2-archetype-portlet/pom.xml| 2 +-
 struts2-archetype-starter/pom.xml| 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/pom.xml b/pom.xml
index be7cc25..f204b5f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
 
 
 struts-archetypes
-2.5.22
+2.5.23-SNAPSHOT
 pom
 Struts 2 Maven Archetypes
 Collection of Apache Struts Maven Archetypes
@@ -37,7 +37,7 @@
 
scm:git:https://gitbox.apache.org/struts-archetypes.git
 
scm:git:https://gitbox.apache.org/repos/asf/struts-archetypes.git
 https://github.com/apache/struts-archetypes.git
-STRUTS_ARCHETYPES_2_5_22
+HEAD
 
 
 
diff --git a/struts2-archetype-angularjs/pom.xml 
b/struts2-archetype-angularjs/pom.xml
index 0afe08a..3ba00b3 100644
--- a/struts2-archetype-angularjs/pom.xml
+++ b/struts2-archetype-angularjs/pom.xml
@@ -2,7 +2,7 @@
 
 org.apache.struts
 struts-archetypes
-2.5.22
+2.5.23-SNAPSHOT
 
 
 4.0.0
diff --git a/struts2-archetype-blank/pom.xml b/struts2-archetype-blank/pom.xml
index 4e1175f..aaad329 100644
--- a/struts2-archetype-blank/pom.xml
+++ b/struts2-archetype-blank/pom.xml
@@ -3,7 +3,7 @@
 
 org.apache.struts
 struts-archetypes
-2.5.22
+2.5.23-SNAPSHOT
 
 
 4.0.0
diff --git a/struts2-archetype-convention/pom.xml 
b/struts2-archetype-convention/pom.xml
index 686f148..64b3910 100644
--- a/struts2-archetype-convention/pom.xml
+++ b/struts2-archetype-convention/pom.xml
@@ -2,7 +2,7 @@
 
 org.apache.struts
 struts-archetypes
-2.5.22
+2.5.23-SNAPSHOT
 
 
 4.0.0
diff --git a/struts2-archetype-dbportlet/pom.xml 
b/struts2-archetype-dbportlet/pom.xml
index e9e86e2..c33f8cf 100644
--- a/struts2-archetype-dbportlet/pom.xml
+++ b/struts2-archetype-dbportlet/pom.xml
@@ -2,7 +2,7 @@
 
 org.apache.struts
 struts-archetypes
-2.5.22
+2.5.23-SNAPSHOT
 
 
 4.0.0
diff --git a/struts2-archetype-plugin/pom.xml b/struts2-archetype-plugin/pom.xml
index 4dfcd7e..e73af7f 100644
--- a/struts2-archetype-plugin/pom.xml
+++ b/struts2-archetype-plugin/pom.xml
@@ -2,7 +2,7 @@
 
 org.apache.struts
 struts-archetypes
-2.5.22
+2.5.23-SNAPSHOT
 
 
 4.0.0
diff --git a/struts2-archetype-portlet/pom.xml 
b/struts2-archetype-portlet/pom.xml
index 14ca5c6..8da8a94 100644
--- a/struts2-archetype-portlet/pom.xml
+++ b/struts2-archetype-portlet/pom.xml
@@ -2,7 +2,7 @@
 
 org.apache.struts
 struts-archetypes
-2.5.22
+2.5.23-SNAPSHOT
 
 
 4.0.0
diff --git a/struts2-archetype-starter/pom.xml 
b/struts2-archetype-starter/pom.xml
index da9c518..af57c75 100644
--- a/struts2-archetype-starter/pom.xml
+++ b/struts2-archetype-starter/pom.xml
@@ -4,7 +4,7 @@
 
 org.apache.struts
 struts-archetypes
-2.5.22
+2.5.23-SNAPSHOT
 
 
 4.0.0