Skip to content

Commit

Permalink
fix(AbstractUserController): Prevent some OtpUser fields from being w…
Browse files Browse the repository at this point in the history
…ritten from web request.
  • Loading branch information
binh-dam-ibigroup committed Nov 20, 2023
1 parent 54ccad7 commit f8cdc36
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,14 @@ U preUpdateHook(U user, U preExistingUser, Request req) {
}

// Include select attributes from existingOtpUser marked @JsonIgnore and
// that are not set in otpUser.
// that are not set in otpUser, and other attributes that should not be modifiable
// using web requests.
otpUser.smsConsentDate = existingOtpUser.smsConsentDate;
otpUser.email = existingOtpUser.email;
otpUser.auth0UserId = existingOtpUser.auth0UserId;
otpUser.isDataToolsUser = existingOtpUser.isDataToolsUser;
otpUser.pushDevices = existingOtpUser.pushDevices;

}
return user;
}
Expand Down

0 comments on commit f8cdc36

Please sign in to comment.