From f300b463bad2a75e7f1a7bf12decf1313b3ef461 Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Thu, 5 May 2022 12:13:42 +0200 Subject: [PATCH] Unescape prefix to fix handling of encoded HTTP URIs --- gvfs.spec | 3 ++ ...efix-to-fix-handling-of-encoded-URIs.patch | 32 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 http-Unescape-prefix-to-fix-handling-of-encoded-URIs.patch diff --git a/gvfs.spec b/gvfs.spec index 28d82d6..056784c 100644 --- a/gvfs.spec +++ b/gvfs.spec @@ -32,6 +32,8 @@ Source0: https://download.gnome.org/sources/gvfs/1.50/gvfs-%{version}.tar.xz # https://bugzilla.redhat.com/show_bug.cgi?id=2068976 Patch0: smb-Rework-anonymous-handling-to-avoid-EINVAL.patch +Patch1: http-Unescape-prefix-to-fix-handling-of-encoded-URIs.patch + BuildRequires: meson BuildRequires: gcc BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} @@ -426,6 +428,7 @@ killall -USR1 gvfsd >&/dev/null || : %changelog * Thu May 05 2022 Ondrej Holy - 1.50.1-2 - Rework anonymous handling of SMB backend to avoid EINVAL (#2068976) +- Unescape prefix to fix handling of encoded HTTP URIs * Tue Apr 26 2022 Ondrej Holy - 1.50.1-1 - Update to 1.50.1 (#2078857) diff --git a/http-Unescape-prefix-to-fix-handling-of-encoded-URIs.patch b/http-Unescape-prefix-to-fix-handling-of-encoded-URIs.patch new file mode 100644 index 0000000..de200c2 --- /dev/null +++ b/http-Unescape-prefix-to-fix-handling-of-encoded-URIs.patch @@ -0,0 +1,32 @@ +From 0d1da12484861a103baba97587cb9d8f7ac952ae Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Mon, 2 May 2022 11:04:36 +0200 +Subject: [PATCH] http: Unescape prefix to fix handling of encoded URIs + +Currently, the HTTP backend fails with the "The specified location is +not mounted" error for URIs with path containing escaped characters. +This is because the mount prefix is not unescaped. This is unfortunatelly +another libsoup3 port regression. Let's correctly unescape the prefix to +make that work again. + +Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/623 +--- + daemon/gvfsbackendhttp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/daemon/gvfsbackendhttp.c b/daemon/gvfsbackendhttp.c +index 0f01d213..e8e44004 100644 +--- a/daemon/gvfsbackendhttp.c ++++ b/daemon/gvfsbackendhttp.c +@@ -307,7 +307,7 @@ try_mount (GVfsBackend *backend, + real_mount_spec = g_mount_spec_new ("http"); + g_mount_spec_set (real_mount_spec, "uri", uri_str); + +- path = g_uri_get_path (uri); ++ path = g_uri_unescape_string (g_uri_get_path (uri), "/"); + if (path[0]) + { + g_free (real_mount_spec->mount_prefix); +-- +2.36.0 +