I have some very basic code in our contact form:
if request.method == 'POST':
form = ContactForm(request.POST)
if form.is_valid():
cd = form.cleaned_data
# send the email to the MANAGERS
send_mail(
'CourtListener message from "%s": %s' % (cd['name'], cd['subject']),
cd['message'],
cd.get('email', 'noreply@example.com'),
manager_email_addresses, )
# we must redirect after success to avoid problems with people using the refresh button.
return HttpResponseRedirect('/contact/thanks/')
A second ago, two users sent us messages around the same time and somehow their data got transposed. In an email we got the message from one user, but the subject line from the other. Looking at the code, I can't imagine how that could have happened, unless it was upstream from Django, but in my experience, bugs are never upstream, so I'm skeptical of this theory.
Anybody have any theories on this?
Our stack is: