Limit date ranges to fix #10581

This commit is contained in:
James Cole
2025-07-12 06:18:25 +02:00
parent bd1326eca9
commit f4e0428ebc
32 changed files with 55 additions and 55 deletions

View File

@@ -116,7 +116,7 @@ class Controller extends BaseController
app('log')->warning(sprintf('Ignored invalid date "%s" in API v2 controller parameter check: %s', substr((string) $date, 0, 20), $e->getMessage()));
}
// out of range? set to null.
if ($obj instanceof Carbon && ($obj->year <= 1900 || $obj->year > 2099)) {
if ($obj instanceof Carbon && ($obj->year <= 1970 || $obj->year > 2038)) {
app('log')->warning(sprintf('Refuse to use date "%s" in API v2 controller parameter check: %s', $field, $obj->toAtomString()));
$obj = null;
}