struts git commit: Includes action: and method: as excluded patterns and drops class

2015-04-29 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/develop 326e89daf -> 5649ff1ac


Includes action: and method: as excluded patterns and drops class


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/5649ff1a
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/5649ff1a
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/5649ff1a

Branch: refs/heads/develop
Commit: 5649ff1ac5a04389e3a1c8aa47ad7673a66ed48f
Parents: 326e89d
Author: Lukasz Lenart 
Authored: Wed Apr 29 21:35:04 2015 +0200
Committer: Lukasz Lenart 
Committed: Wed Apr 29 21:35:04 2015 +0200

--
 core/src/main/resources/struts-default.xml  | 16 
 .../struts2/interceptor/CookieInterceptorTest.java  |  4 +++-
 .../security/DefaultExcludedPatternsChecker.java| 12 ++--
 .../DefaultExcludedPatternsCheckerTest.java |  7 +--
 xwork-core/src/test/resources/xwork-param-test.xml  |  3 ++-
 5 files changed, 16 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/5649ff1a/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 88b6e13..f9c9ff4 100644
--- a/core/src/main/resources/struts-default.xml
+++ b/core/src/main/resources/struts-default.xml
@@ -226,9 +226,7 @@
 
 
 
-
-^action:.*,^method:.*
-
+
 
 
 
@@ -283,9 +281,7 @@
 
 
 
-
-^action:.*,^method:.*
-
+
 
 
 
@@ -293,9 +289,7 @@
 
 
 
-
-^action:.*,^method:.*
-
+
 
 
 input,back,cancel,browse
@@ -331,9 +325,7 @@
 
 
 
-
-^action:.*,^method:.*
-
+
 
 
 input,back,cancel,browse

http://git-wip-us.apache.org/repos/asf/struts/blob/5649ff1a/core/src/test/java/org/apache/struts2/interceptor/CookieInterceptorTest.java
--
diff --git 
a/core/src/test/java/org/apache/struts2/interceptor/CookieInterceptorTest.java 
b/core/src/test/java/org/apache/struts2/interceptor/CookieInterceptorTest.java
index c730382..187efc0 100644
--- 
a/core/src/test/java/org/apache/struts2/interceptor/CookieInterceptorTest.java
+++ 
b/core/src/test/java/org/apache/struts2/interceptor/CookieInterceptorTest.java
@@ -378,7 +378,9 @@ public class CookieInterceptorTest extends 
StrutsInternalTestCase {
 return accepted;
 }
 };
-interceptor.setExcludedPatternsChecker(new 
DefaultExcludedPatternsChecker());
+DefaultExcludedPatternsChecker excludedPatternsChecker = new 
DefaultExcludedPatternsChecker();
+
excludedPatternsChecker.setAdditionalExcludePatterns(".*(^|\\.|\\[|'|\")class(\\.|\\[|'|\").*");
+interceptor.setExcludedPatternsChecker(excludedPatternsChecker);
 interceptor.setAcceptedPatternsChecker(new 
DefaultAcceptedPatternsChecker());
 interceptor.setCookiesName("*");
 

http://git-wip-us.apache.org/repos/asf/struts/blob/5649ff1a/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
--
diff --git 
a/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
 
b/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
index 8878dd2..d96b67a 100644
--- 
a/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
+++ 
b/xwork-core/src/main/java/com/opensymphony/xwork2/security/DefaultExcludedPatternsChecker.java
@@ -16,16 +16,8 @@ public class DefaultExcludedPatternsChecker implements 
ExcludedPatternsChecker {
 private static final Logger LOG = 
LoggerFactory.getLogger(DefaultExcludedPatternsChecker.class);
 
 public static final String[] EXCLUDED_PATTERNS = {
-"(.*\\.|^|.*|\\[('|\"))\\bclass(\\.|('|\")]|\\[).*",
-"(^|.*#)dojo(\\.|\\[).*",
-"(^|.*#)struts(\\.|\\[).*",
-"(^|.*#)session(\\.|\\[).*",
-"(^|.*#)request(\\.|\\[).*",
-"(^|.*#)application(\\.|\\[).*",
-"(^|.*#)servlet(Reque

struts git commit: WW-4493 Allows to pass parameters witch dashes in names

2015-04-29 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/develop 5649ff1ac -> 791364cf6


WW-4493 Allows to pass parameters witch dashes in names


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/791364cf
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/791364cf
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/791364cf

Branch: refs/heads/develop
Commit: 791364cf6d97528ec75b8859450204150d55ed5e
Parents: 5649ff1
Author: Lukasz Lenart 
Authored: Thu Apr 30 08:27:27 2015 +0200
Committer: Lukasz Lenart 
Committed: Thu Apr 30 08:27:27 2015 +0200

--
 .../java/org/apache/struts2/components/Component.java   | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/791364cf/core/src/main/java/org/apache/struts2/components/Component.java
--
diff --git a/core/src/main/java/org/apache/struts2/components/Component.java 
b/core/src/main/java/org/apache/struts2/components/Component.java
index 15cc698..62e07ee 100644
--- a/core/src/main/java/org/apache/struts2/components/Component.java
+++ b/core/src/main/java/org/apache/struts2/components/Component.java
@@ -434,7 +434,7 @@ public class Component {
 /**
  * Pushes this component's parameter Map as well as the component itself 
on to the stack
  * and then copies the supplied parameters over. Because the component's 
parameter Map is
- * pushed before the component itself, any key-value pair that can't be 
assigned to componet
+ * pushed before the component itself, any key-value pair that can't be 
assigned to component
  * will be set in the parameters Map.
  *
  * @param params  the parameters to copy.
@@ -446,7 +446,15 @@ public class Component {
 for (Object o : params.entrySet()) {
 Map.Entry entry = (Map.Entry) o;
 String key = (String) entry.getKey();
-stack.setValue(key, entry.getValue());
+
+if (key.indexOf('-') >= 0) {
+// UI component attributes may contain hypens (e.g. 
data-ajax), but ognl
+// can't handle that, and there can't be a component 
property with a hypen
+// so into the parameters map it goes. See WW-4493
+parameters.put(key, entry.getValue());
+} else {
+stack.setValue(key, entry.getValue());
+}
 }
 } finally {
 stack.pop();



struts git commit: WW-4494 Uses 2.3.0 FreeMarker incompatibility level by default

2015-04-29 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/develop 791364cf6 -> 45071a7ff


WW-4494 Uses 2.3.0 FreeMarker incompatibility level by default


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/45071a7f
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/45071a7f
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/45071a7f

Branch: refs/heads/develop
Commit: 45071a7ff108f75e8988c7b650f2c9cef133f809
Parents: 791364c
Author: Lukasz Lenart 
Authored: Thu Apr 30 08:55:06 2015 +0200
Committer: Lukasz Lenart 
Committed: Thu Apr 30 08:55:06 2015 +0200

--
 .../org/apache/struts2/views/freemarker/FreemarkerManager.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/45071a7f/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 2a16689..a99235e 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
@@ -328,7 +328,7 @@ public class FreemarkerManager {
  * @param servletContext
  */
 protected Configuration createConfiguration(ServletContext servletContext) 
throws TemplateException {
-Configuration configuration = new Configuration();
+Configuration configuration = new 
Configuration(Configuration.VERSION_2_3_0);
 
 
configuration.setTemplateExceptionHandler(TemplateExceptionHandler.HTML_DEBUG_HANDLER);