From d220aa2f754eed4e6a006a4acaa68b31892dea2b Mon Sep 17 00:00:00 2001 From: Shaun McCance Date: Wed, 6 May 2026 12:29:29 -0400 Subject: [PATCH] Don't allow ghelp:/proc URIs When there is something you can exploit, this kind of URI is a way to trick people into running a malicious document. I doubt there are any legitimate use cases. This change mitigates risk. --- libyelp/yelp-uri.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libyelp/yelp-uri.c b/libyelp/yelp-uri.c index 1fe5cd1b..bd29213d 100644 --- a/libyelp/yelp-uri.c +++ b/libyelp/yelp-uri.c @@ -788,7 +788,10 @@ resolve_ghelp_uri (YelpUri *uri) gchar *path; path = g_build_filename ("/", slash, NULL); - if (g_file_test (path, G_FILE_TEST_EXISTS)) { + if (g_str_has_prefix (path, "/proc")) { + priv->tmptype = YELP_URI_DOCUMENT_TYPE_ERROR; + } + else if (g_file_test (path, G_FILE_TEST_EXISTS)) { priv->gfile = g_file_new_for_path (path); resolve_gfile (uri, query, hash); } else { -- GitLab