Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NJWE-2584: implemented backend validation for valid email and domain #3172

Merged
merged 24 commits into from
Feb 11, 2025

Conversation

denish-fearless
Copy link
Collaborator

@denish-fearless denish-fearless commented Jan 15, 2025

NJWE-2584

TEST THIS ADDING MAILCHIMP KEYS TO YOUR BACKEND ENV
#MAILCHIMP
MAILCHIMP_API_KEY
MAILCHIMP_LIST_ID

This PR includes the full working for the signup form
https://fearless.jira.com/browse/NJWE-2654

backend/src/helpers/emailValidator.ts Fixed Show fixed Hide fixed
backend/src/helpers/emailValidator.ts Fixed Show fixed Hide fixed
backend/src/helpers/emailValidator.ts Fixed Show fixed Hide fixed
backend/src/helpers/emailValidator.ts Fixed Show fixed Hide fixed
@ChelseaKR
Copy link
Collaborator

Hey @denish-fearless,

CodeQL flagged a potential tainted format string issue in emailValidator.ts. The concern is that domain and rootDomain—which originate from user input—are being directly embedded in template literals inside console.error and console.log. This can introduce unintended format specifiers if the input contains special characters.

Suggested Fix:

Instead of using template literals, pass variables as separate arguments:

console.error("DNS error while resolving MX for domain:", domain, "-", err.message);
console.log("Valid MX records found for", domain, ":", addresses);

This ensures safe logging without unexpected behavior. Let me know if you have any questions! 🚀

@denish-fearless denish-fearless merged commit db54057 into main Feb 11, 2025
5 checks passed
@denish-fearless denish-fearless deleted the NJWE-2584 branch February 11, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants