-
Type: Bug
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 9.10-SNAPSHOT
-
Fix Version/s: QualifiedToSchedule
-
Component/s: Directory
Method org.nuxeo.directory.mongodb.MongoDBSession.buildQuery(Map<String, Serializable>, Set<String>) does not handle escaping well in case of a fulltext search.
Characters such as { } are not correctly interpreted.
So se should change val = val.replaceAll("%+", ".*"); into
val = Pattern.quote(val).replace("%", "\\E.*
Q");.
(See similar thing in https://github.com/nuxeo/nuxeo/blob/master/nuxeo-core/nuxeo-core/src/main/java/org/nuxeo/ecm/core/blob/DefaultBlobDispatcher.java#L203)