From 84451500ec844a474c8c87dfc0c5a6b91a618b9c Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Thu, 20 Jun 2019 18:15:16 +0200 Subject: [PATCH] hkp: more informative /pks/add response --- dist/templates/about/usage.html.hbs | 2 +- src/web/hkp.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/templates/about/usage.html.hbs b/dist/templates/about/usage.html.hbs index c433046..e44b97f 100644 --- a/dist/templates/about/usage.html.hbs +++ b/dist/templates/about/usage.html.hbs @@ -53,7 +53,7 @@ -

Uploading your key

+

Uploading your key

Keys can be uploaded with GnuPG's --send-keys command, but identity information can't be verified that way to make the key diff --git a/src/web/hkp.rs b/src/web/hkp.rs index 3cadf27..6d3307c 100644 --- a/src/web/hkp.rs +++ b/src/web/hkp.rs @@ -128,13 +128,17 @@ pub fn pks_add_form_data( #[post("/pks/add", format = "application/x-www-form-urlencoded", data = "")] pub fn pks_add_form( + state: rocket::State, db: rocket::State, tokens_stateless: rocket::State, rate_limiter: rocket::State, data: Data, ) -> MyResponse { match vks_web::upload_post_form(db, tokens_stateless, rate_limiter, data) { - Ok(_) => MyResponse::plain("Ok".into()), + Ok(_) => { + let msg = format!("Upload successful. Note that identity information will only be published with verification! see {}/about/usage#gnupg-upload", state.base_uri); + MyResponse::plain(msg) + } Err(err) => MyResponse::ise(err), } }