[gnome-software] Never allow wildcard apps to be added to the global cache
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Never allow wildcard apps to be added to the global cache
- Date: Thu, 22 Feb 2018 13:07:03 +0000 (UTC)
commit 5eaf89f18432973b464d6d8f8034a85ce9a56696
Author: Richard Hughes <richard hughsie com>
Date: Thu Feb 22 12:37:48 2018 +0000
Never allow wildcard apps to be added to the global cache
All kinds of stuff goes wrong in horrible ways if you try to do this.
lib/gs-plugin.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index 6bf9402e..298bdc04 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -1594,6 +1594,11 @@ gs_plugin_cache_add (GsPlugin *plugin, const gchar *key, GsApp *app)
g_critical ("key %s is not a unique_id", key);
return;
}
+ if (gs_app_has_quirk (app, AS_APP_QUIRK_MATCH_ANY_PREFIX)) {
+ g_critical ("not adding wildcard to the global cache: %s",
+ gs_app_get_unique_id (app));
+ return;
+ }
gs_app_list_add (priv->global_cache, app);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]