Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 36 additions & 48 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ data-encoding = ">=2.0, <3"
ed25519-dalek = { version = ">=2.1.1, <=2.2.0" }
futures = ">=0.3.31, <0.4"
js-sys = { version = ">=0.3.72, <0.4" }
log = ">=0.4.18, <0.5"
proc-macro2 = ">=1.0.89, <2"
quote = ">=1.0.37, <2"
reqwest = { version = ">=0.12.5, <0.13", features = [
Expand Down
2 changes: 1 addition & 1 deletion bitwarden_license/bitwarden-sm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ bitwarden-api-api = { workspace = true }
bitwarden-core = { workspace = true, features = ["secrets"] }
bitwarden-crypto = { workspace = true }
chrono = { workspace = true }
log = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
uuid = { workspace = true }
validator = { workspace = true }

Expand Down
4 changes: 2 additions & 2 deletions bitwarden_license/bitwarden-sm/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use bitwarden_api_api::apis::Error as ApiApisError;
use log::debug;
use thiserror::Error;
use tracing::debug;
use validator::ValidationErrors;

#[derive(Debug, thiserror::Error)]
Expand Down Expand Up @@ -45,7 +45,7 @@ pub fn validate_only_whitespaces(value: &str) -> Result<(), validator::Validatio

impl From<ValidationErrors> for ValidationError {
fn from(e: ValidationErrors) -> Self {
debug!("Validation errors: {e:#?}");
debug!(?e, "Validation errors");
for (field_name, errors) in e.field_errors() {
for error in errors {
match error.code.as_ref() {
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ bitwarden-uuid = { workspace = true }
chrono = { workspace = true, features = ["std"] }
# We don't use this directly (it's used by rand), but we need it here to enable WASM support
getrandom = { version = ">=0.2.9, <0.3", features = ["js"] }
log = { workspace = true }
rand = ">=0.8.5, <0.9"
reqwest = { workspace = true }
schemars = { workspace = true }
Expand All @@ -59,6 +58,7 @@ serde_json = { workspace = true }
serde_qs = { workspace = true }
serde_repr = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
tsify = { workspace = true, optional = true }
uniffi = { workspace = true, optional = true, features = ["tokio"] }
uuid = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use log::debug;
use serde::{Deserialize, Serialize};
use tracing::debug;
use uuid::Uuid;

use crate::{
Expand All @@ -23,7 +23,7 @@ impl AccessTokenRequest {
client_secret: client_secret.to_string(),
grant_type: "client_credentials".to_string(),
};
debug!("initializing {obj:?}");
debug!(?obj, "initializing");
obj
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use log::debug;
use serde::{Deserialize, Serialize};
use tracing::debug;

use crate::{
auth::{api::response::IdentityTokenResponse, login::LoginError},
Expand Down Expand Up @@ -31,7 +31,7 @@ impl ApiTokenRequest {
device_name: "firefox".to_string(),
grant_type: "client_credentials".to_string(),
};
debug!("initializing {obj:?}");
debug!(?obj, "initializing");
obj
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use log::debug;
use serde::{Deserialize, Serialize};
use tracing::debug;
use uuid::Uuid;

use crate::{
Expand Down Expand Up @@ -47,7 +47,7 @@ impl AuthRequestTokenRequest {
auth_request_id: *auth_request_id,
access_code: access_code.to_string(),
};
debug!("initializing {obj:?}");
debug!(?obj, "initializing");
obj
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use log::debug;
use serde::{Deserialize, Serialize};
use tracing::debug;

use crate::{
DeviceType,
Expand Down Expand Up @@ -56,7 +56,7 @@ impl PasswordTokenRequest {
two_factor_provider: tf.map(|t| t.provider.clone()),
two_factor_remember: tf.map(|t| t.remember),
};
debug!("initializing {obj:?}");
debug!(?obj, "initializing");
obj
}

Expand Down
4 changes: 2 additions & 2 deletions crates/bitwarden-core/src/auth/login/password.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[cfg(feature = "internal")]
use log::info;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[cfg(feature = "internal")]
use tracing::info;

use crate::auth::{
api::response::IdentityTokenResponse, login::response::two_factor::TwoFactorProviders,
Expand Down
4 changes: 2 additions & 2 deletions crates/bitwarden-core/src/client/encryption_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use bitwarden_crypto::{
#[cfg(any(feature = "internal", feature = "secrets"))]
use bitwarden_crypto::{KeyStore, SymmetricCryptoKey};
use bitwarden_error::bitwarden_error;
#[cfg(feature = "internal")]
use log::warn;
use thiserror::Error;
#[cfg(feature = "internal")]
use tracing::warn;

#[cfg(any(feature = "secrets", feature = "internal"))]
use crate::OrganizationId;
Expand Down
4 changes: 2 additions & 2 deletions crates/bitwarden-core/src/client/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ impl InternalClient {

#[cfg(any(feature = "internal", feature = "secrets"))]
pub(crate) fn set_login_method(&self, login_method: LoginMethod) {
use log::debug;
use tracing::debug;

debug! {"setting login method: {login_method:#?}"}
debug!(?login_method, "setting login method.");
*self.login_method.write().expect("RwLock is not poisoned") = Some(Arc::new(login_method));
}

Expand Down
6 changes: 3 additions & 3 deletions crates/bitwarden-core/src/key_management/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,11 +672,11 @@ pub(super) fn verify_asymmetric_keys(
private_key_decryptable: true,
valid_private_key: true,
},
Err(e) => {
log::debug!("User asymmetric keys verification: {e}");
Err(error) => {
tracing::debug!(%error, "User asymmetric keys verification");

VerifyAsymmetricKeysResponse {
private_key_decryptable: !matches!(e, VerifyError::DecryptFailed(_)),
private_key_decryptable: !matches!(error, VerifyError::DecryptFailed(_)),
valid_private_key: false,
}
}
Expand Down
Loading
Loading