Skip to content

Commit

Permalink
Merge pull request #153 from ZeusWPI/dont-send-emailaddress
Browse files Browse the repository at this point in the history
Don't send email address in /current_user endpoint
  • Loading branch information
rien authored Oct 3, 2021
2 parents 9411677 + 181e12f commit e6f3d73
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/models/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ pub struct User {
#[validate(length(min = 3, max = 254))]
pub full_name: String,
#[validate(email)]
#[serde(skip)]
// Don't send backing email address of users, applications could
// accidentally use this
pub email: String,
#[serde(skip)]
pub pending_email: Option<String>,
Expand Down

0 comments on commit e6f3d73

Please sign in to comment.