diff --git a/Dockerfile b/Dockerfile index c5c907528102d9b4a4b04d620c9cd6818f3484b0..65536ece24150f2b2adda49b4c14b3c9f3f83846 100644 --- a/Dockerfile +++ b/Dockerfile @@ -211,6 +211,7 @@ RUN patch -u ${BASE_DIR}/lib/private/User/Manager.php -i ${TMP_PATCH_DIR}/025-op RUN patch -u ${BASE_DIR}/apps/dav/lib/Connector/Sabre/Principal.php -i ${TMP_PATCH_DIR}/027-displayname-user-leak-dav.patch RUN patch -u ${BASE_DIR}/apps/dav/lib/HookManager.php -i ${TMP_PATCH_DIR}/028-default-task-calendar.patch RUN patch -u ${BASE_DIR}/apps/provisioning_api/lib/Controller/UsersController.php -i ${TMP_PATCH_DIR}/029-restrict-user-to-change-primary-email.patch +RUN patch -u ${BASE_DIR}/lib/private/Security/VerificationToken/VerificationToken.php -i ${TMP_PATCH_DIR}/033-verification-token-private.patch RUN rm -rf ${TMP_PATCH_DIR} RUN curl -fsSL -o ldap_write_support.tar.gz \ diff --git a/patches/033-verification-token-private.patch b/patches/033-verification-token-private.patch new file mode 100644 index 0000000000000000000000000000000000000000..1219069605bb2d2e0fb678276cb169f20e0fa981 --- /dev/null +++ b/patches/033-verification-token-private.patch @@ -0,0 +1,20 @@ +--- lib/private/Security/VerificationToken/VerificationToken.php 2023-12-10 23:05:06 ++++ lib/private/Security/VerificationToken/VerificationToken-new.php 2023-12-11 23:29:24 +@@ -107,7 +107,7 @@ + } + } + +- public function create(IUser $user, string $subject, string $passwordPrefix = ''): string { ++ public function create(IUser $user, string $subject, string $passwordPrefix = '', int $expirationTime = self::TOKEN_LIFETIME * 2): string { + $token = $this->secureRandom->generate( + 21, + ISecureRandom::CHAR_DIGITS. +@@ -121,7 +121,7 @@ + 'userId' => $user->getUID(), + 'subject' => $subject, + 'pp' => $passwordPrefix, +- 'notBefore' => $this->timeFactory->getTime() + self::TOKEN_LIFETIME * 2, // multiply to provide a grace period ++ 'notBefore' => $this->timeFactory->getTime() + $expirationTime, // multiply to provide a grace period + ]); + $this->jobList->add(CleanUpJob::class, $jobArgs); +