diff --git a/Cargo.lock b/Cargo.lock index 8b21dce35..a34496113 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3104,7 +3104,6 @@ dependencies = [ "tokio", "tracing", "url", - "urlencoding", ] [[package]] diff --git a/crates/routes/Cargo.toml b/crates/routes/Cargo.toml index a614ba42d..6d74f0aae 100644 --- a/crates/routes/Cargo.toml +++ b/crates/routes/Cargo.toml @@ -32,5 +32,4 @@ serde = { workspace = true } url = { workspace = true } tracing = { workspace = true } tokio = { workspace = true } -urlencoding = { workspace = true } rss = "2.0.8" diff --git a/crates/routes/src/images.rs b/crates/routes/src/images.rs index 10ffb57de..307d0ab9f 100644 --- a/crates/routes/src/images.rs +++ b/crates/routes/src/images.rs @@ -22,7 +22,6 @@ use reqwest_middleware::{ClientWithMiddleware, RequestBuilder}; use serde::Deserialize; use std::time::Duration; use url::Url; -use urlencoding::decode; pub fn config( cfg: &mut web::ServiceConfig, @@ -255,7 +254,7 @@ pub async fn image_proxy( client: web::Data, context: web::Data, ) -> LemmyResult { - let url = Url::parse(&decode(¶ms.url)?)?; + let url = Url::parse(¶ms.url)?; // Check that url corresponds to a federated image so that this can't be abused as a proxy // for arbitrary purposes.