Skip to content

Commit

Permalink
fix: add parens, add phone as sensitive field
Browse files Browse the repository at this point in the history
  • Loading branch information
J0 committed Sep 11, 2024
1 parent 7e897c6 commit fb5b009
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (a *API) UserUpdate(w http.ResponseWriter, r *http.Request) error {
}

if user.HasMFAEnabled() && !session.IsAAL2() {
if (params.Password != nil && *params.Password != "") || params.Email != "" && user.GetEmail() != params.Email {
if (params.Password != nil && *params.Password != "") || (params.Email != "" && user.GetEmail() != params.Email) || (params.Phone != "" && user.GetPhone() != params.Phone) {
return httpError(http.StatusUnauthorized, ErrorCodeInsufficientAAL, "AAL2 session is required to update email or password when MFA is enabled.")
}
}
Expand Down

0 comments on commit fb5b009

Please sign in to comment.