Yelp / yelp-fusion

Yelp Fusion API
https://yelp.com/developers
MIT License
401 stars 394 forks source link

Businesses Search returns 500 Server Error when open_at > 2147483647 #658

Open apibugsreporting opened 2 years ago

apibugsreporting commented 2 years ago

Overview

Description

When providing an open_at timestamp greater than the maximum possible integer (2147483647), the API crashes and returns a 500 status code (Internal Server Error). I guess this is likely due to some unhandled exception with an integer overflow (e.g., trying to convert the parameter value to an integer without doing proper input validation).

More information

Endpoint

GET /businesses/search

Parameters or Sample Request

https://api.yelp.com/v3/businesses/search?price=4%2C1%2C2&latitude=36.750854&term=open&location=Juarez%2C%20Mexico&attributes=open_to_all&categories=experiences&radius=13356&locale=en_SG&open_at=8673790565488977

Response

{
    "error": {
        "code": "INTERNAL_ERROR",
        "description": "Something went wrong internally, please try again later."
    }
}

Extra information

A test report revealing this issue is available at the following URL: http://apitesting.ddns.net/fse2022/restest/target/allure-reports/yelp_Businesses__r_cbt_perturbation/#behaviors/b1a8273437954620fa374b796ffaacdd/ef78cfc3db49bdc5/