From a0d6884fd7bb7fbf140ca72d65f977cb101b912e Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Fri, 4 Sep 2020 19:01:22 +0200 Subject: [PATCH] fix: prevent importing backup files with version > 003 --- .../javascripts/directives/views/accountMenu.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/assets/javascripts/directives/views/accountMenu.js b/app/assets/javascripts/directives/views/accountMenu.js index a14389ed6..fb38bef4e 100644 --- a/app/assets/javascripts/directives/views/accountMenu.js +++ b/app/assets/javascripts/directives/views/accountMenu.js @@ -377,6 +377,17 @@ class AccountMenuCtrl extends PureCtrl { } async performImport(data, password) { + if (data.keyParams) { + if (Number(data.keyParams.version) > 3) { + this.setState({ + importData: null + }); + this.alertManager.alert({ + text: "This backup file was created using a later version of the application and cannot be imported." + }); + return; + } + } await this.setState({ importData: { ...this.state.importData,