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/Login.pm | 4 ++-- Bugzilla/Auth/Login/CGI.pm | 2 +- Bugzilla/Auth/Login/Cookie.pm | 4 ++-- Bugzilla/Auth/Login/Env.pm | 2 +- Bugzilla/Auth/Login/Stack.pm | 6 +++--- Bugzilla/Auth/Persist/Cookie.pm | 8 ++++---- Bugzilla/Auth/Verify.pm | 12 ++++++------ Bugzilla/Auth/Verify/DB.pm | 2 +- Bugzilla/Auth/Verify/LDAP.pm | 14 +++++++------- 9 files changed, 27 insertions(+), 27 deletions(-) (limited to 'Bugzilla/Auth') diff --git a/Bugzilla/Auth/Login.pm b/Bugzilla/Auth/Login.pm index a5f089777..49d670d93 100644 --- a/Bugzilla/Auth/Login.pm +++ b/Bugzilla/Auth/Login.pm @@ -22,7 +22,7 @@ use constant requires_persistence => 1; use constant requires_verification => 1; use constant user_can_create_account => 0; use constant is_automatic => 0; -use constant extern_id_used => 0; +use constant extern_id_used => 0; sub new { my ($class) = @_; @@ -87,7 +87,7 @@ Returns: Never Returns. =head1 INFO METHODS -These are methods that describe the capabilities of this +These are methods that describe the capabilities of this C object. These are all no-parameter methods that return either C or C. diff --git a/Bugzilla/Auth/Login/CGI.pm b/Bugzilla/Auth/Login/CGI.pm index dad6ddb7c..22a765f61 100644 --- a/Bugzilla/Auth/Login/CGI.pm +++ b/Bugzilla/Auth/Login/CGI.pm @@ -77,7 +77,7 @@ sub fail_nodata { print $cgi->header(); $template->process("account/auth/login.html.tmpl", - { 'target' => $cgi->url(-relative=>1) }) + { 'target' => $cgi->url(-relative=>1) }) || ThrowTemplateError($template->error()); exit; } diff --git a/Bugzilla/Auth/Login/Cookie.pm b/Bugzilla/Auth/Login/Cookie.pm index b52e3e7c1..9a94fe019 100644 --- a/Bugzilla/Auth/Login/Cookie.pm +++ b/Bugzilla/Auth/Login/Cookie.pm @@ -112,9 +112,9 @@ sub get_login_info { } } - # If we logged in successfully, then update the lastused + # If we logged in successfully, then update the lastused # time on the login cookie - $dbh->do("UPDATE logincookies SET lastused = NOW() + $dbh->do("UPDATE logincookies SET lastused = NOW() WHERE cookie = ?", undef, $login_cookie); return { user_id => $user_id }; } diff --git a/Bugzilla/Auth/Login/Env.pm b/Bugzilla/Auth/Login/Env.pm index 9d3da183f..a4de8c638 100644 --- a/Bugzilla/Auth/Login/Env.pm +++ b/Bugzilla/Auth/Login/Env.pm @@ -33,7 +33,7 @@ sub get_login_info { return { failure => AUTH_NODATA } if !$env_email; - return { username => $env_email, extern_id => $env_id, + return { username => $env_email, extern_id => $env_id, realname => $env_realname }; } diff --git a/Bugzilla/Auth/Login/Stack.pm b/Bugzilla/Auth/Login/Stack.pm index dc35998e4..d44ebbd46 100644 --- a/Bugzilla/Auth/Login/Stack.pm +++ b/Bugzilla/Auth/Login/Stack.pm @@ -51,12 +51,12 @@ sub get_login_info { } $result = $object->get_login_info(@_); $self->{successful} = $object; - + # We only carry on down the stack if this method denied all knowledge. last unless ($result->{failure} - && ($result->{failure} eq AUTH_NODATA + && ($result->{failure} eq AUTH_NODATA || $result->{failure} eq AUTH_NO_SUCH_USER)); - + # If none of the methods succeed, it's undef. $self->{successful} = undef; } diff --git a/Bugzilla/Auth/Persist/Cookie.pm b/Bugzilla/Auth/Persist/Cookie.pm index f39ad7de3..57473f551 100644 --- a/Bugzilla/Auth/Persist/Cookie.pm +++ b/Bugzilla/Auth/Persist/Cookie.pm @@ -34,7 +34,7 @@ sub persist_login { $dbh->bz_start_transaction(); - my $login_cookie = + my $login_cookie = Bugzilla::Token::GenerateUniqueToken('logincookies', 'cookie'); my $ip_addr = remote_ip(); @@ -61,13 +61,13 @@ sub persist_login { if ( Bugzilla->params->{'rememberlogin'} eq 'on' || (Bugzilla->params->{'rememberlogin'} ne 'off' && $input_params->{'Bugzilla_remember'} && - $input_params->{'Bugzilla_remember'} eq 'on') ) + $input_params->{'Bugzilla_remember'} eq 'on') ) { # Not a session cookie, so set an infinite expiry $cookieargs{'-expires'} = 'Fri, 01-Jan-2038 00:00:00 GMT'; } if (Bugzilla->params->{'ssl_redirect'}) { - # Make these cookies only be sent to us by the browser during + # Make these cookies only be sent to us by the browser during # HTTPS sessions, if we're using SSL. $cookieargs{'-secure'} = 1; } @@ -89,7 +89,7 @@ sub persist_login { Bugzilla->audit(sprintf "successful login of %s from %s using \"%s\", authenticated by %s", $user->login, $ip_addr, $cgi->user_agent // '', $auth_method); } - + return $login_cookie; } diff --git a/Bugzilla/Auth/Verify.pm b/Bugzilla/Auth/Verify.pm index dbad1e9a7..19d8dcc9e 100644 --- a/Bugzilla/Auth/Verify.pm +++ b/Bugzilla/Auth/Verify.pm @@ -69,7 +69,7 @@ sub create_or_update_user { # passed only a username, and that username doesn't exist already. if ($username && !$username_user_id && !$extern_user_id) { validate_email_syntax($username) - || return { failure => AUTH_ERROR, + || return { failure => AUTH_ERROR, error => 'auth_invalid_email', details => {addr => $username} }; # Usually we'd call validate_password, but external authentication @@ -79,8 +79,8 @@ sub create_or_update_user { # XXX Theoretically this could fail with an error, but the fix for # that is too involved to be done right now. - my $user = Bugzilla::User->create({ - login_name => $username, + my $user = Bugzilla::User->create({ + login_name => $username, cryptpassword => $password, realname => $real_name}); $username_user_id = $user->id; @@ -138,8 +138,8 @@ Bugzilla::Auth::Verify - An object that verifies usernames and passwords. =head1 DESCRIPTION -Bugzilla::Auth::Verify provides the "Verifier" part of the Bugzilla -login process. (For details, see the "STRUCTURE" section of +Bugzilla::Auth::Verify provides the "Verifier" part of the Bugzilla +login process. (For details, see the "STRUCTURE" section of L.) It is mostly an abstract class, requiring subclasses to implement @@ -221,7 +221,7 @@ Returns: Nothing. =head1 INFO METHODS These are methods that describe the capabilities of this object. -These are all no-parameter methods that return either C or +These are all no-parameter methods that return either C or C. =over 4 diff --git a/Bugzilla/Auth/Verify/DB.pm b/Bugzilla/Auth/Verify/DB.pm index 424816f4c..ac6b71ac0 100644 --- a/Bugzilla/Auth/Verify/DB.pm +++ b/Bugzilla/Auth/Verify/DB.pm @@ -55,7 +55,7 @@ sub check_credentials { return { failure => AUTH_LOGINFAILED, failure_count => scalar(@{ $user->account_ip_login_failures }), }; - } + } # Force the user to change their password if it does not meet the current # criteria. This should usually only happen if the criteria has changed. diff --git a/Bugzilla/Auth/Verify/LDAP.pm b/Bugzilla/Auth/Verify/LDAP.pm index c0ae619c1..de88f9a43 100644 --- a/Bugzilla/Auth/Verify/LDAP.pm +++ b/Bugzilla/Auth/Verify/LDAP.pm @@ -53,7 +53,7 @@ sub check_credentials { my $dn = $dn_result->shift_entry->dn; - # Check the password. + # Check the password. my $pw_result = $self->ldap->bind($dn, password => $params->{password}); return { failure => AUTH_LOGINFAILED } if $pw_result->code; @@ -103,7 +103,7 @@ sub check_credentials { if (@emails > 1) { # Cycle through the adresses and check if they're Bugzilla logins. - # Use the first one that returns a valid id. + # Use the first one that returns a valid id. foreach my $email (@emails) { if ( login_to_id($email) ) { $params->{bz_username} = $email; @@ -129,7 +129,7 @@ sub _bz_search_params { $username = escape_filter_value($username); return (base => Bugzilla->params->{"LDAPBaseDN"}, scope => "sub", - filter => '(&(' . Bugzilla->params->{"LDAPuidattribute"} + filter => '(&(' . Bugzilla->params->{"LDAPuidattribute"} . "=$username)" . Bugzilla->params->{"LDAPfilter"} . ')'); } @@ -138,9 +138,9 @@ sub _bind_ldap_for_search { my ($self) = @_; my $bind_result; if (Bugzilla->params->{"LDAPbinddn"}) { - my ($LDAPbinddn,$LDAPbindpass) = + my ($LDAPbinddn,$LDAPbindpass) = split(":",Bugzilla->params->{"LDAPbinddn"}); - $bind_result = + $bind_result = $self->ldap->bind($LDAPbinddn, password => $LDAPbindpass); } else { @@ -153,7 +153,7 @@ sub _bind_ldap_for_search { # We can't just do this in new(), because we're not allowed to throw any # error from anywhere under Bugzilla::Auth::new -- otherwise we # could create a situation where the admin couldn't get to editparams -# to fix his mistake. (Because Bugzilla->login always calls +# to fix his mistake. (Because Bugzilla->login always calls # Bugzilla::Auth->new, and almost every page calls Bugzilla->login.) sub ldap { my ($self) = @_; @@ -166,7 +166,7 @@ sub ldap { $self->{ldap} = new Net::LDAP(trim($_)); last if $self->{ldap}; } - ThrowCodeError("ldap_connect_failed", { server => join(", ", @servers) }) + ThrowCodeError("ldap_connect_failed", { server => join(", ", @servers) }) unless $self->{ldap}; # try to start TLS if needed -- cgit v1.2.3-24-g4f1b