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
A bug has been identified where the server crashes with a SequelizeDatabaseError when processing API requests with excessively large integer values. This issue leads to an 'out of range for type integer' error and was originally found by the Mayhem fuzzer.
Steps to Reproduce
Send an API request to any of the following endpoints with extremely large integer values:
/api/regions/-999999999999999999/siblings
/api/regions/-999999999999999999/geometry
/api/regions/999999999999999999/siblings
/api/regions/-786773861553238898/geometry
Expected Behavior
The API should handle large integer inputs correctly, either by processing them or by returning a proper error message, without causing a server crash.
Actual Behavior
The server crashes, throwing a SequelizeDatabaseError. This error states that the value "-999999999999999999" is out of range for the type integer.
This issue appears to arise from Sequelize's handling of large integer values in database queries. A solution might involve better input validation or modifications to query handling in Sequelize.
Possible Solution
Implement robust input validation to ensure integer values are within a permissible range before processing the API request.
Modify the Sequelize query construction to accommodate or reject large integer values gracefully.
Introduce exception handling for SequelizeDatabaseError related to integer size limits to prevent the server from crashing.
The text was updated successfully, but these errors were encountered:
This commit includes the addition of a utility function that checks the
range of the data types and validates them. This is particularly useful
for numerical inputs in the API that need to be within a specific range.
The commit also updates the backend routes to use these validations.
Issue: #202
Signed-off-by: Nikolay Martyanov <[email protected]>
This commit includes the addition of a utility function that checks the
range of the data types and validates them. This is particularly useful
for numerical inputs in the API that need to be within a specific range.
The commit also updates the backend routes to use these validations.
Issue: #202
Signed-off-by: Nikolay Martyanov <[email protected]>
Description
A bug has been identified where the server crashes with a
SequelizeDatabaseError
when processing API requests with excessively large integer values. This issue leads to an 'out of range for type integer' error and was originally found by the Mayhem fuzzer.Steps to Reproduce
/api/regions/-999999999999999999/siblings
/api/regions/-999999999999999999/geometry
/api/regions/999999999999999999/siblings
/api/regions/-786773861553238898/geometry
Expected Behavior
The API should handle large integer inputs correctly, either by processing them or by returning a proper error message, without causing a server crash.
Actual Behavior
The server crashes, throwing a
SequelizeDatabaseError
. This error states that the value "-999999999999999999" is out of range for the type integer.Commit Version
This bug first found here: 527ad8e
Additional Context
This issue appears to arise from Sequelize's handling of large integer values in database queries. A solution might involve better input validation or modifications to query handling in Sequelize.
Possible Solution
SequelizeDatabaseError
related to integer size limits to prevent the server from crashing.The text was updated successfully, but these errors were encountered: