You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2021/07/29 15:15:48 UTC

[syncope] branch master updated: Escape anpersand when searching in Elasticsearch

This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/master by this push:
     new e4aa0a9  Escape anpersand when searching in Elasticsearch
e4aa0a9 is described below

commit e4aa0a951dd3256540bd0d9d461fdf0971656062
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Thu Jul 29 17:15:12 2021 +0200

    Escape anpersand when searching in Elasticsearch
---
 .../syncope/core/persistence/jpa/dao/ElasticsearchAnySearchDAO.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/elasticsearch/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/ElasticsearchAnySearchDAO.java b/ext/elasticsearch/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/ElasticsearchAnySearchDAO.java
index e44cce2..8111a60 100644
--- a/ext/elasticsearch/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/ElasticsearchAnySearchDAO.java
+++ b/ext/elasticsearch/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/ElasticsearchAnySearchDAO.java
@@ -84,7 +84,7 @@ public class ElasticsearchAnySearchDAO extends AbstractAnySearchDAO {
     protected static final QueryBuilder MATCH_ALL_QUERY_BUILDER = new MatchAllQueryBuilder();
 
     protected static final char[] ELASTICSEARCH_REGEX_CHARS = new char[] {
-        '.', '?', '+', '*', '|', '{', '}', '[', ']', '(', ')', '"', '\\' };
+        '.', '?', '+', '*', '|', '{', '}', '[', ']', '(', ')', '"', '\\', '&' };
 
     protected static String escapeForLikeRegex(final char c) {
         StringBuilder output = new StringBuilder();