From d9d647fdbf8d08957b62c9d33cbbbee1a629e360 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Wed, 3 Nov 2021 15:10:28 -0300 Subject: [PATCH] [appimage] improvement: validating the AppImage file extension when updating imported files --- bauh/gems/appimage/controller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bauh/gems/appimage/controller.py b/bauh/gems/appimage/controller.py index 99b16e9a..44d3ce82 100644 --- a/bauh/gems/appimage/controller.py +++ b/bauh/gems/appimage/controller.py @@ -162,7 +162,8 @@ class AppImageManager(SoftwareManager): components=[FormComponent(label='', components=[file_chooser, input_version], spaces=False)], confirmation_label=self.i18n['proceed'].capitalize(), deny_label=self.i18n['cancel'].capitalize()): - if not file_chooser.file_path or not os.path.isfile(file_chooser.file_path): + + if not file_chooser.file_path or not os.path.isfile(file_chooser.file_path) or not file_chooser.file_path.lower().strip().endswith('.appimage'): watcher.request_confirmation(title=self.i18n['error'].capitalize(), body=self.i18n['appimage.custom_action.install_file.invalid_file'], deny_button=False)