)]}'
{"mistral/actions/std_actions.py":[{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"adce9603af3749252aabad5d8f38f69bcdabc909","unresolved":false,"context_lines":[{"line_number":16,"context_line":"#    limitations under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from email.mime import text"},{"line_number":19,"context_line":"from email.utils import parseaddr"},{"line_number":20,"context_line":"import json"},{"line_number":21,"context_line":"import requests"},{"line_number":22,"context_line":"import smtplib"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_0ef626d7","line":19,"updated":"2015-09-16 08:13:33.000000000","message":"Soft: import module first, then refer to parseaddr:\n\n  from email import utils\n  ...\n  utils.parseaddr\n\nnot critical.","commit_id":"5123d0690178379b07d2c1479c41f3e396043c49"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"adce9603af3749252aabad5d8f38f69bcdabc909","unresolved":false,"context_lines":[{"line_number":269,"context_line":"class SendEmailAction(base.Action):"},{"line_number":270,"context_line":"    def __init__(self, from_addr, to_addrs, smtp_server,"},{"line_number":271,"context_line":"                 smtp_password, subject\u003dNone, body\u003dNone):"},{"line_number":272,"context_line":"        # TODO(dzimine): validate parameters"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        _, from_addr \u003d parseaddr(from_addr)"},{"line_number":275,"context_line":"        if \u0027@\u0027 not in from_addr:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_ce510eda","line":272,"updated":"2015-09-16 08:13:33.000000000","message":"Need to remove this comment.","commit_id":"5123d0690178379b07d2c1479c41f3e396043c49"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"29c2b0757c326b6109b7ebfc71bcb570e8eeef9a","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                 smtp_password, subject\u003dNone, body\u003dNone):"},{"line_number":272,"context_line":"        # TODO(dzimine): validate parameters"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        _, from_addr \u003d parseaddr(from_addr)"},{"line_number":275,"context_line":"        if \u0027@\u0027 not in from_addr:"},{"line_number":276,"context_line":"            raise exc.ActionException(\"\u0027%s\u0027 is not a valid email address.\""},{"line_number":277,"context_line":"                                      % from_addr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_cbe795e1","line":274,"updated":"2015-09-11 15:38:23.000000000","message":"Looks ok, although we may just want to check an email address validity with a regular expression. A pattern can be googled.","commit_id":"5123d0690178379b07d2c1479c41f3e396043c49"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"36fd5c93ebbe10667a351dea3a828e99aa2e000a","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                 smtp_password, subject\u003dNone, body\u003dNone):"},{"line_number":272,"context_line":"        # TODO(dzimine): validate parameters"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        _, from_addr \u003d parseaddr(from_addr)"},{"line_number":275,"context_line":"        if \u0027@\u0027 not in from_addr:"},{"line_number":276,"context_line":"            raise exc.ActionException(\"\u0027%s\u0027 is not a valid email address.\""},{"line_number":277,"context_line":"                                      % from_addr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_e457b8c8","line":274,"in_reply_to":"ba15a1d1_6de71d13","updated":"2015-09-14 08:47:09.000000000","message":"Yeah, looks scary. In my understanding, there much shorter versions that allow to have a good level of confidence about email address validity. This web page may be helpful: http://www.regular-expressions.info/email.html\n\nLike I said, I\u0027m ok with the simple checks you\u0027re proposing because it\u0027s better than nothing. But I\u0027d also ask you to file a ticket to do more thorough validation.","commit_id":"5123d0690178379b07d2c1479c41f3e396043c49"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"3398eb61b0c91a67c5082ebc61b51011d071961d","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                 smtp_password, subject\u003dNone, body\u003dNone):"},{"line_number":272,"context_line":"        # TODO(dzimine): validate parameters"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        _, from_addr \u003d parseaddr(from_addr)"},{"line_number":275,"context_line":"        if \u0027@\u0027 not in from_addr:"},{"line_number":276,"context_line":"            raise exc.ActionException(\"\u0027%s\u0027 is not a valid email address.\""},{"line_number":277,"context_line":"                                      % from_addr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_394f7d6c","line":274,"in_reply_to":"ba15a1d1_8e3b169c","updated":"2015-09-17 08:56:14.000000000","message":"Christian, I agree with Nikolay. Let\u0027s use at least simple (although maybe limited) reg exp to do validation instead of pretending that we\u0027ve added some validation )","commit_id":"5123d0690178379b07d2c1479c41f3e396043c49"},{"author":{"_account_id":7700,"name":"Nikolay Mahotkin","email":"nikolay.makhotkin@gmail.com","username":"nmakhotkin"},"change_message_id":"adce9603af3749252aabad5d8f38f69bcdabc909","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                 smtp_password, subject\u003dNone, body\u003dNone):"},{"line_number":272,"context_line":"        # TODO(dzimine): validate parameters"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        _, from_addr \u003d parseaddr(from_addr)"},{"line_number":275,"context_line":"        if \u0027@\u0027 not in from_addr:"},{"line_number":276,"context_line":"            raise exc.ActionException(\"\u0027%s\u0027 is not a valid email address.\""},{"line_number":277,"context_line":"                                      % from_addr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_8e3b169c","line":274,"in_reply_to":"ba15a1d1_e457b8c8","updated":"2015-09-16 08:13:33.000000000","message":"So, I\u0027ve looked at this function \u0027parseaddr\u0027 and have tried to use it. It does almost nothing. See examples:\n\n  \u003e\u003e\u003e parseaddr(\u0027asds\u0027)\n  (\u0027\u0027, \u0027asds\u0027) \n  \u003e\u003e\u003e parseaddr(\u002712312\u0027)\n  (\u0027\u0027, \u002712312\u0027) \n  \u003e\u003e\u003e parseaddr(\u002712312:;\u0027)\n  (\u0027\u0027, \u0027\u0027)\n  \u003e\u003e\u003e parseaddr(\u002712312:\u0027)\n  (\u0027\u0027, \u0027\u0027)\n  \u003e\u003e\u003e parseaddr(\u002712312;\u0027)\n  (\u0027\u0027, \u002712312\u0027)\n  \u003e\u003e\u003e parseaddr(\u002712312@@\u0027)\n  (\u0027\u0027, \u002712312@\u0027)\n  \u003e\u003e\u003e parseaddr(\u002712312@@@@\u0027)\n  (\u0027\u0027, \u002712312@\u0027)\n  \u003e\u003e\u003e parseaddr(\u0027@12312@@@@\u0027)\n  (\u0027\u0027, \u0027@12312\u0027)\n  \u003e\u003e\u003e parseaddr(\u0027@12312$\u0027)\n  (\u0027\u0027, \u0027@12312$\u0027)\n  \u003e\u003e\u003e parseaddr(\u0027@12312%%\u0027)\n  (\u0027\u0027, \u0027@12312%%\u0027)\n  \u003e\u003e\u003e parseaddr(\u0027@12312\u0027\u0027\u0027)\n  (\u0027\u0027, \u0027@12312\u0027)\n  \u003e\u003e\u003e parseaddr(\u0027@12312\"\u0027)\n  (\u0027\u0027, \u0027@12312\u0027)\n\nFrom that perspective, address @12312 is treated as valid (even after check on line 275). Simple regexp here mentioned by Renat could work much more better.","commit_id":"5123d0690178379b07d2c1479c41f3e396043c49"},{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"523e3cfd9a8514f01a321771ccef8efe248d63a9","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                 smtp_password, subject\u003dNone, body\u003dNone):"},{"line_number":272,"context_line":"        # TODO(dzimine): validate parameters"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        _, from_addr \u003d parseaddr(from_addr)"},{"line_number":275,"context_line":"        if \u0027@\u0027 not in from_addr:"},{"line_number":276,"context_line":"            raise exc.ActionException(\"\u0027%s\u0027 is not a valid email address.\""},{"line_number":277,"context_line":"                                      % from_addr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_6de71d13","line":274,"in_reply_to":"da20952f_cbe795e1","updated":"2015-09-12 19:45:05.000000000","message":"There are a lot of patterns to validate an email address, e.g. http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html .","commit_id":"5123d0690178379b07d2c1479c41f3e396043c49"}]}
