Bugzilla – Attachment 23217 Details for
Bug 11077
Correct silent warnings in C4/Auth.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11077 - Fix indents to trace code more easily
Bug-11077---Fix-indents-to-trace-code-more-easily.patch (text/plain), 3.13 KB, created by
Mark Tompsett
on 2013-11-28 18:23:58 UTC
(
hide
)
Description:
Bug 11077 - Fix indents to trace code more easily
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2013-11-28 18:23:58 UTC
Size:
3.13 KB
patch
obsolete
>From d70013544c615f15c9ea2c90b8c07c0b8ae8af15 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Thu, 28 Nov 2013 13:23:11 -0500 >Subject: [PATCH] Bug 11077 - Fix indents to trace code more easily > >--- > C4/Auth.pm | 40 ++++++++++++++++++++++------------------ > 1 file changed, 22 insertions(+), 18 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 790f56c..ab52ea0 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -763,7 +763,11 @@ sub checkauth { > -HttpOnly => 1 > ); > $userid = $q_userid; >- my $pki_field = C4::Context->preference('AllowPKIAuth') // ''; >+ my $pki_field = C4::Context->preference('AllowPKIAuth'); >+ if (!defined($pki_field)) { >+ print STDERR "Error: Missing AllowPKIAuth System Preference!\n"; >+ $pki_field = ''; >+ } > if ( ( $cas && $query->param('ticket') ) > || $userid > || $pki_field ne 'None' >@@ -780,28 +784,28 @@ sub checkauth { > $info{'invalidCasLogin'} = 1 unless ($return); > } > >- elsif ($persona) { >- my $value = $persona; >+ elsif ($persona) { >+ my $value = $persona; > > # If we're looking up the email, there's a chance that the person > # doesn't have a userid. So if there is none, we pass along the > # borrower number, and the bits of code that need to know the user > # ID will have to be smart enough to handle that. >- require C4::Members; >- my @users_info = C4::Members::GetBorrowersWithEmail($value); >- if (@users_info) { >+ require C4::Members; >+ my @users_info = C4::Members::GetBorrowersWithEmail($value); >+ if (@users_info) { > > # First the userid, then the borrowernum >- $value = $users_info[0][1] || $users_info[0][0]; >- } >- else { >- undef $value; >- } >- $return = $value ? 1 : 0; >- $userid = $value; >- } >+ $value = $users_info[0][1] || $users_info[0][0]; >+ } >+ else { >+ undef $value; >+ } >+ $return = $value ? 1 : 0; >+ $userid = $value; >+ } > >- elsif ( >+ elsif ( > ( $pki_field eq 'Common Name' && $ENV{'SSL_CLIENT_S_DN_CN'} ) > || ( $pki_field eq 'emailAddress' > && $ENV{'SSL_CLIENT_S_DN_Email'} ) >@@ -833,14 +837,14 @@ sub checkauth { > $return = $value ? 1 : 0; > $userid = $value; > >- } >+ } > else { > my $retuserid; > ( $return, $cardnumber, $retuserid ) = > checkpw( $dbh, $userid, $password, $query ); > $userid = $retuserid if ( $retuserid ); >- } >- if ($return) { >+ } >+ if ($return) { > #_session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime)); > if ( $flags = haspermission( $userid, $flagsrequired ) ) { > $loggedin = 1; >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11077
:
22042
|
22043
|
22120
|
22125
|
22665
|
22667
|
22805
|
22806
|
22831
|
22844
|
22854
|
23197
|
23198
|
23199
|
23214
|
23215
|
23217
|
23218
|
23219
|
23240
|
23268
|
23288