mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-30 13:34:28 +02:00
Forbid users to select dates after 2038 on 32-bit systems to prevent errors caused by Year2038 bug
See discussion #548 and #549
This commit is contained in:
parent
18c697f472
commit
206bcebdb7
8 changed files with 167 additions and 36 deletions
|
@ -32,6 +32,7 @@ use App\Entity\Base\TimestampTrait;
|
|||
use App\Entity\Contracts\TimeStampableInterface;
|
||||
use App\Repository\UserSystem\ApiTokenRepository;
|
||||
use App\State\CurrentApiTokenProvider;
|
||||
use App\Validator\Constraints\Year2038BugWorkaround;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
|
@ -76,6 +77,7 @@ class ApiToken implements TimeStampableInterface
|
|||
|
||||
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
|
||||
#[Groups('token:read')]
|
||||
#[Year2038BugWorkaround]
|
||||
private ?\DateTimeInterface $valid_until;
|
||||
|
||||
#[ORM\Column(length: 68, unique: true)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue