1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-11-19 02:10:51 +01:00

fix: ignore bad user ids

This commit is contained in:
Timo Kösters 2023-02-07 15:26:34 +01:00
parent 06df04f61c
commit a4f18f99ad
No known key found for this signature in database
GPG key ID: 0B25E636FBA7E4CB

View file

@ -800,10 +800,17 @@ impl KeyValueDatabase {
} }
if services().globals.database_version()? < 12 { if services().globals.database_version()? < 12 {
for username in services().users.list_local_users().unwrap() { for username in services().users.list_local_users()? {
let user = let user = match UserId::parse_with_server_name(
UserId::parse_with_server_name(username, services().globals.server_name()) username.clone(),
.unwrap(); services().globals.server_name(),
) {
Ok(u) => u,
Err(e) => {
warn!("Invalid username {username}: {e}");
continue;
}
};
let raw_rules_list = services() let raw_rules_list = services()
.account_data .account_data