From 6168fb2e792e3ccb0758922d0d877bcd1f4da09d Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 30 Jun 2020 12:44:26 +0200 Subject: [PATCH] transaction: Avoid authentication for no-op updates Ensure we normalize ops before requesting authentication so we can trust the op->skip value to be set for no-op updates (which don't need authentication). --- common/flatpak-transaction.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/flatpak-transaction.c b/common/flatpak-transaction.c index e18dca86..f6660362 100644 --- a/common/flatpak-transaction.c +++ b/common/flatpak-transaction.c @@ -3306,6 +3306,9 @@ request_required_tokens (FlatpakTransaction *self, GList *l; g_autoptr(GHashTable) need_token_ht = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_list_free); /* remote name -> list of op */ + /* Ensure all ops so far ar normalized so we don't request authentication for no-op updates */ + flatpak_transaction_normalize_ops (self); + for (l = priv->ops; l != NULL; l = l->next) { FlatpakTransactionOperation *op = l->data;