Support Org Export for v2022.11 clients

Since v2022.9.x the org export uses a different endpoint.
But, since v2022.11.x this endpoint will return a different format.
See: https://github.com/bitwarden/clients/pull/3641 and https://github.com/bitwarden/server/pull/2316

To support both version in the case of users having an older client
either web-vault or cli this PR checks the version and responds using
the correct format. If no version can be determined it will use the new
format as a default.
This commit is contained in:
BlackDex
2022-11-07 17:13:34 +01:00
parent f60a6929a9
commit c9ec389b24
4 changed files with 61 additions and 21 deletions

7
Cargo.lock generated
View File

@@ -2466,6 +2466,12 @@ dependencies = [
"libc",
]
[[package]]
name = "semver"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4"
[[package]]
name = "serde"
version = "1.0.147"
@@ -3201,6 +3207,7 @@ dependencies = [
"ring",
"rmpv",
"rocket",
"semver",
"serde",
"serde_json",
"syslog",