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.