mail icon indicating copy to clipboard operation
mail copied to clipboard

Handle too long dates passed to DateTime.parse

Open rosa opened this issue 4 years ago • 4 comments

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.

rosa avatar Dec 20 '21 09:12 rosa

Thanks a lot for the review, @mikel! I'll get these changes implemented this week, I hope.

rosa avatar Dec 06 '22 10:12 rosa

Implemented the changes requested 😊

rosa avatar Dec 08 '22 11:12 rosa