From 2dde6052c15f858fa70df1690b9216a2d7a34e4c Mon Sep 17 00:00:00 2001 From: Christian Schilling Date: Mon, 5 Aug 2024 16:11:15 +0200 Subject: [PATCH] Decode percent encoding in url (#1347) Some filters take quoted string arguements. As it is not possible to use quotes in an URL directly it is necessary to percent encode them. Change: percent-decode --- josh-proxy/src/bin/josh-proxy.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/josh-proxy/src/bin/josh-proxy.rs b/josh-proxy/src/bin/josh-proxy.rs index 15d10ef2..2a9532c8 100644 --- a/josh-proxy/src/bin/josh-proxy.rs +++ b/josh-proxy/src/bin/josh-proxy.rs @@ -1185,7 +1185,9 @@ async fn call_service( while path.contains("//") { path = path.replace("//", "/"); } - path + percent_encoding::percent_decode_str(&path) + .decode_utf8_lossy() + .to_string() }; if let Some(resource_path) = path.strip_prefix("/~/ui") {