Wrong email ids passing validation during mass subscription
Bug #1441314 reported by
Pavan Koli
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Postorius |
Fix Committed
|
Undecided
|
Pavan Koli |
Bug Description
While using the mass subscription option to subscribe many email ids, email ids such as @gmail.com are passing through. The line responsible for validation of email ids(http://
One way to fix this would be to make the following change
if len(parts) != 2 or '.' not in parts[1] or len(parts[0])==0:
I've attached a patch, it takes help of django for email validation(I think this would be better than the earlier suggested way to validate email ids).
Related branches
lp:~bhavesh-goyal093/postorius/fixed-invalid-email-acceptance
- Terri: Approve
-
Diff: 49 lines (+13/-14)1 file modifiedsrc/postorius/views/list.py (+13/-14)
Changed in postorius: | |
status: | New → In Progress |
Changed in postorius: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
While the patch would successfully reject addresses like @gmail.com but other invalid addresses such as '..@gmail.com' , '...<email address hidden>' would still get accepted. To Ensure a perfectly valid address get accepted everytime, some regex matching needs to be done based on the format standards (like RFC - 5322) or better using Django validators which can save the cost of making a regular expression for an absolutely valid email