0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 00:02:34 +01:00

modules/client/keys/signatures/upload: Fix inhibition to interactive verification.

closes #162
This commit is contained in:
Jason Volk 2023-04-19 21:46:07 -07:00
parent d5df04a183
commit 336026dde6

View file

@ -43,34 +43,21 @@ ircd::m::resource::response
ircd::m::post_keys_signatures_upload(client &client,
const resource::request &request)
{
const m::device::id::buf device_id
{
m::user::tokens::device(request.access_token)
};
const m::user::room user_room
{
request.user_id
};
for(const auto &[_user_id, devices_keys_] : request)
{
if(!valid(m::id::USER, _user_id))
continue;
if(_user_id != request.user_id)
throw m::ACCESS_DENIED
{
"Uploading for user %s by %s not allowed or supported",
_user_id,
string_view{request.user_id},
};
const m::user::id user_id
{
_user_id
};
const m::user::room user_room
{
user_id
};
const m::user::devices devices
{
user_id