Closed Bug 365713 Opened 18 years ago Closed 15 years ago

BMO's review emails now appear to be double spaced

Categories

(Bugzilla :: Email Notifications, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 486206

People

(Reporter: nelson, Unassigned)

References

Details

Attachments

(11 files, 1 obsolete file)

When a review of a patch is requested, or granted, or denied, bugzilla 
sends out an email to the reviewer (or to the person who requested the 
review) whose subject starts with "review requested:" or "review granted".

bugzilla also sends a similar email to people on the CC list, but that
email does not have the "review requested" or "review granted" prefix on
the subject line.

The email with the "review requested:" or "review granted:" subject prefix
has the body double spaced.  That is, as displayed, there is a blank line 
between every pair of non-blank lines in that email message body. 

The email sent to the CC list does not have this double spacing.

This behavior began with the December 26 upgrade.

Examining the body of one of these emails shows that the message is 
sent in quoted-printable encoding and every line ends with =0D .
It's those =0D line endings that cause the double spacing.
Is this still an issue, Nelson?
No, I last observed the problem in an email dated 02-02.
The next such review email I received, dated 02-08, did not exhibit the 
problem and I have not seen it since.
So I guess this was fixed.  Anybody know what fixed it?
This problem is back with a vengeance.
Two more double-spaced emails received just minutes ago.
This is continuing to occur.  More such emails received just today.
I can confirm this with my own review mail.  The top portion of the message has unix line endings, the comment section has windows line endings.  Thunderbird ignores it, but obviously whatever email client Nelson is using doesn't.

The also only seems to affect messages that are quoted-printable encoded.  Text/plain messages have the proper line endings all the way through.
Assignee: justdave → email-notifications
Component: Bugzilla: Other b.m.o Issues → Email Notifications
Product: mozilla.org → Bugzilla
QA Contact: reed → default-qa
Target Milestone: --- → Bugzilla 3.0
Version: other → 3.0
I'm using a mozilla mail client.
Unix line endings in emails are always wrong.  
RFC 822 demands that all lines end in CR LF, that is \r\n.

But this bug is not about those lines.  
It is about the lines with the quoted-printable line endings 
as seen in the attached message.
Still happening
Hey rjbs--is encoding_set doing something wrong here, or are we doing something wrong with encoding_set?
There are a few things worth saying, here:

First, you guys should consider using Mail::Box.  It's not quite as simple to use as Email::MIME, but it is *far* more thorough about making sure that your messages are correctly constructed.  Email::MIME is much better for quickly slapping together something simple.

Secondly, this line is weird:

  $part->encoding_set('quoted-printable') if !is_7bit_clean($part->body);

I'm not sure where $msg comes from, or what was in it, but ->body returns the the *decoded* body, so it might be so 7-bit-unclean as to suggest base64 encoding rather than QP.  Of course, I don't have enough context (and haven't dug much for more).  If this message was created with something sane, elsewhere, you should not have to set the encoding.

Finally, you should try these tests with the *very* latest Email::Simple and Email::MIME::* modules.  Be sure you have the *very* latest ones, not the latest ones to hit your local mirror.  That is:

 Email::Simple 2.002
 Email::MIME   1.860
 EM::Creator   1.454
 EM::Modifier  1.442

These versions have corrected quite a few linebreak bugs.  They're also quite fresh out of the gate, and there have been a few little quirks, so please test them LOCALLY before deploying to The Big Install. ;)  I think they're safe, at this point, though.
Hey Ricardo. Thanks for your comment. :-)

I can look into Mail::Box. I really like the API of the Email:: modules, though, which is why I'm using them. Also, I wanted to get away from the fact that MailTools doesn't throw understandable error messages when it fails. (Maybe Mail::Box is better about that?)

$msg comes from the templates. Which means that parts of it come from the user. For example, it could contain one of these bug comments.

Perhaps we should be using body_raw? I seem to recall some reason I didn't do that, but I forget now.
The interface provided by Mail::Message (part of the Mail-Box distribution) is not all that different from Email::Simple, although it provides a *larger* interface.  I should hide you from worrying at all about manually figuring out encodings.

It seems like you should be accepting parts of the message, putting them together into pieces, and then be using Email::MIME::Creator if that's what you want to do.  You're only going to cause yourself serious problems by screwing with encoding and MIME headers after the fact.
(In reply to comment #15)
> It seems like you should be accepting parts of the message, putting them
> together into pieces, and then be using Email::MIME::Creator if that's what you
> want to do.  You're only going to cause yourself serious problems by screwing
> with encoding and MIME headers after the fact.

  This particular message has only one part.

  There's only one message that has two parts (the Whine mail), and we haven't had any particular bugs reported with that one.
Attached file More example
still going.  Call this the "Energizer bug".
I want bugzilla to stop sending me any more of these
ridiculous emails until this is fixed.  
There doesn't seem to be an option to get it to stop 
sending review notifications.
Flags: blocking3.1.1?
Flags: blocking3.0.1?
OS: Windows XP → All
Hardware: PC → All
(In reply to comment #18)
> There doesn't seem to be an option to get it to stop 
> sending review notifications.

https://bugzilla.mozilla.org/userprefs.cgi?tab=email -- see the two options under "Global options:".
Please ignore this patch.  I am testing review emails.
This comment has an email address <nobody@nowhere.net>
Attachment #275259 - Flags: review?(nelson)
Comment on attachment 275259 [details] [diff] [review]
dummy patch for testing the problem

This comment has a quoted line
>+            if (info) PORT_Free(info);
>+            if (info) PORT_Free(info);
Attachment #275259 - Flags: review?(nelson) → review-
Comment on attachment 275259 [details] [diff] [review]
dummy patch for testing the problem

More test
> quoted line without any special characters
> quoted line without any special characters
> quoted line without any special characters
Attachment #275259 - Flags: review- → review?(nelson)
Comment on attachment 275259 [details] [diff] [review]
dummy patch for testing the problem

Binary search for characters that trigger double-spacing:
> (parenthenses)
> (parenthenses)
> (parenthenses)
Attachment #275259 - Flags: review?(nelson) → review-
Comment on attachment 275259 [details] [diff] [review]
dummy patch for testing the problem

Binary search continues.  Wasn't parentheses.  
There were only 5 special characters in the last message 
that was double-spaced, and I've eliminated 3 (>).
Plus and semicolon remain.  Try plus (and period).
> +
> +
> +
Attachment #275259 - Flags: review- → review?
Comment on attachment 275259 [details] [diff] [review]
dummy patch for testing the problem

Binary search continues.  Wasn't parentheses.  
There were only 5 special characters in the last message 
that was double-spaced, and I've eliminated 3 (>).
Plus and semicolon remain.  Try plus (and period).
> > +
> > +
> > +
Attachment #275259 - Flags: review? → review?(nelson)
Comment on attachment 275259 [details] [diff] [review]
dummy patch for testing the problem

OK, just semi-colon left, I think.  (Also testing comma)
> ;
> ;
> ;
Attachment #275259 - Flags: review?(nelson) → review-
Comment on attachment 275259 [details] [diff] [review]
dummy patch for testing the problem

Oops, I missed underscore.  
The last review request or denial message that was 
double spaced was the denial in comment 21.
All my attempts to reproduce the double spacing 
using a subset of the characters in that denial 
have failed to be double spaced.  But I see now
that I overlooked the underscore, so here goes.
>  bla_bla
>  bla_bla
>  bla_bla
Attachment #275259 - Flags: review- → review?(nelson)
Comment on attachment 275259 [details] [diff] [review]
dummy patch for testing the problem

Something about comment 21 triggered double spacing.
None of my attempts to trigger double-spacing using a 
subset of those characters has triggered double spacing.
I don't know what was special about comment 21.
Attachment #275259 - Flags: review?(nelson) → review-
3.0.1 is *in QA*. Of course this isn't a blocker now. :-) 3.1.1 is also in the release process.

Also, Nelson, please use landfill to test, not bmo.
Flags: blocking3.1.1?
Flags: blocking3.1.1-
Flags: blocking3.0.1?
Flags: blocking3.0.1-
Comment on attachment 275259 [details] [diff] [review]
dummy patch for testing the problem

Hmm. Maybe juxtaposition of characters,
Trying greater than followed by plus, 
with no intervening space
>+  bla bla bla
>+  bla bla bla
>+  bla bla bla
>+  bla bla bla
Attachment #275259 - Flags: review- → review?(nelson)
OK, I'm done testing.  
I'm attaching all the emails I received from the above tests.
Only one of them was double-spaced, due to improper quoted-printable
encoding.
Attachment #275259 - Attachment is obsolete: true
Attachment #275259 - Flags: review?(nelson)
Target Milestone: Bugzilla 3.0 → Bugzilla 3.2
Nelson, why change the TM? This is still a problem in 3.0, right?
Target Milestone: Bugzilla 3.2 → Bugzilla 3.0
> Why change the TM?  
Because comment 29 says the 3.0 train has left the station.

Bugs targetted at already-released versions don't get fixed
(at least, not in the already released version).
The Version field records the version of the product in which 
the problem occurs.  The fix will occur in some later (higher
numbered) release, if any, which is why I set the target to 
the next available higher numbered target. (Why is there no 3.1
target?) 

But if you think this bug will be fixed soonest by being targetted 
at an already released version, I will defer to your choice.
(In reply to comment #33)
> > Why change the TM?  
> Because comment 29 says the 3.0 train has left the station.

  No, I was just talking about 3.0.1. You can come into IRC if you want an explanation of our development process.
Flags: blocking3.1.2?
Flags: blocking3.0.2?
This isn't a blocker until somebody proves that it happens on other installations and can actually reproduce it. I just don't want to block any release forever on a bug we can't reproduce predictably.

I also need to know if bmo has upgraded as rjbs suggested in comment 13.
Flags: blocking3.1.2?
Flags: blocking3.1.2-
Flags: blocking3.0.2?
Flags: blocking3.0.2-
(In reply to comment #36)
> I also need to know if bmo has upgraded as rjbs suggested in comment 13.

bmo currently has:

perl-Email-Simple-1.995-1.el4.rf
perl-Email-MIME-1.859-1.el4.rf
perl-Email-MIME-Creator-1.453-1.el4.rf
perl-Email-MIME-Modifier-1.441-2.el4.rf

Those are the latest versions available in rpmforge.

The following were installed just now via CPAN:

R/RJ/RJBS/Email-Simple-2.003.tar.gz
R/RJ/RJBS/Email-MIME-1.860.tar.gz
R/RJ/RJBS/Email-MIME-Creator-1.454.tar.gz
R/RJ/RJBS/Email-MIME-Modifier-1.442.tar.gz
According to LpSolit, this upgrade seems to have made it worse.
OK, we've had additional upgrades to the version of Email::* that we're running since the last time this bug was touched.  Is this still an issue?

perl-Email-Simple-2.003-1.el5.rf
perl-Email-MIME-1.861-1.el5.rf
perl-Email-MIME-Creator-1.454-2.el5.rf
perl-Email-MIME-Modifier-1.442-1.el5.rf
I propose that we wait a few weeks.  If no more problematic messages arrive
by end of month, I think we can call it fixed.
Nope, not fixed. 
I received another double-spaced review email today.
Same problem as before.  Each line of text ends with =0D .
I received another double-spaced review request email today.
Attached file latest example
I think we have a reproducible test case, at long last. 

Alexei Volkov has found that he can past some text (a stack trace) into 
the comment window when he requests a patch review, and this causes the 
review request email to have that "double-spaced" appearance (actually 
improper quoted printable encoding), every time.  See bug 429230.
still occuring
The Bugzilla 3.0 branch is now locked to security bugs and dataloss fixes only. This bug doesn't fit into one of these two categories and is retargetted to 3.2 as part of a mass-change. To catch bugmails related to this mass-change, use lts081207 in your email client filter.
Target Milestone: Bugzilla 3.0 → Bugzilla 3.2
mkanat, is this bug fixed by bug 467920?
(In reply to comment #48)
> mkanat, is this bug fixed by bug 467920?

  Oh, very likely. Let's see if it still happens after the upgrade.
Today, about half of the emails from bugzilla have this same appearance 
of double-spacing in them.  They include ordinary bug mails, from comments
given on the main bug page, and not only review comments (or comments given
on the "details" page.  

This is suddenly MUCH worse.  It was a minor/normal problem before, but 
now, I'd say it's "major".
Looking at both bug 486206 and the examples on this bug, I think that bug 486206 is just a broader case of this bug that's started happening everywhere now that we enforce standard line endings in emails. bug 486206 has a patch, so I'm going to dup forward to that bug.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Target Milestone: Bugzilla 3.2 → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: