[LON-CAPA-cvs] cvs: loncom /auth lonauth.pm

raeburn raeburn at source.lon-capa.org
Tue Oct 26 11:10:34 EDT 2021


raeburn		Tue Oct 26 15:10:34 2021 EDT

  Modified files:              
    /loncom/auth	lonauth.pm 
  Log:
  - 0 is a valid linkkey.
  
  
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.166 loncom/auth/lonauth.pm:1.167
--- loncom/auth/lonauth.pm:1.166	Tue Aug 10 15:28:13 2021
+++ loncom/auth/lonauth.pm	Tue Oct 26 15:10:34 2021
@@ -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 @@
             }
             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 @@
                 }
                 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 @@
                          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 @@
                 $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 @@
                 } 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 @@
             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'};




More information about the LON-CAPA-cvs mailing list