Skip to content

Commit 65cbfac

Browse files
committed
Ensure that bundles have metadata on install
If we have a bundle without metadata we wouldn't properly present the permissions in the transaction.
1 parent 93357d3 commit 65cbfac

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: common/flatpak-dir.c

+7
Original file line numberDiff line numberDiff line change
@@ -9372,6 +9372,13 @@ flatpak_dir_ensure_bundle_remote (FlatpakDir *self,
93729372
if (metadata == NULL)
93739373
return NULL;
93749374

9375+
/* If we rely on metadata (to e.g. print permissions), check it exists before creating the remote */
9376+
if (out_metadata && fp_metadata == NULL)
9377+
{
9378+
flatpak_fail_error (error, FLATPAK_ERROR_INVALID_DATA, "No metadata in bundler header");
9379+
return NULL;
9380+
}
9381+
93759382
gpg_data = extra_gpg_data ? extra_gpg_data : included_gpg_data;
93769383

93779384
deploy_data = flatpak_dir_get_deploy_data (self, ref, FLATPAK_DEPLOY_VERSION_ANY, cancellable, NULL);

0 commit comments

Comments
 (0)