feat: force consistent casing for emails...

This commit is contained in:
zkldi
2024-06-03 15:14:24 +01:00
parent fdded806c0
commit bd7e30ff8f
@@ -199,6 +199,9 @@ router.post(
captcha: string;
};
// force lowercase for emails to avoid case-confusion in lookups...
body.email = body.email.toLowerCase();
if (body.inviteCode === undefined && ServerConfig.INVITE_CODE_CONFIG) {
return res.status(400).json({
success: false,
@@ -469,6 +472,8 @@ router.post(
email: string;
};
body.email = body.email.toLowerCase();
logger.debug(`received password reset request for ${body.email}.`);
// For timing attack and infosec reasons, we can't do anything but **immediately** return here.