= Summary =
Fix bug #354544 by preventing creating an codereviewcomment from an
email whose subject line is empty
== Proposed fix ==
Until now, errors due to empty subject lines have been produced after
the CodeReviewComment was created, when sending the message to
recipients. Now, we perform the same validation used by
sendmail.sendmail to ensure that we never create an unsendable
codereviewcomment.
== Pre-implementation notes ==
None
== Implementation details ==
The orig_email parameter for createCommentFromMessage is now mandatory,
but may be supplied as None if _validate is supplied as False. This is
done by createComment, because we can assume that we create a valid
message that way.
Several tests had to be updated for to handle the new parameters, and
the makeSignedMessage had to be updated to create messages with a "to"
header.
== Tests ==
bin/test test_codehandler
== Demo and Q/A ==
Reply to a merge proposal with no subject. An error email should be
sent, and your comment should not appear on the merge proposal.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files:
lib/lp/code/model/branchmergeproposal.py
lib/lp/code/mail/tests/test_codehandler.py
lib/lp/testing/factory.py
lib/lp/services/mail/sendmail.py
lib/lp/code/model/tests/test_codereviewcomment.py
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
= Summary =
Fix bug #354544 by preventing creating an codereviewcomment from an
email whose subject line is empty
== Proposed fix ==
Until now, errors due to empty subject lines have been produced after
the CodeReviewComment was created, when sending the message to
recipients. Now, we perform the same validation used by
sendmail.sendmail to ensure that we never create an unsendable
codereviewcomment.
== Pre-implementation notes ==
None
== Implementation details == omMessage is now mandatory,
The orig_email parameter for createCommentFr
but may be supplied as None if _validate is supplied as False. This is
done by createComment, because we can assume that we create a valid
message that way.
Several tests had to be updated for to handle the new parameters, and
the makeSignedMessage had to be updated to create messages with a "to"
header.
== Tests ==
bin/test test_codehandler
== Demo and Q/A ==
Reply to a merge proposal with no subject. An error email should be
sent, and your comment should not appear on the merge proposal.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: code/model/ branchmergeprop osal.py code/mail/ tests/test_ codehandler. py testing/ factory. py services/ mail/sendmail. py code/model/ tests/test_ codereviewcomme nt.py enigmail. mozdev. org
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkp opuMACgkQ0F+ nu1YWqI320ACfcS EjLGHJUipn0sCeJ 5mnJfnd tsQgkG9iszb2k90 HT
qtEAn1z1sphwJnC
=h3uu
-----END PGP SIGNATURE-----