Skip to content

Don't assume that request has "command" key.

Philipp Winter requested to merge phw/gettor:defect/34286 into master

If GetTor deals with an autoresponder, it returns an empty request, which is then passed to parse_callback, which raises a KeyError because of request["command"]:

2020-05-29 19:04:43+0000 [email parser] Error while parsing email content: [Failure instance: Traceback: <class 'KeyError'>: 'command' /usr/lib/python3/dist-packages/twisted/internet/defer.py:311:addCallbacks /usr/lib/python3/dist-packages/twisted/internet/defer.py:654:_runCallbacks /usr/lib/python3/dist-packages/twisted/internet/defer.py:1613:unwindGenerator /usr/lib/python3/dist-packages/twisted/internet/defer.py:1529:_cancellableInlineCallbacks --- --- /usr/lib/python3/dist-packages/twisted/internet/defer.py:1418:_inlineCallbacks /srv/gettor.torproject.org/home/gettor/gettor/parse/email.py:256:parse_callback ].

This is a fixup of: https://bugs.torproject.org/34286

Merge request reports

Loading