From e9a71201b08fef2b1e122ba439f1d4be64011187 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Tue, 17 Nov 2009 16:35:08 +0000 Subject: [PATCH] MDL-18006 MDL-18807 MDL-20853 warn that the default salt is definitely weak --- admin/report/security/lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/report/security/lib.php b/admin/report/security/lib.php index bfa62ac1ccf..0591628cbfe 100644 --- a/admin/report/security/lib.php +++ b/admin/report/security/lib.php @@ -500,7 +500,8 @@ function report_security_check_passwordsaltmain($detailed=false) { if (empty($CFG->passwordsaltmain)) { $result->status = REPORT_SECURITY_WARNING; $result->info = get_string('check_passwordsaltmain_warning', 'report_security'); - } else if (trim($CFG->passwordsaltmain)=='' || preg_match('/^([\w]+|[\d]+)$/i', $CFG->passwordsaltmain)) { + } else if ($CFG->passwordsaltmain === 'a_very_long_random_string_of_characters#@6&*1' + || trim($CFG->passwordsaltmain) === '' || preg_match('/^([\w]+|[\d]+)$/i', $CFG->passwordsaltmain)) { $result->status = REPORT_SECURITY_WARNING; $result->info = get_string('check_passwordsaltmain_weak', 'report_security'); } else {