yajra / laravel-datatables

jQuery DataTables API for Laravel
https://yajrabox.com/docs/laravel-datatables
MIT License
4.75k stars 861 forks source link

Set maximum records limit per-page in config. #3171

Open gemul opened 1 month ago

gemul commented 1 month ago

This PR adds a max_limit configuration to prevent end-users from arbitrarily setting a large value for the length request parameter, which could otherwise cause the server to overload if not handled manually (e.g., in middleware).

If the length value exceeds this limit, it will be overridden with the specified max_limit.

The default value is 100.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

yajra commented 3 weeks ago

Thanks for the PR! The changes look good, however, I suspect this might break the export functionality of buttons package.

Will check further when I get the chance.