Skip to content

Make the new appimage executable on validation success - #138

Merged
TheAssassin merged 1 commit into
rewritefrom
unknown repository
Mar 23, 2020
Merged

TheAssassin merged 1 commit into
rewritefrom
unknown repository

Conversation

@ghost

@ghost ghost commented Oct 31, 2019

Copy link
Copy Markdown

Currently, the 'Run' button functionality will make the newly downloaded AppImage executable before executing. What I propose with this pull request is that the newly downloaded AppImage is also made executable when signature validation passes (not on warning/missing signature).

@TheAssassin

Copy link
Copy Markdown
Member

Why would you need that feature? Hardly any AppImage supports the signature validation anyway. It'd probably make more sense to make any updated AppImage executable.

@ghost

ghost commented Nov 2, 2019

Copy link
Copy Markdown
Author

Thank you for reviewing my patch.

I have come across this while working on updates integration for Krita. It is a small usability issue, but I believe it is useful.

As it is now, if a user downloads an AppImage, they express their trust by making it executable and running it. However, if they update the AppImage, they need to make it executable again (unless they use appimaged or AppImageLauncher, most of our users probably do not have any of those). That is quite inconvenient (it adds an extra step on every update) and it might be confusing (the user already expressed their trust earlier). That is why I propose to make the AppImage executable upon update.

From the security point of view, it made sense to me to only make the AppImage executable upon successful signature validation. However, that is just the original idea and I understand your argument that signed AppImages are not widespread at the moment. I will of course change the patch to behave the way you want it to be.

@probonopd

Copy link
Copy Markdown
Member

The way I had implemented it originally: after a successful update, the permissions of the old version were carried over to the new version. In other words, if you were updating an AppImage that was executable, the updated binary also was executable (unless the signature was tampered with).

Would that satisfy your requirement?

@ghost

ghost commented Nov 2, 2019

Copy link
Copy Markdown
Author

Yes, carrying over the permissions of the old version would work for my use case. I will make the changes to the pull request.

Concerning "unless the signature was tampered with": should I change the permissions only for valid signatures, or also for AppImages, which were never signed (both old and new versions are missing the signature)?

@probonopd

Copy link
Copy Markdown
Member

Unsigned AppImages cannot be verified, hence we assume they are good. Only signed AppImages can be verified, and if verification fails, the user should be warned and the file should not get the same permissions as the old version.

@ghost

ghost commented Nov 2, 2019

Copy link
Copy Markdown
Author

I have updated the code: permissions are copied from the old version to the new one when 1) both AppImages are unsigned, 2) signature validation passes. Is this acceptable? Should I make other changes?

@TheAssassin TheAssassin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@probonopd

Copy link
Copy Markdown
Member

@TheAssassin do you have an idea why we are getting

ERROR: Could not find suitable icon for Icon entry: AppImage

@ghost

ghost commented Mar 23, 2020

Copy link
Copy Markdown
Author

Are there any remaining blockers to this? If not, may I ask you to merge it?

@TheAssassin
TheAssassin merged commit cb611d8 into AppImageCommunity:rewrite Mar 23, 2020
@TheAssassin

Copy link
Copy Markdown
Member

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants