Bugzilla – Attachment 23198 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]
[FAILED_QA] bug_11077: get rid of some warnings
FAILEDQA-bug11077-get-rid-of-some-warnings.patch (text/plain), 3.33 KB, created by
Marcel de Rooy
on 2013-11-27 17:27:40 UTC
(
hide
)
Description:
[FAILED_QA] bug_11077: get rid of some warnings
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-11-27 17:27:40 UTC
Size:
3.33 KB
patch
obsolete
>From e5bf3b7297f55d020681249eea907ad19e378ee7 Mon Sep 17 00:00:00 2001 >From: Srdjan <srdjan@catalyst.net.nz> >Date: Fri, 1 Nov 2013 21:42:45 +1300 >Subject: [PATCH] [FAILED_QA] bug_11077: get rid of some warnings >Content-Type: text/plain; charset=utf-8 > >--- > C4/Auth.pm | 15 +++++++++------ > 1 files changed, 9 insertions(+), 6 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index c6475bb..9d0b623 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -650,6 +650,7 @@ sub checkauth { > # This parameter is the name of the CAS server we want to authenticate against, > # when using authentication against multiple CAS servers, as configured in Auth_cas_servers.yaml > my $casparam = $query->param('cas'); >+ my $q_userid = $query->param('userid'); > > if ( $userid = $ENV{'REMOTE_USER'} ) { > # Using Basic Authentication, no cookies required >@@ -669,9 +670,11 @@ sub checkauth { > my $session = get_session($sessionID); > C4::Context->_new_userenv($sessionID); > my ($ip, $lasttime, $sessiontype); >+ my $s_userid; > if ($session){ >+ $s_userid = $session->param('id'); > C4::Context::set_userenv( >- $session->param('number'), $session->param('id'), >+ $session->param('number'), $s_userid, > $session->param('cardnumber'), $session->param('firstname'), > $session->param('surname'), $session->param('branch'), > $session->param('branchname'), $session->param('flags'), >@@ -684,14 +687,14 @@ sub checkauth { > $debug and printf STDERR "AUTH_SESSION: (%s)\t%s %s - %s\n", map {$session->param($_)} qw(cardnumber firstname surname branch) ; > $ip = $session->param('ip'); > $lasttime = $session->param('lasttime'); >- $userid = $session->param('id'); >+ $userid = $s_userid; > $sessiontype = $session->param('sessiontype') || ''; > } >- if ( ( ($query->param('koha_login_context')) && ($query->param('userid') ne ($session->param('id') // '')) ) >+ if ( ( $query->param('koha_login_context') && ($q_userid && $s_userid && $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... >- $debug and warn "query id = " . $query->param('userid') . " but session id = " . $session->param('id'); >+ $debug and warn "query id = $q_userid but session id = $s_userid"; > $session->flush; > $session->delete(); > C4::Context->_unset_userenv($sessionID); >@@ -711,7 +714,7 @@ sub checkauth { > logout_cas($query); > } > } >- elsif ( $lasttime < time() - $timeout ) { >+ elsif ( $lasttime && ($lasttime < time() - $timeout) ) { > # timed logout > $info{'timed_out'} = 1; > $session->delete() if $session; >@@ -759,7 +762,7 @@ sub checkauth { > -value => $session->id, > -HttpOnly => 1 > ); >- $userid = $query->param('userid'); >+ $userid = $q_userid; > my $pki_field = C4::Context->preference('AllowPKIAuth') // 'None'; > if ( ( $cas && $query->param('ticket') ) > || $userid >-- >1.7.7.6
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