vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit edc482c8ea36fdefa2913cfd54eb52af5045eb24
parent 6e5c03cc784b866f0b2481d91d49b36071576cb8
Author: BlackDex <black.dex@gmail.com>
Date:   Tue,  8 Oct 2019 22:29:12 +0200

Changed HIBP Error message.

- Moved the manual link to the check to the top.
- Clearified that hibp is a payed service.
- Changed error logo to hibp logo.

Diffstat:
Msrc/api/core/mod.rs | 8++++----
Msrc/api/web.rs | 1+
Asrc/static/images/hibp.png | 0
3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs @@ -160,15 +160,15 @@ fn hibp_breach(username: String) -> JsonResult { } else { Ok(Json(json!([{ "Name": "HaveIBeenPwned", - "Title": "--- Error! ---", + "Title": "Manual HIBP Check", "Domain": "haveibeenpwned.com", "BreachDate": "2019-08-18T00:00:00Z", "AddedDate": "2019-08-18T00:00:00Z", - "Description": format!("HaveIBeenPwned API key not set!<br/>Go to <a href=\"https://haveibeenpwned.com/API/Key\" target=\"_blank\" rel=\"noopener\">https://haveibeenpwned.com/API/Key</a><br/><br/>Or go to: <a href=\"https://haveibeenpwned.com/account/{account}\" target=\"_blank\" rel=\"noopener\">https://haveibeenpwned.com/account/{account}</a> for a manual check.", account=username), - "LogoPath": "/bwrs_static/error-x.svg", + "Description": format!("Go to: <a href=\"https://haveibeenpwned.com/account/{account}\" target=\"_blank\" rel=\"noopener\">https://haveibeenpwned.com/account/{account}</a> for a manual check.<br/><br/>HaveIBeenPwned API key not set!<br/>Go to <a href=\"https://haveibeenpwned.com/API/Key\" target=\"_blank\" rel=\"noopener\">https://haveibeenpwned.com/API/Key</a> to purchase an API key from HaveIBeenPwned.<br/><br/>", account=username), + "LogoPath": "/bwrs_static/hibp.png", "PwnCount": 0, "DataClasses": [ - "Error - No API key" + "Error - No API key set!" ] }]))) } diff --git a/src/api/web.rs b/src/api/web.rs @@ -69,6 +69,7 @@ fn static_files(filename: String) -> Result<Content<&'static [u8]>, Error> { "mail-github.png" => Ok(Content(ContentType::PNG, include_bytes!("../static/images/mail-github.png"))), "logo-gray.png" => Ok(Content(ContentType::PNG, include_bytes!("../static/images/logo-gray.png"))), "error-x.svg" => Ok(Content(ContentType::SVG, include_bytes!("../static/images/error-x.svg"))), + "hibp.png" => Ok(Content(ContentType::PNG, include_bytes!("../static/images/hibp.png"))), "bootstrap.css" => Ok(Content(ContentType::CSS, include_bytes!("../static/scripts/bootstrap.css"))), "bootstrap-native-v4.js" => Ok(Content(ContentType::JavaScript, include_bytes!("../static/scripts/bootstrap-native-v4.js"))), diff --git a/src/static/images/hibp.png b/src/static/images/hibp.png Binary files differ.