Skip to content

Commit

Permalink
MDL-78961 admin: correct smtppass preset configuration name.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Aug 28, 2023
1 parent 9bfcd77 commit b52132d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion admin/settings/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
$temp->add(new admin_setting_heading('adminpresets', new lang_string('siteadminpresetspluginname', 'core_adminpresets'), ''));
$sensiblesettingsdefault = 'recaptchapublickey@@none, recaptchaprivatekey@@none, googlemapkey3@@none, ';
$sensiblesettingsdefault .= 'secretphrase@@url, cronremotepassword@@none, smtpuser@@none, ';
$sensiblesettingsdefault .= 'smtppass@none, proxypassword@@none, quizpassword@@quiz, allowedip@@none, blockedip@@none, ';
$sensiblesettingsdefault .= 'smtppass@@none, proxypassword@@none, quizpassword@@quiz, allowedip@@none, blockedip@@none, ';
$sensiblesettingsdefault .= 'dbpass@@logstore_database, messageinbound_hostpass@@none, ';
$sensiblesettingsdefault .= 'bind_pw@@auth_cas, pass@@auth_db, bind_pw@@auth_ldap, ';
$sensiblesettingsdefault .= 'dbpass@@enrol_database, bind_pw@@enrol_ldap, ';
Expand Down
13 changes: 13 additions & 0 deletions lib/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3501,5 +3501,18 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2023082200.04);
}

if ($oldversion < 2023082600.01) {

// The previous default configuration had a typo, check for its presence and correct if necessary.
$sensiblesettings = get_config('adminpresets', 'sensiblesettings');
if (strpos($sensiblesettings, 'smtppass@none') !== false) {
$newsensiblesettings = str_replace('smtppass@none', 'smtppass@@none', $sensiblesettings);
set_config('sensiblesettings', $newsensiblesettings, 'adminpresets');
}

// Main savepoint reached.
upgrade_main_savepoint(true, 2023082600.01);
}

return true;
}
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

defined('MOODLE_INTERNAL') || die();

$version = 2023082600.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2023082600.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '4.3dev+ (Build: 20230826)'; // Human-friendly version name
Expand Down

0 comments on commit b52132d

Please sign in to comment.