aio-libs / aio-libs/aiosmtpd

Extra dot added to message lines (dot-stuffing not unstuffed correctly since v1.4.5+)

Aperta
#561 4 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
373
Fork
105
Merge medio
4m
PR unite (30g)
2

Descrizione

Hi ,

Starting from **aiosmtpd v1.4.5** (and still present in **v1.4.6**), message bodies received by the SMTP handler are incorrectly dot-stuffed — each line beginning with a `.` in the `DATA` section gets an **extra dot prepended (`..`)** when accessed in `envelope.content`.

This behaviour was **not present in v1.4.4.post2**, where dot-unstuffing worked correctly.

---

### Test Code

(Attached in the issue)

The test sends the following message body containing two dots on a single line:

```python
msg = b"""this is a test of dot
..
"""
```

---

### Results

#### ✅ v1.4.4.post2 (correct behaviour)

```
data: (354, b'End data with .')
send: b'this is a test of dot\n...\n\r\n.\r\n' <- dot-stuffed during send (expected)
```

```
b'this is a test of dot\n..\n\r\n' <- correctly unstuffed (2 dots)
```

#### ❌ v1.4.5+ (incorrect behaviour)

```
data: (354, b'End data with .')
send: b'this is a test of dot\n...\n\r\n.\r\n' <- dot-stuffed during send (expected)
```

```
b'this is a test of dot\n...\n\r\n' <- not unstuffed (3 dots) ❌
```

---

Thanks!

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.