--- loncom/auth/lonshibauth.pm 2021/12/12 20:49:26 1.14 +++ loncom/auth/lonshibauth.pm 2022/06/18 02:10:18 1.15 @@ -2,7 +2,7 @@ # Redirect Single Sign On authentication to designated URL: # /adm/sso, by default. # -# $Id: lonshibauth.pm,v 1.14 2021/12/12 20:49:26 raeburn Exp $ +# $Id: lonshibauth.pm,v 1.15 2022/06/18 02:10:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -293,6 +293,10 @@ sub set_token { &Apache::lonacc::get_posted_cgi($r,['linkkey']); } } + unless (($r->is_initial_req()) || ($env{'form.ltoken'}) || + ($env{'form.linkkey'})) { + return; + } } my $extras; foreach my $name (@names) { @@ -302,6 +306,9 @@ sub set_token { &Apache::lonnet::tmpdel($env{'form.ltoken'}); if ($info{'linkprot'}) { $extras .= '&linkprot='.&escape($info{'linkprot'}); + if ($info{'linkprotuser'} ne '') { + $extras .= '&linkprotuser='.&escape($info{'linkprotuser'}); + } last; } } else {