[gnome-software/gnome-3-22] Check the version in flatpakrepo files
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-22] Check the version in flatpakrepo files
- Date: Mon, 16 Jan 2017 14:34:25 +0000 (UTC)
commit bdf54070c5d8208e09487934535c8cb5ca444de5
Author: Richard Hughes <richard hughsie com>
Date: Tue Dec 13 13:41:20 2016 +0000
Check the version in flatpakrepo files
src/plugins/gs-flatpak.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index 28b5d25..0522c3a 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -2247,6 +2247,18 @@ gs_flatpak_file_to_app_repo (GsFlatpak *self,
return FALSE;
}
+ /* check version */
+ if (g_key_file_has_key (kf, "Flatpak Repo", "Version", NULL)) {
+ guint64 ver = g_key_file_get_uint64 (kf, "Flatpak Repo", "Version", NULL);
+ if (ver != 1) {
+ g_set_error (error,
+ GS_PLUGIN_ERROR,
+ GS_PLUGIN_ERROR_NOT_SUPPORTED,
+ "unsupported version %" G_GUINT64_FORMAT, ver);
+ return FALSE;
+ }
+ }
+
/* user specified a URL */
if (g_str_has_prefix (repo_gpgkey, "http://") ||
g_str_has_prefix (repo_gpgkey, "https://")) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]