Compare commits

...

9 Commits

Author SHA1 Message Date
Lukasz Lenart a6e72347d2 [maven-release-plugin] prepare release STRUTS_2_3_24_2 2016-04-19 11:24:19 +02:00
Lukasz Lenart da8d444389 Cleans up method name 2016-04-19 11:07:43 +02:00
Lukasz Lenart 2bc29c5ae9 Upgrades OGNL 2016-04-19 11:07:20 +02:00
Lukasz Lenart 36238eb35a [maven-release-plugin] prepare for next development iteration 2016-04-18 22:08:19 +02:00
Lukasz Lenart 5c51bf4051 [maven-release-plugin] prepare release STRUTS_2_3_24_2 2016-04-18 22:08:04 +02:00
Lukasz Lenart 24085ee6a6 Sets SNAPSHOT version to allow prepare a new release 2016-04-18 21:56:59 +02:00
Lukasz Lenart 8f42327dc6 Drops defining location via request 2016-04-18 21:51:11 +02:00
Lukasz Lenart d92654daf3 Adds additional blocked classes 2016-04-18 21:51:01 +02:00
Lukasz Lenart 47da9c9f52 Uses isSequence flag to block chained expressions 2016-04-18 21:50:50 +02:00
59 changed files with 85 additions and 73 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId> <artifactId>struts2-apps</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-blank</artifactId> <artifactId>struts2-blank</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId> <artifactId>struts2-apps</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-jboss-blank</artifactId> <artifactId>struts2-jboss-blank</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId> <artifactId>struts2-apps</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-mailreader</artifactId> <artifactId>struts2-mailreader</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId> <artifactId>struts2-parent</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-apps</artifactId> <artifactId>struts2-apps</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId> <artifactId>struts2-apps</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-portlet</artifactId> <artifactId>struts2-portlet</artifactId>
+2 -2
View File
@@ -26,12 +26,12 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId> <artifactId>struts2-apps</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-rest-showcase</artifactId> <artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>2.3.24.1</version> <version>2.3.24.2</version>
<name>Struts 2 Rest Showcase Webapp</name> <name>Struts 2 Rest Showcase Webapp</name>
<description>Struts 2 Rest Showcase Example</description> <description>Struts 2 Rest Showcase Example</description>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId> <artifactId>struts2-apps</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-showcase</artifactId> <artifactId>struts2-showcase</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId> <artifactId>struts2-parent</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-archetypes</artifactId> <artifactId>struts2-archetypes</artifactId>
@@ -2,7 +2,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId> <artifactId>struts2-archetypes</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId> <artifactId>struts2-archetypes</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -2,7 +2,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId> <artifactId>struts2-archetypes</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -2,7 +2,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId> <artifactId>struts2-archetypes</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -2,7 +2,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId> <artifactId>struts2-archetypes</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -2,7 +2,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId> <artifactId>struts2-archetypes</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId> <artifactId>struts2-archetypes</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId> <artifactId>struts2-parent</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-assembly</artifactId> <artifactId>struts2-assembly</artifactId>
+3 -3
View File
@@ -10,7 +10,7 @@
</parent> </parent>
<artifactId>struts2-bom</artifactId> <artifactId>struts2-bom</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Struts 2 Bill of Materials</name> <name>Struts 2 Bill of Materials</name>
@@ -25,7 +25,7 @@
</licenses> </licenses>
<properties> <properties>
<struts-version.version>2.3.24.1</struts-version.version> <struts-version.version>2.3.24.2</struts-version.version>
</properties> </properties>
<build> <build>
@@ -197,6 +197,6 @@
</dependencyManagement> </dependencyManagement>
<scm> <scm>
<tag>STRUTS_2_3_24_1</tag> <tag>STRUTS_2_3_24_2</tag>
</scm> </scm>
</project> </project>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId> <artifactId>struts2-osgi-bundles</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-osgi-admin-bundle</artifactId> <artifactId>struts2-osgi-admin-bundle</artifactId>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId> <artifactId>struts2-osgi-bundles</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-osgi-demo-bundle</artifactId> <artifactId>struts2-osgi-demo-bundle</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId> <artifactId>struts2-parent</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-osgi-bundles</artifactId> <artifactId>struts2-osgi-bundles</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId> <artifactId>struts2-parent</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-core</artifactId> <artifactId>struts2-core</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
@@ -136,7 +136,7 @@ public class DefaultActionMapper implements ActionMapper {
put(METHOD_PREFIX, new ParameterAction() { put(METHOD_PREFIX, new ParameterAction() {
public void execute(String key, ActionMapping mapping) { public void execute(String key, ActionMapping mapping) {
if (allowDynamicMethodCalls) { if (allowDynamicMethodCalls) {
mapping.setMethod(key.substring(METHOD_PREFIX.length())); mapping.setMethod(cleanupActionName(key.substring(METHOD_PREFIX.length())));
} }
} }
}); });
@@ -148,7 +148,7 @@ public class DefaultActionMapper implements ActionMapper {
if (allowDynamicMethodCalls) { if (allowDynamicMethodCalls) {
int bang = name.indexOf('!'); int bang = name.indexOf('!');
if (bang != -1) { if (bang != -1) {
String method = name.substring(bang + 1); String method = cleanupActionName(name.substring(bang + 1));
mapping.setMethod(method); mapping.setMethod(method);
name = name.substring(0, bang); name = name.substring(0, bang);
} }
@@ -385,7 +385,7 @@ public class DefaultActionMapper implements ActionMapper {
return rawActionName; return rawActionName;
} else { } else {
if (LOG.isWarnEnabled()) { if (LOG.isWarnEnabled()) {
LOG.warn("Action [#0] does not match allowed action names pattern [#1], cleaning it up!", LOG.warn("Action/method [#0] does not match allowed action names pattern [#1], cleaning it up!",
rawActionName, allowedActionNames); rawActionName, allowedActionNames);
} }
String cleanActionName = rawActionName; String cleanActionName = rawActionName;
@@ -393,7 +393,7 @@ public class DefaultActionMapper implements ActionMapper {
cleanActionName = cleanActionName.replace(chunk, ""); cleanActionName = cleanActionName.replace(chunk, "");
} }
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
LOG.debug("Cleaned action name [#0]", cleanActionName); LOG.debug("Cleaned action/method name [#0]", cleanActionName);
} }
return cleanActionName; return cleanActionName;
} }
@@ -448,12 +448,7 @@ public class XSLTResult implements Result {
ServletActionContext.getServletContext()); ServletActionContext.getServletContext());
} }
protected Templates getTemplates(String path) throws TransformerException, IOException { protected Templates getTemplates(final String path) throws TransformerException, IOException {
String pathFromRequest = ServletActionContext.getRequest().getParameter("xslt.location");
if (pathFromRequest != null)
path = pathFromRequest;
if (path == null) if (path == null)
throw new TransformerException("Stylesheet path is null"); throw new TransformerException("Stylesheet path is null");
@@ -50,6 +50,9 @@
ognl.MemberAccess, ognl.MemberAccess,
ognl.ClassResolver, ognl.ClassResolver,
ognl.TypeConverter, ognl.TypeConverter,
ognl.MemberAccess,
ognl.DefaultMemberAccess,
com.opensymphony.xwork2.ognl.SecurityMemberAccess,
com.opensymphony.xwork2.ActionContext" /> com.opensymphony.xwork2.ActionContext" />
<!-- this must be valid regex, each '.' in package name must be escaped! --> <!-- this must be valid regex, each '.' in package name must be escaped! -->
<constant name="struts.excludedPackageNamePatterns" value="^java\.lang\..*,^ognl.*,^(?!javax\.servlet\..+)(javax\..+)" /> <constant name="struts.excludedPackageNamePatterns" value="^java\.lang\..*,^ognl.*,^(?!javax\.servlet\..+)(javax\..+)" />
@@ -657,8 +657,7 @@ public class URLTagTest extends AbstractUITagTest {
tag.doEndTag(); tag.doEndTag();
Object allowMethodAccess = stack.findValue("\u0023_memberAccess['allowStaticMethodAccess']"); Object allowMethodAccess = stack.findValue("\u0023_memberAccess['allowStaticMethodAccess']");
assertNotNull(allowMethodAccess); assertNull(allowMethodAccess);
assertEquals(Boolean.FALSE, allowMethodAccess);
assertNull(session.get("foo")); assertNull(session.get("foo"));
+1 -1
View File
@@ -25,7 +25,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-cdi-plugin</artifactId> <artifactId>struts2-cdi-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-codebehind-plugin</artifactId> <artifactId>struts2-codebehind-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-config-browser-plugin</artifactId> <artifactId>struts2-config-browser-plugin</artifactId>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-convention-plugin</artifactId> <artifactId>struts2-convention-plugin</artifactId>
+1 -1
View File
@@ -25,7 +25,7 @@
<parent> <parent>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-dwr-plugin</artifactId> <artifactId>struts2-dwr-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-embeddedjsp-plugin</artifactId> <artifactId>struts2-embeddedjsp-plugin</artifactId>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-gxp-plugin</artifactId> <artifactId>struts2-gxp-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-jasperreports-plugin</artifactId> <artifactId>struts2-jasperreports-plugin</artifactId>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-java8-support-plugin</artifactId> <artifactId>struts2-java8-support-plugin</artifactId>
+1 -1
View File
@@ -25,7 +25,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-javatemplates-plugin</artifactId> <artifactId>struts2-javatemplates-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-jfreechart-plugin</artifactId> <artifactId>struts2-jfreechart-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-jsf-plugin</artifactId> <artifactId>struts2-jsf-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-json-plugin</artifactId> <artifactId>struts2-json-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-junit-plugin</artifactId> <artifactId>struts2-junit-plugin</artifactId>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-osgi-plugin</artifactId> <artifactId>struts2-osgi-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-oval-plugin</artifactId> <artifactId>struts2-oval-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-pell-multipart-plugin</artifactId> <artifactId>struts2-pell-multipart-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-plexus-plugin</artifactId> <artifactId>struts2-plexus-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId> <artifactId>struts2-parent</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-portlet-tiles-plugin</artifactId> <artifactId>struts2-portlet-tiles-plugin</artifactId>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-portlet-plugin</artifactId> <artifactId>struts2-portlet-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-rest-plugin</artifactId> <artifactId>struts2-rest-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-sitegraph-plugin</artifactId> <artifactId>struts2-sitegraph-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-sitemesh-plugin</artifactId> <artifactId>struts2-sitemesh-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-spring-plugin</artifactId> <artifactId>struts2-spring-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-struts1-plugin</artifactId> <artifactId>struts2-struts1-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-testng-plugin</artifactId> <artifactId>struts2-testng-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-tiles-plugin</artifactId> <artifactId>struts2-tiles-plugin</artifactId>
+1 -1
View File
@@ -26,7 +26,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId> <artifactId>struts2-plugins</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<artifactId>struts2-tiles3-plugin</artifactId> <artifactId>struts2-tiles3-plugin</artifactId>
+3 -3
View File
@@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>struts2-parent</artifactId> <artifactId>struts2-parent</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Struts 2</name> <name>Struts 2</name>
<url>http://struts.apache.org/</url> <url>http://struts.apache.org/</url>
@@ -31,7 +31,7 @@
<connection>scm:git:git://git.apache.org/struts.git</connection> <connection>scm:git:git://git.apache.org/struts.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/struts.git</developerConnection> <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/struts.git</developerConnection>
<url>http://git.apache.org/struts.git</url> <url>http://git.apache.org/struts.git</url>
<tag>STRUTS_2_3_24_1</tag> <tag>STRUTS_2_3_24_2</tag>
</scm> </scm>
<issueManagement> <issueManagement>
@@ -86,7 +86,7 @@
<properties> <properties>
<currentVersion>${project.version}</currentVersion> <currentVersion>${project.version}</currentVersion>
<struts2.springPlatformVersion>3.0.5.RELEASE</struts2.springPlatformVersion> <struts2.springPlatformVersion>3.0.5.RELEASE</struts2.springPlatformVersion>
<ognl.version>3.0.6</ognl.version> <ognl.version>3.0.6.1</ognl.version>
<asm.version>3.3</asm.version> <asm.version>3.3</asm.version>
<asm5.version>5.0.2</asm5.version> <asm5.version>5.0.2</asm5.version>
<tiles.version>2.0.6</tiles.version> <tiles.version>2.0.6</tiles.version>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.apache.struts</groupId> <groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId> <artifactId>struts2-parent</artifactId>
<version>2.3.24.1</version> <version>2.3.24.2</version>
</parent> </parent>
<groupId>org.apache.struts.xwork</groupId> <groupId>org.apache.struts.xwork</groupId>
@@ -282,7 +282,7 @@ public class OgnlUtil {
compileAndExecute(name, context, new OgnlTask<Void>() { compileAndExecute(name, context, new OgnlTask<Void>() {
public Void execute(Object tree) throws OgnlException { public Void execute(Object tree) throws OgnlException {
if (!evalName && isEvalExpression(tree, context)) { if (!evalName && isEvalExpression(tree, context)) {
throw new OgnlException("Eval expression cannot be used as parameter name"); throw new OgnlException("Eval expression/chained expressions cannot be used as parameter name");
} }
Ognl.setValue(tree, context, root, value); Ognl.setValue(tree, context, root, value);
return null; return null;
@@ -298,7 +298,7 @@ public class OgnlUtil {
if (context!=null && context instanceof OgnlContext) { if (context!=null && context instanceof OgnlContext) {
ognlContext = (OgnlContext) context; ognlContext = (OgnlContext) context;
} }
return node.isEvalChain(ognlContext); return node.isEvalChain(ognlContext) || node.isSequence(ognlContext);
} }
return false; return false;
} }
@@ -355,7 +355,7 @@ public class OgnlUtil {
private void checkEnableEvalExpression(Object tree, Map<String, Object> context) throws OgnlException { private void checkEnableEvalExpression(Object tree, Map<String, Object> context) throws OgnlException {
if (!enableEvalExpression && isEvalExpression(tree, context)) { if (!enableEvalExpression && isEvalExpression(tree, context)) {
throw new OgnlException("Eval expressions has been disabled!"); throw new OgnlException("Eval expressions/chained expressions have been disabled!");
} }
} }
@@ -750,6 +750,21 @@ public class OgnlUtilTest extends XWorkTestCase {
assertEquals(expected.getMessage(), "Method \"getRuntime\" failed for object class java.lang.Runtime"); assertEquals(expected.getMessage(), "Method \"getRuntime\" failed for object class java.lang.Runtime");
} }
public void testBlockSequenceOfExpressions() throws Exception {
Foo foo = new Foo();
Exception expected = null;
try {
ognlUtil.setValue("#booScope=@myclass@DEFAULT_SCOPE,#bootScope.init()", ognlUtil.createDefaultContext(foo), foo, true);
fail();
} catch (OgnlException e) {
expected = e;
}
assertNotNull(expected);
assertSame(OgnlException.class, expected.getClass());
assertEquals(expected.getMessage(), "Eval expressions/chained expressions have been disabled!");
}
public static class Email { public static class Email {
String address; String address;