aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2021-01-13 22:27:04 +0000
committerKegan Dougal <kegan@matrix.org>2021-01-13 22:27:04 +0000
commit19392c8c6ba89cedff7c0dbdd1d7592d873adbde (patch)
treedaf9fa20c95485c8b07f57807a14ac515c14cd57 /setup
parent3183f75aed87f77b0164a701fda99d42b9d443ca (diff)
Decode uri values correctly
Diffstat (limited to 'setup')
-rw-r--r--setup/mscs/msc2946/msc2946.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/setup/mscs/msc2946/msc2946.go b/setup/mscs/msc2946/msc2946.go
index 244a54bc..f1314f41 100644
--- a/setup/mscs/msc2946/msc2946.go
+++ b/setup/mscs/msc2946/msc2946.go
@@ -97,7 +97,10 @@ func spacesHandler(db Database, rsAPI roomserver.RoomserverInternalAPI) func(*ht
inMemoryBatchCache := make(map[string]set)
return func(req *http.Request, device *userapi.Device) util.JSONResponse {
// Extract the room ID from the request. Sanity check request data.
- params := mux.Vars(req)
+ params, err := httputil.URLDecodeMapValues(mux.Vars(req))
+ if err != nil {
+ return util.ErrorResponse(err)
+ }
roomID := params["roomID"]
var r SpacesRequest
r.Defaults()