From 746f76af1827c11389bad03798f0d8cec806d54d Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Tue, 10 Aug 2021 21:07:04 -0400 Subject: [PATCH 1/3] fix login response deserialization --- steamguard/src/steamapi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/steamguard/src/steamapi.rs b/steamguard/src/steamapi.rs index 22cb78d..4a96864 100644 --- a/steamguard/src/steamapi.rs +++ b/steamguard/src/steamapi.rs @@ -28,7 +28,7 @@ pub struct LoginResponse { pub captcha_needed: bool, #[serde(default)] pub captcha_gid: String, - #[serde(default)] + #[serde(default, deserialize_with = "parse_json_string_as_number")] pub emailsteamid: u64, #[serde(default)] pub emailauth_needed: bool, From 847deafe86f8fd51719007e8327e16ee47d85409 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Tue, 10 Aug 2021 21:10:04 -0400 Subject: [PATCH 2/3] save manifest after finalization --- src/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.rs b/src/main.rs index dbc5f59..5ba6ffb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -209,6 +209,15 @@ fn main() { } } + println!("Authenticator finalized."); + match manifest.save() { + Ok(_) => {} + Err(err) => { + println!("Failed to save manifest, but we were able to save it before. {}", err); + return; + } + } + return; } From d67a93a982bb16023baa1bbbbe5ae51a0188c638 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Tue, 10 Aug 2021 22:45:17 -0400 Subject: [PATCH 3/3] cargo fmt --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 5ba6ffb..c7c028b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -213,7 +213,10 @@ fn main() { match manifest.save() { Ok(_) => {} Err(err) => { - println!("Failed to save manifest, but we were able to save it before. {}", err); + println!( + "Failed to save manifest, but we were able to save it before. {}", + err + ); return; } }