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

raeburn raeburn at source.lon-capa.org
Sun Aug 9 23:22:54 EDT 2020


raeburn		Mon Aug 10 03:22:54 2020 EDT

  Modified files:              
    /loncom/auth	lonacc.pm 
  Log:
  - Bug 6400
    Authentication required by user with public session when accessing urls
    for deep-linking, i.e., /tiny/<domain>/uniqid 
  
  
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.177 loncom/auth/lonacc.pm:1.178
--- loncom/auth/lonacc.pm:1.177	Tue Apr 14 02:25:09 2020
+++ loncom/auth/lonacc.pm	Mon Aug 10 03:22:54 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Cookie Based Access Handler
 #
-# $Id: lonacc.pm,v 1.177 2020/04/14 02:25:09 raeburn Exp $
+# $Id: lonacc.pm,v 1.178 2020/08/10 03:22:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -609,7 +609,13 @@
             }
         }
         if ($requrl=~m{^/+tiny/+$match_domain/+\w+$}) {
-            return OK;
+            if ($env{'user.name'} eq 'public' &&
+                $env{'user.domain'} eq 'public') {
+                $env{'request.firsturl'}=$requrl;
+                return FORBIDDEN;
+            } else {
+                return OK;
+            }
         }
 # ---------------------------------------------------------------- Check access
 	my $now = time;




More information about the LON-CAPA-cvs mailing list