janaipakos / ghibliapi

A simple API for Studio Ghibli resources. Unofficial/fan-made
https://ghibliapi.herokuapp.com
MIT License
310 stars 109 forks source link

Bug in app.js with proposed fix #25

Closed mikesol closed 4 years ago

mikesol commented 4 years ago

Hi James!

Thanks for your awesome API.

My company is developing a service for automated testing of GitHub apps, and while testing it out on some public repos we found the following bug on this line.

      data.length = Math.min(Math.min(query.limit, data.length), maxLimit)

If query.limit is negative, it will cause the server to crash. A fix could be to do, for example, Math.max(query.limit, 0).

We really enjoyed testing your app with Meeshkan, and if you find this bug report useful, I'd encourage you to sign up for free alpha access at https://meeshkan.com. Thanks again for your great work!

janaipakos commented 4 years ago

Thanks!