Add a warning when the user is using the import functionality, as importing data, imports executable code such as plugins as well

This commit is contained in:
Kovid Goyal 2018-03-07 09:22:43 +05:30
parent 8e41e225e5
commit 706c3ba805
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -253,6 +253,12 @@ class EximDialog(Dialog):
path = choose_dir(self, 'choose-export-folder-for-import', _('Select folder with exported data')) path = choose_dir(self, 'choose-export-folder-for-import', _('Select folder with exported data'))
if path is None: if path is None:
return 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: try:
self.importer = Importer(path) self.importer = Importer(path)
except Exception as e: except Exception as e: