Skip to content

Commit

Permalink
api: URI encode device_id in update_device
Browse files Browse the repository at this point in the history
The grammar for device IDs is not documented [1].  In the meantime we
should not assume that device IDs will not contain reserved characters.

[1]: https://github.com/matrix-org/matrix-doc/issues/1257
  • Loading branch information
auscompgeek committed Apr 15, 2020
1 parent ce6e6ca commit 98f0c24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ def update_device(access_token, device_id, content):
updated for the device.
"""
query_parameters = {"access_token": access_token}
path = "devices/{}".format(device_id)
path = "devices/{}".format(quote(device_id))

return (
"PUT",
Expand Down

0 comments on commit 98f0c24

Please sign in to comment.