diff --git a/admin/settings/security.php b/admin/settings/security.php index a703f9e0155..911f072620a 100644 --- a/admin/settings/security.php +++ b/admin/settings/security.php @@ -152,7 +152,8 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page $sensiblesettingsdefault .= 'server_password@@search_solr, ssl_keypassword@@search_solr, '; $sensiblesettingsdefault .= 'alternateserver_password@@search_solr, alternatessl_keypassword@@search_solr, '; $sensiblesettingsdefault .= 'test_password@@cachestore_redis, password@@mlbackend_python, '; - $sensiblesettingsdefault .= 'badges_badgesalt@@none, calendar_exportsalt@@none'; + $sensiblesettingsdefault .= 'badges_badgesalt@@none, calendar_exportsalt@@none, '; + $sensiblesettingsdefault .= 'bigbluebuttonbn_shared_secret@@none'; $temp->add(new admin_setting_configtextarea('adminpresets/sensiblesettings', get_string('sensiblesettings', 'core_adminpresets'), get_string('sensiblesettingstext', 'core_adminpresets'), diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index dfb4c344bc9..5f272622d5c 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -3111,5 +3111,21 @@ privatefiles,moodle|/user/files.php'; upgrade_main_savepoint(true, 2022112805.14); } + if ($oldversion < 2022112811.09) { + + // Fix missing default admin presets "sensible settings" (those that should be treated as sensitive). + $newsensiblesetting = 'bigbluebuttonbn_shared_secret@@none'; + + $sensiblesettings = get_config('adminpresets', 'sensiblesettings'); + if (strpos($sensiblesettings, $newsensiblesetting) === false) { + $sensiblesettings .= ", {$newsensiblesetting}"; + } + + set_config('sensiblesettings', $sensiblesettings, 'adminpresets'); + + // Main savepoint reached. + upgrade_main_savepoint(true, 2022112811.09); + } + return true; } diff --git a/version.php b/version.php index 7f69f00af2d..a4fc395b400 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2022112811.08; // 20221128 = branching date YYYYMMDD - do not modify! +$version = 2022112811.09; // 20221128 = branching date YYYYMMDD - do not modify! // RR = release increments - 00 in DEV branches. // .XX = incremental changes. $release = '4.1.11+ (Build: 20240802)'; // Human-friendly version name