Fix endpoints, validate dates.

This commit is contained in:
James Cole
2025-01-25 09:17:21 +01:00
parent 949d818bad
commit 6d89485792
8 changed files with 28 additions and 5 deletions

View File

@@ -157,7 +157,15 @@ abstract class Controller extends BaseController
$value = null;
}
if (null !== $value) {
$bag->set($integer, (int) $value);
$value = (int) $value;
if ($value < 1) {
$value = 1;
}
if ($value > 2 ** 16) {
$value = 2 ** 16;
}
$bag->set($integer, $value);
}
if (null === $value
&& 'limit' === $integer // @phpstan-ignore-line