From 3fd065757f02ebf1d055912e6809fac15c8bf058 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Mon, 25 Jan 2021 22:38:06 +0100 Subject: reintroduce CsrfToken type Raw HTML is potentially dangerous so it's better to provide an encapsulating type instead of relying on naked strings. bump version to 0.3.3 --- examples/csrf/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/csrf') diff --git a/examples/csrf/src/main.rs b/examples/csrf/src/main.rs index 94fd09c..1048689 100644 --- a/examples/csrf/src/main.rs +++ b/examples/csrf/src/main.rs @@ -34,7 +34,7 @@ async fn route(req: &mut Parts, body: Body) -> Result { fn get_form(req: &mut Parts) -> Response { let mut response = Builder::new(); - let csrf_input = req.csrf_html_input(&mut response); + let csrf_input = req.csrf_token(&mut response).html_input(); response.content_type(mime::TEXT_HTML).body( format!("
{}
", csrf_input).into() -- cgit v1.2.3