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

raeburn raeburn at source.lon-capa.org
Fri Jan 23 10:44:20 EST 2015


raeburn		Fri Jan 23 15:44:20 2015 EDT

  Modified files:              
    /loncom/auth	lonacc.pm 
  Log:
  - Use $LONCAPA::match_username regexp for extraction of username for SSO
    user from $r->user().
  
  
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.160 loncom/auth/lonacc.pm:1.161
--- loncom/auth/lonacc.pm:1.160	Mon Dec  1 22:52:54 2014
+++ loncom/auth/lonacc.pm	Fri Jan 23 15:44:20 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Cookie Based Access Handler
 #
-# $Id: lonacc.pm,v 1.160 2014/12/01 22:52:54 raeburn Exp $
+# $Id: lonacc.pm,v 1.161 2015/01/23 15:44:20 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -290,7 +290,10 @@
 	return undef;
     }
 
-    my ($user) = ($r->user =~ m/([a-zA-Z0-9_\- at .]*)/);
+    my ($user) = ($r->user =~ m/^($match_username)$/);
+    if ($user eq '') {
+        return undef;
+    }
 
     my $query = $r->args;
     my %form;




More information about the LON-CAPA-cvs mailing list