Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2023-10-07 11:34:49 +01:00
commit a1f3a5c624

View file

@ -33,12 +33,14 @@ class SettingsServiceProvider extends ServiceProvider
// Make sure the limit is actually set, is an integer and does not exceed system limits
\App::singleton('api_limit_value', function () {
$limit = config('app.max_results');
$int_limit = intval(request('limit'));
if ((abs(intval(request('limit'))) > 0) && (abs(request('limit')) <= config('app.max_results'))) {
$limit = abs(request('limit'));
if ((abs($int_limit) > 0) && ($int_limit <= config('app.max_results'))) {
$limit = abs($int_limit);
}
\Log::debug('Max in env: '.config('app.max_results'));
\Log::debug('Original requested limit: '.request('limit'));
\Log::debug('Int limit: '.$int_limit);
\Log::debug('Modified limit: '.$limit);
\Log::debug('------------------------------');