--- loncom/auth/lonacc.pm 2014/12/01 22:52:54 1.160 +++ loncom/auth/lonacc.pm 2015/01/23 15:44:20 1.161 @@ -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 @@ sub sso_login { return undef; } - my ($user) = ($r->user =~ m/([a-zA-Z0-9_\-@.]*)/); + my ($user) = ($r->user =~ m/^($match_username)$/); + if ($user eq '') { + return undef; + } my $query = $r->args; my %form;