Code review comment for lp://staging/~abentley/launchpad/abort-failed-vote

Revision history for this message
Aaron Bentley (abentley) wrote :

-----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 ==
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

iEYEARECAAYFAkpopuMACgkQ0F+nu1YWqI320ACfcSEjLGHJUipn0sCeJ5mnJfnd
qtEAn1z1sphwJnCtsQgkG9iszb2k90HT
=h3uu
-----END PGP SIGNATURE-----

« Back to merge proposal