diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 0001-Set-Vault-BaseURL.patch | 43 | ||||
-rw-r--r-- | PKGBUILD | 4 |
3 files changed, 41 insertions, 10 deletions
@@ -1,6 +1,6 @@ pkgbase = bitwarden_rs-vault-git pkgdesc = Integrates the Vault Web-Interface into bitwarden_rs. - pkgver = v2.13.1.r0.geaa6bc12 + pkgver = v2.13.2.r2.gfb6e85c5 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 = cd4764f1b5ff6dc2a139da3c806d9c51c4c813acedd07afdcb19f483d8363db5f24c843c85525df4b95886e3c7b16432a26463157e53d316ae4633afe863cf7f + sha512sums = 642aec31a9d9c702b100cecca89f2e815fc8265fc61d9c8b096922c7c6cd9fec2bed353e191e985b154dd2c8576c2be22efeda69f3aac6aaea1560e50fa95ae4 sha512sums = 0b93ea1a442f15ac2445bc0cb759887b0826215edbc73dabb150de8ac136c8712c18b798ff397a06d50989332562a36382b5b7d962e60c2f2619d0f46cf9b04d pkgname = bitwarden_rs-vault-git diff --git a/0001-Set-Vault-BaseURL.patch b/0001-Set-Vault-BaseURL.patch index e2e2f7ad5a71..bf6092c27f7c 100644 --- a/0001-Set-Vault-BaseURL.patch +++ b/0001-Set-Vault-BaseURL.patch @@ -1,7 +1,22 @@ -index a92bf70c..cf5a4cb4 100644 +index 2c694d95..bba34865 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)) { ++ 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"; ++ } + this.showToast(message); + break; + case 'analyticsEventTrack': +diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts +index c74261dd..f61ccefe 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts -@@ -123,20 +123,16 @@ const environmentService = new EnvironmentService(apiService, storageService, no +@@ -127,22 +127,31 @@ const environmentService = new EnvironmentService(apiService, storageService, no const auditService = new AuditService(cryptoFunctionService, apiService); const eventLoggingService = new EventLoggingService(storageService, apiService, userService, cipherService); @@ -11,6 +26,19 @@ index a92bf70c..cf5a4cb4 100644 containerService.attachToWindow(window); export function initFactory(): Function { ++ function getBaseUrl() { ++ // If the base URL is `https://bitwarden.example.com/base/path/`, ++ // `window.location.href` should have one of the following forms: ++ // ++ // - `https://bitwarden.example.com/base/path/` ++ // - `https://bitwarden.example.com/base/path/#/some/endpoint[?queryParam=...]` ++ // ++ // We want to get to just `https://bitwarden.example.com/base/path`. ++ let baseUrl = window.location.href; ++ baseUrl = baseUrl.replace(/#.*/, ''); // Strip off `#` and everything after. ++ baseUrl = baseUrl.replace(/\/+$/, ''); // Trim any trailing `/` chars. ++ return baseUrl; ++ } return async () => { await (storageService as HtmlStorageService).init(); - const isDev = platformUtilsService.isDev(); @@ -21,11 +49,14 @@ index a92bf70c..cf5a4cb4 100644 - 'https://notifications.bitwarden.com'; // window.location.origin + '/notifications'; - } + const isDev = false; -+ environmentService.baseUrl = window.location.origin; -+ environmentService.notificationsUrl = window.location.origin + '/notifications'; ++ environmentService.baseUrl = getBaseUrl(); ++ environmentService.notificationsUrl = environmentService.baseUrl + '/notifications'; apiService.setUrls({ - base: isDev ? null : window.location.origin, +- base: isDev ? null : window.location.origin, ++ base: isDev ? null : environmentService.baseUrl, api: isDev ? 'http://localhost:4000' : null, + identity: isDev ? 'http://localhost:33656' : null, + events: isDev ? 'http://localhost:46273' : null, index 5560c476..a9b954a8 100644 --- a/src/app/settings/two-factor-u2f.component.ts +++ b/src/app/settings/two-factor-u2f.component.ts @@ -37,7 +68,7 @@ index 5560c476..a9b954a8 100644 }], [], (data: any) => { this.ngZone.run(() => { this.u2fListening = false; -index 2e1dbec9..2d9b635f 100644 +index 80951953..5c784175 100644 --- a/src/scss/styles.scss +++ b/src/scss/styles.scss @@ -1,5 +1,31 @@ @@ -1,7 +1,7 @@ # Maintainer: Markus Richter <mqus at disroot dot org> pkgname=bitwarden_rs-vault-git -pkgver=v2.13.1.r0.geaa6bc12 +pkgver=v2.13.2.r2.gfb6e85c5 pkgrel=1 pkgdesc="Integrates the Vault Web-Interface into bitwarden_rs." arch=('any') @@ -19,7 +19,7 @@ source=("git+https://github.com/bitwarden/web.git" "0001-Set-Vault-BaseURL.patch" "${pkgname%-git}.install") sha512sums=('SKIP' - 'cd4764f1b5ff6dc2a139da3c806d9c51c4c813acedd07afdcb19f483d8363db5f24c843c85525df4b95886e3c7b16432a26463157e53d316ae4633afe863cf7f' + '642aec31a9d9c702b100cecca89f2e815fc8265fc61d9c8b096922c7c6cd9fec2bed353e191e985b154dd2c8576c2be22efeda69f3aac6aaea1560e50fa95ae4' '0b93ea1a442f15ac2445bc0cb759887b0826215edbc73dabb150de8ac136c8712c18b798ff397a06d50989332562a36382b5b7d962e60c2f2619d0f46cf9b04d') pkgver() { |