Skip to content

Commit

Permalink
Decode percent encoding in url (#1347)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
christian-schilling authored Aug 5, 2024
1 parent 953c432 commit 2dde605
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion josh-proxy/src/bin/josh-proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 2dde605

Please sign in to comment.