--- loncom/auth/lonacc.pm 2014/12/01 22:52:54 1.160 +++ loncom/auth/lonacc.pm 2015/12/03 20:40:21 1.162 @@ -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.162 2015/12/03 20:40:21 damieng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -203,6 +203,14 @@ sub get_posted_cgi { $fname=''; $fmime=''; } + if ($i<$#lines && $lines[$i+1]=~/^Content\-Type\:\s*([\w\-\/]+)/i) { + # TODO: something with $1 ! + $i++; + } + if ($i<$#lines && $lines[$i+1]=~/^Content\-transfer\-encoding\:\s*([\w\-\/]+)/i) { + # TODO: something with $1 ! + $i++; + } $i++; } } else { @@ -290,7 +298,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;