--- loncom/auth/lonacc.pm 2014/12/01 22:52:54 1.160 +++ loncom/auth/lonacc.pm 2016/02/20 00:12:49 1.163 @@ -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.163 2016/02/20 00:12:49 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -109,7 +109,6 @@ sub cleanup { my ($r)=@_; if (! $r->is_initial_req()) { return DECLINED; } &Apache::lonnet::save_cache(); - &Apache::lontexconvert::jsMath_reset(); return OK; } @@ -203,6 +202,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 +297,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;