diff --git a/libfwupd/fwupd-release.c b/libfwupd/fwupd-release.c index 28425076d..5b812e6a5 100644 --- a/libfwupd/fwupd-release.c +++ b/libfwupd/fwupd-release.c @@ -429,7 +429,7 @@ fwupd_release_has_category(FwupdRelease *self, const gchar *category) * fwupd_release_get_checksums: * @self: a #FwupdRelease * - * Gets the release checksums. + * Gets the release container checksums. * * Returns: (element-type utf8) (transfer none): the checksums, which may be empty * @@ -446,7 +446,7 @@ fwupd_release_get_checksums(FwupdRelease *self) /** * fwupd_release_add_checksum: * @self: a #FwupdRelease - * @checksum: (not nullable): the update checksum + * @checksum: (not nullable): the update container checksum * * Sets the update checksum. * @@ -471,7 +471,7 @@ fwupd_release_add_checksum(FwupdRelease *self, const gchar *checksum) * @self: a #FwupdRelease * @checksum: (not nullable): the update checksum * - * Finds out if the release has the update checksum. + * Finds out if the release has the update container checksum. * * Returns: %TRUE if the release matches * diff --git a/src/fu-release.c b/src/fu-release.c index 8430296ca..e448af2f2 100644 --- a/src/fu-release.c +++ b/src/fu-release.c @@ -257,6 +257,12 @@ fu_release_load_artifact(FuRelease *self, XbNode *artifact, GError **error) /* filename */ filename = xb_node_query_text(artifact, "filename", NULL); + if (!g_str_has_suffix(filename, ".cab")) { + /* some firmware archives was signed with where the + * checksums were the *content* checksums, not the *container* checksum */ + g_debug("ignoring non-binary artifact entry: %s", filename); + return TRUE; + } if (filename != NULL) fwupd_release_set_filename(FWUPD_RELEASE(self), filename); @@ -742,7 +748,7 @@ fu_release_load(FuRelease *self, fwupd_release_add_flag(FWUPD_RELEASE(self), FWUPD_RELEASE_FLAG_IS_COMMUNITY); /* this is the more modern way to do this */ - artifact = xb_node_query_first(rel, "artifacts/artifact", NULL); + artifact = xb_node_query_first(rel, "artifacts/artifact[@type='binary']", NULL); if (artifact != NULL) { if (!fu_release_load_artifact(self, artifact, error)) return FALSE;