Increase version support to 4 for 2FAS backup import

Version 4 import of 2FAS backup was tested and successful with and without encryption without any code change
This commit is contained in:
Alexandre ELIOT 2024-03-15 15:11:38 +00:00 committed by GitHub
parent dfd720b406
commit 66e13b0840
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,7 +61,7 @@ public class TwoFASImporter extends DatabaseImporter {
String json = new String(IOUtils.readAll(stream), StandardCharsets.UTF_8); String json = new String(IOUtils.readAll(stream), StandardCharsets.UTF_8);
JSONObject obj = new JSONObject(json); JSONObject obj = new JSONObject(json);
int version = obj.getInt("schemaVersion"); int version = obj.getInt("schemaVersion");
if (version > 4) { if (version > 5) {
throw new DatabaseImporterException(String.format("Unsupported schema version: %d", version)); throw new DatabaseImporterException(String.format("Unsupported schema version: %d", version));
} }