matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.82k stars 2.13k forks source link

The user list API search name does not support Chinese search. Enter Chinese and report 400 code #16386

Closed web-chenke closed 1 year ago

web-chenke commented 1 year ago

The user list API does not support Chinese search and reports a 400 error after Chinese search. Although the client transcodes the parameters and does not report a 400 error, the name field cannot be searched. English characters can search for data

API address: https://matrix.gptchat.fan/_synapse/admin/v2/users?order_by=creation_ts&dir=b&name=%25E5%25B0%258F%25E8%259C%259C%25E8%259C%2582&isShow=true&deactivated=false&limit=10

All three encoding processing methods are invalid: encodeURIComponent(chineseText); encodeURI(chineseText); escape(chineseText);

DMRobertson commented 1 year ago

Is this a duplicate of https://github.com/matrix-org/synapse/issues/16370?

clokep commented 1 year ago

Seems like it.