fix: alias parsing

next
Timo Kösters 2021-04-11 21:29:37 +02:00
parent 8773e5013d
commit a8231eef25
No known key found for this signature in database
GPG Key ID: 24DA7517711A2BA4
1 changed files with 4 additions and 2 deletions

View File

@ -1668,8 +1668,10 @@ impl Rooms {
.scan_prefix(prefix) .scan_prefix(prefix)
.values() .values()
.map(|bytes| { .map(|bytes| {
Ok(serde_json::from_slice(&bytes?) Ok(utils::string_from_bytes(&bytes?)
.map_err(|_| Error::bad_database("Alias in aliasid_alias is invalid."))?) .map_err(|_| Error::bad_database("Invalid alias bytes in aliasid_alias."))?
.try_into()
.map_err(|_| Error::bad_database("Invalid alias in aliasid_alias."))?)
}) })
} }