--- loncom/auth/lonauth.pm 2006/10/12 18:18:01 1.86 +++ loncom/auth/lonauth.pm 2006/11/23 01:49:41 1.87 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.86 2006/10/12 18:18:01 albertel Exp $ +# $Id: lonauth.pm,v 1.87 2006/11/23 01:49:41 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -173,8 +173,7 @@ sub handler { my $lonid=$cookies{'lonID'}; my $cookie; if ($lonid) { - my $handle=$lonid->value; - $handle=~s/\W//g; + my $handle=&LONCAPA::clean_handle($lonid->value); my $lonidsdir=$r->dir_config('lonIDsDir'); if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) { # Indeed, a valid token is found @@ -221,9 +220,9 @@ ENDFAILED # split user logging in and "su"-user ($form{'uname'},$form{'suname'})=split(/\:/,$form{'uname'}); - $form{'uname'} =~ s/\W//g; - $form{'suname'} =~ s/\W//g; - $form{'udom'} =~ s/\W//g; + $form{'uname'} = &LONCAPA::clean_username($form{'uname'}); + $form{'suname'}= &LONCAPA::clean_username($form{'suname'}); + $form{'udom'} = &LONCAPA::clean_domain( $form{'udom'}); my $role = $r->dir_config('lonRole'); my $domain = $r->dir_config('lonDefDomain');