mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
modules/client/publicrooms: Fix url decoding of query string arguments.
This commit is contained in:
parent
f2fb177d7d
commit
cef538fdf3
1 changed files with 4 additions and 2 deletions
|
@ -52,11 +52,12 @@ resource::response
|
||||||
get__publicrooms(client &client,
|
get__publicrooms(client &client,
|
||||||
const resource::request &request)
|
const resource::request &request)
|
||||||
{
|
{
|
||||||
|
char since_buf[256];
|
||||||
const string_view &since
|
const string_view &since
|
||||||
{
|
{
|
||||||
request.has("since")?
|
request.has("since")?
|
||||||
unquote(request["since"]):
|
unquote(request["since"]):
|
||||||
request.query["since"]
|
url::decode(since_buf, request.query["since"])
|
||||||
};
|
};
|
||||||
|
|
||||||
if(since && !valid(m::id::ROOM, since))
|
if(since && !valid(m::id::ROOM, since))
|
||||||
|
@ -65,9 +66,10 @@ get__publicrooms(client &client,
|
||||||
"Invalid since token for this server."
|
"Invalid since token for this server."
|
||||||
};
|
};
|
||||||
|
|
||||||
|
char server_buf[256];
|
||||||
const auto &server
|
const auto &server
|
||||||
{
|
{
|
||||||
request.query["server"]
|
url::decode(server_buf, request.query["server"])
|
||||||
};
|
};
|
||||||
|
|
||||||
const json::object &filter
|
const json::object &filter
|
||||||
|
|
Loading…
Reference in a new issue