From 4900a2ede773cb579207ad27ee73e2ffee943e87 Mon Sep 17 00:00:00 2001 From: Yoav Shai Date: Sat, 15 Jan 2022 02:21:36 +0200 Subject: [PATCH] Make WebCookie optional in Session The maFile from Steam Desktop Authenticator may set this field to null --- steamguard/src/steamapi.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/steamguard/src/steamapi.rs b/steamguard/src/steamapi.rs index 19ea1c1..d57d961 100644 --- a/steamguard/src/steamapi.rs +++ b/steamguard/src/steamapi.rs @@ -99,7 +99,7 @@ pub struct Session { #[serde(rename = "SteamLoginSecure")] pub steam_login_secure: String, #[serde(default, rename = "WebCookie")] - pub web_cookie: String, + pub web_cookie: Option, #[serde(rename = "OAuthToken")] pub token: String, #[serde(rename = "SteamID")] @@ -153,7 +153,7 @@ impl SteamApiClient { session_id: self .extract_session_id() .expect("failed to extract session id from cookies"), - web_cookie: data.webcookie.clone(), + web_cookie: Some(data.webcookie.clone()), }; }