Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-23853

Fix escaping for fulltext search in MongoDBSession

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 9.10-SNAPSHOT
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Directory

      Description

      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)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              egiuly Estelle Giuly
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: