--- loncom/interface/loncommon.pm 2019/05/05 23:19:47 1.1331 +++ loncom/interface/loncommon.pm 2020/01/10 05:08:39 1.1335 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1331 2019/05/05 23:19:47 raeburn Exp $ +# $Id: loncommon.pm,v 1.1335 2020/01/10 05:08:39 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3571,16 +3571,17 @@ sub check_passwd_rules { my ($domain,$plainpass) = @_; my %passwdconf = &Apache::lonnet::get_passwdconf($domain); my ($min,$max,@chars,@brokerule,$warning); + $min = $Apache::lonnet::passwdmin; if (ref($passwdconf{'chars'}) eq 'ARRAY') { if ($passwdconf{'min'} =~ /^\d+$/) { - $min = $passwdconf{'min'}; + if ($passwdconf{'min'} > $min) { + $min = $passwdconf{'min'}; + } } if ($passwdconf{'max'} =~ /^\d+$/) { $max = $passwdconf{'max'}; } @chars = @{$passwdconf{'chars'}}; - } else { - $min = 7; } if (($min) && (length($plainpass) < $min)) { push(@brokerule,'min'); @@ -3597,7 +3598,7 @@ sub check_passwd_rules { } } if ($rules{'lc'}) { - unless ($plainpass =~ /a-z/) { + unless ($plainpass =~ /[a-z]/) { push(@brokerule,'lc'); } } @@ -3633,6 +3634,9 @@ sub check_passwd_rules { } $warning .= ''; } + if (wantarray) { + return @brokerule; + } return $warning; } @@ -7254,7 +7258,8 @@ table.LC_prior_tries td { padding: 6px; } -.LC_answer_unknown { +.LC_answer_unknown, +.LC_answer_warning { background: orange; color: black; padding: 6px; @@ -8250,6 +8255,14 @@ ul.LC_funclist li { cursor:pointer; } +pre.LC_wordwrap { + white-space: pre-wrap; + white-space: -moz-pre-wrap; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + word-wrap: break-word; +} + /* styles used for response display */