Skip to content

Conversation

@code0emperor
Copy link
Contributor

@code0emperor code0emperor commented Aug 9, 2024

an email of the type "example*@gmail.com was accepted due to an errant if statement in isEmail.js file which was only checking for the first double quote (user[0] === '"'). Fixed it by adding a secondary "and" condition along with it, to ensure the local part is completely enclosed in the double quotes (&& user[user.length - 1] === '"').

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)
  • References provided in PR (where applicable)

@rubiin
Copy link
Member

rubiin commented Aug 10, 2024

could you also add tests for this specific scenario

@code0emperor
Copy link
Contributor Author

In which file should I add them? I wasn't sure of that

@code0emperor
Copy link
Contributor Author

added few tests for this issue in validators.test.js

Copy link
Member

@rubiin rubiin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the tests seems to be failing do fix

@code0emperor
Copy link
Contributor Author

yep, am on it rn

@codecov
Copy link

codecov bot commented Aug 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (f81d857) to head (1250755).
Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##            master    #2437      +/-   ##
===========================================
- Coverage   100.00%   99.96%   -0.04%     
===========================================
  Files          110      111       +1     
  Lines         2510     2517       +7     
  Branches       633      634       +1     
===========================================
+ Hits          2510     2516       +6     
- Partials         0        1       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@code0emperor
Copy link
Contributor Author

code0emperor commented Aug 10, 2024

Done, i put the test in the wrong area, please check now

@profnandaa
Copy link
Member

Thanks for your contrib! 🎉

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.

3 participants