version 1.72.4.4, 2020/09/08 18:35:31
|
version 1.78, 2019/05/05 23:19:47
|
Line 570 sub javascript_validmail {
|
Line 570 sub javascript_validmail {
|
my %js_lt = &Apache::lonlocal::texthash ( |
my %js_lt = &Apache::lonlocal::texthash ( |
email => 'The e-mail address you entered', |
email => 'The e-mail address you entered', |
notv => 'is not a valid e-mail address', |
notv => 'is not a valid e-mail address', |
avae => 'A valid e-mail address is not formed when the value you entered is combined with the required domain', |
avae => 'A valid e-mail address is not formed when the value you entered', |
|
isco => 'is combined with the required domain', |
); |
); |
my $output = "\n".'<script type="text/javascript">'."\n". |
my $output = "\n".'<script type="text/javascript">'."\n". |
'// <![CDATA['."\n". |
'// <![CDATA['."\n". |
Line 582 function validate_email(client) {
|
Line 583 function validate_email(client) {
|
var condition = '$condition'; |
var condition = '$condition'; |
if (validmail(field,condition) == false) { |
if (validmail(field,condition) == false) { |
if ((condition != undefined) && (condition != '')) { |
if ((condition != undefined) && (condition != '')) { |
alert("$js_lt{'avae'}: "+condition); |
alert("$js_lt{'avae'}: "+field.value+" $js_lt{'isco'}: "+condition); |
} else { |
} else { |
alert("$js_lt{'email'}: "+field.value+" $js_lt{'notv'}."); |
alert("$js_lt{'email'}: "+field.value+" $js_lt{'notv'}."); |
} |
} |
Line 932 sub send_token {
|
Line 933 sub send_token {
|
# Check if the password entered by the user satisfies domain's requirements |
# Check if the password entered by the user satisfies domain's requirements |
my %passwdconf = &Apache::lonnet::get_passwdconf($domain); |
my %passwdconf = &Apache::lonnet::get_passwdconf($domain); |
my ($min,$max,@chars); |
my ($min,$max,@chars); |
$min = $Apache::lonnet::passwdmin; |
|
if (ref($passwdconf{'chars'}) eq 'ARRAY') { |
if (ref($passwdconf{'chars'}) eq 'ARRAY') { |
if ($passwdconf{'min'} =~ /^\d+$/) { |
if ($passwdconf{'min'} =~ /^\d+$/) { |
if ($passwdconf{'min'} > $min) { |
$min = $passwdconf{'min'}; |
$min = $passwdconf{'min'}; |
|
} |
|
} |
} |
if ($passwdconf{'max'} =~ /^\d+$/) { |
if ($passwdconf{'max'} =~ /^\d+$/) { |
$max = $passwdconf{'max'}; |
$max = $passwdconf{'max'}; |
} |
} |
@chars = @{$passwdconf{'chars'}}; |
@chars = @{$passwdconf{'chars'}}; |
} |
|
my $encpass = $env{'form.upass'}; |
|
if ($encpass eq '') { |
|
$msg = &mt('Password retrieved was blank.'). |
|
'<br /><p>'.&mt('[_1]Return[_2] to the previous page to try again.', |
|
'<a href="javascript:document.retryemail.submit();">','</a>'); |
|
$earlyout = 1; |
|
} else { |
} else { |
|
$min = 7; |
|
} |
|
if (($min ne '') || ($max ne '') || (@chars > 0)) { |
|
my ($plainpass,$encpass); |
|
my $encpass = $env{'form.upass'}; |
|
if ($encpass eq '') { |
|
$msg = &mt('Password retrieved was blank.'). |
|
'<br /><p>'.&mt('[_1]Return[_2] to the previous page to try again.', |
|
'<a href="javascript:document.retryemail.submit();">','</a>'); |
|
$earlyout = 1; |
|
} else { |
# Split the logtoken to retrieve the DES key and decrypt the encypted password |
# Split the logtoken to retrieve the DES key and decrypt the encypted password |
my ($key,$caller)=split(/&/,$tmpinfo); |
my ($key,$caller)=split(/&/,$tmpinfo); |
if ($caller eq 'createaccount') { |
if ($caller eq 'createaccount') { |
my $plainpass = &Apache::loncommon::des_decrypt($key,$encpass); |
$plainpass = &Apache::loncommon::des_decrypt($key,$encpass); |
if (($min > 0) || ($max ne '') || (@chars > 0)) { |
|
my $warning = &Apache::loncommon::check_passwd_rules($domain,$plainpass); |
my $warning = &Apache::loncommon::check_passwd_rules($domain,$plainpass); |
if ($warning) { |
if ($warning) { |
$msg = $warning. |
$msg = $warning. |