You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just wondering if it would make sense to submit a PR for this use case.
I experienced a weird app error and the app ended up calling business_days_until(x) with x being nil.
This produces an unhandled infinite loop because calling that nil generates an infinite range inside the business_time gem, and calling each ... well... crashes everything. The docker containers running the app started being restarted for a simple data error.
Line where the nil to_date parameter could be checked:
I understand that it's a fault at the app level, but I'd prefer the library rejects a nil that would never work.
Most probably other funcitions in the gem are affected by the same issue.
Happy to submit a PR, but wanted to check if it makes sense.
Thanks!
The text was updated successfully, but these errors were encountered:
Hey,
Just wondering if it would make sense to submit a PR for this use case.
I experienced a weird app error and the app ended up calling
business_days_until(x)
with x being nil.This produces an unhandled infinite loop because calling that nil generates an infinite range inside the business_time gem, and calling
each
... well... crashes everything. The docker containers running the app started being restarted for a simple data error.Line where the nil
to_date
parameter could be checked:business_time/lib/business_time/core_ext/date.rb
Line 10 in 9ab2474
I understand that it's a fault at the app level, but I'd prefer the library rejects a nil that would never work.
Most probably other funcitions in the gem are affected by the same issue.
Happy to submit a PR, but wanted to check if it makes sense.
Thanks!
The text was updated successfully, but these errors were encountered: