From e38d7e62fef58a73bfcd7a96fe6f303073808d01 Mon Sep 17 00:00:00 2001 From: Leo Feyer Date: Thu, 11 Apr 2019 13:11:07 +0200 Subject: [PATCH] Version 3.5.40 --- system/config/constants.php | 2 +- system/docs/CHANGELOG.md | 7 +++++++ system/modules/core/controllers/BackendPassword.php | 7 +++++-- system/modules/repository/classes/RepositorySettings.php | 1 + 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/system/config/constants.php b/system/config/constants.php index d28f1bb005..2e7557bc72 100644 --- a/system/config/constants.php +++ b/system/config/constants.php @@ -13,7 +13,7 @@ * Core version */ define('VERSION', '3.5'); -define('BUILD', '39'); +define('BUILD', '40'); define('LONG_TERM_SUPPORT', true); diff --git a/system/docs/CHANGELOG.md b/system/docs/CHANGELOG.md index be2d138f55..08f1f52f15 100644 --- a/system/docs/CHANGELOG.md +++ b/system/docs/CHANGELOG.md @@ -1,6 +1,13 @@ Contao Open Source CMS changelog ================================ +Version 3.5.40 (2019-04-10) +--------------------------- + +### Fixed +Fix the save callback in the back end password module (see #429). + + Version 3.5.39 (2019-04-09) --------------------------- diff --git a/system/modules/core/controllers/BackendPassword.php b/system/modules/core/controllers/BackendPassword.php index aa6bca38c1..4ad0532484 100644 --- a/system/modules/core/controllers/BackendPassword.php +++ b/system/modules/core/controllers/BackendPassword.php @@ -83,16 +83,19 @@ public function run() // Trigger the save_callback if (is_array($GLOBALS['TL_DCA']['tl_user']['fields']['password']['save_callback'])) { + $dc = new \DC_Table('tl_user'); + $dc->id = $this->User->id; + foreach ($GLOBALS['TL_DCA']['tl_user']['fields']['password']['save_callback'] as $callback) { if (is_array($callback)) { $this->import($callback[0]); - $pw = $this->{$callback[0]}->{$callback[1]}($pw); + $pw = $this->{$callback[0]}->{$callback[1]}($pw, $dc); } elseif (is_callable($callback)) { - $pw = $callback($pw); + $pw = $callback($pw, $dc); } } } diff --git a/system/modules/repository/classes/RepositorySettings.php b/system/modules/repository/classes/RepositorySettings.php index a739be21a6..0bbbe5a9b4 100644 --- a/system/modules/repository/classes/RepositorySettings.php +++ b/system/modules/repository/classes/RepositorySettings.php @@ -17,6 +17,7 @@ // valid core versions in descending order define('REPOSITORY_COREVERSIONS', + '30050409,30050409;'. // 3.5.40 '30050399,30050399;'. // 3.5.39 '30050389,30050389;'. // 3.5.38 '30050379,30050379;'. // 3.5.37