fix: #11554, email requirement bypass by sending in whitespace

This commit is contained in:
Julian Lam
2023-05-02 11:47:54 -04:00
parent b3787bd50c
commit 2b8dd3d202

View File

@@ -46,6 +46,10 @@ Interstitials.email = async (data) => {
issuePasswordChallenge: !!data.userData.uid && hasPassword,
},
callback: async (userData, formData) => {
if (formData.email) {
formData.email = String(formData.email).trim();
}
// Validate and send email confirmation
if (userData.uid) {
const isSelf = parseInt(userData.uid, 10) === parseInt(data.req.uid, 10);