Fixed #10450: Different errormessages on login failure
This commit is contained in:
parent
20a333cde8
commit
aab891a5b6
5 changed files with 21 additions and 8 deletions
|
|
@ -134,7 +134,7 @@ sub authenticate {
|
|||
my $uid = $user->{userId};
|
||||
#If userId does not exist or is not active, fail login
|
||||
if (!$uid) {
|
||||
$self->error($i18n->get(68));
|
||||
$self->authenticationError;
|
||||
return 0;
|
||||
} elsif($user->{status} ne 'Active') {
|
||||
$self->error($i18n->get(820));
|
||||
|
|
@ -147,6 +147,22 @@ sub authenticate {
|
|||
return 1;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 authenticationError
|
||||
|
||||
This subroutine is called by authenticate and its subclasses to make
|
||||
sure these subroutines return the same errormessage on login failure.
|
||||
Different errormessages would reveil if a username exists after
|
||||
which only the password has to be guessed by brute force for example.
|
||||
|
||||
=cut
|
||||
|
||||
sub authenticationError {
|
||||
my $self = shift;
|
||||
my $i18n = WebGUI::International->new($self->session);
|
||||
return ($self->error('<li>'.$i18n->get(68).'</li>'));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 authMethod ( [authMethod] )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue