cosullivan / SmtpServer

A SMTP Server component written in C#
MIT License
690 stars 163 forks source link

Token.Equals() bug ? #196

Closed geoxel closed 11 months ago

geoxel commented 1 year ago

https://github.com/cosullivan/SmtpServer/blob/2b9cefff54d5ea19669ec417f2cc569ab0137387/Src/SmtpServer/Text/Token.cs#L99

Maybe should it be :

return Kind == other.Kind && ToText().Equals(other.ToText(), StringComparison.OrdinalIgnoreCase);
cosullivan commented 11 months ago

Yes, you are correct that this is wrong. It's not actually used anywhere that it can cause an issue so I've actually removed support for Equals on the token itself.