mail
mail copied to clipboard
Handle too long dates passed to DateTime.parse
Since Ruby 3.0.3, this method raises an ArgumentError with a different message from the invalid date message, as mitigation for CVE-2021-41817.
ArgumentError: string length (150) exceeds the limit 128
This PR handles this error to return nil, just like when the date is invalid.
Thanks a lot for the review, @mikel! I'll get these changes implemented this week, I hope.
Implemented the changes requested 😊