diff --git a/src/accountmanager/legacy.rs b/src/accountmanager/legacy.rs index 298781b..9b07bfe 100644 --- a/src/accountmanager/legacy.rs +++ b/src/accountmanager/legacy.rs @@ -128,9 +128,11 @@ pub struct SdaAccount { pub token_gid: String, #[serde(with = "crate::secret_string")] pub identity_secret: SecretString, + #[serde(default)] pub server_time: u64, #[serde(with = "crate::secret_string")] pub uri: SecretString, + #[serde(default)] pub fully_enrolled: bool, pub device_id: String, #[serde(with = "crate::secret_string")] diff --git a/src/accountmanager/migrate.rs b/src/accountmanager/migrate.rs index 3354910..41c75b0 100644 --- a/src/accountmanager/migrate.rs +++ b/src/accountmanager/migrate.rs @@ -359,6 +359,10 @@ mod tests { manifest: "src/fixtures/maFiles/compat/difficult-migration/manifest.json", passkey: None, }, + Test { + manifest: "src/fixtures/maFiles/compat/missing-unnecessary/manifest.json", + passkey: None, + }, ]; for case in cases { eprintln!("testing: {:?}", case); @@ -421,6 +425,11 @@ mod tests { account_name: "example", steam_id: 1234, }, + Test { + mafile: "src/fixtures/maFiles/compat/missing-unnecessary/1234.maFile", + account_name: "example", + steam_id: 1234, + }, ]; for case in cases { eprintln!("testing: {:?}", case); diff --git a/src/fixtures/maFiles/compat/missing-unnecessary/1234.maFile b/src/fixtures/maFiles/compat/missing-unnecessary/1234.maFile new file mode 100644 index 0000000..7d907fa --- /dev/null +++ b/src/fixtures/maFiles/compat/missing-unnecessary/1234.maFile @@ -0,0 +1 @@ +{"shared_secret":"zvIayp3JPvtvX/QGHqsqKBk/44s=","serial_number":"kljasfhds","revocation_code":"R12345","uri":"otpauth://totp/Steam:example?secret=ASDF&issuer=Steam","account_name":"example","token_gid":"jkkjlhkhjgf","identity_secret":"kjsdlwowiqe=","secret_1":"sklduhfgsdlkjhf=","status":1,"device_id":"android:99d2ad0e-4bad-4247-b111-26393aae0be3","Session":{"SessionID":"a;lskdjf","SteamLogin":"983498437543","SteamLoginSecure":"dlkjdsl;j%7C%32984730298","WebCookie":";lkjsed;klfjas98093","OAuthToken":"asdk;lf;dsjlkfd","SteamID":1234}} \ No newline at end of file diff --git a/src/fixtures/maFiles/compat/missing-unnecessary/manifest.json b/src/fixtures/maFiles/compat/missing-unnecessary/manifest.json new file mode 100644 index 0000000..7c2ed9f --- /dev/null +++ b/src/fixtures/maFiles/compat/missing-unnecessary/manifest.json @@ -0,0 +1 @@ +{"encrypted":false,"first_run":true,"entries":[{"encryption_iv":null,"encryption_salt":null,"filename":"1234.maFile","steamid":1234}],"periodic_checking":false,"periodic_checking_interval":5,"periodic_checking_checkall":false,"auto_confirm_market_transactions":false,"auto_confirm_trades":false} \ No newline at end of file