From 706c3ba805e30d720ca919e5ea124a9a201f9094 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 7 Mar 2018 09:22:43 +0530 Subject: [PATCH] Add a warning when the user is using the import functionality, as importing data, imports executable code such as plugins as well --- src/calibre/gui2/dialogs/exim.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/calibre/gui2/dialogs/exim.py b/src/calibre/gui2/dialogs/exim.py index 85fd80eebd..cf1e9e993d 100644 --- a/src/calibre/gui2/dialogs/exim.py +++ b/src/calibre/gui2/dialogs/exim.py @@ -253,6 +253,12 @@ class EximDialog(Dialog): path = choose_dir(self, 'choose-export-folder-for-import', _('Select folder with exported data')) if path is None: return + if not question_dialog(self, _('Are you sure?'), _( + 'Importing calibre data means all libraries, settings, plugins, etc will be imported. This is' + ' a security risk, only proceed if the data you are importing was previously generated by you, using the calibre' + ' export functionality.' + )): + return try: self.importer = Importer(path) except Exception as e: