mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-29 08:00:43 -04:00
fix(api-server): check type of email to prevent throw (#50259)
This commit is contained in:
@@ -220,7 +220,7 @@ function mobileLogin(app) {
|
||||
|
||||
const { email } = await auth0Res.json();
|
||||
|
||||
if (!isEmail(email)) {
|
||||
if (typeof email !== 'string' || !isEmail(email)) {
|
||||
return next(
|
||||
wrapHandledError(new TypeError('decoded email is invalid'), {
|
||||
type: 'danger',
|
||||
|
||||
Reference in New Issue
Block a user