From 4e32d1c59077a46521b7af33977fb0686a61eb46 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 21 Oct 2020 08:40:04 +0200 Subject: [PATCH] fix for prevoius patch: we want to copy all valid tickets --- src/client/http_client.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/client/http_client.rs b/src/client/http_client.rs index 02a58c2d..e92d4b18 100644 --- a/src/client/http_client.rs +++ b/src/client/http_client.rs @@ -220,12 +220,10 @@ fn store_ticket_info(prefix: &str, server: &str, username: &str, ticket: &str, t let empty = serde_json::map::Map::new(); for (server, info) in data.as_object().unwrap_or(&empty) { for (user, uinfo) in info.as_object().unwrap_or(&empty) { - if user == username { - if let Some(timestamp) = uinfo["timestamp"].as_i64() { - let age = now - timestamp; - if age < ticket_lifetime { - new_data[server][username] = uinfo.clone(); - } + if let Some(timestamp) = uinfo["timestamp"].as_i64() { + let age = now - timestamp; + if age < ticket_lifetime { + new_data[server][user] = uinfo.clone(); } } }