From 29c4100006e43658a627389bc158279140a0c837 Mon Sep 17 00:00:00 2001
From: BlackDex
Date: Sat, 19 Mar 2022 11:29:49 +0100
Subject: [PATCH 1/2] Added v2.27.0 support
---
Dockerfile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 9a7b6c5..ebe3e48 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -23,8 +23,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.26.1
-ARG VAULT_VERSION=aa42890fdfbfe603efd6d410d2cbd109f2033db9
+# Using https://github.com/bitwarden/web/releases/tag/v2.27.0
+ARG VAULT_VERSION=05a17629a52ea188a146fbb6b2b82595e5eb73b5
RUN git clone https://github.com/bitwarden/web.git /vault
WORKDIR /vault
@@ -39,7 +39,7 @@ RUN bash /apply_patches.sh
# Build
RUN npm ci
-# RUN npm audit fix || true
+RUN npm audit fix || true
RUN npm run dist:oss:selfhost
RUN printf '{"version":"%s"}' \
From 6c988cdf11c42ebafe013620b80fac9dcc1980c7 Mon Sep 17 00:00:00 2001
From: Samuel Cormier-Iijima
Date: Sat, 26 Mar 2022 01:00:09 -0400
Subject: [PATCH 2/2] Add patch for v2.27.0
---
patches/v2.27.0.patch | 271 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 271 insertions(+)
create mode 100644 patches/v2.27.0.patch
diff --git a/patches/v2.27.0.patch b/patches/v2.27.0.patch
new file mode 100644
index 0000000..b491948
--- /dev/null
+++ b/patches/v2.27.0.patch
@@ -0,0 +1,271 @@
+Submodule jslib contains modified content
+diff --git a/jslib/angular/src/components/register.component.ts b/jslib/angular/src/components/register.component.ts
+index f66800c9..d7866fc0 100644
+--- a/jslib/angular/src/components/register.component.ts
++++ b/jslib/angular/src/components/register.component.ts
+@@ -28,7 +28,7 @@ export class RegisterComponent extends CaptchaProtectedComponent implements OnIn
+ formPromise: Promise;
+ masterPasswordScore: number;
+ referenceData: ReferenceEventRequest;
+- showTerms = true;
++ showTerms = false;
+ acceptPolicies = false;
+
+ protected successRoute = "login";
+@@ -47,7 +47,7 @@ export class RegisterComponent extends CaptchaProtectedComponent implements OnIn
+ protected logService: LogService
+ ) {
+ super(environmentService, i18nService, platformUtilsService);
+- this.showTerms = !platformUtilsService.isSelfHost();
++ this.showTerms = false;
+ }
+
+ async ngOnInit() {
+@@ -85,6 +85,15 @@ export class RegisterComponent extends CaptchaProtectedComponent implements OnIn
+ }
+
+ 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",
+diff --git a/src/404.html b/src/404.html
+index 6cf5e363..54d11495 100644
+--- a/src/404.html
++++ b/src/404.html
+@@ -42,11 +42,10 @@
+
+
+
+- You can return to the web vault, check our
+- status page or
+- contact us.
++ You can return to the web vault, or
++ contact us.
+
+
+-
++
+