Email interface can create bug titles containing newlines
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Medium
|
Stuart Bishop |
Bug Description
The subject line of bug 31589 is set to the following:
"Attempting to set redirection_url to a tuple instead of a string\n in login machinery"
(where "\n" is a newline).
When I tried to add a comment to the bug without updating the subject line, the form machinary reports a "Constraint not satisfied" error for the subject line field. The newline must be removed from the subject line before the comment can be added.
My guess is that Stuart's orginal email had the subject line wrapped as follows, in keeping with RFC2822 header folding rules:
Subject: Attempting to set redirection_url to a tuple instead of a string
in login machinery
The incoming email code then uses this wrapped version of the subject line as the bug title, which is where the problem starts.
The "Summary" header should be unfolded before being used as a bug title or message subject. The unfolding algorithm in RFC2822 is found in section 2.2.3:
The process of moving from this folded multiple-line representation
of a header field to its single line representation is called
"unfolding". Unfolding is accomplished by simply removing any CRLF
that is immediately followed by WSP. Each header field should be
treated in its unfolded form for further syntactic and semantic
evaluation.
Changed in malone: | |
status: | Unconfirmed → Confirmed |
Changed in malone: | |
assignee: | nobody → bjornt |
Changed in malone: | |
status: | In Progress → Fix Committed |
Once this bug is fixed in code, I will need to update the production data so please assign it to me at this point rather than closing the bug.