Loading Dockerfile +1 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ RUN patch -u ${BASE_DIR}/apps/settings/lib/Settings/Personal/ServerDevNotice.php RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/009-help-links.patch RUN patch -u ${BASE_DIR}/lib/private/Updater.php -i ${TMP_PATCH_DIR}/010-disable-app-store-upgrade.patch RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/011-privacy-settings.patch RUN patch -u ${BASE_DIR}/lib/private/Authentication/Token/PublicKeyTokenProvider.php -i ${TMP_PATCH_DIR}/013-revert-token-password-update.patch RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/014-add-mail-usage.patch RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/015-email-mail-template.patch RUN patch -u ${BASE_DIR}/core/Command/User/Setting.php -i ${TMP_PATCH_DIR}/018-occ-user-setting.patch Loading patches/013-revert-token-password-update.patch 0 → 100644 +21 −0 Original line number Diff line number Diff line From: Akhil <akhil@e.email> Date: Fri, 16 Dec 2021 17:30 +0530 Subject: [PATCH] Reverts token password update on each login NC 21 started updating password of each and every token on each login. This introduces a huge load on database. This patch reverts to only update when there are expired tokens. --- ./lib/private/Authentication/Token/PublicKeyTokenProvider.php 2024-07-25 17:51:37 +0530 +++ ./lib/private/Authentication/Token/PublicKeyTokenProvider-new.php 2024-07-25 17:53:16 +0530 @@ -509,6 +509,11 @@ } public function updatePasswords(string $uid, string $password) { + + if (!$this->mapper->hasExpiredTokens($uid)) { + // Nothing to do here + return; + } // prevent setting an empty pw as result of pw-less-login if ($password === '' || !$this->config->getSystemValueBool('auth.storeCryptedPassword', true)) { return; Loading
Dockerfile +1 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ RUN patch -u ${BASE_DIR}/apps/settings/lib/Settings/Personal/ServerDevNotice.php RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/009-help-links.patch RUN patch -u ${BASE_DIR}/lib/private/Updater.php -i ${TMP_PATCH_DIR}/010-disable-app-store-upgrade.patch RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/011-privacy-settings.patch RUN patch -u ${BASE_DIR}/lib/private/Authentication/Token/PublicKeyTokenProvider.php -i ${TMP_PATCH_DIR}/013-revert-token-password-update.patch RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/014-add-mail-usage.patch RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/015-email-mail-template.patch RUN patch -u ${BASE_DIR}/core/Command/User/Setting.php -i ${TMP_PATCH_DIR}/018-occ-user-setting.patch Loading
patches/013-revert-token-password-update.patch 0 → 100644 +21 −0 Original line number Diff line number Diff line From: Akhil <akhil@e.email> Date: Fri, 16 Dec 2021 17:30 +0530 Subject: [PATCH] Reverts token password update on each login NC 21 started updating password of each and every token on each login. This introduces a huge load on database. This patch reverts to only update when there are expired tokens. --- ./lib/private/Authentication/Token/PublicKeyTokenProvider.php 2024-07-25 17:51:37 +0530 +++ ./lib/private/Authentication/Token/PublicKeyTokenProvider-new.php 2024-07-25 17:53:16 +0530 @@ -509,6 +509,11 @@ } public function updatePasswords(string $uid, string $password) { + + if (!$this->mapper->hasExpiredTokens($uid)) { + // Nothing to do here + return; + } // prevent setting an empty pw as result of pw-less-login if ($password === '' || !$this->config->getSystemValueBool('auth.storeCryptedPassword', true)) { return;