From 63c71bad916d02cee34f0648b4ae49fdfb60decc Mon Sep 17 00:00:00 2001 From: supahgreg Date: Sun, 12 Apr 2026 02:49:43 +0000 Subject: [PATCH] When using the CLI, only set a user password if it's changed. This is mainly to prevent session invalidation for the 'admin' user when 'ADMIN_USER_PASS' is defined and the container starts up. Even if 'ADMIN_USER_PASS' hadn't changed, 'UserHelper::user_modify()' would get invoked and change 'pwd_hash', which would result in 'Sessions::validate_session()' invalidating the session. --- update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.php b/update.php index b01a04a75..166b79af7 100755 --- a/update.php +++ b/update.php @@ -459,7 +459,7 @@ Debug::log("Changing password of user $login..."); - if (UserHelper::user_modify($uid, $password)) { + if (UserHelper::user_has_password($uid, $password) || UserHelper::user_modify($uid, $password)) { Debug::log("Success."); } else { Debug::log("Operation failed, check the logs for more information.");