From c502ae73f6a8aad7f27ae86a5f7e123608a08a45 Mon Sep 17 00:00:00 2001 From: fdb-hiroshima <35889323+fdb-hiroshima@users.noreply.github.com> Date: Sat, 5 Jan 2019 19:36:55 +0100 Subject: [PATCH] Encode redirect messages into valid url data (#409) Ref #408 --- plume-common/src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plume-common/src/utils.rs b/plume-common/src/utils.rs index 98514f9f..409b9d07 100644 --- a/plume-common/src/utils.rs +++ b/plume-common/src/utils.rs @@ -29,7 +29,7 @@ pub fn make_actor_id(name: &str) -> String { * Note that the message should be translated before passed to this function. */ pub fn requires_login>>(message: &str, url: T) -> Flash { - Flash::new(Redirect::to(format!("/login?m={}", message)), "callback", url.into().to_string()) + Flash::new(Redirect::to(format!("/login?m={}", Uri::percent_encode(message))), "callback", url.into().to_string()) } #[derive(Debug)]