--- loncom/interface/lonmsgdisplay.pm 2022/01/19 15:06:22 1.181.2.9 +++ loncom/interface/lonmsgdisplay.pm 2023/09/15 12:02:57 1.181.2.9.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.181.2.9 2022/01/19 15:06:22 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.181.2.9.2.2 2023/09/15 12:02:57 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -111,6 +111,7 @@ use Apache::loncommunicate; use Apache::lonfeedback; use Apache::lonrss(); use Apache::lonselstudent(); +use Apache::lonenc(); use lib '/home/httpd/lib/perl/'; use LONCAPA qw(:DEFAULT :match); @@ -2702,9 +2703,10 @@ sub displayresource { && (&Apache::lonnet::allowed('vgr',$content{'courseid'}))) { my $symb; if (defined($content{'symb'})) { - $symb = $content{'symb'}; - } else { - $symb=&Apache::lonnet::symbread($content{'baseurl'}); + $symb = &Apache::lonenc::check_decrypt($content{'symb'}); + } elsif (defined($content{'baseurl'})) { + $symb = + &Apache::lonnet::symbread(&Apache::lonenc::check_decrypt($content{'baseurl'})); } # Could not get a symb, give up unless ($symb) { return $content{'citation'}; } @@ -3165,9 +3167,24 @@ sub handler { 'sendreply','compose','sendmail','critical','recname','recdom', 'recordftf','sortedby','folder','startdis','interdis', 'showcommentbaseurl','dismode','group','subject','text','ref', - 'msgstatus']); + 'msgstatus','btoken']); $sqs='&sortedby='.$env{'form.sortedby'}; +# ----------- Check if access was from balancer to server with existing session + + if ($env{'form.btoken'}) { + my %info = &Apache::lonnet::tmpget($env{'form.btoken'}); + &Apache::lonnet::tmpdel($env{'form.btoken'}); + delete($env{'form.btoken'}); + unless ($env{'form.display'}) { + if (($info{'display'}) && ($info{'mailrecip'})) { + if (&unescape($info{'mailrecip'}) eq $env{'user.name'}.':'.$env{'user.domain'}) { + $env{'form.display'} = &unescape($info{'display'}); + } + } + } + } + # ------------------------------------------------------ They checked for email &Apache::lonnet::put('email_status',{'recnewemail'=>0});