[Koha-bugs] [Bug 16714] New: Unexpected logout with "IP address change"

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Jun 11 16:06:46 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16714

            Bug ID: 16714
           Summary: Unexpected logout with "IP address change"
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: ASSIGNED
          Severity: normal
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: jonathan.druart at bugs.koha-community.org
          Reporter: jonathan.druart at bugs.koha-community.org
        QA Contact: testopia at bugs.koha-community.org

I get a new issue (not sure since when) under Plack:
I am logged out with "IP address change" just after the first login.

To reproduce:
- logout
- restart plack
- login
- click somewhere
=> You will be logged out

I have tried to debug:
diff --git a/C4/Auth.pm b/C4/Auth.pm
index 985bd39..a494ddf 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -818,6 +818,9 @@ sub checkauth {
             $userid      = $s_userid;
             $sessiontype = $session->param('sessiontype') || '';
         }
+
+        warn $ip;
+        warn $ENV{REMOTE_ADDR};
         if ( ( $query->param('koha_login_context') && ( $q_userid ne $s_userid
) )
             || ( $cas && $query->param('ticket') &&
!C4::Context->userenv->{'id'} )
             || ( $shib && $shib_login && !$logout &&
!C4::Context->userenv->{'id'} )


I get:
After the login:
  $ip=undef, $ENV{REMOTE_ADDR}=192.168.254.1
After the click producing the logout:
  $ip=192.168.254.1, $ENV{REMOTE_ADDR}=127.0.0.1
After the second login:
  $ip=127.0.0.1, $ENV{REMOTE_ADDR}=127.0.0.1

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list