Repository navigation
Conversation
Currently if you install from a flatpak bundle that doesn't have a collection ID set or from a flatpakref file that has the CollectionID key set to the empty sting, you end up with an invalid configuration on the origin remote created. This is because the collection_id parameter of flatpak_dir_create_origin_remote() is set to the empty string, not NULL, and create_origin_remote_config() then only checks for NULL when deciding whether to set gpg-verify-summary to true or false. Then because there's no collection ID configured but gpg-verify-summary is set to false, you get the error "Can't pull from untrusted non-gpg verified remote" when trying to pull related refs or update the app. This commit fixes the bug by checking for the empty string when the collection ID is read from a bundle or ref file, and collapsing that into NULL.
mwleeds
force-pushed
the
fix-empty-collection-id-handling
branch
from
September 8, 2018 23:33
a791997 to
93f88ca
Compare
Member
|
📌 Commit 93f88ca has been approved by |
|
☀️ Test successful - status-papr |
uajain
pushed a commit
to uajain/flatpak
that referenced
this pull request
Oct 12, 2018
Currently if you install from a flatpak bundle that doesn't have a collection ID set or from a flatpakref file that has the CollectionID key set to the empty sting, you end up with an invalid configuration on the origin remote created. This is because the collection_id parameter of flatpak_dir_create_origin_remote() is set to the empty string, not NULL, and create_origin_remote_config() then only checks for NULL when deciding whether to set gpg-verify-summary to true or false. Then because there's no collection ID configured but gpg-verify-summary is set to false, you get the error "Can't pull from untrusted non-gpg verified remote" when trying to pull related refs or update the app. This commit fixes the bug by checking for the empty string when the collection ID is read from a bundle or ref file, and collapsing that into NULL. Closes: flatpak#2081 Approved by: alexlarsson
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently if you instal from a flatpak bundle that doesn't have a
collection ID set or from a flatpakref file that has the CollectionID
key set to the empty sting, you end up with an invalid configuration on
the origin remote created. This is because the collection_id parameter
of flatpak_dir_create_origin_remote() is set to the empty string, not
NULL, and create_origin_remote_config() then only checks for NULL when
deciding whether to set gpg-verify-summary to true or false. Then
because there's no collection ID configured but gpg-verify-summary is
set to false, you get the error "Can't pull from untrusted non-gpg
verified remote" when trying to pull related refs or update the app.
This commit fixes the bug by checking for the empty string when the
collection ID is read from a bundle or ref file, and collapsing that
into NULL.