Bug 5066 - Incorrect use of localtime function when calling _session_log
Summary: Incorrect use of localtime function when calling _session_log
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Authentication (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) trivial
Assignee: Marcel de Rooy
QA Contact: Bugs List
URL:
Keywords:
: 3295 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-28 13:51 UTC by Marcel de Rooy
Modified: 2010-12-17 14:42 UTC (History)
2 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2010-07-28 13:51:38 UTC
The function localtime is called a couple of times in C4/Auth.pm in list context rather than scalar context.
Patch sent for 3.0.x
Comment 1 Marcel de Rooy 2010-11-04 09:22:40 UTC
Problem still occurred on one place in code. Patch sent for master (3.4).

diff --git a/C4/Auth.pm b/C4/Auth.pm
index 6ba852d..58ce63e 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -717,7 +717,7 @@ sub checkauth {
                    ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password, $query );
                }
                if ($return) {
-               _session_log(sprintf "%20s from %16s logged in  at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime);
+               _session_log(sprintf "%20s from %16s logged in  at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},scalar localtime);
                if ( $flags = haspermission(  $userid, $flagsrequired ) ) {
                                        $loggedin = 1;
                }
--
Comment 2 Chris Cormack 2010-11-18 01:25:54 UTC
Patch pushed please test and close
Comment 3 Chris Nighswonger 2010-11-18 03:15:30 UTC
This bug has a patch presently committed to HEAD and 3.2.x.

Please take the appropriate action to update the status of this bug.

Remember, bugs which have been resolved should be tested and marked closed, preferably by the original reporter.
Comment 4 Marcel de Rooy 2010-12-17 14:42:43 UTC
*** Bug 3295 has been marked as a duplicate of this bug. ***