mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2024-12-12 09:24:34 -05:00
pantalaimon: Forward raw path instead of quoting the decoded path
If the original path had quoted slash characters (`%2F`), the code decoded them and then left them unquoted, causing the forwarded request to fail. An example is trying to ban a user with a slash in their name using Mjolnir, which PUTs a state event with `rule:<username>` in the URL. Use the undecoded path to avoid this.
This commit is contained in:
parent
e3be7bee3b
commit
054a3bcb0b
@ -482,9 +482,7 @@ class ProxyDaemon:
|
|||||||
|
|
||||||
assert session
|
assert session
|
||||||
|
|
||||||
path = urllib.parse.quote(
|
path = request.raw_path
|
||||||
request.path
|
|
||||||
) # re-encode path stuff like room aliases
|
|
||||||
method = request.method
|
method = request.method
|
||||||
|
|
||||||
headers = CIMultiDict(request.headers)
|
headers = CIMultiDict(request.headers)
|
||||||
|
Loading…
Reference in New Issue
Block a user