--- loncom/auth/lonauth.pm 2021/08/10 15:28:13 1.166 +++ loncom/auth/lonauth.pm 2021/10/26 15:10:34 1.167 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.166 2021/08/10 15:28:13 raeburn Exp $ +# $Id: lonauth.pm,v 1.167 2021/10/26 15:10:34 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -709,7 +709,7 @@ sub handler { } if ($form{'linkprot'}) { $env{'request.linkprot'} = $form{'linkprot'}; - } elsif ($form{'linkkey'}) { + } elsif ($form{'linkkey'} ne '') { $env{'request.linkkey'} = $form{'linkkey'}; } if ($form{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) { @@ -740,7 +740,7 @@ sub handler { } if ($form{'linkprot'}) { $env{'request.linkprot'} = $form{'linkprot'}; - } elsif ($form{'linkkey'}) { + } elsif ($form{'linkkey'} ne '') { $env{'request.linkkey'} = $form{'linkkey'}; } if ($form{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) { @@ -779,7 +779,7 @@ sub handler { undef,\%form); if ($form{'linkprot'}) { $env{'request.linkprot'} = $form{'linkprot'}; - } elsif ($form{'linkkey'}) { + } elsif ($form{'linkkey'} ne '') { $env{'request.linkkey'} = $form{'linkkey'}; } if ($form{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) { @@ -799,7 +799,7 @@ sub handler { $extra_env = {'user.linkprotector' => $linkprotector, 'user.linkproturi' => $uri}; } - } elsif ($form{'linkkey'}) { + } elsif ($form{'linkkey'} ne '') { $extra_env = {'user.deeplinkkey' => $form{'linkkey'}, 'user.keyedlinkuri' => $form{'firsturl'}}; } @@ -811,7 +811,7 @@ sub handler { } else { $extra_env = {'request.linkprot' => $form{'linkprot'}}; } - } elsif ($form{'linkkey'}) { + } elsif ($form{'linkkey'} ne '') { if (ref($extra_env) eq 'HASH') { %{$extra_env} = ( %{$extra_env}, 'request.linkkey' => $form{'linkkey'} ); } else { @@ -938,7 +938,7 @@ sub check_can_host { if ($form->{'linkprot'}) { $env{'request.linkprot'} = $form->{'linkprot'}; } elsif ($form->{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) { - if ($form->{'linkkey'}) { + if ($form->{'linkkey'} ne '') { $env{'request.linkkey'} = $form->{'linkkey'}; } $env{'request.deeplink.login'} = $form->{'firsturl'};