From a62d7af2a98d6649cf0dbaa1181ae85f619d27cc Mon Sep 17 00:00:00 2001 From: Jan Evers Date: Tue, 23 Jul 2024 13:52:24 +0200 Subject: [PATCH 1/4] fix(Admin): Don't delete password change date on account update --- tine20/Admin/js/user/EditDialog.js | 11 +++++++++-- tine20/Tinebase/User/Sql.php | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tine20/Admin/js/user/EditDialog.js b/tine20/Admin/js/user/EditDialog.js index 99315500938..7f67aabed21 100644 --- a/tine20/Admin/js/user/EditDialog.js +++ b/tine20/Admin/js/user/EditDialog.js @@ -85,7 +85,11 @@ Tine.Admin.UserEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, { responseText: Ext.util.JSON.encode(this.record.get('emailUser')) }; this.emailRecord = Tine.Admin.emailUserBackend.recordReader(emailResponse); - + + if (this.record.get('accountLastPasswordChange')) { + this.record.set('accountLastPasswordChangeRaw', this.record.get('accountLastPasswordChange')) + } + // format dates var dateTimeDisplayFields = ['accountLastLogin', 'accountLastPasswordChange', 'logonTime', 'logoffTime', 'pwdLastSet']; for (var i = 0; i < dateTimeDisplayFields.length; i += 1) { @@ -182,7 +186,10 @@ Tine.Admin.UserEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, { this.record.set('groups', newGroups); this.record.set('accountRoles', newRoles); - this.unsetLocalizedDateTimeFields(this.record, ['accountLastLogin', 'accountLastPasswordChange']); + this.unsetLocalizedDateTimeFields(this.record, ['accountLastLogin']); + if (this.record.get('accountLastPasswordChangeRaw')) { + this.record.set('accountLastPasswordChange', this.record.get('accountLastPasswordChangeRaw')) + } var xprops = this.record.get('xprops'); xprops = Ext.isObject(xprops) ? xprops : {}; diff --git a/tine20/Tinebase/User/Sql.php b/tine20/Tinebase/User/Sql.php index 4ba3bf8326c..8dd8fcca190 100644 --- a/tine20/Tinebase/User/Sql.php +++ b/tine20/Tinebase/User/Sql.php @@ -543,6 +543,8 @@ protected function _updatePasswordProperties($_userId, $_password, $_encrypt = t $accountData = array(); $accountData['password'] = ($_encrypt) ? Hash_Password::generate('SSHA256', $_password) : $_password; $accountData['password_must_change'] = $_mustChange ? 1 : 0; + $now = new Tinebase_DateTime(); + $accountData['last_password_change'] = $now->toString(); if (Tinebase_Auth_NtlmV2::isEnabled()) { $accountData['ntlmv2hash'] = Tinebase_Auth_CredentialCache::encryptData( Tinebase_Auth_NtlmV2::getPwdHash($_password), From 6b7d608c9f6068cd85095766cec6c3216158ccbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Sch=C3=BCle?= Date: Mon, 10 Feb 2025 13:42:21 +0100 Subject: [PATCH 2/4] text(Tinebase/Group/Ldap): log disabled backend ... this happens, if no groupDn is configured --- tine20/Tinebase/Group/Ldap.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tine20/Tinebase/Group/Ldap.php b/tine20/Tinebase/Group/Ldap.php index 9a531881361..7f6c0480d1e 100644 --- a/tine20/Tinebase/Group/Ldap.php +++ b/tine20/Tinebase/Group/Ldap.php @@ -1069,6 +1069,9 @@ public function resolveUUIdToGIdNumber($_uuid) public function getGroupMembershipsFromSyncBackend($_userId) { if ($this->isDisabledBackend()) { + if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) { + Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' isDisabledBackend'); + } return []; } From 02dcb113aefbcdff1cfb009556c7fc5e4e33f349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Sch=C3=BCle?= Date: Mon, 10 Feb 2025 15:09:26 +0100 Subject: [PATCH 3/4] conf(ci/Dockerfile): update tike to 2.9.3 --- ci/dockerimage/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/dockerimage/Dockerfile b/ci/dockerimage/Dockerfile index ad86ba29568..1ab57bf44d1 100644 --- a/ci/dockerimage/Dockerfile +++ b/ci/dockerimage/Dockerfile @@ -124,7 +124,7 @@ COPY --from=gomplate /bin/gomplate /usr/bin/gomplate RUN mkdir /usr/local/busybox \ && busybox --install /usr/local/busybox ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/busybox -RUN wget -O /usr/local/bin/tika.jar https://dlcdn.apache.org/tika/2.9.2/tika-app-2.9.2.jar +RUN wget -O /usr/local/bin/tika.jar https://dlcdn.apache.org/tika/2.9.3/tika-app-2.9.3.jar RUN addgroup --system -gid 150 tine20 && \ adduser --system --no-create-home --disabled-password --shell /bin/bash --gecos "tine20 user" --ingroup tine20 --uid 150 tine20 && \ mkdir -p /etc/tine20/conf.d && \ From 1aa85acfc2d4e66475cce372e22876678beeab4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Sch=C3=BCle?= Date: Mon, 10 Feb 2025 15:10:37 +0100 Subject: [PATCH 4/4] conf(ci/Dockerfile): update tike to 2.9.3 --- ci/dockerimage/base.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/dockerimage/base.Dockerfile b/ci/dockerimage/base.Dockerfile index e511715c56c..875b30a4961 100644 --- a/ci/dockerimage/base.Dockerfile +++ b/ci/dockerimage/base.Dockerfile @@ -62,7 +62,7 @@ ARG TINE20ROOT=/usr/share ENV TINE20ROOT=$TINE20ROOT # todo version vars | move tika to lib -RUN wget -O /usr/local/bin/tika.jar https://dlcdn.apache.org/tika/2.9.2/tika-app-2.9.2.jar +RUN wget -O /usr/local/bin/tika.jar https://dlcdn.apache.org/tika/2.9.3/tika-app-2.9.3.jar # todo check if copy or add creates folder RUN mkdir /usr/local/lib/container