]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18006 MDL-18807 MDL-20853 warn that the default salt is definitely weak
authorPetr Skoda <skodak@moodle.org>
Tue, 17 Nov 2009 16:36:23 +0000 (16:36 +0000)
committerPetr Skoda <skodak@moodle.org>
Tue, 17 Nov 2009 16:36:23 +0000 (16:36 +0000)
admin/report/security/lib.php

index e20c7e812912a59044a62d4dc453ab9334bcc055..16a9232f23b476c118f6e8e6881fbc49665355bd 100644 (file)
@@ -488,7 +488,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 {