From 864c6cc889fb86fa1df8a182ad4dc9efc57e1d71 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 7 Mar 2019 15:32:03 -0800 Subject: [PATCH] modules/client/rooms/send: urldecode type and txnid path parameters. --- modules/client/rooms/send.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/client/rooms/send.cc b/modules/client/rooms/send.cc index d049f8154..e14210aba 100644 --- a/modules/client/rooms/send.cc +++ b/modules/client/rooms/send.cc @@ -24,9 +24,10 @@ put__send(client &client, "type parameter missing" }; + char type_buf[m::event::TYPE_MAX_SIZE]; const string_view &type { - request.parv[2] + url::decode(type_buf, request.parv[2]) }; if(request.parv.size() < 4) @@ -35,9 +36,10 @@ put__send(client &client, "txnid parameter missing" }; + char transaction_id_buf[64]; const string_view &transaction_id { - request.parv[3] + url::decode(transaction_id_buf, request.parv[3]) }; m::vm::copts copts;