cms-PdmV / cmsPdmV

CERN CMS McM repository
4 stars 10 forks source link

Limit infinite requests #1142

Closed lmoureaux closed 1 month ago

lmoureaux commented 2 months ago

This adds two hard limits to database accesses:

We let JSON fail to parse incomplete objects when they are too large because httplib doesn't gives us a handle on the total (available) size.

Hopefully 1000 objects and 10MB this is large enough to allow normal usage while protecting ourselves.

lmoureaux commented 2 months ago

Thanks for the review! I updated the server-side code. I'm not sure if the webapp is prepared to handle errors and won't touch it (don't know much Angular, less so in 2010 style).