--- loncom/auth/lonauth.pm 2018/07/04 16:58:19 1.154 +++ loncom/auth/lonauth.pm 2018/11/10 10:53:01 1.155 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.154 2018/07/04 16:58:19 raeburn Exp $ +# $Id: lonauth.pm,v 1.155 2018/11/10 10:53:01 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -298,6 +298,12 @@ sub failed { $retry .= (($retry=~/\?/)?'&':'?').'symb='.$symb; } } + if (exists($form->{firsturl})) { + my $firsturl = &Apache::loncommon::cleanup_html($form->{firsturl}); + if ($firsturl ne '') { + $retry .= (($retry=~/\?/)?'&':'?').'firsturl='.$firsturl; + } + } my $end_page = &Apache::loncommon::end_page(); &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; @@ -442,6 +448,9 @@ sub handler { if ($iptokenstr) { $iptokenstr = &unescape($iptokenstr); } + if ($firsturl =~ m{^/tiny/$match_domain/\w+$}) { + $form{'firsturl'} = $firsturl; + } if ($rolestr =~ /^role=/) { (undef,$form{'role'}) = split('=',$rolestr); }