]> git.proxmox.com Git - proxmox-backup.git/commitdiff
fix for prevoius patch: we want to copy all valid tickets
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 21 Oct 2020 06:40:04 +0000 (08:40 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 21 Oct 2020 06:40:04 +0000 (08:40 +0200)
src/client/http_client.rs

index 02a58c2dced247e64261c028ecc6654d94a7ec1c..e92d4b18eb3d211e92bc0dddee0a3bc714a65e3c 100644 (file)
@@ -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();
                 }
             }
         }