mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-12-22 10:37:45 +01:00
Fix handling of base64 consent data and never die when it's broken
This commit is contained in:
parent
124ec3ac1c
commit
bd1be63f6b
@ -85,8 +85,12 @@ public class AuthManagerServiceImpl extends IAuthManagerService.Stub {
|
||||
i.putExtra(KEY_ACCOUNT_TYPE, authManager.getAccountType());
|
||||
i.putExtra(KEY_ACCOUNT_NAME, accountName);
|
||||
i.putExtra(KEY_AUTHTOKEN, scope);
|
||||
if (res.consentDataBase64 != null)
|
||||
i.putExtra(EXTRA_CONSENT_DATA, Base64.decode(res.consentDataBase64, Base64.URL_SAFE));
|
||||
try {
|
||||
if (res.consentDataBase64 != null)
|
||||
i.putExtra(EXTRA_CONSENT_DATA, Base64.decode(res.consentDataBase64, Base64.URL_SAFE));
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Can't decode consent data: ", e);
|
||||
}
|
||||
result.putParcelable(KEY_USER_RECOVERY_INTENT, i);
|
||||
return result;
|
||||
}
|
||||
|
@ -109,8 +109,12 @@ class AccountAuthenticator extends AbstractAccountAuthenticator {
|
||||
i.putExtra(KEY_ACCOUNT_TYPE, account.type);
|
||||
i.putExtra(KEY_ACCOUNT_NAME, account.name);
|
||||
i.putExtra(KEY_AUTHTOKEN, authTokenType);
|
||||
if (res.consentDataBase64 != null)
|
||||
i.putExtra(AskPermissionActivity.EXTRA_CONSENT_DATA, Base64.decode(res.consentDataBase64, Base64.DEFAULT));
|
||||
try {
|
||||
if (res.consentDataBase64 != null)
|
||||
i.putExtra(AskPermissionActivity.EXTRA_CONSENT_DATA, Base64.decode(res.consentDataBase64, Base64.URL_SAFE));
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Can't decode consent data: ", e);
|
||||
}
|
||||
result.putParcelable(KEY_INTENT, i);
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user