Browse Source

Merge branch 'main' into agent/sso-default-organization

pull/7422/head
Tom 1 day ago
committed by GitHub
parent
commit
6792aeec1c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      docker/Dockerfile.alpine
  2. 2
      docker/Dockerfile.j2
  3. 12
      src/db/models/cipher.rs

2
docker/Dockerfile.alpine

@ -66,7 +66,7 @@ RUN USER=root cargo new --bin /app
WORKDIR /app
# Environment variables for Cargo on Alpine based builds
RUN echo "export CARGO_TARGET=${RUST_MUSL_CROSS_TARGET}" >> /env-cargo && \
RUN echo "export CARGO_TARGET=${CARGO_BUILD_TARGET}" >> /env-cargo && \
# Output the current contents of the file
cat /env-cargo

2
docker/Dockerfile.j2

@ -106,7 +106,7 @@ WORKDIR /app
{% if base == "alpine" %}
# Environment variables for Cargo on Alpine based builds
RUN echo "export CARGO_TARGET=${RUST_MUSL_CROSS_TARGET}" >> /env-cargo && \
RUN echo "export CARGO_TARGET=${CARGO_BUILD_TARGET}" >> /env-cargo && \
# Output the current contents of the file
cat /env-cargo

12
src/db/models/cipher.rs

@ -306,16 +306,6 @@ impl Cipher {
type_data_json = Value::Null;
}
// Clone the type_data and add some default value.
let mut data_json = type_data_json.clone();
// NOTE: This was marked as *Backwards Compatibility Code*, but as of January 2021 this is still being used by upstream
// data_json should always contain the following keys with every atype
data_json["fields"] = json!(fields_json);
data_json["name"] = json!(self.name);
data_json["notes"] = json!(self.notes);
data_json["passwordHistory"] = Value::Array(password_history_json.clone());
let collection_ids = if let Some(cipher_sync_data) = cipher_sync_data {
if let Some(cipher_collections) = cipher_sync_data.cipher_collections.get(&self.uuid) {
Cow::from(cipher_collections)
@ -355,8 +345,6 @@ impl Cipher {
"notes": self.notes,
"fields": fields_json,
"data": data_json,
"passwordHistory": password_history_json,
// All Cipher types are included by default as null, but only the matching one will be populated

Loading…
Cancel
Save