File tree Expand file tree Collapse file tree
core/persistence-neo4j/src/main/java/org/apache/syncope/core/persistence/neo4j/dao Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ protected static void appendPlainAttrCond(
132132
133133 protected static String escapeIfString (final String value , final boolean isStr ) {
134134 return isStr
135- ? new StringBuilder ().append ('"' ).append (value ).append ('"' ).toString ()
135+ ? new StringBuilder ().append ('"' ).append (AnyRepoExt . escapeForLikeRegex ( value ) ).append ('"' ).toString ()
136136 : value ;
137137 }
138138
@@ -648,7 +648,7 @@ protected AnyCondQuery getQuery(
648648 if (!SyncopeConstants .UUID_PATTERN .matcher (cond .getExpression ()).matches ()) {
649649 Realm realm = realmSearchDAO .findByFullPath (cond .getExpression ()).
650650 orElseThrow (() -> new IllegalArgumentException (
651- "Invalid Realm full path: " + cond .getExpression ()));
651+ "Invalid Realm full path: " + cond .getExpression ()));
652652 cond .setExpression (realm .getKey ());
653653 }
654654
@@ -842,7 +842,7 @@ protected void wrapQuery(
842842 Stream .concat (
843843 queryInfo .fields ().stream (),
844844 orderBy .stream ().filter (clause -> !"id" .equals (clause .getProperty ())
845- && anyUtils .getField (clause .getProperty ()).isPresent ()).map (Order ::getProperty )).
845+ && anyUtils .getField (clause .getProperty ()).isPresent ()).map (Order ::getProperty )).
846846 distinct ().forEach (field -> match .append (", n." ).append (field ).append (" AS " ).append (field ));
847847
848848 // take plain schemas into account
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ protected static void appendPlainAttrCond(
101101
102102 protected static String escapeIfString (final String value , final boolean isStr ) {
103103 return isStr
104- ? new StringBuilder ().append ('"' ).append (value ).append ('"' ).toString ()
104+ ? new StringBuilder ().append ('"' ).append (AnyRepoExt . escapeForLikeRegex ( value ) ).append ('"' ).toString ()
105105 : value ;
106106 }
107107
@@ -278,7 +278,7 @@ protected void wrapQuery(
278278 Stream .concat (
279279 queryInfo .fields ().stream (),
280280 orderBy .stream ().filter (clause -> !"id" .equals (clause .getProperty ())
281- && realmUtils .getField (clause .getProperty ()).isPresent ()).map (Order ::getProperty )).
281+ && realmUtils .getField (clause .getProperty ()).isPresent ()).map (Order ::getProperty )).
282282 distinct ().forEach (field -> match .append (", n." ).append (field ).append (" AS " ).append (field ));
283283
284284 // take plain schemas into account
You can’t perform that action at this time.
0 commit comments