--- loncom/auth/lonauth.pm 2006/10/12 18:18:01 1.86 +++ loncom/auth/lonauth.pm 2007/07/25 22:35:47 1.88 @@ -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.88 2007/07/25 22:35:47 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -122,6 +122,7 @@ sub failed { {'no_inline_link' => 1,}); my $end_page = &Apache::loncommon::end_page(); + $message = &mt($message); my %lt=('sorry' => &mt('Sorry ...'), 'please' => &mt('Please [_1]log in again[_2].', @@ -173,8 +174,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 +221,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');