Skip to content

Commit

Permalink
fix(payment_methods): mask the email address being logged in the `pay…
Browse files Browse the repository at this point in the history
…ment_method_list` response logs (#4749)
  • Loading branch information
ShankarSinghC committed May 23, 2024
1 parent f04c6ac commit 23c7395
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/api_models/src/payment_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ pub struct RequiredFieldInfo {
#[schema(value_type = FieldType)]
pub field_type: api_enums::FieldType,

pub value: Option<String>,
#[schema(value_type = Option<String>)]
pub value: Option<masking::Secret<String>>,
}

#[derive(Debug, Clone, serde::Serialize, ToSchema)]
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/core/payment_methods/cards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2268,7 +2268,7 @@ pub async fn list_payment_methods(
.as_ref()
.and_then(|r| get_val(key.to_owned(), r));
if let Some(s) = temp {
val.value = Some(s)
val.value = Some(s.into())
};
}
}
Expand Down

0 comments on commit 23c7395

Please sign in to comment.