mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
modules/client/login: Fix for fully qualified requested device_id; verify hostpart.
This commit is contained in:
parent
6eb1724a2b
commit
d1a5930ba9
1 changed files with 8 additions and 0 deletions
|
@ -114,11 +114,19 @@ post__login_password(client &client,
|
|||
|
||||
const auto device_id
|
||||
{
|
||||
valid(m::id::DEVICE, requested_device_id)?
|
||||
m::id::device::buf{requested_device_id}:
|
||||
requested_device_id?
|
||||
m::id::device::buf{requested_device_id, my_host()}:
|
||||
m::id::device::buf{m::id::generate, my_host()}
|
||||
};
|
||||
|
||||
if(!my(device_id))
|
||||
throw m::UNSUPPORTED
|
||||
{
|
||||
"Device ID's with foreign hostparts are not supported."
|
||||
};
|
||||
|
||||
char access_token_buf[32];
|
||||
const string_view access_token
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue