Closed
Description
Discussed in #8715
Originally posted by beltagymohamed October 17, 2022
If you provid an input to the FloatField that is too big for example toolargeinput.txt it will crash with the following error
File ".../lib/python3.10/site-packages/rest_framework/fields.py", line 994, in to_internal_value
return float(data)
OverflowError: int too large to convert to float
I propose to fix this by adding the following to the exception list OverflowError
so the line change as below
https://github.com/encode/django-rest-framework/blob/master/rest_framework/fields.py#L946
# current implementation
# except (TypeError, ValueError):
# proposed change to handle this bug
except (TypeError, ValueError, OverflowError):