commit b268c3dd1cfda78f113cc5c3bf06e08324590379
parent 4e64dbdde4b475fc0712a8d540e38c4108091029
Author: Daniel GarcĂa <dani-garcia@users.noreply.github.com>
Date: Tue, 6 Apr 2021 20:38:22 +0200
Update web vault and add unnoficialserver response
Diffstat:
9 files changed, 43 insertions(+), 40 deletions(-)
diff --git a/docker/Dockerfile.j2 b/docker/Dockerfile.j2
@@ -44,8 +44,8 @@
# https://docs.docker.com/develop/develop-images/multistage-build/
# https://whitfin.io/speeding-up-rust-docker-builds/
####################### VAULT BUILD IMAGE #######################
-{% set vault_version = "2.19.0" %}
-{% set vault_image_digest = "sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4" %}
+{% set vault_version = "2.19.0b" %}
+{% set vault_image_digest = "sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e" %}
# The web-vault digest specifies a particular web-vault build on Docker Hub.
# Using the digest instead of the tag name provides better security,
# as the digest of an image is immutable, whereas a tag name can later
diff --git a/docker/amd64/Dockerfile b/docker/amd64/Dockerfile
@@ -14,15 +14,15 @@
# - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
# click the tag name to view the digest of the image it currently points to.
# - From the command line:
-# $ docker pull bitwardenrs/web-vault:v2.19.0
-# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.19.0
-# [bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4]
+# $ docker pull bitwardenrs/web-vault:v2.19.0b
+# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.19.0b
+# [bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e]
#
# - Conversely, to get the tag name from the digest:
-# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4
-# [bitwardenrs/web-vault:v2.19.0]
+# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e
+# [bitwardenrs/web-vault:v2.19.0b]
#
-FROM bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4 as vault
+FROM bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e as vault
########################## BUILD IMAGE ##########################
FROM rust:1.50 as build
diff --git a/docker/amd64/Dockerfile.alpine b/docker/amd64/Dockerfile.alpine
@@ -14,15 +14,15 @@
# - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
# click the tag name to view the digest of the image it currently points to.
# - From the command line:
-# $ docker pull bitwardenrs/web-vault:v2.19.0
-# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.19.0
-# [bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4]
+# $ docker pull bitwardenrs/web-vault:v2.19.0b
+# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.19.0b
+# [bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e]
#
# - Conversely, to get the tag name from the digest:
-# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4
-# [bitwardenrs/web-vault:v2.19.0]
+# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e
+# [bitwardenrs/web-vault:v2.19.0b]
#
-FROM bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4 as vault
+FROM bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e as vault
########################## BUILD IMAGE ##########################
FROM clux/muslrust:nightly-2021-02-22 as build
diff --git a/docker/arm64/Dockerfile b/docker/arm64/Dockerfile
@@ -14,15 +14,15 @@
# - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
# click the tag name to view the digest of the image it currently points to.
# - From the command line:
-# $ docker pull bitwardenrs/web-vault:v2.19.0
-# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.19.0
-# [bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4]
+# $ docker pull bitwardenrs/web-vault:v2.19.0b
+# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.19.0b
+# [bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e]
#
# - Conversely, to get the tag name from the digest:
-# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4
-# [bitwardenrs/web-vault:v2.19.0]
+# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e
+# [bitwardenrs/web-vault:v2.19.0b]
#
-FROM bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4 as vault
+FROM bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e as vault
########################## BUILD IMAGE ##########################
FROM rust:1.50 as build
diff --git a/docker/armv6/Dockerfile b/docker/armv6/Dockerfile
@@ -14,15 +14,15 @@
# - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
# click the tag name to view the digest of the image it currently points to.
# - From the command line:
-# $ docker pull bitwardenrs/web-vault:v2.19.0
-# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.19.0
-# [bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4]
+# $ docker pull bitwardenrs/web-vault:v2.19.0b
+# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.19.0b
+# [bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e]
#
# - Conversely, to get the tag name from the digest:
-# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4
-# [bitwardenrs/web-vault:v2.19.0]
+# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e
+# [bitwardenrs/web-vault:v2.19.0b]
#
-FROM bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4 as vault
+FROM bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e as vault
########################## BUILD IMAGE ##########################
FROM rust:1.50 as build
diff --git a/docker/armv7/Dockerfile b/docker/armv7/Dockerfile
@@ -14,15 +14,15 @@
# - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
# click the tag name to view the digest of the image it currently points to.
# - From the command line:
-# $ docker pull bitwardenrs/web-vault:v2.19.0
-# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.19.0
-# [bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4]
+# $ docker pull bitwardenrs/web-vault:v2.19.0b
+# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.19.0b
+# [bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e]
#
# - Conversely, to get the tag name from the digest:
-# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4
-# [bitwardenrs/web-vault:v2.19.0]
+# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e
+# [bitwardenrs/web-vault:v2.19.0b]
#
-FROM bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4 as vault
+FROM bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e as vault
########################## BUILD IMAGE ##########################
FROM rust:1.50 as build
diff --git a/docker/armv7/Dockerfile.alpine b/docker/armv7/Dockerfile.alpine
@@ -14,15 +14,15 @@
# - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
# click the tag name to view the digest of the image it currently points to.
# - From the command line:
-# $ docker pull bitwardenrs/web-vault:v2.19.0
-# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.19.0
-# [bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4]
+# $ docker pull bitwardenrs/web-vault:v2.19.0b
+# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.19.0b
+# [bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e]
#
# - Conversely, to get the tag name from the digest:
-# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4
-# [bitwardenrs/web-vault:v2.19.0]
+# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e
+# [bitwardenrs/web-vault:v2.19.0b]
#
-FROM bitwardenrs/web-vault@sha256:8747cfaa2c6d87d1749e119dd884697e8099389aa9aca30a4d73d4ff796fe0e4 as vault
+FROM bitwardenrs/web-vault@sha256:27631b913f5858895a3e109c5e701341b9d01e69818f5283e72a49fa545eb40e as vault
########################## BUILD IMAGE ##########################
FROM messense/rust-musl-cross:armv7-musleabihf as build
diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs
@@ -133,6 +133,7 @@ fn sync(data: Form<SyncData>, headers: Headers, conn: DbConn) -> Json<Value> {
"Ciphers": ciphers_json,
"Domains": domains_json,
"Sends": sends_json,
+ "unofficialServer": true,
"Object": "sync"
}))
}
diff --git a/src/api/identity.rs b/src/api/identity.rs
@@ -72,7 +72,8 @@ fn _refresh_login(data: ConnectData, conn: DbConn) -> JsonResult {
"Kdf": user.client_kdf_type,
"KdfIterations": user.client_kdf_iter,
"ResetMasterPassword": false, // TODO: according to official server seems something like: user.password_hash.is_empty(), but would need testing
- "scope": "api offline_access"
+ "scope": "api offline_access",
+ "unofficialServer": true,
})))
}
@@ -172,7 +173,8 @@ fn _password_login(data: ConnectData, conn: DbConn, ip: &ClientIp) -> JsonResult
"Kdf": user.client_kdf_type,
"KdfIterations": user.client_kdf_iter,
"ResetMasterPassword": false,// TODO: Same as above
- "scope": "api offline_access"
+ "scope": "api offline_access",
+ "unofficialServer": true,
});
if let Some(token) = twofactor_token {