Summary
In backend/controllers/authController.js, the user creation block unconditionally sets isEmailVerified: true with an inline comment acknowledging this is a temporary workaround:
isEmailVerified: true, // skip email verification until SMTP is configured
This means:
- Anyone can register with any email address (including addresses they do not own).
- The email verification flow (
verifyEmail, resendVerificationEmail) is fully implemented but unreachable in practice.
- There is no mechanism to ensure a user owns the email they registered with.
Impact
- Account enumeration: an attacker can register with victim@company.com and use the account.
- Reputation: malicious users register with real-looking email addresses for social engineering.
- Data integrity: user profiles contain unverified email addresses used for contact and notifications.
Suggested Fix
Configure an SMTP provider (Resend, Postmark, or Nodemailer with a real account) and remove the hardcoded bypass:
// Remove this line:
isEmailVerified: true,
// Replace with:
isEmailVerified: false,
emailVerificationToken: crypto.randomBytes(32).toString('hex'),
emailVerificationExpires: new Date(Date.now() + 24 * 60 * 60 * 1000),
Then call sendVerificationEmail after user creation.
Summary
In
backend/controllers/authController.js, the user creation block unconditionally setsisEmailVerified: truewith an inline comment acknowledging this is a temporary workaround:This means:
verifyEmail,resendVerificationEmail) is fully implemented but unreachable in practice.Impact
Suggested Fix
Configure an SMTP provider (Resend, Postmark, or Nodemailer with a real account) and remove the hardcoded bypass:
Then call
sendVerificationEmailafter user creation.