fix null OAuthToken field in SDA accounts causing migrations to crash and burn (#227)
This commit is contained in:
parent
93a5fe643c
commit
d2ba7d8f1d
4 changed files with 23 additions and 1 deletions
|
@ -155,7 +155,7 @@ pub struct Session {
|
|||
#[serde(default, rename = "WebCookie")]
|
||||
pub web_cookie: Option<String>,
|
||||
#[serde(default, rename = "OAuthToken")]
|
||||
pub token: String,
|
||||
pub token: Option<String>,
|
||||
#[serde(rename = "SteamID")]
|
||||
pub steam_id: u64,
|
||||
}
|
||||
|
|
|
@ -294,6 +294,10 @@ mod tests {
|
|||
manifest: "src/fixtures/maFiles/compat/no-webcookie/manifest.json",
|
||||
passkey: None,
|
||||
},
|
||||
Test {
|
||||
manifest: "src/fixtures/maFiles/compat/null-oauthtoken/manifest.json",
|
||||
passkey: None,
|
||||
},
|
||||
];
|
||||
for case in cases {
|
||||
eprintln!("testing: {:?}", case);
|
||||
|
|
17
src/fixtures/maFiles/compat/null-oauthtoken/manifest.json
Normal file
17
src/fixtures/maFiles/compat/null-oauthtoken/manifest.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"encrypted": false,
|
||||
"first_run": true,
|
||||
"entries": [
|
||||
{
|
||||
"encryption_iv": null,
|
||||
"encryption_salt": null,
|
||||
"filename": "nulloauthtoken.maFile",
|
||||
"steamid": 1234
|
||||
}
|
||||
],
|
||||
"periodic_checking": false,
|
||||
"periodic_checking_interval": 5,
|
||||
"periodic_checking_checkall": false,
|
||||
"auto_confirm_market_transactions": false,
|
||||
"auto_confirm_trades": false
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{"shared_secret":"zvIayp3JPvtvX/QGHqsqKBk/44s=","serial_number":"kljasfhds","revocation_code":"R12345","uri":"otpauth://totp/Steam:example?secret=ASDF&issuer=Steam","server_time":1602522478,"account_name":"example","token_gid":"jkkjlhkhjgf","identity_secret":"kjsdlwowiqe=","secret_1":"sklduhfgsdlkjhf=","status":1,"device_id":"android:99d2ad0e-4bad-4247-b111-26393aae0be3","fully_enrolled":true,"Session":{"SessionID":"a;lskdjf","SteamLogin":"983498437543","SteamLoginSecure":"dlkjdsl;j%7C%32984730298","WebCookie":"asdk;lf;dsjlkfd","OAuthToken":null,"SteamID":1234}}
|
Loading…
Reference in a new issue