[struts] branch WW-5340-ognlutil-refactor created (now 13f0591ca)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5340-ognlutil-refactor in repository https://gitbox.apache.org/repos/asf/struts.git at 13f0591ca WW-5340 Remove redundant check on #setValue This branch includes the following new commits: new 452cb774a WW-5340 Refactor OgnlUtil, specifically calls to Ognl#getValue,setValue,parseExpression new 13f0591ca WW-5340 Remove redundant check on #setValue 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.
[struts] 01/02: WW-5340 Refactor OgnlUtil, specifically calls to Ognl#getValue,setValue,parseExpression
This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5340-ognlutil-refactor in repository https://gitbox.apache.org/repos/asf/struts.git commit 452cb774a92fb65627afbb4827f931d55b64d520 Author: Kusal Kithul-Godage AuthorDate: Thu Aug 31 17:20:46 2023 +1000 WW-5340 Refactor OgnlUtil, specifically calls to Ognl#getValue,setValue,parseExpression --- .../com/opensymphony/xwork2/ognl/OgnlUtil.java | 99 ++ 1 file changed, 47 insertions(+), 52 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java index 005d17eba..beee54cb4 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java @@ -529,8 +529,7 @@ public class OgnlUtil { } /** - * Wrapper around Ognl.setValue() to handle type conversion for collection elements. - * Ideally, this should be handled by OGNL directly. + * Wrapper around Ognl#setValue * * @param name the name * @param context context map @@ -540,16 +539,7 @@ public class OgnlUtil { * @throws OgnlException in case of ognl errors */ public void setValue(final String name, final Map context, final Object root, final Object value) throws OgnlException { -compileAndExecute(name, context, (OgnlTask) tree -> { -if (isEvalExpression(tree, context)) { -throw new OgnlException("Eval expression/chained expressions cannot be used as parameter name"); -} -if (isArithmeticExpression(tree, context)) { -throw new OgnlException("Arithmetic expressions cannot be used as parameter name"); -} -Ognl.setValue(tree, context, root, value); -return null; -}); +ognlSet(name, context, root, value, context, this::checkEnableEvalExpression, this::checkEvalExpression, this::checkArithmeticExpression); } private boolean isEvalExpression(Object tree, Map context) throws OgnlException { @@ -592,58 +582,55 @@ public class OgnlUtil { } public Object getValue(final String name, final Map context, final Object root) throws OgnlException { -return compileAndExecute(name, context, tree -> Ognl.getValue(tree, context, root)); +return getValue(name, context, root, null); } public Object callMethod(final String name, final Map context, final Object root) throws OgnlException { -return compileAndExecuteMethod(name, context, tree -> Ognl.getValue(tree, context, root)); +return ognlGet(name, context, root, null, context, this::checkSimpleMethod); } public Object getValue(final String name, final Map context, final Object root, final Class resultType) throws OgnlException { -return compileAndExecute(name, context, tree -> Ognl.getValue(tree, context, root, resultType)); +return ognlGet(name, context, root, resultType, context, this::checkEnableEvalExpression); } - public Object compile(String expression) throws OgnlException { return compile(expression, null); } -private Object compileAndExecute(String expression, Map context, OgnlTask task) throws OgnlException { -Object tree; -if (enableExpressionCache) { -tree = expressionCache.get(expression); -if (tree == null) { -tree = Ognl.parseExpression(expression); -checkEnableEvalExpression(tree, context); -expressionCache.putIfAbsent(expression, tree); -} -} else { -tree = Ognl.parseExpression(expression); -checkEnableEvalExpression(tree, context); +private void ognlSet(String expr, Map context, Object root, Object value, Map checkContext, TreeCheck ...treeChecks) throws OgnlException { +Object tree = toTree(expr); +for (TreeCheck check : treeChecks) { +check.consume(tree, checkContext); } +Ognl.setValue(tree, context, root, value); +} -return task.execute(tree); +private T ognlGet(String expr, Map context, Object root, Class resultType, Map checkContext, TreeCheck ...treeChecks) throws OgnlException { +Object tree = toTree(expr); +for (TreeCheck check : treeChecks) { +check.consume(tree, checkContext); +} +return (T) Ognl.getValue(tree, context, root, resultType); } -private Object compileAndExecuteMethod(String expression, Map context, OgnlTask task) throws OgnlException { -Object tree; +private Object toTree(String expr) throws OgnlException { +Object tree = null; if (enableExpressionCache) { -tree = expressionCache.get(expression); -if (tree == null) { -tree = Ognl.parseExpression(e
[struts] 02/02: WW-5340 Remove redundant check on #setValue
This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5340-ognlutil-refactor in repository https://gitbox.apache.org/repos/asf/struts.git commit 13f0591ca1c3175932ad9fcc7d3374e0f2819308 Author: Kusal Kithul-Godage AuthorDate: Thu Aug 31 17:22:48 2023 +1000 WW-5340 Remove redundant check on #setValue --- core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java | 2 +- core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java index beee54cb4..f960fe73a 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java @@ -539,7 +539,7 @@ public class OgnlUtil { * @throws OgnlException in case of ognl errors */ public void setValue(final String name, final Map context, final Object root, final Object value) throws OgnlException { -ognlSet(name, context, root, value, context, this::checkEnableEvalExpression, this::checkEvalExpression, this::checkArithmeticExpression); +ognlSet(name, context, root, value, context, this::checkEvalExpression, this::checkArithmeticExpression); } private boolean isEvalExpression(Object tree, Map context) throws OgnlException { diff --git a/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java b/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java index 0cafd799b..559677e99 100644 --- a/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java +++ b/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java @@ -1312,7 +1312,7 @@ public class OgnlUtilTest extends XWorkTestCase { } assertNotNull(expected); assertSame(OgnlException.class, expected.getClass()); -assertEquals(expected.getMessage(), "Eval expressions/chained expressions have been disabled!"); +assertEquals("Eval expression/chained expressions cannot be used as parameter name", expected.getMessage()); } public void testCallMethod() {
[struts] branch WW-5340-ognlutil-refactor updated: WW-5340 Rename functional interface
This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5340-ognlutil-refactor in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/WW-5340-ognlutil-refactor by this push: new 14d343503 WW-5340 Rename functional interface 14d343503 is described below commit 14d34350358e8bc583d70a894ec41ea97058d740 Author: Kusal Kithul-Godage AuthorDate: Thu Aug 31 17:26:45 2023 +1000 WW-5340 Rename functional interface --- .../main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java index f960fe73a..e1df852e3 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java @@ -597,18 +597,18 @@ public class OgnlUtil { return compile(expression, null); } -private void ognlSet(String expr, Map context, Object root, Object value, Map checkContext, TreeCheck ...treeChecks) throws OgnlException { +private void ognlSet(String expr, Map context, Object root, Object value, Map checkContext, TreeValidator... treeValidators) throws OgnlException { Object tree = toTree(expr); -for (TreeCheck check : treeChecks) { -check.consume(tree, checkContext); +for (TreeValidator check : treeValidators) { +check.validate(tree, checkContext); } Ognl.setValue(tree, context, root, value); } -private T ognlGet(String expr, Map context, Object root, Class resultType, Map checkContext, TreeCheck ...treeChecks) throws OgnlException { +private T ognlGet(String expr, Map context, Object root, Class resultType, Map checkContext, TreeValidator... treeValidators) throws OgnlException { Object tree = toTree(expr); -for (TreeCheck check : treeChecks) { -check.consume(tree, checkContext); +for (TreeValidator check : treeValidators) { +check.validate(tree, checkContext); } return (T) Ognl.getValue(tree, context, root, resultType); } @@ -895,7 +895,7 @@ public class OgnlUtil { } @FunctionalInterface -private interface TreeCheck { -void consume(Object tree, Map context) throws OgnlException; +private interface TreeValidator { +void validate(Object tree, Map context) throws OgnlException; } }
[struts] branch WW-5340-ognlutil-refactor updated (14d343503 -> 65ff2422e)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5340-ognlutil-refactor in repository https://gitbox.apache.org/repos/asf/struts.git discard 14d343503 WW-5340 Rename functional interface add 65ff2422e WW-5340 Rename functional interface 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 (14d343503) \ N -- N -- N refs/heads/WW-5340-ognlutil-refactor (65ff2422e) 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: core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java | 8 1 file changed, 4 insertions(+), 4 deletions(-)
[struts] branch WW-5340-ognlutil-refactor updated: WW-5340 Fix OgnlReflectionProvider bypassing OgnlUtil
This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5340-ognlutil-refactor in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/WW-5340-ognlutil-refactor by this push: new 90adbfb3c WW-5340 Fix OgnlReflectionProvider bypassing OgnlUtil 90adbfb3c is described below commit 90adbfb3cee53cc4284d3155a8a95009a8b35f55 Author: Kusal Kithul-Godage AuthorDate: Thu Aug 31 18:58:56 2023 +1000 WW-5340 Fix OgnlReflectionProvider bypassing OgnlUtil --- .../java/com/opensymphony/xwork2/ognl/OgnlReflectionProvider.java | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlReflectionProvider.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlReflectionProvider.java index d21b2f624..1dbc8c67e 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlReflectionProvider.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlReflectionProvider.java @@ -21,7 +21,6 @@ package com.opensymphony.xwork2.ognl; import com.opensymphony.xwork2.inject.Inject; import com.opensymphony.xwork2.util.reflection.ReflectionException; import com.opensymphony.xwork2.util.reflection.ReflectionProvider; -import ognl.Ognl; import ognl.OgnlException; import ognl.OgnlRuntime; @@ -33,9 +32,9 @@ import java.util.Collection; import java.util.Map; public class OgnlReflectionProvider implements ReflectionProvider { - + private OgnlUtil ognlUtil; - + @Inject public void setOgnlUtil(OgnlUtil ognlUtil) { this.ognlUtil = ognlUtil; @@ -69,7 +68,6 @@ public class OgnlReflectionProvider implements ReflectionProvider { public void setProperties(Map props, Object o, Map context, boolean throwPropertyExceptions) throws ReflectionException{ ognlUtil.setProperties(props, o, context, throwPropertyExceptions); - } public void setProperties(Map properties, Object o) { @@ -134,7 +132,7 @@ public class OgnlReflectionProvider implements ReflectionProvider { public void setValue(String expression, Map context, Object root, Object value) throws ReflectionException { try { -Ognl.setValue(expression, context, root, value); +ognlUtil.setValue(expression, context, root, value); } catch (OgnlException e) { throw new ReflectionException(e); }
[struts] 01/01: WW-5340 Introducing OGNL Guard
This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git commit e8b752fbb30298a3a2a4e77b0396853d0ffc0d1b Author: Kusal Kithul-Godage AuthorDate: Thu Aug 31 19:21:51 2023 +1000 WW-5340 Introducing OGNL Guard --- .../opensymphony/xwork2/ognl/DefaultOgnlGuard.java | 56 ++ .../com/opensymphony/xwork2/ognl/OgnlGuard.java| 6 +++ .../com/opensymphony/xwork2/ognl/OgnlUtil.java | 9 .../java/org/apache/struts2/StrutsConstants.java | 3 ++ core/src/main/resources/struts-beans.xml | 1 + 5 files changed, 75 insertions(+) diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlGuard.java b/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlGuard.java new file mode 100644 index 0..390089f26 --- /dev/null +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlGuard.java @@ -0,0 +1,56 @@ +package com.opensymphony.xwork2.ognl; + +import com.opensymphony.xwork2.inject.Inject; +import ognl.Node; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.struts2.StrutsConstants; + +import java.util.HashSet; +import java.util.Set; + +import static com.opensymphony.xwork2.util.TextParseUtil.commaDelimitedStringToSet; +import static java.util.Collections.emptySet; +import static java.util.Collections.unmodifiableSet; + +public class DefaultOgnlGuard implements OgnlGuard { + +private static final Logger LOG = LogManager.getLogger(DefaultOgnlGuard.class); + +private Set excludedNodeTypes = emptySet(); + +@Inject(value = StrutsConstants.STRUTS_OGNL_EXCLUDED_NODE_TYPES, required = false) +public void useExcludedNodeTypes(String excludedNodeTypes) { +Set incomingExcludedNodeTypes = commaDelimitedStringToSet(excludedNodeTypes); +Set newExcludeNodeTypes = new HashSet<>(this.excludedNodeTypes); +newExcludeNodeTypes.addAll(incomingExcludedNodeTypes); +this.excludedNodeTypes = unmodifiableSet(newExcludeNodeTypes); +} + +@Override +public boolean isBlocked(String expr, Object tree) { +return containsExcludedNodeType(tree); +} + +protected boolean containsExcludedNodeType(Object tree) { +if (!(tree instanceof Node) || excludedNodeTypes.isEmpty()) { +return false; +} +return recurseExcludedNodeType((Node) tree); +} + +protected boolean recurseExcludedNodeType(Node node) { +String nodeClassName = node.getClass().getName(); +if (excludedNodeTypes.contains(nodeClassName)) { +LOG.warn("Expression contains blocked node type [{}]", nodeClassName); +return true; +} else { +for (int i = 0; i < node.jjtGetNumChildren(); i++) { +if (containsExcludedNodeType(node.jjtGetChild(i))) { +return true; +} +} +return false; +} +} +} diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlGuard.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlGuard.java new file mode 100644 index 0..043df0294 --- /dev/null +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlGuard.java @@ -0,0 +1,6 @@ +package com.opensymphony.xwork2.ognl; + +public interface OgnlGuard { + +boolean isBlocked(String expr, Object tree); +} diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java index 8edac0a95..b9ae31455 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java @@ -73,6 +73,7 @@ public class OgnlUtil { private final OgnlCache expressionCache; private final OgnlCache, BeanInfo> beanInfoCache; private TypeConverter defaultConverter; +private OgnlGuard ognlGuard; private boolean devMode; private boolean enableExpressionCache = true; @@ -140,6 +141,11 @@ public class OgnlUtil { this.beanInfoCache = ognlBeanInfoCacheFactory.buildOgnlCache(); } +@Inject +protected void setOgnlGuard(OgnlGuard ognlGuard) { +this.ognlGuard = ognlGuard; +} + @Inject protected void setXWorkConverter(XWorkConverter conv) { this.defaultConverter = new OgnlTypeConverterWrapper(conv); @@ -624,6 +630,9 @@ public class OgnlUtil { expressionCache.put(expr, tree); } } +if (ognlGuard.isBlocked(expr, tree)) { +throw new OgnlException("Expression blocked by OgnlGuard: " + expr); +} return tree; } diff --git a/core/src/main/java/org/apache/struts2/StrutsConstants.java b/core/src/main/java/org/apache/struts2/StrutsConstants.java index 29dfca4b9..143b8c832 100644 --- a/core/src/main/java/org/apache/struts2/Struts
[struts] branch WW-5340-ognl-guard created (now e8b752fbb)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git at e8b752fbb WW-5340 Introducing OGNL Guard This branch includes the following new commits: new e8b752fbb WW-5340 Introducing OGNL Guard 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] 01/01: WW-5340 Introducing OGNL Guard
This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git commit 7106acf599ef426a3b8230f527ea18831f775af7 Author: Kusal Kithul-Godage AuthorDate: Thu Aug 31 19:21:51 2023 +1000 WW-5340 Introducing OGNL Guard --- .../opensymphony/xwork2/ognl/DefaultOgnlGuard.java | 79 ++ .../com/opensymphony/xwork2/ognl/OgnlGuard.java| 37 ++ .../com/opensymphony/xwork2/ognl/OgnlUtil.java | 9 +++ .../java/org/apache/struts2/StrutsConstants.java | 3 + core/src/main/resources/struts-beans.xml | 1 + 5 files changed, 129 insertions(+) diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlGuard.java b/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlGuard.java new file mode 100644 index 0..0d70d515c --- /dev/null +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlGuard.java @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package com.opensymphony.xwork2.ognl; + +import com.opensymphony.xwork2.inject.Inject; +import ognl.Node; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.struts2.StrutsConstants; + +import java.util.HashSet; +import java.util.Set; + +import static com.opensymphony.xwork2.util.TextParseUtil.commaDelimitedStringToSet; +import static java.util.Collections.emptySet; +import static java.util.Collections.unmodifiableSet; + +/** + * The default implementation of {@link OgnlGuard}. + * + * @since 6.4.0 + */ +public class DefaultOgnlGuard implements OgnlGuard { + +private static final Logger LOG = LogManager.getLogger(DefaultOgnlGuard.class); + +private Set excludedNodeTypes = emptySet(); + +@Inject(value = StrutsConstants.STRUTS_OGNL_EXCLUDED_NODE_TYPES, required = false) +public void useExcludedNodeTypes(String excludedNodeTypes) { +Set incomingExcludedNodeTypes = commaDelimitedStringToSet(excludedNodeTypes); +Set newExcludeNodeTypes = new HashSet<>(this.excludedNodeTypes); +newExcludeNodeTypes.addAll(incomingExcludedNodeTypes); +this.excludedNodeTypes = unmodifiableSet(newExcludeNodeTypes); +} + +@Override +public boolean isBlocked(String expr, Object tree) { +return containsExcludedNodeType(tree); +} + +protected boolean containsExcludedNodeType(Object tree) { +if (!(tree instanceof Node) || excludedNodeTypes.isEmpty()) { +return false; +} +return recurseExcludedNodeType((Node) tree); +} + +protected boolean recurseExcludedNodeType(Node node) { +String nodeClassName = node.getClass().getName(); +if (excludedNodeTypes.contains(nodeClassName)) { +LOG.warn("Expression contains blocked node type [{}]", nodeClassName); +return true; +} else { +for (int i = 0; i < node.jjtGetNumChildren(); i++) { +if (containsExcludedNodeType(node.jjtGetChild(i))) { +return true; +} +} +return false; +} +} +} diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlGuard.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlGuard.java new file mode 100644 index 0..b1bcb409e --- /dev/null +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlGuard.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the
[struts] branch WW-5340-ognl-guard updated (e8b752fbb -> 7106acf59)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git discard e8b752fbb WW-5340 Introducing OGNL Guard new 7106acf59 WW-5340 Introducing OGNL Guard 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 (e8b752fbb) \ N -- N -- N refs/heads/WW-5340-ognl-guard (7106acf59) 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. 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: .../opensymphony/xwork2/ognl/DefaultOgnlGuard.java | 23 .../com/opensymphony/xwork2/ognl/OgnlGuard.java| 31 ++ 2 files changed, 54 insertions(+)
[struts] branch WW-5340-ognl-guard updated (7106acf59 -> 78d68a496)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git omit 7106acf59 WW-5340 Introducing OGNL Guard add 54a0d987d WW-5340 Introducing OGNL Guard add 78d68a496 WW-5340 Make OgnlGuard a configurable bean 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 (7106acf59) \ N -- N -- N refs/heads/WW-5340-ognl-guard (78d68a496) 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: .../xwork2/config/impl/DefaultConfiguration.java | 85 +++--- .../StrutsDefaultConfigurationProvider.java| 3 + .../java/org/apache/struts2/StrutsConstants.java | 2 + .../config/StrutsBeanSelectionProvider.java| 19 +++-- core/src/main/resources/struts-beans.xml | 3 +- 5 files changed, 93 insertions(+), 19 deletions(-)
[struts] branch WW-5340-ognl-guard updated (78d68a496 -> fcc349389)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git omit 78d68a496 WW-5340 Make OgnlGuard a configurable bean omit 54a0d987d WW-5340 Introducing OGNL Guard add ef4d34f37 WW-5340 Introducing OGNL Guard add 17a0acac2 WW-5340 Fix tests add fcc349389 WW-5340 Make OgnlGuard a configurable bean 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 (78d68a496) \ N -- N -- N refs/heads/WW-5340-ognl-guard (fcc349389) 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/ognl/OgnlUtil.java | 43 -- .../xwork2/DefaultActionInvocationTest.java| 6 ++- .../com/opensymphony/xwork2/ognl/OgnlUtilTest.java | 18 - 3 files changed, 28 insertions(+), 39 deletions(-)
[struts] branch WW-5340-ognl-guard updated (fcc349389 -> 200bc0361)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git omit fcc349389 WW-5340 Make OgnlGuard a configurable bean omit 17a0acac2 WW-5340 Fix tests omit ef4d34f37 WW-5340 Introducing OGNL Guard new 7a9c61cb6 WW-5340 Introducing OGNL Guard new 193ef74b1 WW-5340 Fix tests new fc01f1e1c WW-5340 Make OgnlGuard a configurable bean new 200bc0361 WW-5340 Cache OgnlGuard result 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 (fcc349389) \ N -- N -- N refs/heads/WW-5340-ognl-guard (200bc0361) 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. The 4 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/com/opensymphony/xwork2/ognl/OgnlCache.java | 16 .../com/opensymphony/xwork2/ognl/OgnlDefaultCache.java | 4 ++-- .../java/com/opensymphony/xwork2/ognl/OgnlLRUCache.java | 6 +++--- .../main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java | 8 ++-- 4 files changed, 19 insertions(+), 15 deletions(-)
[struts] 01/04: WW-5340 Introducing OGNL Guard
This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git commit 7a9c61cb69a8ad1f7b6e07fdeb278ee704119ca2 Author: Kusal Kithul-Godage AuthorDate: Thu Aug 31 19:21:51 2023 +1000 WW-5340 Introducing OGNL Guard --- .../xwork2/config/impl/DefaultConfiguration.java | 85 +++--- .../StrutsDefaultConfigurationProvider.java| 3 + .../opensymphony/xwork2/ognl/DefaultOgnlGuard.java | 79 .../com/opensymphony/xwork2/ognl/OgnlGuard.java| 37 ++ .../com/opensymphony/xwork2/ognl/OgnlUtil.java | 42 +-- .../java/org/apache/struts2/StrutsConstants.java | 3 + core/src/main/resources/struts-beans.xml | 1 + 7 files changed, 217 insertions(+), 33 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java b/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java index 71fdf2ff8..92852657e 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java +++ b/core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java @@ -18,25 +18,82 @@ */ package com.opensymphony.xwork2.config.impl; -import com.opensymphony.xwork2.*; -import com.opensymphony.xwork2.config.*; -import com.opensymphony.xwork2.config.entities.*; +import com.opensymphony.xwork2.ActionContext; +import com.opensymphony.xwork2.DefaultLocaleProviderFactory; +import com.opensymphony.xwork2.DefaultTextProvider; +import com.opensymphony.xwork2.FileManager; +import com.opensymphony.xwork2.FileManagerFactory; +import com.opensymphony.xwork2.LocaleProviderFactory; +import com.opensymphony.xwork2.LocalizedTextProvider; +import com.opensymphony.xwork2.ObjectFactory; +import com.opensymphony.xwork2.StrutsTextProviderFactory; +import com.opensymphony.xwork2.TextProvider; +import com.opensymphony.xwork2.TextProviderFactory; +import com.opensymphony.xwork2.config.Configuration; +import com.opensymphony.xwork2.config.ConfigurationException; +import com.opensymphony.xwork2.config.ContainerProvider; +import com.opensymphony.xwork2.config.FileManagerFactoryProvider; +import com.opensymphony.xwork2.config.FileManagerProvider; +import com.opensymphony.xwork2.config.PackageProvider; +import com.opensymphony.xwork2.config.RuntimeConfiguration; +import com.opensymphony.xwork2.config.entities.ActionConfig; +import com.opensymphony.xwork2.config.entities.InterceptorMapping; +import com.opensymphony.xwork2.config.entities.PackageConfig; +import com.opensymphony.xwork2.config.entities.ResultConfig; +import com.opensymphony.xwork2.config.entities.ResultTypeConfig; +import com.opensymphony.xwork2.config.entities.UnknownHandlerConfig; import com.opensymphony.xwork2.config.providers.EnvsValueSubstitutor; import com.opensymphony.xwork2.config.providers.InterceptorBuilder; import com.opensymphony.xwork2.config.providers.ValueSubstitutor; -import com.opensymphony.xwork2.conversion.*; -import com.opensymphony.xwork2.conversion.impl.*; -import com.opensymphony.xwork2.factory.*; -import com.opensymphony.xwork2.inject.*; +import com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor; +import com.opensymphony.xwork2.conversion.ConversionFileProcessor; +import com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor; +import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer; +import com.opensymphony.xwork2.conversion.TypeConverter; +import com.opensymphony.xwork2.conversion.TypeConverterCreator; +import com.opensymphony.xwork2.conversion.TypeConverterHolder; +import com.opensymphony.xwork2.conversion.impl.ArrayConverter; +import com.opensymphony.xwork2.conversion.impl.CollectionConverter; +import com.opensymphony.xwork2.conversion.impl.DateConverter; +import com.opensymphony.xwork2.conversion.impl.DefaultConversionAnnotationProcessor; +import com.opensymphony.xwork2.conversion.impl.DefaultConversionFileProcessor; +import com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer; +import com.opensymphony.xwork2.conversion.impl.NumberConverter; +import com.opensymphony.xwork2.conversion.impl.StringConverter; +import com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter; +import com.opensymphony.xwork2.conversion.impl.XWorkConverter; +import com.opensymphony.xwork2.factory.ActionFactory; +import com.opensymphony.xwork2.factory.ConverterFactory; +import com.opensymphony.xwork2.factory.DefaultActionFactory; +import com.opensymphony.xwork2.factory.DefaultInterceptorFactory; +import com.opensymphony.xwork2.factory.DefaultResultFactory; +import com.opensymphony.xwork2.factory.DefaultUnknownHandlerFactory; +import com.opensymphony.xwork2.factory.InterceptorFactory; +import com.opensymphony.xwork2.factory.ResultFactory; +import com.opensymphony.xwork2.factory.StrutsConverterFactory; +import com.opensymphony.xwork2.factory.Unk
[struts] 02/04: WW-5340 Fix tests
This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git commit 193ef74b1920c1f87028283e808396cdff41728c Author: Kusal Kithul-Godage AuthorDate: Thu Aug 31 20:43:23 2023 +1000 WW-5340 Fix tests --- .../xwork2/DefaultActionInvocationTest.java| 6 -- .../com/opensymphony/xwork2/ognl/OgnlUtilTest.java | 18 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/core/src/test/java/com/opensymphony/xwork2/DefaultActionInvocationTest.java b/core/src/test/java/com/opensymphony/xwork2/DefaultActionInvocationTest.java index db6e21b64..00c97c972 100644 --- a/core/src/test/java/com/opensymphony/xwork2/DefaultActionInvocationTest.java +++ b/core/src/test/java/com/opensymphony/xwork2/DefaultActionInvocationTest.java @@ -28,6 +28,7 @@ import com.opensymphony.xwork2.mock.MockInterceptor; import com.opensymphony.xwork2.mock.MockResult; import com.opensymphony.xwork2.ognl.DefaultOgnlBeanInfoCacheFactory; import com.opensymphony.xwork2.ognl.DefaultOgnlExpressionCacheFactory; +import com.opensymphony.xwork2.ognl.DefaultOgnlGuard; import com.opensymphony.xwork2.ognl.OgnlUtil; import com.opensymphony.xwork2.util.ValueStack; import com.opensymphony.xwork2.util.ValueStackFactory; @@ -532,8 +533,9 @@ public class DefaultActionInvocationTest extends XWorkTestCase { private OgnlUtil createOgnlUtil() { return new OgnlUtil( -new DefaultOgnlExpressionCacheFactory<>(), -new DefaultOgnlBeanInfoCacheFactory<>() +new DefaultOgnlExpressionCacheFactory<>(), +new DefaultOgnlBeanInfoCacheFactory<>(), +new DefaultOgnlGuard() ); } diff --git a/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java b/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java index 559677e99..f9a62cdc7 100644 --- a/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java +++ b/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java @@ -1345,21 +1345,21 @@ public class OgnlUtilTest extends XWorkTestCase { public void testDefaultOgnlUtilAlternateConstructorArguments() { // Code coverage test for the OgnlUtil alternate constructor method, and verify expected behaviour. try { -OgnlUtil basicOgnlUtil = new OgnlUtil(new DefaultOgnlExpressionCacheFactory(), null); +OgnlUtil basicOgnlUtil = new OgnlUtil(new DefaultOgnlExpressionCacheFactory(), null, null); fail("null beanInfoCacheFactory should result in exception"); -} catch (IllegalArgumentException iaex) { +} catch (NullPointerException iaex) { // expected result } try { -OgnlUtil basicOgnlUtil = new OgnlUtil(null, new DefaultOgnlBeanInfoCacheFactory, BeanInfo>()); +OgnlUtil basicOgnlUtil = new OgnlUtil(null, new DefaultOgnlBeanInfoCacheFactory, BeanInfo>(), null); fail("null expressionCacheFactory should result in exception"); -} catch (IllegalArgumentException iaex) { +} catch (NullPointerException iaex) { // expected result } } public void testDefaultOgnlUtilExclusionsAlternateConstructorPopulated() { -OgnlUtil basicOgnlUtil = new OgnlUtil(new DefaultOgnlExpressionCacheFactory(), new DefaultOgnlBeanInfoCacheFactory, BeanInfo>()); +OgnlUtil basicOgnlUtil = new OgnlUtil(new DefaultOgnlExpressionCacheFactory(), new DefaultOgnlBeanInfoCacheFactory, BeanInfo>(), new DefaultOgnlGuard()); internalTestInitialEmptyOgnlUtilExclusions(basicOgnlUtil); internalTestOgnlUtilExclusionsImmutable(basicOgnlUtil); @@ -1737,7 +1737,7 @@ public class OgnlUtilTest extends XWorkTestCase { public void testGetExcludedPackageNamesAlternateConstructorPopulated() { // Getter should return an immutable collection -OgnlUtil util = new OgnlUtil(new DefaultOgnlExpressionCacheFactory<>(), new DefaultOgnlBeanInfoCacheFactory<>()); +OgnlUtil util = new OgnlUtil(new DefaultOgnlExpressionCacheFactory<>(), new DefaultOgnlBeanInfoCacheFactory<>(), new DefaultOgnlGuard()); util.setExcludedPackageNames("java.lang,java.awt"); assertEquals(util.getExcludedPackageNames().size(), 2); try { @@ -1765,7 +1765,7 @@ public class OgnlUtilTest extends XWorkTestCase { public void testGetExcludedClassesAlternateConstructorPopulated() { // Getter should return an immutable collection -OgnlUtil util = new OgnlUtil(new DefaultOgnlExpressionCacheFactory(), new DefaultOgnlBeanInfoCacheFactory, BeanInfo>()); +OgnlUtil util = new OgnlUtil(new DefaultOgnlExpressionCacheFactory(), new DefaultOgnlBeanInfoCacheFactory, BeanInfo>(), new DefaultOgnlGuard()); util.setExcludedClasses("java.lang.Runtime,java.lang.Pr
[struts] 03/04: WW-5340 Make OgnlGuard a configurable bean
This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git commit fc01f1e1c484f378e73bbbdc652a17470f1d95df Author: Kusal Kithul-Godage AuthorDate: Thu Aug 31 20:14:48 2023 +1000 WW-5340 Make OgnlGuard a configurable bean --- .../main/java/org/apache/struts2/StrutsConstants.java | 2 ++ .../struts2/config/StrutsBeanSelectionProvider.java | 19 +++ core/src/main/resources/struts-beans.xml | 3 ++- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/StrutsConstants.java b/core/src/main/java/org/apache/struts2/StrutsConstants.java index 143b8c832..ac5b91d8a 100644 --- a/core/src/main/java/org/apache/struts2/StrutsConstants.java +++ b/core/src/main/java/org/apache/struts2/StrutsConstants.java @@ -234,6 +234,8 @@ public final class StrutsConstants { /** The name of the parameter to determine whether static field access will be allowed in OGNL expressions or not */ public static final String STRUTS_ALLOW_STATIC_FIELD_ACCESS = "struts.ognl.allowStaticFieldAccess"; +public static final String STRUTS_OGNL_GUARD = "struts.ognlGuard"; + /** The com.opensymphony.xwork2.validator.ActionValidatorManager implementation class */ public static final String STRUTS_ACTIONVALIDATORMANAGER = "struts.actionValidatorManager"; diff --git a/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java b/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java index c80494f35..64feac83b 100644 --- a/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java +++ b/core/src/main/java/org/apache/struts2/config/StrutsBeanSelectionProvider.java @@ -19,18 +19,13 @@ package org.apache.struts2.config; import com.opensymphony.xwork2.ActionProxyFactory; -import com.opensymphony.xwork2.LocaleProviderFactory; -import com.opensymphony.xwork2.LocalizedTextProvider; -import com.opensymphony.xwork2.TextProviderFactory; -import com.opensymphony.xwork2.factory.UnknownHandlerFactory; -import com.opensymphony.xwork2.ognl.BeanInfoCacheFactory; -import com.opensymphony.xwork2.ognl.ExpressionCacheFactory; -import com.opensymphony.xwork2.security.AcceptedPatternsChecker; -import com.opensymphony.xwork2.security.ExcludedPatternsChecker; import com.opensymphony.xwork2.FileManager; import com.opensymphony.xwork2.FileManagerFactory; +import com.opensymphony.xwork2.LocaleProviderFactory; +import com.opensymphony.xwork2.LocalizedTextProvider; import com.opensymphony.xwork2.ObjectFactory; import com.opensymphony.xwork2.TextProvider; +import com.opensymphony.xwork2.TextProviderFactory; import com.opensymphony.xwork2.UnknownHandlerManager; import com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor; import com.opensymphony.xwork2.conversion.ConversionFileProcessor; @@ -48,9 +43,15 @@ import com.opensymphony.xwork2.factory.ActionFactory; import com.opensymphony.xwork2.factory.ConverterFactory; import com.opensymphony.xwork2.factory.InterceptorFactory; import com.opensymphony.xwork2.factory.ResultFactory; +import com.opensymphony.xwork2.factory.UnknownHandlerFactory; import com.opensymphony.xwork2.factory.ValidatorFactory; import com.opensymphony.xwork2.inject.ContainerBuilder; import com.opensymphony.xwork2.inject.Scope; +import com.opensymphony.xwork2.ognl.BeanInfoCacheFactory; +import com.opensymphony.xwork2.ognl.ExpressionCacheFactory; +import com.opensymphony.xwork2.ognl.OgnlGuard; +import com.opensymphony.xwork2.security.AcceptedPatternsChecker; +import com.opensymphony.xwork2.security.ExcludedPatternsChecker; import com.opensymphony.xwork2.security.NotExcludedAcceptedPatternsChecker; import com.opensymphony.xwork2.util.PatternMatcher; import com.opensymphony.xwork2.util.TextParser; @@ -434,6 +435,8 @@ public class StrutsBeanSelectionProvider extends AbstractBeanSelectionProvider { alias(ExpressionCacheFactory.class, StrutsConstants.STRUTS_OGNL_EXPRESSION_CACHE_FACTORY, builder, props, Scope.SINGLETON); alias(BeanInfoCacheFactory.class, StrutsConstants.STRUTS_OGNL_BEANINFO_CACHE_FACTORY, builder, props, Scope.SINGLETON); +alias(OgnlGuard.class, StrutsConstants.STRUTS_OGNL_GUARD, builder, props, Scope.SINGLETON); + alias(QueryStringBuilder.class, StrutsConstants.STRUTS_URL_QUERY_STRING_BUILDER, builder, props, Scope.SINGLETON); alias(QueryStringParser.class, StrutsConstants.STRUTS_URL_QUERY_STRING_PARSER, builder, props, Scope.SINGLETON); alias(UrlEncoder.class, StrutsConstants.STRUTS_URL_ENCODER, builder, props, Scope.SINGLETON); diff --git a/core/src/main/resources/struts-beans.xml b/core/src/main/resources/struts-beans.xml index 89acda7c6..c6cdcc94a 100644 --- a/core/src/main/resources/struts-beans.xml +++ b/core/src/main/resources/struts-beans.xml @@ -166,7 +16
[struts] 04/04: WW-5340 Cache OgnlGuard result
This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git commit 200bc03616984a92e5009b17a7671f7f47526e0c Author: Kusal Kithul-Godage AuthorDate: Thu Aug 31 21:34:20 2023 +1000 WW-5340 Cache OgnlGuard result --- .../java/com/opensymphony/xwork2/ognl/OgnlCache.java | 16 .../com/opensymphony/xwork2/ognl/OgnlDefaultCache.java | 4 ++-- .../java/com/opensymphony/xwork2/ognl/OgnlLRUCache.java | 6 +++--- .../main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java | 6 +- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCache.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCache.java index 83893c153..fc8366699 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCache.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlCache.java @@ -19,23 +19,23 @@ package com.opensymphony.xwork2.ognl; * A basic cache interface for use with OGNL processing (such as Expression, BeanInfo). * All OGNL caches will have an eviction limit, but setting an extremely high value can * simulate an "effectively unlimited" cache. - * + * * @param The type for the cache key entries * @param The type for the cache value entries */ public interface OgnlCache { -public Value get(Key key); +Value get(Key key); -public void put(Key key, Value value); +void put(Key key, Value value); -public void putIfAbsent(Key key, Value value); +void putIfAbsent(Key key, Value value); -public int size(); +int size(); -public void clear(); +void clear(); -public int getEvictionLimit(); +int getEvictionLimit(); -public void setEvictionLimit(int cacheEvictionLimit); +void setEvictionLimit(int cacheEvictionLimit); } diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlDefaultCache.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlDefaultCache.java index 20431e133..a32736da6 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlDefaultCache.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlDefaultCache.java @@ -20,10 +20,10 @@ import java.util.concurrent.atomic.AtomicInteger; /** * Default OGNL cache implementation. - * + * * Setting a very high eviction limit simulates an unlimited cache. * Setting too low an eviction limit will make the cache ineffective. - * + * * @param The type for the cache key entries * @param The type for the cache value entries */ diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlLRUCache.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlLRUCache.java index a99adca2a..93ab56d36 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlLRUCache.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlLRUCache.java @@ -22,14 +22,14 @@ import java.util.concurrent.atomic.AtomicInteger; /** * A basic OGNL LRU cache implementation. - * + * * The implementation utilizes a {@link Collections#synchronizedMap(java.util.Map)} * backed by a {@link LinkedHashMap}. May be replaced by a more efficient implementation in the future. - * + * * Setting too low an eviction limit will produce more overhead than value. * Setting too high an eviction limit may also produce more overhead than value. * An appropriate eviction limit will need to be determined on an individual application basis. - * + * * @param The type for the cache key entries * @param The type for the cache value entries */ diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java index c080500aa..8a276435a 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java @@ -71,6 +71,7 @@ public class OgnlUtil { // Flag used to reduce flooding logs with WARNs about using DevMode excluded packages private final AtomicBoolean warnReported = new AtomicBoolean(false); +private static final String GUARD_BLOCKED = "_ognl_guard_blocked"; private final OgnlCache expressionCache; private final OgnlCache, BeanInfo> beanInfoCache; private TypeConverter defaultConverter; @@ -613,11 +614,14 @@ public class OgnlUtil { } if (tree == null) { tree = Ognl.parseExpression(expr); +if (ognlGuard.isBlocked(expr, tree)) { +tree = GUARD_BLOCKED; +} if (enableExpressionCache) { expressionCache.put(expr, tree); } } -if (ognlGuard.isBlocked(expr, tree)) { +if (GUARD_BLOCKED.equals(tree)) { throw new OgnlException("Expression blocked by OgnlGuard: " + expr); } return tree;
[struts] branch WW-5340-ognl-guard updated (200bc0361 -> b47fdfa48)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git from 200bc0361 WW-5340 Cache OgnlGuard result add 1aeb055d6 WW-5340 Add validation to excluded node configuration add b47fdfa48 WW-5340 Add unit tests No new revisions were added by this update. Summary of changes: .../opensymphony/xwork2/ognl/DefaultOgnlGuard.java | 14 + .../xwork2/ognl/DefaultOgnlGuardTest.java | 67 ++ 2 files changed, 81 insertions(+) create mode 100644 core/src/test/java/com/opensymphony/xwork2/ognl/DefaultOgnlGuardTest.java
[struts] branch WW-5340-ognl-guard updated (b47fdfa48 -> 94392ab62)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git omit b47fdfa48 WW-5340 Add unit tests add 94392ab62 WW-5340 Add unit tests 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 (b47fdfa48) \ N -- N -- N refs/heads/WW-5340-ognl-guard (94392ab62) 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:
[struts] branch WW-5340-ognl-guard updated (94392ab62 -> a1b5d7a7d)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git discard 94392ab62 WW-5340 Add unit tests add a1b5d7a7d WW-5340 Add unit tests 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 (94392ab62) \ N -- N -- N refs/heads/WW-5340-ognl-guard (a1b5d7a7d) 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: .../opensymphony/xwork2/ognl/DefaultOgnlGuardTest.java | 18 ++ 1 file changed, 18 insertions(+)
[struts] 01/01: WW-5343 Delete unused code and consolidate constructors
This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5343-sec-extend in repository https://gitbox.apache.org/repos/asf/struts.git commit de16218cbf236a2f6c16f83b18ab61b748d4b64e Author: Kusal Kithul-Godage AuthorDate: Thu Aug 31 23:56:02 2023 +1000 WW-5343 Delete unused code and consolidate constructors --- .../opensymphony/xwork2/ognl/OgnlValueStack.java | 36 - .../xwork2/util/location/LocationImpl.java | 47 +- 2 files changed, 35 insertions(+), 48 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java index 936619ae4..1a7606d11 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java @@ -21,7 +21,6 @@ package com.opensymphony.xwork2.ognl; import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.TextProvider; import com.opensymphony.xwork2.conversion.impl.XWorkConverter; -import com.opensymphony.xwork2.inject.Container; import com.opensymphony.xwork2.inject.Inject; import com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor; import com.opensymphony.xwork2.util.ClearableValueStack; @@ -34,7 +33,6 @@ import ognl.NoSuchPropertyException; import ognl.Ognl; import ognl.OgnlContext; import ognl.OgnlException; -import ognl.PropertyAccessor; import org.apache.commons.lang3.BooleanUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -77,13 +75,26 @@ public class OgnlValueStack implements Serializable, ValueStack, ClearableValueS private boolean devMode; private boolean logMissingProperties; +protected OgnlValueStack(ValueStack vs, + XWorkConverter xworkConverter, + CompoundRootAccessor accessor, + TextProvider prov, + boolean allowStaticFieldAccess) { +setRoot(xworkConverter, +accessor, +vs != null ? new CompoundRoot(vs.getRoot()) : new CompoundRoot(), +allowStaticFieldAccess); +if (prov != null) { +push(prov); +} +} + protected OgnlValueStack(XWorkConverter xworkConverter, CompoundRootAccessor accessor, TextProvider prov, boolean allowStaticFieldAccess) { -setRoot(xworkConverter, accessor, new CompoundRoot(), allowStaticFieldAccess); -push(prov); +this(null, xworkConverter, accessor, prov, allowStaticFieldAccess); } protected OgnlValueStack(ValueStack vs, XWorkConverter xworkConverter, CompoundRootAccessor accessor, boolean allowStaticFieldAccess) { -setRoot(xworkConverter, accessor, new CompoundRoot(vs.getRoot()), allowStaticFieldAccess); +this(vs, xworkConverter, accessor, null, allowStaticFieldAccess); } @Inject @@ -461,21 +472,6 @@ public class OgnlValueStack implements Serializable, ValueStack, ClearableValueS return root.size(); } -private Object readResolve() { -// TODO: this should be done better -ActionContext ac = ActionContext.getContext(); -Container cont = ac.getContainer(); -XWorkConverter xworkConverter = cont.getInstance(XWorkConverter.class); -CompoundRootAccessor accessor = (CompoundRootAccessor) cont.getInstance(PropertyAccessor.class, CompoundRoot.class.getName()); -TextProvider prov = cont.getInstance(TextProvider.class, "system"); -final boolean allowStaticField = BooleanUtils.toBoolean(cont.getInstance(String.class, StrutsConstants.STRUTS_ALLOW_STATIC_FIELD_ACCESS)); -OgnlValueStack aStack = new OgnlValueStack(xworkConverter, accessor, prov, allowStaticField); -aStack.setOgnlUtil(cont.getInstance(OgnlUtil.class)); -aStack.setRoot(xworkConverter, accessor, this.root, allowStaticField); - -return aStack; -} - public void clearContextValues() { //this is an OGNL ValueStack so the context will be an OgnlContext diff --git a/core/src/main/java/com/opensymphony/xwork2/util/location/LocationImpl.java b/core/src/main/java/com/opensymphony/xwork2/util/location/LocationImpl.java index 298b34b3f..26b3072df 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/location/LocationImpl.java +++ b/core/src/main/java/com/opensymphony/xwork2/util/location/LocationImpl.java @@ -37,7 +37,7 @@ public class LocationImpl implements Location, Serializable { private final int line; private final int column; private final String description; - + // Package private: outside this package, use Location.UNKNOWN. static final LocationImpl UNKNOWN = new LocationImpl(null, null, -1, -1); @@ -71,16 +71,16 @@ public class LocationImpl implements Location, Serializable { }
[struts] branch WW-5343-sec-extend created (now de16218cb)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5343-sec-extend in repository https://gitbox.apache.org/repos/asf/struts.git at de16218cb WW-5343 Delete unused code and consolidate constructors This branch includes the following new commits: new de16218cb WW-5343 Delete unused code and consolidate constructors 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] branch WW-5340-ognl-guard updated: WW-5340 Refactor OgnlGuard to do the parsing
This is an automated email from the ASF dual-hosted git repository. kusal pushed a commit to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git The following commit(s) were added to refs/heads/WW-5340-ognl-guard by this push: new 02db3683b WW-5340 Refactor OgnlGuard to do the parsing 02db3683b is described below commit 02db3683bdd201737b78ad3fac55b81c0b3cded5 Author: Kusal Kithul-Godage AuthorDate: Fri Sep 1 00:16:34 2023 +1000 WW-5340 Refactor OgnlGuard to do the parsing --- .../opensymphony/xwork2/ognl/DefaultOgnlGuard.java | 7 +++- .../com/opensymphony/xwork2/ognl/OgnlGuard.java| 48 -- .../com/opensymphony/xwork2/ognl/OgnlUtil.java | 7 +--- .../xwork2/ognl/DefaultOgnlGuardTest.java | 18 +++- 4 files changed, 59 insertions(+), 21 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlGuard.java b/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlGuard.java index 4e45a19ad..55a5d8f74 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlGuard.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlGuard.java @@ -65,7 +65,12 @@ public class DefaultOgnlGuard implements OgnlGuard { } @Override -public boolean isBlocked(String expr, Object tree) { +public boolean isRawExpressionBlocked(String expr) { +return false; +} + +@Override +public boolean isParsedTreeBlocked(Object tree) { return containsExcludedNodeType(tree); } diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlGuard.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlGuard.java index b1bcb409e..b0e75f4c1 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlGuard.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlGuard.java @@ -18,6 +18,9 @@ */ package com.opensymphony.xwork2.ognl; +import ognl.Ognl; +import ognl.OgnlException; + /** * Guards all expressions parsed by Struts Core. It is evaluated by {@link OgnlUtil} immediately after parsing any * expression. @@ -26,12 +29,51 @@ package com.opensymphony.xwork2.ognl; */ public interface OgnlGuard { +String GUARD_BLOCKED = "_ognl_guard_blocked"; + /** - * It is imperative that the parsed tree matches the expression. + * Determines whether an OGNL expression should be blocked based on validation done on both the raw expression and + * the parsed tree. * * @param expr OGNL expression - * @param tree parsed tree of expression * @return whether the expression should be blocked */ -boolean isBlocked(String expr, Object tree); +default boolean isBlocked(String expr) throws OgnlException { +return GUARD_BLOCKED.equals(parseExpression(expr)); +} + +/** + * Parses an OGNL expression and returns the resulting tree only if the expression is not blocked as per defined + * validation rules in {@link #isRawExpressionBlocked} and {@link #isParsedTreeBlocked}. + * + * @param expr OGNL expression + * @return parsed expression or {@link #GUARD_BLOCKED} if the expression should be blocked + */ +default Object parseExpression(String expr) throws OgnlException { +if (isRawExpressionBlocked(expr)) { +return GUARD_BLOCKED; +} +Object tree = Ognl.parseExpression(expr); +if (isParsedTreeBlocked(tree)) { +return GUARD_BLOCKED; +} +return expr; +} + +/** + * Determines whether an OGNL expression should be blocked based on validation done on only the raw expression, + * without parsing the tree. + * + * @param expr OGNL expression + * @return whether the expression should be blocked + */ +boolean isRawExpressionBlocked(String expr); + +/** + * Determines whether a parsed OGNL tree should be blocked based on some validation rules. + * + * @param tree parsed OGNL tree + * @return whether the parsed tree should be blocked + */ +boolean isParsedTreeBlocked(Object tree); } diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java index 8a276435a..8f207541f 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java @@ -52,6 +52,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; +import static com.opensymphony.xwork2.ognl.OgnlGuard.GUARD_BLOCKED; import static com.opensymphony.xwork2.util.TextParseUtil.commaDelimitedStringToSet; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toSet; @@ -71,7 +72,6 @@ public class OgnlUtil { // Flag used to reduce flooding logs with WARNs about using DevMode excluded packages
[struts] branch WW-5340-ognl-guard updated (02db3683b -> 31cc8a1fb)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git omit 02db3683b WW-5340 Refactor OgnlGuard to do the parsing add 31cc8a1fb WW-5340 Refactor OgnlGuard to do the parsing 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 (02db3683b) \ N -- N -- N refs/heads/WW-5340-ognl-guard (31cc8a1fb) 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: core/src/main/java/com/opensymphony/xwork2/ognl/OgnlGuard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[struts] branch WW-5340-ognl-guard updated (31cc8a1fb -> 1401f1ef1)
This is an automated email from the ASF dual-hosted git repository. kusal pushed a change to branch WW-5340-ognl-guard in repository https://gitbox.apache.org/repos/asf/struts.git from 31cc8a1fb WW-5340 Refactor OgnlGuard to do the parsing add 1401f1ef1 WW-5340 Correct optimisation No new revisions were added by this update. Summary of changes: core/src/main/java/com/opensymphony/xwork2/ognl/DefaultOgnlGuard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[struts] branch WW-5334-fix-chained-contexts deleted (was 891598545)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch WW-5334-fix-chained-contexts in repository https://gitbox.apache.org/repos/asf/struts.git was 891598545 WW-5334 Fix empty chained context name The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[struts] branch master updated (32e42b3ec -> 03e232344)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git from 32e42b3ec [maven-release-plugin] prepare for next development iteration add 891598545 WW-5334 Fix empty chained context name new 03e232344 Merge pull request #744 from apache/WW-5334-fix-chained-contexts 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/views/velocity/VelocityManager.java | 9 - 1 file changed, 4 insertions(+), 5 deletions(-)
[struts] 01/01: Merge pull request #744 from apache/WW-5334-fix-chained-contexts
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.git commit 03e232344b5ddffcee376c65dc754570bd9cab73 Merge: 32e42b3ec 891598545 Author: Lukasz Lenart AuthorDate: Fri Sep 1 07:40:22 2023 +0200 Merge pull request #744 from apache/WW-5334-fix-chained-contexts WW-5334 Fix empty chained context names in VelocityManager .../java/org/apache/struts2/views/velocity/VelocityManager.java | 9 - 1 file changed, 4 insertions(+), 5 deletions(-)
svn commit: r63720 - /dev/struts/6.3.0/
Author: lukaszlenart Date: Fri Sep 1 05:42:39 2023 New Revision: 63720 Log: Restarts the release process Removed: dev/struts/6.3.0/
svn commit: r63721 - /dev/struts/6.3.0-RC1/
Author: lukaszlenart Date: Fri Sep 1 05:42:58 2023 New Revision: 63721 Log: Removes test build Removed: dev/struts/6.3.0-RC1/
[struts] annotated tag STRUTS_6_3_0 deleted (was 402aa8d66)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to annotated tag STRUTS_6_3_0 in repository https://gitbox.apache.org/repos/asf/struts.git *** WARNING: tag STRUTS_6_3_0 was deleted! *** tag was 402aa8d66 The revisions that were on this annotated tag are still contained in other references; therefore, this change does not discard any commits from the repository.
[struts] branch master updated (03e232344 -> 1a88f78a7)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git from 03e232344 Merge pull request #744 from apache/WW-5334-fix-chained-contexts new 20e211061 Reverts version to 6.3.0-SNAPSHOT new 1a88f78a7 [maven-release-plugin] prepare release STRUTS_6_3_0 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: apps/pom.xml| 2 +- apps/rest-showcase/pom.xml | 4 ++-- apps/showcase/pom.xml | 2 +- assembly/pom.xml| 2 +- bom/pom.xml | 8 bundles/admin/pom.xml | 2 +- bundles/demo/pom.xml| 2 +- bundles/pom.xml | 2 +- core/pom.xml| 2 +- plugins/async/pom.xml | 2 +- plugins/bean-validation/pom.xml | 2 +- plugins/cdi/pom.xml | 2 +- plugins/config-browser/pom.xml | 2 +- plugins/convention/pom.xml | 2 +- plugins/dwr/pom.xml | 2 +- plugins/embeddedjsp/pom.xml | 2 +- plugins/gxp/pom.xml | 2 +- plugins/jasperreports/pom.xml | 2 +- plugins/javatemplates/pom.xml | 2 +- plugins/jfreechart/pom.xml | 2 +- plugins/json/pom.xml| 2 +- plugins/junit/pom.xml | 2 +- plugins/osgi/pom.xml| 2 +- plugins/oval/pom.xml| 2 +- plugins/pell-multipart/pom.xml | 2 +- plugins/plexus/pom.xml | 2 +- plugins/pom.xml | 2 +- plugins/portlet-junit/pom.xml | 2 +- plugins/portlet-mocks/pom.xml | 2 +- plugins/portlet-tiles/pom.xml | 2 +- plugins/portlet/pom.xml | 2 +- plugins/rest/pom.xml| 2 +- plugins/sitemesh/pom.xml| 2 +- plugins/spring/pom.xml | 2 +- plugins/testng/pom.xml | 2 +- plugins/tiles/pom.xml | 2 +- plugins/velocity/pom.xml| 2 +- plugins/xslt/pom.xml| 2 +- pom.xml | 6 +++--- 39 files changed, 45 insertions(+), 45 deletions(-)
[struts] 01/02: Reverts version to 6.3.0-SNAPSHOT
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.git commit 20e2110614496fd953c180a7ff8590e0513b051f Author: Lukasz Lenart AuthorDate: Fri Sep 1 07:44:47 2023 +0200 Reverts version to 6.3.0-SNAPSHOT --- apps/pom.xml| 2 +- apps/rest-showcase/pom.xml | 4 ++-- apps/showcase/pom.xml | 2 +- assembly/pom.xml| 2 +- bom/pom.xml | 6 +++--- bundles/admin/pom.xml | 2 +- bundles/demo/pom.xml| 2 +- bundles/pom.xml | 2 +- core/pom.xml| 2 +- plugins/async/pom.xml | 2 +- plugins/bean-validation/pom.xml | 2 +- plugins/cdi/pom.xml | 2 +- plugins/config-browser/pom.xml | 2 +- plugins/convention/pom.xml | 2 +- plugins/dwr/pom.xml | 2 +- plugins/embeddedjsp/pom.xml | 2 +- plugins/gxp/pom.xml | 2 +- plugins/jasperreports/pom.xml | 2 +- plugins/javatemplates/pom.xml | 2 +- plugins/jfreechart/pom.xml | 2 +- plugins/json/pom.xml| 2 +- plugins/junit/pom.xml | 2 +- plugins/osgi/pom.xml| 2 +- plugins/oval/pom.xml| 2 +- plugins/pell-multipart/pom.xml | 2 +- plugins/plexus/pom.xml | 2 +- plugins/pom.xml | 2 +- plugins/portlet-junit/pom.xml | 2 +- plugins/portlet-mocks/pom.xml | 2 +- plugins/portlet-tiles/pom.xml | 2 +- plugins/portlet/pom.xml | 2 +- plugins/rest/pom.xml| 2 +- plugins/sitemesh/pom.xml| 2 +- plugins/spring/pom.xml | 2 +- plugins/testng/pom.xml | 2 +- plugins/tiles/pom.xml | 2 +- plugins/velocity/pom.xml| 2 +- plugins/xslt/pom.xml| 2 +- pom.xml | 2 +- 39 files changed, 42 insertions(+), 42 deletions(-) diff --git a/apps/pom.xml b/apps/pom.xml index a1a187151..37682ab24 100644 --- a/apps/pom.xml +++ b/apps/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-parent -6.4.0-SNAPSHOT +6.3.0-SNAPSHOT struts2-apps pom diff --git a/apps/rest-showcase/pom.xml b/apps/rest-showcase/pom.xml index e891f704d..6dcd20c3e 100644 --- a/apps/rest-showcase/pom.xml +++ b/apps/rest-showcase/pom.xml @@ -24,12 +24,12 @@ org.apache.struts struts2-apps -6.4.0-SNAPSHOT +6.3.0-SNAPSHOT struts2-rest-showcase war -6.4.0-SNAPSHOT +6.3.0-SNAPSHOT Struts 2 Rest Showcase Webapp Struts 2 Rest Showcase Example diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml index 87b524ac1..0287d6cb5 100644 --- a/apps/showcase/pom.xml +++ b/apps/showcase/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-apps -6.4.0-SNAPSHOT +6.3.0-SNAPSHOT struts2-showcase diff --git a/assembly/pom.xml b/assembly/pom.xml index 531e3fb1a..5caee68fc 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-parent -6.4.0-SNAPSHOT +6.3.0-SNAPSHOT struts2-assembly diff --git a/bom/pom.xml b/bom/pom.xml index a45e5634e..6a9757382 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -25,11 +25,11 @@ org.apache.struts struts2-parent -6.4.0-SNAPSHOT +6.3.0-SNAPSHOT struts2-bom -6.4.0-SNAPSHOT +6.3.0-SNAPSHOT pom Struts 2 Bill of Materials @@ -44,7 +44,7 @@ -6.4.0-SNAPSHOT +6.3.0-SNAPSHOT true true diff --git a/bundles/admin/pom.xml b/bundles/admin/pom.xml index 8c2c35a7d..c5b9224c3 100644 --- a/bundles/admin/pom.xml +++ b/bundles/admin/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-osgi-bundles -6.4.0-SNAPSHOT +6.3.0-SNAPSHOT struts2-osgi-admin-bundle diff --git a/bundles/demo/pom.xml b/bundles/demo/pom.xml index 647be8c9c..cdd4d 100644 --- a/bundles/demo/pom.xml +++ b/bundles/demo/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-osgi-bundles -6.4.0-SNAPSHOT +6.3.0-SNAPSHOT struts2-osgi-demo-bundle diff --git a/bundles/pom.xml b/bundles/pom.xml index 408947c8f..00e7e2f72 100755 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-parent -6.4.0-SNAPSHOT +6.3.0-SNAPSHOT struts2-osgi-bundles diff --git a/core/pom.xml b/core/pom.xml index bbd397ba7..3a10ed47d 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-parent -6.4.0-SNAPSHOT +6.3.0-SNAPSHOT struts2-core jar diff --git a/plugins/async/pom.xml b/plugins/async/pom.xml index 2233f9e3c..1b108c998 100644 --- a/plugins/asy
[struts] 02/02: [maven-release-plugin] prepare release STRUTS_6_3_0
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.git commit 1a88f78a7ea2fba76b0b1a2a509f1b7084a34e98 Author: Lukasz Lenart AuthorDate: Fri Sep 1 08:01:30 2023 +0200 [maven-release-plugin] prepare release STRUTS_6_3_0 --- apps/pom.xml| 2 +- apps/rest-showcase/pom.xml | 4 ++-- apps/showcase/pom.xml | 2 +- assembly/pom.xml| 2 +- bom/pom.xml | 8 bundles/admin/pom.xml | 2 +- bundles/demo/pom.xml| 2 +- bundles/pom.xml | 2 +- core/pom.xml| 2 +- plugins/async/pom.xml | 2 +- plugins/bean-validation/pom.xml | 2 +- plugins/cdi/pom.xml | 2 +- plugins/config-browser/pom.xml | 2 +- plugins/convention/pom.xml | 2 +- plugins/dwr/pom.xml | 2 +- plugins/embeddedjsp/pom.xml | 2 +- plugins/gxp/pom.xml | 2 +- plugins/jasperreports/pom.xml | 2 +- plugins/javatemplates/pom.xml | 2 +- plugins/jfreechart/pom.xml | 2 +- plugins/json/pom.xml| 2 +- plugins/junit/pom.xml | 2 +- plugins/osgi/pom.xml| 2 +- plugins/oval/pom.xml| 2 +- plugins/pell-multipart/pom.xml | 2 +- plugins/plexus/pom.xml | 2 +- plugins/pom.xml | 2 +- plugins/portlet-junit/pom.xml | 2 +- plugins/portlet-mocks/pom.xml | 2 +- plugins/portlet-tiles/pom.xml | 2 +- plugins/portlet/pom.xml | 2 +- plugins/rest/pom.xml| 2 +- plugins/sitemesh/pom.xml| 2 +- plugins/spring/pom.xml | 2 +- plugins/testng/pom.xml | 2 +- plugins/tiles/pom.xml | 2 +- plugins/velocity/pom.xml| 2 +- plugins/xslt/pom.xml| 2 +- pom.xml | 6 +++--- 39 files changed, 45 insertions(+), 45 deletions(-) diff --git a/apps/pom.xml b/apps/pom.xml index 37682ab24..2327e638c 100644 --- a/apps/pom.xml +++ b/apps/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-parent -6.3.0-SNAPSHOT +6.3.0 struts2-apps pom diff --git a/apps/rest-showcase/pom.xml b/apps/rest-showcase/pom.xml index 6dcd20c3e..29143b678 100644 --- a/apps/rest-showcase/pom.xml +++ b/apps/rest-showcase/pom.xml @@ -24,12 +24,12 @@ org.apache.struts struts2-apps -6.3.0-SNAPSHOT +6.3.0 struts2-rest-showcase war -6.3.0-SNAPSHOT +6.3.0 Struts 2 Rest Showcase Webapp Struts 2 Rest Showcase Example diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml index 0287d6cb5..763c02085 100644 --- a/apps/showcase/pom.xml +++ b/apps/showcase/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-apps -6.3.0-SNAPSHOT +6.3.0 struts2-showcase diff --git a/assembly/pom.xml b/assembly/pom.xml index 5caee68fc..186dec261 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-parent -6.3.0-SNAPSHOT +6.3.0 struts2-assembly diff --git a/bom/pom.xml b/bom/pom.xml index 6a9757382..4abc04066 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -25,11 +25,11 @@ org.apache.struts struts2-parent -6.3.0-SNAPSHOT +6.3.0 struts2-bom -6.3.0-SNAPSHOT +6.3.0 pom Struts 2 Bill of Materials @@ -44,7 +44,7 @@ -6.3.0-SNAPSHOT +6.3.0 true true @@ -190,7 +190,7 @@ -HEAD +STRUTS_6_3_0 scm:git:https://gitbox.apache.org/repos/asf/struts.git scm:git:https://gitbox.apache.org/repos/asf/struts.git https://github.com/apache/struts/ diff --git a/bundles/admin/pom.xml b/bundles/admin/pom.xml index c5b9224c3..cb4ca538e 100644 --- a/bundles/admin/pom.xml +++ b/bundles/admin/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-osgi-bundles -6.3.0-SNAPSHOT +6.3.0 struts2-osgi-admin-bundle diff --git a/bundles/demo/pom.xml b/bundles/demo/pom.xml index cdd4d..c624a99f6 100644 --- a/bundles/demo/pom.xml +++ b/bundles/demo/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-osgi-bundles -6.3.0-SNAPSHOT +6.3.0 struts2-osgi-demo-bundle diff --git a/bundles/pom.xml b/bundles/pom.xml index 00e7e2f72..743661851 100755 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-parent -6.3.0-SNAPSHOT +6.3.0 struts2-osgi-bundles diff --git a/core/pom.xml b/core/pom.xml index 3a10ed47d..ed12fb54a 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-parent -6.3.0-SNAPSHOT +6.3.0
[struts] annotated tag STRUTS_6_3_0 created (now efca3a898)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to annotated tag STRUTS_6_3_0 in repository https://gitbox.apache.org/repos/asf/struts.git at efca3a898 (tag) tagging 1a88f78a7ea2fba76b0b1a2a509f1b7084a34e98 (commit) replaces STRUTS_6_2_0 by Lukasz Lenart on Fri Sep 1 08:01:35 2023 +0200 - Log - [maven-release-plugin] copy for tag STRUTS_6_3_0 --- No new revisions were added by this update.
[struts] branch master updated: [maven-release-plugin] prepare for next development iteration
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.git The following commit(s) were added to refs/heads/master by this push: new a0185f248 [maven-release-plugin] prepare for next development iteration a0185f248 is described below commit a0185f2483b098211bda92792400af569bf6578a Author: Lukasz Lenart AuthorDate: Fri Sep 1 08:01:39 2023 +0200 [maven-release-plugin] prepare for next development iteration --- apps/pom.xml| 2 +- apps/rest-showcase/pom.xml | 4 ++-- apps/showcase/pom.xml | 2 +- assembly/pom.xml| 2 +- bom/pom.xml | 8 bundles/admin/pom.xml | 2 +- bundles/demo/pom.xml| 2 +- bundles/pom.xml | 2 +- core/pom.xml| 2 +- plugins/async/pom.xml | 2 +- plugins/bean-validation/pom.xml | 2 +- plugins/cdi/pom.xml | 2 +- plugins/config-browser/pom.xml | 2 +- plugins/convention/pom.xml | 2 +- plugins/dwr/pom.xml | 2 +- plugins/embeddedjsp/pom.xml | 2 +- plugins/gxp/pom.xml | 2 +- plugins/jasperreports/pom.xml | 2 +- plugins/javatemplates/pom.xml | 2 +- plugins/jfreechart/pom.xml | 2 +- plugins/json/pom.xml| 2 +- plugins/junit/pom.xml | 2 +- plugins/osgi/pom.xml| 2 +- plugins/oval/pom.xml| 2 +- plugins/pell-multipart/pom.xml | 2 +- plugins/plexus/pom.xml | 2 +- plugins/pom.xml | 2 +- plugins/portlet-junit/pom.xml | 2 +- plugins/portlet-mocks/pom.xml | 2 +- plugins/portlet-tiles/pom.xml | 2 +- plugins/portlet/pom.xml | 2 +- plugins/rest/pom.xml| 2 +- plugins/sitemesh/pom.xml| 2 +- plugins/spring/pom.xml | 2 +- plugins/testng/pom.xml | 2 +- plugins/tiles/pom.xml | 2 +- plugins/velocity/pom.xml| 2 +- plugins/xslt/pom.xml| 2 +- pom.xml | 6 +++--- 39 files changed, 45 insertions(+), 45 deletions(-) diff --git a/apps/pom.xml b/apps/pom.xml index 2327e638c..a1a187151 100644 --- a/apps/pom.xml +++ b/apps/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-parent -6.3.0 +6.4.0-SNAPSHOT struts2-apps pom diff --git a/apps/rest-showcase/pom.xml b/apps/rest-showcase/pom.xml index 29143b678..e891f704d 100644 --- a/apps/rest-showcase/pom.xml +++ b/apps/rest-showcase/pom.xml @@ -24,12 +24,12 @@ org.apache.struts struts2-apps -6.3.0 +6.4.0-SNAPSHOT struts2-rest-showcase war -6.3.0 +6.4.0-SNAPSHOT Struts 2 Rest Showcase Webapp Struts 2 Rest Showcase Example diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml index 763c02085..87b524ac1 100644 --- a/apps/showcase/pom.xml +++ b/apps/showcase/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-apps -6.3.0 +6.4.0-SNAPSHOT struts2-showcase diff --git a/assembly/pom.xml b/assembly/pom.xml index 186dec261..531e3fb1a 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-parent -6.3.0 +6.4.0-SNAPSHOT struts2-assembly diff --git a/bom/pom.xml b/bom/pom.xml index 4abc04066..a45e5634e 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -25,11 +25,11 @@ org.apache.struts struts2-parent -6.3.0 +6.4.0-SNAPSHOT struts2-bom -6.3.0 +6.4.0-SNAPSHOT pom Struts 2 Bill of Materials @@ -44,7 +44,7 @@ -6.3.0 +6.4.0-SNAPSHOT true true @@ -190,7 +190,7 @@ -STRUTS_6_3_0 +HEAD scm:git:https://gitbox.apache.org/repos/asf/struts.git scm:git:https://gitbox.apache.org/repos/asf/struts.git https://github.com/apache/struts/ diff --git a/bundles/admin/pom.xml b/bundles/admin/pom.xml index cb4ca538e..8c2c35a7d 100644 --- a/bundles/admin/pom.xml +++ b/bundles/admin/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-osgi-bundles -6.3.0 +6.4.0-SNAPSHOT struts2-osgi-admin-bundle diff --git a/bundles/demo/pom.xml b/bundles/demo/pom.xml index c624a99f6..647be8c9c 100644 --- a/bundles/demo/pom.xml +++ b/bundles/demo/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-osgi-bundles -6.3.0 +6.4.0-SNAPSHOT struts2-osgi-demo-bundle diff --git a/bundles/pom.xml b/bundles/pom.xml index 743661851..408947c8f 100755 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-parent -6.3.0 +6.4.0-SNAPSHOT struts2-osgi-bundles diff --git a/core/pom.xml b/core/pom.xml
svn commit: r63723 - /dev/struts/6.3.0/
Author: lukaszlenart Date: Fri Sep 1 06:41:36 2023 New Revision: 63723 Log: Updates test release 6.3.0 Added: dev/struts/6.3.0/ dev/struts/6.3.0/struts-6.3.0-all.zip (with props) dev/struts/6.3.0/struts-6.3.0-all.zip.asc dev/struts/6.3.0/struts-6.3.0-all.zip.sha256 dev/struts/6.3.0/struts-6.3.0-all.zip.sha512 dev/struts/6.3.0/struts-6.3.0-apps.zip (with props) dev/struts/6.3.0/struts-6.3.0-apps.zip.asc dev/struts/6.3.0/struts-6.3.0-apps.zip.sha256 dev/struts/6.3.0/struts-6.3.0-apps.zip.sha512 dev/struts/6.3.0/struts-6.3.0-docs.zip (with props) dev/struts/6.3.0/struts-6.3.0-docs.zip.asc dev/struts/6.3.0/struts-6.3.0-docs.zip.sha256 dev/struts/6.3.0/struts-6.3.0-docs.zip.sha512 dev/struts/6.3.0/struts-6.3.0-lib.zip (with props) dev/struts/6.3.0/struts-6.3.0-lib.zip.asc dev/struts/6.3.0/struts-6.3.0-lib.zip.sha256 dev/struts/6.3.0/struts-6.3.0-lib.zip.sha512 dev/struts/6.3.0/struts-6.3.0-min-lib.zip (with props) dev/struts/6.3.0/struts-6.3.0-min-lib.zip.asc dev/struts/6.3.0/struts-6.3.0-min-lib.zip.sha256 dev/struts/6.3.0/struts-6.3.0-min-lib.zip.sha512 dev/struts/6.3.0/struts-6.3.0-src.zip (with props) dev/struts/6.3.0/struts-6.3.0-src.zip.asc dev/struts/6.3.0/struts-6.3.0-src.zip.sha256 dev/struts/6.3.0/struts-6.3.0-src.zip.sha512 Added: dev/struts/6.3.0/struts-6.3.0-all.zip == Binary file - no diff available. Propchange: dev/struts/6.3.0/struts-6.3.0-all.zip -- svn:mime-type = application/octet-stream Added: dev/struts/6.3.0/struts-6.3.0-all.zip.asc == --- dev/struts/6.3.0/struts-6.3.0-all.zip.asc (added) +++ dev/struts/6.3.0/struts-6.3.0-all.zip.asc Fri Sep 1 06:41:36 2023 @@ -0,0 +1,17 @@ +-BEGIN PGP SIGNATURE- + +iQJMBAABCgA2FiEEDgCGmDROYrkGM7fGKEFhBmOvux8FAmTxf/QYHGx1a2Fzemxl +bmFydEBhcGFjaGUub3JnAAoJEChBYQZjr7sfkM4P/3Kw/ridrVDvK5xl120KM+pQ +Ttwa2AmqTy7gh3JZdwhiWTMmXvYGQMvtBRNqV7kkJhqFcUa7W9pnYWZxqpisdn25 +kLjgkVBmjkhQLxKSMFn4D5c2mpiir6blyszahMEoj6mDr8zy9VTJ8Ff1Bjz8p7YC +n0rpSzA09vZnsiIiEY+HaF2dsdA20y8lq6gIIbicmsr1RmY8780YydO0Z23Zpdz+ +Xi8JBgu3wxK5SIYB+sFnscrhe5ECsL7d5dGluYxem/1GrQkx0PCNfNN853neFzlb +kSjtTZJm3MDjAgDfAq5c5Mm43jBBAbSTm5l7ALGtz6B5ju0GX/99Yw7akkT7pQa6 +hLS52DxFkspjMapk/FvWvZ4TL3lXcHQvbsfalOFY058/kk3xJH84geeVQR1uH/S6 +bhNwvvwT1XPGRPEsBv6m5C24KX599MdUc7NfghFi+Z3u0a2htMrDxMGNtp2OSmYH +tFQoYz7wCZbFMLW0p6Upfjyo4/RJ1qMEsaSvvqloup88kmek6PZehMHQHnJNH83h +0bX15GDmxNUV1c+94tcVdh4DdSBamGvIDGcedh4TIer7gFqzz04oCfV8LbJgn6lh +ZXpPd/+aj5av+UblVTkRHDAN/zA+/fRZ0mnExxrkj9nom2zBnT6kAV8KSwdbuzTy +Wi9ejKEom9UIF0L6iIwA +=44D7 +-END PGP SIGNATURE- Added: dev/struts/6.3.0/struts-6.3.0-all.zip.sha256 == --- dev/struts/6.3.0/struts-6.3.0-all.zip.sha256 (added) +++ dev/struts/6.3.0/struts-6.3.0-all.zip.sha256 Fri Sep 1 06:41:36 2023 @@ -0,0 +1 @@ +52ab2cd2bbb8df5aab18c63c2240cd5692727e845350f4245d7b5c293ea923a7 struts-6.3.0-all.zip Added: dev/struts/6.3.0/struts-6.3.0-all.zip.sha512 == --- dev/struts/6.3.0/struts-6.3.0-all.zip.sha512 (added) +++ dev/struts/6.3.0/struts-6.3.0-all.zip.sha512 Fri Sep 1 06:41:36 2023 @@ -0,0 +1 @@ +826bac5f71bddd12dd0da0484a337ec5f76bf9192e2b152324c845bdf619b418189d549239945c4483406f8ae776a0c84a0b9d1f223605f6a528afd6e9ad68b1 struts-6.3.0-all.zip Added: dev/struts/6.3.0/struts-6.3.0-apps.zip == Binary file - no diff available. Propchange: dev/struts/6.3.0/struts-6.3.0-apps.zip -- svn:mime-type = application/octet-stream Added: dev/struts/6.3.0/struts-6.3.0-apps.zip.asc == --- dev/struts/6.3.0/struts-6.3.0-apps.zip.asc (added) +++ dev/struts/6.3.0/struts-6.3.0-apps.zip.asc Fri Sep 1 06:41:36 2023 @@ -0,0 +1,17 @@ +-BEGIN PGP SIGNATURE- + +iQJMBAABCgA2FiEEDgCGmDROYrkGM7fGKEFhBmOvux8FAmTxf/UYHGx1a2Fzemxl +bmFydEBhcGFjaGUub3JnAAoJEChBYQZjr7sfxuwP/RInCbAch5+wGAJNTLLL8V37 +Q7cvKogmp8I6C7jLdQtcZUCC8PxZKFjYRpDuJbyjRPuDhjS3os62dgncd2DgJWyY +DnzMcU8OPGsoL1LJbkGTU5ULyc2/vQy5zazjQLB6AC5oo3U6+U/QS67/mif8dY1T ++/5HOpbQfkGc5bamFzcjSWkq9fnPN5ZH+gjrFUqDM/43J/rPbp6qz5Yf5TdjrDvi +hXmfzDZQ8YJR9pP7CrukAMXCwhL2oxdL4eqv9lrE7UQyGYxJcu4TPkRMWxaYwdWE +7S+90DW0Dgm6eLi5hnrPYuqRQub1PGO1bYZQ56MLz5KgmKP+XqDZjyMatI29whi3 +QBwZSk3IEwJ6XQvB3Vase+Cle2FmjUj5PMuEZIOwEM6TGAyPK1/qvyM235V3eOGw +F9GF1NS+OFTtV6sRG3oQQ76HfiSdg/53eVX6whFs9Wh4OFCScnViNINXYNvNzcum +mIAjsd7WAigtDQNjuyN9RkxISgJXcz7j4i68PODgHqEv9qx/m9cZjpFwCyFbeyA2 +GlNjE0Bk6i+cSO1kcafUDn+Un3Lqhlx0L4Bk1WzSgtBbODrh