diff --git a/Dockerfile b/Dockerfile index 00fb1df..40e687b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,8 +25,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.21.1 -ARG VAULT_VERSION=62cd45030ad5b0a0bdbd08f0579f8ffac91a48a4 +# Using https://github.com/bitwarden/web/releases/tag/v2.22.2 +ARG VAULT_VERSION=2fe196df5e8b8b7494218ae0fd08d4db79eceb05 RUN git clone https://github.com/bitwarden/web.git /vault WORKDIR /vault diff --git a/patches/v2.22.2.patch b/patches/v2.22.2.patch new file mode 100644 index 0000000..ebca5ad --- /dev/null +++ b/patches/v2.22.2.patch @@ -0,0 +1,329 @@ +Submodule jslib contains modified content +diff --git a/jslib/angular/src/components/register.component.ts b/jslib/angular/src/components/register.component.ts +index aecf9ce..7dec3e7 100644 +--- a/jslib/angular/src/components/register.component.ts ++++ b/jslib/angular/src/components/register.component.ts +@@ -29,7 +29,7 @@ export class RegisterComponent extends CaptchaProtectedComponent implements OnIn + formPromise: Promise; + masterPasswordScore: number; + referenceData: ReferenceEventRequest; +- showTerms = true; ++ showTerms = false; + acceptPolicies: boolean = false; + + protected successRoute = 'login'; +@@ -41,7 +41,7 @@ export class RegisterComponent extends CaptchaProtectedComponent implements OnIn + platformUtilsService: PlatformUtilsService, + protected passwordGenerationService: PasswordGenerationService, environmentService: EnvironmentService) { + super(environmentService, i18nService, platformUtilsService); +- this.showTerms = !platformUtilsService.isSelfHost(); ++ this.showTerms = false; + } + + async ngOnInit() { +@@ -79,6 +79,12 @@ 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', 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.

+ + + + +diff --git a/src/app/app.component.ts b/src/app/app.component.ts +index 2922cf09..8f2be1ad 100644 +--- a/src/app/app.component.ts ++++ b/src/app/app.component.ts +@@ -146,6 +146,10 @@ export class AppComponent implements OnDestroy, OnInit { + } + break; + case 'showToast': ++ if (typeof message.text === "string" && typeof crypto.subtle === 'undefined') { ++ message.title="This browser requires HTTPS to use the web vault"; ++ message.text="Check the Vaultwarden wiki for details on how to enable it"; ++ } + this.showToast(message); + break; + case 'setFullWidth': +diff --git a/src/app/layouts/footer.component.html b/src/app/layouts/footer.component.html +index b001b9e3..c1bd2ac8 100644 +--- a/src/app/layouts/footer.component.html ++++ b/src/app/layouts/footer.component.html +@@ -1,7 +1,7 @@ +