Skip to content

Commit

Permalink
Eliminate false positives
Browse files Browse the repository at this point in the history
The regex matched a lot of false positives since the word boundary is not set correctly and the dot is not escaped. For example this one `/\bnus.edu.sg/` does not only match evil@nus.edu.sg but also 
good@nus.edu.sg.com
nus-edu@sg.com
nus@edu.sgood.com
nusmedursg@good.net

I rearranged the code and eliminated the regex in favor of a simple comparison.
  • Loading branch information
R-J committed Oct 1, 2015
1 parent 93aa607 commit dc0b49a
Showing 1 changed file with 3 additions and 3 deletions.

0 comments on commit dc0b49a

Please sign in to comment.