Diff for /loncom/auth/lonauth.pm between versions 1.158 and 1.159

version 1.158, 2019/06/16 22:32:04 version 1.159, 2020/03/15 23:04:10
Line 46  use Digest::MD5; Line 46  use Digest::MD5;
 # ------------------------------------------------------------ Successful login  # ------------------------------------------------------------ Successful login
 sub success {  sub success {
     my ($r, $username, $domain, $authhost, $lowerurl, $extra_env,      my ($r, $username, $domain, $authhost, $lowerurl, $extra_env,
  $form,$skipcritical) = @_;   $form,$skipcritical,$cid) = @_;
   
 # ------------------------------------------------------------ Get cookie ready  # ------------------------------------------------------------ Get cookie ready
     my $cookie =      my $cookie =
Line 148  sub success { Line 148  sub success {
     }      }
     if (defined($form->{symb})) {      if (defined($form->{symb})) {
         my $destsymb = $form->{symb};          my $destsymb = $form->{symb};
           my $encrypted;
           if ($destsymb =~ m{^/enc/}) {
               $encrypted = 1;
               if ($cid) {
                   $destsymb = &Apache::lonenc::unencrypted($destsymb,$cid);
               }
           }
         $destination  .= ($destination =~ /\?/) ? '&' : '?';          $destination  .= ($destination =~ /\?/) ? '&' : '?';
         if ($destsymb =~ /___/) {          if ($destsymb =~ /___/) {
             # FIXME Need to deal with encrypted symbs and urls as needed.  
             my ($map,$resid,$desturl)=split(/___/,$destsymb);              my ($map,$resid,$desturl)=split(/___/,$destsymb);
             $desturl = &Apache::lonnet::clutter($desturl);              $desturl = &Apache::lonnet::clutter($desturl);
               if ($encrypted) {
                   $desturl = &Apache::lonenc::encrypted($desturl,1,$cid);
                   $destsymb = $form->{symb};
               }
             $desturl = &HTML::Entities::encode($desturl,'"<>&');              $desturl = &HTML::Entities::encode($desturl,'"<>&');
             $destsymb = &HTML::Entities::encode($destsymb,'"<>&');              $destsymb = &HTML::Entities::encode($destsymb,'"<>&');
             $destination .= 'destinationurl='.$desturl.              $destination .= 'destinationurl='.$desturl.
                             '&destsymb='.$destsymb;                              '&destsymb='.$destsymb;
         } else {          } elsif (!$encrypted) {
             $destsymb = &HTML::Entities::encode($destsymb,'"<>&');              $destsymb = &HTML::Entities::encode($destsymb,'"<>&');
             $destination .= 'destinationurl='.$destsymb;              $destination .= 'destinationurl='.$destsymb;
         }          }

Removed from v.1.158  
changed lines
  Added in v.1.159


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>