You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per matrix-org/matrix-spec#2060, Sydent can return both standard and url-safe base64-encoded public keys, but we only expect standard base64 so they fail to deserialize.
Note that both Synapse and Sydent use the python-unpaddedbase64 that decodes both indifferently.
I am not sure if we should be using Base64 in this case. The problem that I see with this type is that it decodes the string during deserialization and reencodes it during serialization, which can be lossy (regarding to padding). But the server might store the base64-encoded key (this is was Sydent does), so it might not be able to find the key if it does not use the exact same string, on the endpoints to check the validity of the key.
It should be noted that RoomThirdPartyEventContent and ruma_identity_service_api::invitation::store_invitation::v2::Response use their own PublicKey type but it should probably be the same type.
The text was updated successfully, but these errors were encountered:
As per matrix-org/matrix-spec#2060, Sydent can return both standard and url-safe base64-encoded public keys, but we only expect standard base64 so they fail to deserialize.
Note that both Synapse and Sydent use the
python-unpaddedbase64
that decodes both indifferently.This affects:
ruma_identity_service_api::keys
RoomThirdPartyEventContent
(which was reported in the Matrix Rust SDK room)ruma_identity_service_api::invitation::store_invitation::v2::PublicKey
should be affected too except that it doesn't useBase64
butString
.I am not sure if we should be using
Base64
in this case. The problem that I see with this type is that it decodes the string during deserialization and reencodes it during serialization, which can be lossy (regarding to padding). But the server might store the base64-encoded key (this is was Sydent does), so it might not be able to find the key if it does not use the exact same string, on the endpoints to check the validity of the key.It should be noted that
RoomThirdPartyEventContent
andruma_identity_service_api::invitation::store_invitation::v2::Response
use their ownPublicKey
type but it should probably be the same type.The text was updated successfully, but these errors were encountered: