Django

Code

Ticket #1139 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

Bug in email.txt documentation example code

Reported by: Simon Willison Assigned to: adrian
Milestone: Component: Core framework
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

The header injection example code in http://code.djangoproject.com/browser/django/trunk/docs/email.txt only checxs for '\n' in the headers, but Django itself checks for '\r' instead. Suggestion: instead of throwing a ValueError? in the SafeMIMEText class throw a "BadHeaderError?" (or similarly named) that is a subclass of ValueError?. The example code can then try to send the email and show an error if it catches that exception.

Attachments

Change History

12/29/05 16:12:54 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

(In [1798]) Fixed #1139 -- Changed django.core.mail to raise BadHeaderError? (a subclass of ValueError?) and changed docs/email.txt example to use that


Add/Change #1139 (Bug in email.txt documentation example code)




Change Properties
Action