From 2ee0d53c5fc6bd6d2d146be761c496fc07547e32 Mon Sep 17 00:00:00 2001 From: GeekCorner <45696571+GeekCornerGH@users.noreply.github.com> Date: Tue, 10 Jan 2023 09:41:35 +0100 Subject: [PATCH 1/3] fix (2fa.directory): Allow api.2fa.directory, and remove 2fa.directory --- src/util.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.rs b/src/util.rs index 3297fad5..fe99e2d3 100644 --- a/src/util.rs +++ b/src/util.rs @@ -50,7 +50,7 @@ impl Fairing for AppHeaders { // Have I Been Pwned and Gravator to allow those calls to work. // # Connect src: // Leaked Passwords check: api.pwnedpasswords.com - // 2FA/MFA Site check: 2fa.directory + // 2FA/MFA Site check: api.2fa.directory // # Mail Relay: https://bitwarden.com/blog/add-privacy-and-security-using-email-aliases-with-bitwarden/ // app.simplelogin.io, app.anonaddy.com, api.fastmail.com, quack.duckduckgo.com let csp = format!( @@ -73,7 +73,7 @@ impl Fairing for AppHeaders { {icon_service_csp}; \ connect-src 'self' \ https://api.pwnedpasswords.com \ - https://2fa.directory \ + https://api.2fa.directory \ https://app.simplelogin.io/api/ \ https://app.anonaddy.com/api/ \ https://api.fastmail.com/ \ From 3e5369c8dd74a62af519ff07104cfdca1869ce63 Mon Sep 17 00:00:00 2001 From: Rychart Redwerkz Date: Tue, 10 Jan 2023 00:24:37 +0100 Subject: [PATCH 2/3] Use more modern meta tag for charset encoding --- src/static/templates/admin/base.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/templates/admin/base.hbs b/src/static/templates/admin/base.hbs index e296b114..2fe1ee54 100644 --- a/src/static/templates/admin/base.hbs +++ b/src/static/templates/admin/base.hbs @@ -1,7 +1,7 @@ - + From 606a1bbfcb9355dd4018a14b8a9867af9716c951 Mon Sep 17 00:00:00 2001 From: BlackDex Date: Mon, 9 Jan 2023 20:32:56 +0100 Subject: [PATCH 3/3] Fix remaning inline format --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index fa8bea66..f8990dc0 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1222,7 +1222,7 @@ fn to_json<'reg, 'rc>( ) -> HelperResult { let param = h.param(0).ok_or_else(|| RenderError::new("Expected 1 parameter for \"to_json\""))?.value(); let json = serde_json::to_string(param) - .map_err(|e| RenderError::new(format!("Can't serialize parameter to JSON: {}", e)))?; + .map_err(|e| RenderError::new(format!("Can't serialize parameter to JSON: {e}")))?; out.write(&json)?; Ok(()) }