From 3665a5177d20bca20bb8ee005a2049c2ab097ba0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Garc=C3=ADa?=
Date: Mon, 24 May 2021 00:04:02 +0200
Subject: [PATCH] v2.20.3
---
Dockerfile | 4 +-
patches/v2.20.3.patch | 253 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 255 insertions(+), 2 deletions(-)
create mode 100644 patches/v2.20.3.patch
diff --git a/Dockerfile b/Dockerfile
index 0fd5c64..666bcd8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -22,8 +22,8 @@ USER node
# Can be a tag, release, but prefer a commit hash because it's not changeable
# https://github.com/bitwarden/web/commit/$VAULT_VERSION
#
-# Using https://github.com/bitwarden/web/releases/tag/v2.20.1
-ARG VAULT_VERSION=165944624a5edb1b1d1b4047ccdeb04c2d07c7d6
+# Using https://github.com/bitwarden/web/releases/tag/v2.20.3
+ARG VAULT_VERSION=d566c963c15b968940aad46fe6f6c3816f331ed7
RUN git clone https://github.com/bitwarden/web.git /vault
WORKDIR /vault
diff --git a/patches/v2.20.3.patch b/patches/v2.20.3.patch
new file mode 100644
index 0000000..39aa19c
--- /dev/null
+++ b/patches/v2.20.3.patch
@@ -0,0 +1,253 @@
+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/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.
+
+
+