diff options
author | Markus Richter | 2021-03-24 21:07:12 +0100 |
---|---|---|
committer | Markus Richter | 2021-03-24 21:07:12 +0100 |
commit | c3f8f80d4178a4dec0a76c3fd3ebc94b1745daa7 (patch) | |
tree | 0ab89f2fc4ead6ce8b146bdb2b44e84e6b8db077 | |
parent | a407b551190afea47513117b5902ba857e67ef1d (diff) | |
download | aur-bitwarden_rs-vault-git.tar.gz |
Update patch, remove u2f portion
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 0001-Set-Vault-BaseURL.patch | 54 | ||||
-rw-r--r-- | PKGBUILD | 5 |
3 files changed, 30 insertions, 33 deletions
@@ -1,6 +1,6 @@ pkgbase = bitwarden_rs-vault-git pkgdesc = Integrates the Vault Web-Interface into bitwarden_rs. - pkgver = v2.18.0.r28.gd2f1e39a + pkgver = v2.18.0.r65.g1b74d22b pkgrel = 1 url = https://github.com/bitwarden/web install = bitwarden_rs-vault.install @@ -18,7 +18,7 @@ pkgbase = bitwarden_rs-vault-git source = 0001-Set-Vault-BaseURL.patch source = bitwarden_rs-vault.install sha512sums = SKIP - sha512sums = 23ce8c903fb6ccb8c56dec0daf8763560ad013c5ee57a5c64ca6db2f15bd52d4e3ce2166de62c3e0ea65bcde46ec2cb6bf7013f1b2c4d0f7b7c8c4c3bbdd9fb8 + sha512sums = 801651b6f1208da5f88a55c44ede614b99898e53801f681a28183c193f15c2039d4ffca5e2baa22af0399319fe6f0ef0ec37801f7c87462614ad2ae80dcbd595 sha512sums = 0b93ea1a442f15ac2445bc0cb759887b0826215edbc73dabb150de8ac136c8712c18b798ff397a06d50989332562a36382b5b7d962e60c2f2619d0f46cf9b04d pkgname = bitwarden_rs-vault-git diff --git a/0001-Set-Vault-BaseURL.patch b/0001-Set-Vault-BaseURL.patch index 41a0302c5e06..59d70296532f 100644 --- a/0001-Set-Vault-BaseURL.patch +++ b/0001-Set-Vault-BaseURL.patch @@ -1,12 +1,30 @@ +Submodule jslib contains modified content +diff --git a/jslib/src/angular/components/register.component.ts b/jslib/src/angular/components/register.component.ts +index 6149f83..005d528 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 bitwarden_rs 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/app/app.component.ts b/src/app/app.component.ts -index 51853633..c9b3d48a 100644 +index 9c5b6b5d..287338d2 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -140,6 +140,10 @@ export class AppComponent implements OnDestroy, OnInit { } break; case 'showToast': -+ if (typeof message.text === "string" && (message.text.indexOf("this.subtle") != -1 || message.text.indexOf("importKey") != -1)) { ++ if (typeof message.text === "string" && typeof crypto.subtle === 'undefined') { + message.title="This browser requires HTTPS to use the web vault"; + message.text="Check the bitwarden_rs wiki for details on how to enable it"; + } @@ -14,10 +32,10 @@ index 51853633..c9b3d48a 100644 break; case 'analyticsEventTrack': diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts -index 3e4d8dfa..f5bf60e4 100644 +index e5c48fe9..17ee65c9 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts -@@ -135,25 +135,32 @@ const environmentService = new EnvironmentService(apiService, storageService, no +@@ -136,25 +136,33 @@ const environmentService = new EnvironmentService(apiService, storageService, no const auditService = new AuditService(cryptoFunctionService, apiService); const eventLoggingService = new EventLoggingService(storageService, apiService, userService, cipherService); @@ -54,6 +72,7 @@ index 3e4d8dfa..f5bf60e4 100644 - } + const isDev = false; + environmentService.baseUrl = getBaseUrl(); ++ environmentService.webVaultUrl = environmentService.baseUrl; + environmentService.notificationsUrl = environmentService.baseUrl + '/notifications'; + environmentService.enterpriseUrl = environmentService.baseUrl + '/portal'; apiService.setUrls({ @@ -62,20 +81,8 @@ index 3e4d8dfa..f5bf60e4 100644 api: isDev ? 'http://localhost:4000' : null, identity: isDev ? 'http://localhost:33656' : null, events: isDev ? 'http://localhost:46273' : null, -diff --git a/src/app/settings/two-factor-u2f.component.ts b/src/app/settings/two-factor-u2f.component.ts -index 5560c476..a9b954a8 100644 ---- a/src/app/settings/two-factor-u2f.component.ts -+++ b/src/app/settings/two-factor-u2f.component.ts -@@ -128,6 +128,7 @@ export class TwoFactorU2fComponent extends TwoFactorBaseComponent implements OnI - (window as any).u2f.register(u2fChallenge.appId, [{ - version: u2fChallenge.version, - challenge: u2fChallenge.challenge, -+ attestation: 'direct', - }], [], (data: any) => { - this.ngZone.run(() => { - this.u2fListening = false; diff --git a/src/scss/styles.scss b/src/scss/styles.scss -index 55b3c92c..c48e2baf 100644 +index be32ef9e..1cbb8682 100644 --- a/src/scss/styles.scss +++ b/src/scss/styles.scss @@ -1,5 +1,56 @@ @@ -135,15 +142,4 @@ index 55b3c92c..c48e2baf 100644 $primary: #175DDC; $primary-accent: #1252A3; $secondary: #ced4da; -diff --git a/webpack.config.js b/webpack.config.js -index b6da3558..eef05772 100644 ---- a/webpack.config.js -+++ b/webpack.config.js -@@ -178,6 +178,7 @@ const config = { - }, - minimizer: [ - new TerserPlugin({ -+ sourceMap: true, - terserOptions: { - safari10: true, - }, + @@ -1,7 +1,7 @@ # Maintainer: Markus Richter <mqus at disroot dot org> pkgname=bitwarden_rs-vault-git -pkgver=v2.18.0.r28.gd2f1e39a +pkgver=v2.18.0.r65.g1b74d22b pkgrel=1 pkgdesc="Integrates the Vault Web-Interface into bitwarden_rs." arch=('any') @@ -18,7 +18,7 @@ source=("git+https://github.com/bitwarden/web.git" "0001-Set-Vault-BaseURL.patch" "${pkgname%-git}.install") sha512sums=('SKIP' - '23ce8c903fb6ccb8c56dec0daf8763560ad013c5ee57a5c64ca6db2f15bd52d4e3ce2166de62c3e0ea65bcde46ec2cb6bf7013f1b2c4d0f7b7c8c4c3bbdd9fb8' + '801651b6f1208da5f88a55c44ede614b99898e53801f681a28183c193f15c2039d4ffca5e2baa22af0399319fe6f0ef0ec37801f7c87462614ad2ae80dcbd595' '0b93ea1a442f15ac2445bc0cb759887b0826215edbc73dabb150de8ac136c8712c18b798ff397a06d50989332562a36382b5b7d962e60c2f2619d0f46cf9b04d') pkgver() { @@ -32,6 +32,7 @@ pkgver() { prepare() { # patch paths cd "$srcdir/web" + git submodule update --init --recursive patch -N -p1 -i "$srcdir/0001-Set-Vault-BaseURL.patch" } |