From fcde19e3fb1e7b10d4af5742bebb8109c7d911c4 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 13 Mar 2022 00:43:35 +0100 Subject: uri: Remove access() check Otherwise it was returning `NULL` and sending out the path of non-readable files over HTTP (unencrypted) could be unintended. Better to fail in a local path than be sorry. --- uri.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'uri.c') diff --git a/uri.c b/uri.c index 6d3755a..c026c28 100644 --- a/uri.c +++ b/uri.c @@ -26,11 +26,7 @@ badwolf_ensure_uri_scheme(const gchar *text, gboolean try_file) if(path != NULL) { - /* flawfinder: ignore. only used as presence check, no way to pass file descriptor */ - if(access(path, R_OK) == 0) - { - f = g_strdup_printf("file://%s", path); - } + f = g_strdup_printf("file://%s", path); free(path); -- cgit v1.3.1-23-gd82d