Bugzilla – Attachment 22667 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 - Correct silent warnings in C4/Auth.pm
Bug-11077---Correct-silent-warnings-in-C4Authpm.patch (text/plain), 2.06 KB, created by
Mark Tompsett
on 2013-11-01 14:09:15 UTC
(
hide
)
Description:
Bug 11077 - Correct silent warnings in C4/Auth.pm
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2013-11-01 14:09:15 UTC
Size:
2.06 KB
patch
obsolete
>From 515eb7fa960ccfc09edac0b7bcea3b36be1fb4c9 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 1 Nov 2013 09:51:28 -0400 >Subject: [PATCH] Bug 11077 - Correct silent warnings in C4/Auth.pm >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch corrects a noisy ne condition. > $userid = $retuserid if ( $retuserid ne ''); >became > $userid = $retuserid if ( $retuserid ); > >It also integrates Srdjan Jankovic's patch with Petter Goksøyr >Ãsen's patch, while correcting the problems found. >--- > C4/Auth.pm | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index ccbc5a6..219cc99 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -690,7 +690,8 @@ sub checkauth { > $userid = $s_userid; > $sessiontype = $session->param('sessiontype') || ''; > } >- if ( ( $query->param('koha_login_context') && ($q_userid ne $s_userid) >+ if ( ( $query->param('koha_login_context') && >+ ($q_userid ne $s_userid) ) > || ( $cas && $query->param('ticket') ) ) { > #if a user enters an id ne to the id in the current session, we need to log them in... > #first we need to clear the anonymous session... >@@ -714,7 +715,7 @@ sub checkauth { > logout_cas($query); > } > } >- elsif ( $lasttime && ($lasttime < time() - $timeout) ) { >+ elsif ( !$lasttime || ($lasttime < time() - $timeout) ) { > # timed logout > $info{'timed_out'} = 1; > $session->delete() if $session; >@@ -838,7 +839,7 @@ sub checkauth { > my $retuserid; > ( $return, $cardnumber, $retuserid ) = > checkpw( $dbh, $userid, $password, $query ); >- $userid = $retuserid if ( $retuserid ne '' ); >+ $userid = $retuserid if ( $retuserid ); > } > if ($return) { > #_session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime)); >-- >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