You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2019/09/26 11:43:02 UTC
[cxf] branch 3.2.x-fixes updated (2f35d34 -> 455b161)
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a change to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.
from 2f35d34 Recording .gitmergeinfo Changes
new c3983b7 CXF-8123 - FIQL parser throws a StringIndexOutOfBoundsException on a wildcard character
new 455b161 Recording .gitmergeinfo Changes
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:
.gitmergeinfo | 1 +
.../apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java | 3 +++
.../org/apache/cxf/jaxrs/ext/search/fiql/FiqlParserTest.java | 11 +++++++++++
3 files changed, 15 insertions(+)
[cxf] 02/02: Recording .gitmergeinfo Changes
Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 455b161e5c98f042de07fbc2d6db7b4ef9ec3121
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Sep 26 12:41:41 2019 +0100
Recording .gitmergeinfo Changes
---
.gitmergeinfo | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 4b7cccb..aa37eaa 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -668,6 +668,7 @@ M 0dc54f4549a68a573e38e0d01396efbb46e87f41
M 0ef506e13f227ce325e09ae5042e003df32c1e0f
M 0f6490cb4e63118dcf4deedd0345ed4b6a35b669
M 1188522e725c117f46668c54b5e2102f1bf7a414
+M 13772a327098239e468c6b04b24afc92afd4cebd
M 1449f125586deaf6f5d87e282f0e1502eef4b6b4
M 15982b9496d0909ffa37e895a48c8428464196c9
M 182d5c91002425fd79c6c62c0318a554fb8cecac
[cxf] 01/02: CXF-8123 - FIQL parser throws a
StringIndexOutOfBoundsException on a wildcard character
Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit c3983b7826a50188e2c58b30e90b6eed800230ce
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Sep 26 12:38:59 2019 +0100
CXF-8123 - FIQL parser throws a StringIndexOutOfBoundsException on a wildcard character
(cherry picked from commit d6eafa6e6dbd47f220c6fc7835e025a11a67080d)
(cherry picked from commit 13772a327098239e468c6b04b24afc92afd4cebd)
# Conflicts:
# rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParserTest.java
---
.../apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java | 3 +++
.../org/apache/cxf/jaxrs/ext/search/fiql/FiqlParserTest.java | 11 +++++++++++
2 files changed, 14 insertions(+)
diff --git a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java
index fffb0f4..eb294e8 100644
--- a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java
+++ b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/PrimitiveSearchCondition.java
@@ -191,6 +191,9 @@ public class PrimitiveSearchCondition<T> implements SearchCondition<T> {
if (rval.charAt(0) == '*') {
starts = true;
rval = rval.substring(1);
+ if (rval.isEmpty()) {
+ throw new SearchParseException("A single wildcard is not a valid search condition");
+ }
}
if (rval.charAt(rval.length() - 1) == '*') {
ends = true;
diff --git a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParserTest.java b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParserTest.java
index 315db8e..c2915e1 100644
--- a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParserTest.java
+++ b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParserTest.java
@@ -313,6 +313,17 @@ public class FiqlParserTest extends Assert {
assertEquals("myitem", job.getTasks().get(0).getItems().get(0).getItemName());
}
+ @Test
+ public void testWildcard() throws SearchParseException {
+ SearchCondition<Condition> filter = parser.parse("name==*");
+ try {
+ filter.isMet(new Condition("foobaz", 0, null));
+ fail("Failure expected on an invalid search condition");
+ } catch (SearchParseException ex) {
+ // expected
+ }
+ }
+
@Ignore
public static class Condition {
private String name;