# HG changeset patch # User Marcin Lulek # Date 2017-11-20 16:49:02 # Node ID 2808e7be75480c31e0c37fafb6edcfb30f33f9d9 # Parent ef27e94abc9a1387cc7a139300927c10fde4a9c0 email: add whitespace stripping during registration of users on email addresses. diff --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py --- a/rhodecode/model/forms.py +++ b/rhodecode/model/forms.py @@ -228,7 +228,10 @@ def RegisterForm(localizer, edit=False, active = v.StringBoolean(if_missing=False) firstname = v.UnicodeString(strip=True, min=1, not_empty=False) lastname = v.UnicodeString(strip=True, min=1, not_empty=False) - email = All(v.Email(not_empty=True), v.UniqSystemEmail(localizer, old_data)) + email = All( + v.Email(not_empty=True), + v.UniqSystemEmail(localizer, old_data), + v.UnicodeString(strip=True, min=3)) chained_validators = [v.ValidPasswordsMatch(localizer)] return _RegisterForm