mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Read first frame of backup to validate before proceeding.
Addresses #11952.
This commit is contained in:
@@ -289,6 +289,11 @@ public final class RestoreBackupFragment extends LoggingFragment {
|
||||
SQLiteDatabase database = SignalDatabase.getBackupDatabase();
|
||||
|
||||
BackupPassphrase.set(context, passphrase);
|
||||
|
||||
if (!FullBackupImporter.validatePassphrase(context, backup.getUri(), passphrase)) {
|
||||
return BackupImportResult.FAILURE_UNKNOWN;
|
||||
}
|
||||
|
||||
FullBackupImporter.importFile(context,
|
||||
AttachmentSecretProvider.getInstance(context).getOrCreateAttachmentSecret(),
|
||||
database,
|
||||
|
||||
Reference in New Issue
Block a user