mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd:Ⓜ️🆔 Fix id::event::v3/v4 hashing ctor return view of sigil.
This commit is contained in:
parent
19df2bbf79
commit
54d5afae49
1 changed files with 16 additions and 5 deletions
21
ircd/m_id.cc
21
ircd/m_id.cc
|
@ -707,7 +707,15 @@ ircd::m::id::event::v3::v3(const mutable_buffer &out,
|
|||
};
|
||||
|
||||
out[0] = '$';
|
||||
return b64encode_unpadded(out + 1, hash);
|
||||
const string_view hashb64
|
||||
{
|
||||
b64encode_unpadded(out + 1, hash)
|
||||
};
|
||||
|
||||
return string_view
|
||||
{
|
||||
ircd::data(out), 1 + ircd::size(hashb64)
|
||||
};
|
||||
}()}
|
||||
{
|
||||
}
|
||||
|
@ -742,10 +750,13 @@ ircd::m::id::event::v4::v4(const mutable_buffer &out,
|
|||
};
|
||||
|
||||
out[0] = '$';
|
||||
string_view ret;
|
||||
ret = b64encode_unpadded(out + 1, hash);
|
||||
ret = b64tob64url(out + 1, ret);
|
||||
return ret;
|
||||
string_view hashb64;
|
||||
hashb64 = b64encode_unpadded(out + 1, hash);
|
||||
hashb64 = b64tob64url(out + 1, hashb64);
|
||||
return string_view
|
||||
{
|
||||
ircd::data(out), 1 + ircd::size(hashb64)
|
||||
};
|
||||
}()}
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue