summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2018-12-12 15:45:39 +0000
committerRichard Hughes <richard@hughsie.com>2018-12-12 15:45:39 +0000
commit0879263333b74b5738128ee115d93a5128c4b7ed (patch)
treec5f4db6b958b99fd57f0edf086020348fb709002
parentc2ea2b38da6fd4f2dbfb1a26980edd3e3faf5876 (diff)
downloadappstream-glib-0879263333b74b5738128ee115d93a5128c4b7ed.tar.gz
trivial: Do not let libsoup explode in a ball of flames for file:// mirror URLs
-rw-r--r--client/as-util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/as-util.c b/client/as-util.c
index ae9a402..52916ee 100644
--- a/client/as-util.c
+++ b/client/as-util.c
@@ -3340,6 +3340,13 @@ as_util_mirror_screenshots_app_url (AsUtilPrivate *priv,
} else if (priv->nonet) {
as_util_app_log (app, "Missing %s:%s", url, cache_filename);
} else {
+ if (g_str_has_prefix (url, "file:")) {
+ g_set_error (error,
+ AS_ERROR,
+ AS_ERROR_FAILED,
+ "file:// URLs like %s are not suported", url);
+ return FALSE;
+ }
uri = soup_uri_new (url);
if (uri == NULL) {
g_set_error (error,