Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.7.4
-
Security Level: Public
-
CBG Sprint 67
-
2
Description
The regexp we use for validating emails is too strict, and won't allow emails with apostrophes in them, along with many other valid but esoteric email addresses.
Fully validating emails with regular expressions is notoriously difficult. Often it's best to use a basic and permissive validation method (e.g "^[^@]+@[^@]+$" - allow anything with one and only one @ symbol in the middle), and actually try sending an email to validate - but given that Sync Gateway does not actually use emails as email addresses, rather just a secondary username, it seems more than adequate to be permissive.