version 1.1394, 2018/12/08 15:17:25
|
version 1.1396, 2018/12/22 01:56:25
|
Line 458 sub reply {
|
Line 458 sub reply {
|
unless (defined(&hostname($server))) { return 'no_such_host'; } |
unless (defined(&hostname($server))) { return 'no_such_host'; } |
my $answer=subreply($cmd,$server); |
my $answer=subreply($cmd,$server); |
if (($answer=~/^refused/) || ($answer=~/^rejected/)) { |
if (($answer=~/^refused/) || ($answer=~/^rejected/)) { |
&logthis("<font color=\"blue\">WARNING:". |
my $logged = $cmd; |
" $cmd to $server returned $answer</font>"); |
if ($cmd =~ /^encrypt:([^:]+):/) { |
|
my $subcmd = $1; |
|
if (($subcmd eq 'auth') || ($subcmd eq 'passwd') || |
|
($subcmd eq 'changeuserauth') || ($subcmd eq 'makeuser') || |
|
($subcmd eq 'putdom') || ($subcmd eq 'autoexportgrades')) { |
|
(undef,undef,my @rest) = split(/:/,$cmd); |
|
if (($subcmd eq 'auth') || ($subcmd eq 'putdom')) { |
|
splice(@rest,2,1,'Hidden'); |
|
} elsif ($subcmd eq 'passwd') { |
|
splice(@rest,2,2,('Hidden','Hidden')); |
|
} elsif (($subcmd eq 'changeuserauth') || ($subcmd eq 'makeuser') || |
|
($subcmd eq 'autoexportgrades')) { |
|
splice(@rest,3,1,'Hidden'); |
|
} |
|
$logged = join(':',('encrypt:'.$subcmd,@rest)); |
|
} |
|
} |
|
&logthis("<font color=\"blue\">WARNING:". |
|
" $logged to $server returned $answer</font>"); |
} |
} |
return $answer; |
return $answer; |
} |
} |
Line 1741 sub trusted_domains {
|
Line 1759 sub trusted_domains {
|
if (&domain($calldom) eq '') { |
if (&domain($calldom) eq '') { |
return ($trusted,$untrusted); |
return ($trusted,$untrusted); |
} |
} |
unless ($cmdtype =~ /^(content|shared|enroll|coaurem|domroles|catalog|reqcrs|msg)$/) { |
unless ($cmdtype =~ /^(content|shared|enroll|coaurem|othcoau|domroles|catalog|reqcrs|msg)$/) { |
return ($trusted,$untrusted); |
return ($trusted,$untrusted); |
} |
} |
my $callprimary = &domain($calldom,'primary'); |
my $callprimary = &domain($calldom,'primary'); |
Line 1763 sub trusted_domains {
|
Line 1781 sub trusted_domains {
|
map { $possexc{$_} = 1; } @{$trustconfig->{$cmdtype}->{'exc'}}; |
map { $possexc{$_} = 1; } @{$trustconfig->{$cmdtype}->{'exc'}}; |
} |
} |
if (ref($trustconfig->{$cmdtype}->{'inc'}) eq 'ARRAY') { |
if (ref($trustconfig->{$cmdtype}->{'inc'}) eq 'ARRAY') { |
|
$possinc{$intcalldom} = 1; |
map { $possinc{$_} = 1; } @{$trustconfig->{$cmdtype}->{'inc'}}; |
map { $possinc{$_} = 1; } @{$trustconfig->{$cmdtype}->{'inc'}}; |
} |
} |
} |
} |
Line 1797 sub trusted_domains {
|
Line 1816 sub trusted_domains {
|
} |
} |
foreach my $exc (@allexc) { |
foreach my $exc (@allexc) { |
if (ref($doms_by_intdom{$exc}) eq 'ARRAY') { |
if (ref($doms_by_intdom{$exc}) eq 'ARRAY') { |
$untrusted = $doms_by_intdom{$exc}; |
push(@{$untrusted},@{$doms_by_intdom{$exc}}); |
} |
} |
} |
} |
foreach my $inc (@allinc) { |
foreach my $inc (@allinc) { |
if (ref($doms_by_intdom{$inc}) eq 'ARRAY') { |
if (ref($doms_by_intdom{$inc}) eq 'ARRAY') { |
$trusted = $doms_by_intdom{$inc}; |
push(@{$trusted},@{$doms_by_intdom{$inc}}); |
} |
} |
} |
} |
} |
} |