From c6602d0669f323e02414a7753c46b946f4270a15 Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 20 May 2024 07:10:16 +0200 Subject: [PATCH] fix(uriproxy): oops reverted fix again replacing '+' --- uriproxy/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uriproxy/src/lib.rs b/uriproxy/src/lib.rs index 2feb6ba..7d1959c 100644 --- a/uriproxy/src/lib.rs +++ b/uriproxy/src/lib.rs @@ -22,7 +22,7 @@ impl AsRef for UriClass { /// unpack uri in id if valid, otherwise compose full uri with "{base}/{entity}/{id}" pub fn uri(base: &str, entity: UriClass, id: &str) -> String { if id.starts_with('+') { // ready-to-use base64-encoded id - if let Ok(bytes) = base64::prelude::BASE64_URL_SAFE.decode(id) { + if let Ok(bytes) = base64::prelude::BASE64_URL_SAFE.decode(id.replacen('+', "", 1)) { if let Ok(uri) = std::str::from_utf8(&bytes) { return uri.to_string(); }