[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Mon Aug 19 13:35:35 EDT 2019
raeburn Mon Aug 19 17:35:35 2019 EDT
Modified files: (Branch: version_2_11_X)
/loncom/lonnet/perl lonnet.pm
Log:
- For 2.11
Backport 1.1396
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1172.2.110 loncom/lonnet/perl/lonnet.pm:1.1172.2.111
--- loncom/lonnet/perl/lonnet.pm:1.1172.2.110 Mon Aug 19 17:27:49 2019
+++ loncom/lonnet/perl/lonnet.pm Mon Aug 19 17:35:34 2019
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1172.2.110 2019/08/19 17:27:49 raeburn Exp $
+# $Id: lonnet.pm,v 1.1172.2.111 2019/08/19 17:35:34 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -409,8 +409,26 @@
unless (defined(&hostname($server))) { return 'no_such_host'; }
my $answer=subreply($cmd,$server);
if (($answer=~/^refused/) || ($answer=~/^rejected/)) {
- &logthis("<font color=\"blue\">WARNING:".
- " $cmd to $server returned $answer</font>");
+ my $logged = $cmd;
+ 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, at rest));
+ }
+ }
+ &logthis("<font color=\"blue\">WARNING:".
+ " $logged to $server returned $answer</font>");
}
return $answer;
}
More information about the LON-CAPA-cvs
mailing list