Skip to content

Commit c20357b

Browse files
committed
Fixed a place where email addresses not all lowercase could slip in, which can mess up reverse table relationships.
- Legacy-Id: 12088
1 parent 851b9b3 commit c20357b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ietf/community/forms.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ def __init__(self, user, clist, *args, **kwargs):
105105
if self.fields["email"].queryset:
106106
self.fields["email"].initial = self.fields["email"].queryset[0]
107107

108+
def clean_email(self):
109+
return self.cleaned_data["email"].strip().lower()
110+
108111
def clean(self):
109112
if EmailSubscription.objects.filter(community_list=self.clist, email=self.cleaned_data["email"], notify_on=self.cleaned_data["notify_on"]).exists():
110113
raise forms.ValidationError("You already have a subscription like this.")

0 commit comments

Comments
 (0)