]> git.proxmox.com Git - fwupd.git/commitdiff
Revert "Only accept application/x-xz compression for the metadata payload"
authorRichard Hughes <richard@hughsie.com>
Fri, 24 Feb 2023 14:14:09 +0000 (14:14 +0000)
committerRichard Hughes <richard@hughsie.com>
Fri, 24 Feb 2023 14:14:09 +0000 (14:14 +0000)
This reverts commit df8a6a7eaf46462e5861c80176e6a8d83e6ccb1f.

Vendors are using xml.gz remotes...

src/fu-engine.c

index 343ce0828cd6e48162da7a9b9aecd5f711d6a063..434ff09b210ea9eed9fddccfda2ac5f8553564e2 100644 (file)
@@ -4975,7 +4975,6 @@ fu_engine_update_metadata_bytes(FuEngine *self,
        FwupdKeyringKind keyring_kind;
        FwupdRemote *remote;
        JcatVerifyFlags jcat_flags = JCAT_VERIFY_FLAG_REQUIRE_SIGNATURE;
-       g_autofree gchar *content_type = NULL;
        g_autoptr(JcatFile) jcat_file = jcat_file_new();
 
        g_return_val_if_fail(FU_IS_ENGINE(self), FALSE);
@@ -5003,20 +5002,6 @@ fu_engine_update_metadata_bytes(FuEngine *self,
                return FALSE;
        }
 
-       /* check for xz payload */
-       content_type = g_content_type_guess(NULL,
-                                           (const guchar *)g_bytes_get_data(bytes_raw, NULL),
-                                           g_bytes_get_size(bytes_raw),
-                                           NULL);
-       if (content_type != NULL && g_strcmp0(content_type, "application/x-xz") != 0) {
-               g_set_error(error,
-                           FWUPD_ERROR,
-                           FWUPD_ERROR_NOT_SUPPORTED,
-                           "only application/x-xz payload supported, got %s",
-                           content_type);
-               return FALSE;
-       }
-
        /* verify JCatFile, or create a dummy one from legacy data */
        keyring_kind = fwupd_remote_get_keyring_kind(remote);
        if (keyring_kind == FWUPD_KEYRING_KIND_JCAT) {