From b19553a16fe8d4ba75fffaaeca008ceb09632e13 Mon Sep 17 00:00:00 2001
From: Jeremy Lin
Date: Wed, 12 May 2021 14:09:41 -0700
Subject: [PATCH] Preliminary changes for v2.20.1
This patch is missing changes to `src/app/settings/two-factor-u2f.component.ts`,
which doesn't exist anymore since upstream moved from U2F to its successor,
WebAuthn, which Vaultwarden doesn't have backend support for yet.
---
patches/v2.20.1.patch | 276 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 276 insertions(+)
create mode 100644 patches/v2.20.1.patch
diff --git a/patches/v2.20.1.patch b/patches/v2.20.1.patch
new file mode 100644
index 0000000..b0afa0a
--- /dev/null
+++ b/patches/v2.20.1.patch
@@ -0,0 +1,276 @@
+Submodule jslib contains modified content
+diff --git a/jslib/src/angular/components/register.component.ts b/jslib/src/angular/components/register.component.ts
+index ae45add..e6a5590 100644
+--- a/jslib/src/angular/components/register.component.ts
++++ b/jslib/src/angular/components/register.component.ts
+@@ -69,6 +69,12 @@ export class RegisterComponent {
+ }
+
+ async submit() {
++ if (typeof crypto.subtle === 'undefined') {
++ this.platformUtilsService.showToast('error', "This browser requires HTTPS to use the web vault",
++ "Check the Vaultwarden wiki for details on how to enable it");
++ return;
++ }
++
+ if (!this.acceptPolicies && this.showTerms) {
+ this.platformUtilsService.showToast('error', this.i18nService.t('errorOccurred'),
+ this.i18nService.t('acceptPoliciesError'));
+diff --git a/package-lock.json b/package-lock.json
+index eca77e9e..3b2531d4 100644
+--- a/package-lock.json
++++ b/package-lock.json
+@@ -7836,7 +7836,7 @@
+ },
+ "next-tick": {
+ "version": "1.0.0",
+- "resolved": "http://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
++ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
+ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
+ "dev": true
+ },
+@@ -8331,7 +8331,7 @@
+ },
+ "os-locale": {
+ "version": "1.4.0",
+- "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
++ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
+ "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
+ "dev": true,
+ "requires": {
+diff --git a/src/404.html b/src/404.html
+index eba36375..cb8883ec 100644
+--- a/src/404.html
++++ b/src/404.html
+@@ -41,10 +41,10 @@
+
+
+ You can return to the web vault, check our status page
+- or contact us.
++ or contact us.
+
+
+