From 6f71ab08f698adfdc55a81ace290c24d8196fe3a Mon Sep 17 00:00:00 2001 From: Karcsesz Date: Wed, 14 Feb 2024 22:28:17 +0100 Subject: [PATCH] Add percentage encoding and decoding to query handling --- Cargo.lock | 7 +++++++ Cargo.toml | 3 ++- src/editor/finger_remote.rs | 1 + src/server/mod.rs | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 37a082a..b6c9ea0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -371,6 +371,7 @@ dependencies = [ "tokio", "tracing", "tracing-subscriber", + "urlencoding", "which", ] @@ -1451,6 +1452,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "utf8parse" version = "0.2.1" diff --git a/Cargo.toml b/Cargo.toml index 6d91053..169a736 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,4 +24,5 @@ axum = { version = "0.7.4", optional = true } reqwest = { version = "0.11.24", optional = true, default-features = false, features = ["rustls-tls", "blocking", "json", "gzip", "brotli", "deflate"] } tempfile = { version = "3.10.0", optional = true } which = { version = "6.0.0", optional = true } -nix = { version = "0.27.1", optional = true, default-features = false, features = ["signal"] } \ No newline at end of file +nix = { version = "0.27.1", optional = true, default-features = false, features = ["signal"] } +urlencoding = { version = "2.1.3"} \ No newline at end of file diff --git a/src/editor/finger_remote.rs b/src/editor/finger_remote.rs index 0b0511e..fb9f244 100644 --- a/src/editor/finger_remote.rs +++ b/src/editor/finger_remote.rs @@ -52,6 +52,7 @@ pub fn finger_fedi(client: &Client, handle: &str) -> Result