AttributeError: 'NoneType' object has no attribute 'items' when handling multipart messages with attachments
- 主要语言
- Python
- 星标
- 373
- 派生
- 105
- 平均合并
- 4 分钟
- 30 天内合并 PR
- 2
描述
When an SMTP client sends a multipart email with an attachment, i.e. `multipart/mixed` containing a binary attachment (e.g., PDF), `aiosmtpd` crashes.
This was observed through the smtp2mqtt add-on, which uses aiosmtpd, but the stack trace points clearly to aiosmtpd/smtp.py.
PHP version: 3.11.8
```
Traceback (most recent call last):
File ".../aiosmtpd/smtp.py", line 756, in _handle_client
await method(arg)
File ".../aiosmtpd/smtp.py", line 1519, in smtp_DATA
status = await self._call_handler_hook('DATA')
File ".../aiosmtpd/smtp.py", line 473, in _call_handler_hook
status = await hook(self, self.session, self.envelope, *args)
File "/app/smtp2mqtt.py", line 96, in handle_DATA
for header in msgBody.items():
AttributeError: 'NoneType' object has no attribute 'items'
```
贡献指南
评估
这个 Issue 还没有评估数据。