Uploaded image for project: 'ActivityPub Application'
  1. ActivityPub Application
  2. XAP-117

The user picker fails when the typed text contains Solr special characters such as the colon of a URL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 1.2
    • None
    • Unknown

    Description

      Problem

      Typing a URL, e.g. https://mastodon.example/@alice, in the ActivityPub user picker returns no result and logs a Solr error:

      SyntaxError: Cannot parse 'filter(type:webfinger) AND id:*https://mastodon.example/@alice*'
      

      Cause

      DefaultActivityPubStorage#searchWebFinger inserts the typed text as is in the Solr filter query filter(type:webfinger) AND id:<query>. The Solr special characters it contains, such as the : of a URL, are not escaped, so the query cannot be parsed.

      Suggested fix

      Escape the typed text (e.g. with ClientUtils.escapeQueryChars) before inserting it in the query.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mleduc Manuel Leduc
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: