From 37722eca39874bb6abdcd120e3e458bd62dea62b Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 5 Jul 2017 11:43:18 -0700 Subject: Bug 1377933 - Remove trailing whitespace from all perl files --- Bugzilla/Auth.pm | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'Bugzilla/Auth.pm') diff --git a/Bugzilla/Auth.pm b/Bugzilla/Auth.pm index 522fbebf3..797ec1122 100644 --- a/Bugzilla/Auth.pm +++ b/Bugzilla/Auth.pm @@ -137,7 +137,7 @@ sub can_change_password { my $verifier = $self->{_verifier}->{successful}; $verifier ||= $self->{_verifier}; my $getter = $self->{_info_getter}->{successful}; - $getter = $self->{_info_getter} + $getter = $self->{_info_getter} if (!$getter || $getter->isa('Bugzilla::Auth::Login::Cookie')); return $verifier->can_change_password && $getter->user_can_create_account; @@ -219,7 +219,7 @@ sub _handle_login_result { } } elsif ($fail_code == AUTH_NODATA) { - $self->{_info_getter}->fail_nodata($self) + $self->{_info_getter}->fail_nodata($self) if $login_type == LOGIN_REQUIRED; # If we're not LOGIN_REQUIRED, we just return the default user. @@ -230,9 +230,9 @@ sub _handle_login_result { # the password was just wrong. (This makes it harder for a cracker # to find account names by brute force) elsif ($fail_code == AUTH_LOGINFAILED or $fail_code == AUTH_NO_SUCH_USER) { - my $remaining_attempts = MAX_LOGIN_ATTEMPTS + my $remaining_attempts = MAX_LOGIN_ATTEMPTS - ($result->{failure_count} || 0); - ThrowUserError("invalid_username_or_password", + ThrowUserError("invalid_username_or_password", { remaining => $remaining_attempts }); } # The account may be disabled @@ -247,18 +247,18 @@ sub _handle_login_result { elsif ($fail_code == AUTH_LOCKOUT) { my $attempts = $user->account_ip_login_failures; - # We want to know when the account will be unlocked. This is + # We want to know when the account will be unlocked. This is # determined by the 5th-from-last login failure (or more/less than # 5th, if MAX_LOGIN_ATTEMPTS is not 5). my $determiner = $attempts->[scalar(@$attempts) - MAX_LOGIN_ATTEMPTS]; - my $unlock_at = datetime_from($determiner->{login_time}, + my $unlock_at = datetime_from($determiner->{login_time}, Bugzilla->local_timezone); $unlock_at->add(minutes => LOGIN_LOCKOUT_INTERVAL); # If we were *just* locked out, notify the maintainer about the # lockout. if ($result->{just_locked_out}) { - # We're sending to the maintainer, who may be not a Bugzilla + # We're sending to the maintainer, who may be not a Bugzilla # account, but just an email address. So we use the # installation's default language for sending the email. my $default_settings = Bugzilla::User::Setting::get_defaults(); @@ -289,7 +289,7 @@ sub _handle_login_result { } $unlock_at->set_time_zone($user->timezone); - ThrowUserError('account_locked', + ThrowUserError('account_locked', { ip_addr => $determiner->{ip_addr}, unlock_at => $unlock_at }); } # If we get here, then we've run out of options, which shouldn't happen. @@ -314,11 +314,11 @@ Bugzilla::Auth - An object that authenticates the login credentials for Handles authentication for Bugzilla users. Authentication from Bugzilla involves two sets of modules. One set is -used to obtain the username/password (from CGI, email, etc), and the -other set uses this data to authenticate against the datasource +used to obtain the username/password (from CGI, email, etc), and the +other set uses this data to authenticate against the datasource (the Bugzilla DB, LDAP, PAM, etc.). -Modules for obtaining the username/password are subclasses of +Modules for obtaining the username/password are subclasses of L, and modules for authenticating are subclasses of L. @@ -342,11 +342,11 @@ An error occurred when trying to use the login mechanism. The hashref will also contain an C element, which is the name of an error from C