--- loncom/interface/loncommon.pm 2006/12/01 21:52:29 1.483 +++ loncom/interface/loncommon.pm 2006/12/06 11:36:52 1.488 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.483 2006/12/01 21:52:29 albertel Exp $ +# $Id: loncommon.pm,v 1.488 2006/12/06 11:36:52 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2942,7 +2942,7 @@ sub blockcheck { last; } } - } else { + } else { if (&Apache::lonnet::allowed('evb',undef,undef,$checkrole)) { $no_ownblock = 1; last; @@ -5225,7 +5225,6 @@ sub record_sep { } } else { my @allfields; - &Apache::lonnet::logthis("file type is ".$env{'form.upfiletype'}); if ($env{'form.upfiletype'} eq 'semisv') { @allfields=split(/;/,$record); } else { @@ -6290,9 +6289,11 @@ sub construct_course { # if specified, key authority is not course, but user # only active if keyaccess is yes if ($args->{'keyauth'}) { - $args->{'keyauth'}=~s/[^\w\@]//g; - if ($args->{'keyauth'}) { - $cenv{'keyauth'}=$args->{'keyauth'}; + my ($user,$domain) = split(':',$args->{'keyauth'}); + $user = &LONCAPA::clean_username($user); + $domain = &LONCAPA::clean_username($domain); + if ($user ne '' && $domain ne '') { + $cenv{'keyauth'}=$user.':'.$domain; } }