aio-libs / aio-libs/aiosmtpd

C# SMTPClient uses lowercase login AUTH method

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

Descrizione

Hello,

I am currently implementing a smtp handler from requests coming from a C# System.Net.Mail.SMTPClient instance with credentials ([code](https://github.com/Cloud9Developer/Jellyfin-Newsletter-Plugin/blob/0c382440a75844a08e45a3dae13ed30d238d1eed/Jellyfin.Plugin.Newsletters/Emails/smtp.cs#L62-L65)).

I didn't understand the problem until I discovered with tcpdump that the login method is spelled "login" in lowercase:
![Image](https://github.com/user-attachments/assets/939b9ea2-a1da-4279-929a-82e12c8b3f84)

and indeed [your code is not doing any case matching](https://github.com/aio-libs/aiosmtpd/blob/54b9643f232c92a0d651aa8dc0eddbd3af144174/aiosmtpd/smtp.py#L966-L969) on the said authentication method:
![Image](https://github.com/user-attachments/assets/7c95b55d-4400-47fa-8a18-2d9126a85b2f)

Would it be possible to transform method to uppercase before handling it?
```python
mechanism = mechanism.upper()
```

Thanks in advance.

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.