From a622b4d2fb3134f94f156c09365d3cd243d6b4f0 Mon Sep 17 00:00:00 2001 From: Kaito Udagawa Date: Thu, 8 Jul 2021 00:58:58 +0900 Subject: [PATCH 1/3] Add Edge's frame-ancestors Edge's frame-ancestors are required for Edge extension to do WebAuthn. --- src/util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.rs b/src/util.rs index 8512bc7b..14e8c52e 100644 --- a/src/util.rs +++ b/src/util.rs @@ -29,7 +29,7 @@ impl Fairing for AppHeaders { res.set_raw_header("X-Content-Type-Options", "nosniff"); res.set_raw_header("X-XSS-Protection", "1; mode=block"); let csp = format!( - "frame-ancestors 'self' chrome-extension://nngceckbapebfimnlniiiahkandclblb moz-extension://* {};", + "frame-ancestors 'self' chrome-extension://nngceckbapebfimnlniiiahkandclblb chrome-extension://jbkfoedolllekgbhcbcoahefnbanhhlh moz-extension://* {};", CONFIG.allowed_iframe_ancestors() ); res.set_raw_header("Content-Security-Policy", csp); From 13598c098f5c941c8dd4d0452ea67750d6a5020a Mon Sep 17 00:00:00 2001 From: Kaito Udagawa Date: Thu, 8 Jul 2021 02:51:11 +0900 Subject: [PATCH 2/3] Add links to browser extensions --- src/util.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util.rs b/src/util.rs index 14e8c52e..ffe77e99 100644 --- a/src/util.rs +++ b/src/util.rs @@ -29,6 +29,9 @@ impl Fairing for AppHeaders { res.set_raw_header("X-Content-Type-Options", "nosniff"); res.set_raw_header("X-XSS-Protection", "1; mode=block"); let csp = format!( + // Chrome Web Store: https://chrome.google.com/webstore/detail/bitwarden-free-password-m/nngceckbapebfimnlniiiahkandclblb + // Edge Add-ons: https://microsoftedge.microsoft.com/addons/detail/bitwarden-free-password/jbkfoedolllekgbhcbcoahefnbanhhlh?hl=en-US + // Firefox Browser Add-ons: https://addons.mozilla.org/ja/firefox/addon/bitwarden-password-manager/ "frame-ancestors 'self' chrome-extension://nngceckbapebfimnlniiiahkandclblb chrome-extension://jbkfoedolllekgbhcbcoahefnbanhhlh moz-extension://* {};", CONFIG.allowed_iframe_ancestors() ); From c640abbcd71bfb9758cfe1be597a63323f6afef0 Mon Sep 17 00:00:00 2001 From: Kaito Udagawa Date: Thu, 8 Jul 2021 02:55:58 +0900 Subject: [PATCH 3/3] Update src/util.rs Co-authored-by: William Desportes --- src/util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.rs b/src/util.rs index ffe77e99..a397ed6d 100644 --- a/src/util.rs +++ b/src/util.rs @@ -31,7 +31,7 @@ impl Fairing for AppHeaders { let csp = format!( // Chrome Web Store: https://chrome.google.com/webstore/detail/bitwarden-free-password-m/nngceckbapebfimnlniiiahkandclblb // Edge Add-ons: https://microsoftedge.microsoft.com/addons/detail/bitwarden-free-password/jbkfoedolllekgbhcbcoahefnbanhhlh?hl=en-US - // Firefox Browser Add-ons: https://addons.mozilla.org/ja/firefox/addon/bitwarden-password-manager/ + // Firefox Browser Add-ons: https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager/ "frame-ancestors 'self' chrome-extension://nngceckbapebfimnlniiiahkandclblb chrome-extension://jbkfoedolllekgbhcbcoahefnbanhhlh moz-extension://* {};", CONFIG.allowed_iframe_ancestors() );