Session activity timeout not works(filed lastSeen disappeared)
Hello. Trying to set up session activity timeout using Apache::Session::Browseable::MySQL storage.
Saw issue 845, but have nothing using MySql too.
Problem is in empty field lastSeen which used by */lemonldap-ng/bin/purgeCentralCache
Part of code:
# User has no activity, so considere the session has expired
elsif ( $conf->{timeoutActivity}
and $entry->{_lastSeen}
and $time - $entry->{_lastSeen} > $conf->{timeoutActivity} )
{
push @t, $id;
print "Session $id inactive\n" if $debug;
}
undef;
{code}
$entry->{_lastSeen} is always empty.
Try to use use Data::Dumper that way: print Dumper($entry) and get
following result with no {_lastSeen} field:
{code}
HASH(0x216b9c0)Check session 81a4f365e155d94baed51f68b0413c73
$VAR1 = {
'startTime' => '20150917153647',
'_utime' => 1442486207,
'authenticationLevel' => '2',
'_session_id' => '81a4f365e155d94baed51f68b0413c73',
'_AD_userAccountControl' => '512',
'_session_kind' => 'SSO',
'_issuerDB' => 'Null',
'loginHistory' => {
'successLogin' => [
{
'_utime' => 1442486207,
'ipAddr' => '192.168.140.54'
},
{
'_utime' => 1442481529,
'ipAddr' => '192.168.140.54'
},
{
'ipAddr' => '192.168.140.54',
'_utime' => 1442475815
},
{
'ipAddr' => '192.168.140.54',
'_utime' => 1442475095
},
{
'ipAddr' => '192.168.140.54',
'_utime' => 1442474964
}
],
'failedLogin' => [
{
'_utime' => 1442474713,
'ipAddr' => '192.168.140.54',
'error' => "\x{41f}\x{43e}\x{43b}\x{44c}\x{437}\x{43e}\x{432}\x{430}\x{442}\x{435}\x{43b}\x{44c} \x{43d}\x{435} \x{43d}\x{430}\x{439}\x{434}\x{435}\x{43d} \x{432} \x{431}\x{430}\x{437}\x{435}"
},
{
'error' => "\x{41f}\x{43e}\x{43b}\x{44c}\x{437}\x{43e}\x{432}\x{430}\x{442}\x{435}\x{43b}\x{44c} \x{43d}\x{435} \x{43d}\x{430}\x{439}\x{434}\x{435}\x{43d} \x{432} \x{431}\x{430}\x{437}\x{435}",
'_utime' => 1442406493,
'ipAddr' => '192.168.140.54'
},
{
'error' => "\x{41f}\x{43e}\x{43b}\x{44c}\x{437}\x{43e}\x{432}\x{430}\x{442}\x{435}\x{43b}\x{44c} \x{43d}\x{435} \x{43d}\x{430}\x{439}\x{434}\x{435}\x{43d} \x{432} \x{431}\x{430}\x{437}\x{435}",
'ipAddr' => '192.168.140.54',
'_utime' => 1442406351
},
{
'error' => "\x{41f}\x{43e}\x{43b}\x{44c}\x{437}\x{43e}\x{432}\x{430}\x{442}\x{435}\x{43b}\x{44c} \x{43d}\x{435} \x{43d}\x{430}\x{439}\x{434}\x{435}\x{43d} \x{432} \x{431}\x{430}\x{437}\x{435}",
'ipAddr' => '192.168.140.54',
'_utime' => 1442399194
},
{
'error' => "\x{41f}\x{43e}\x{43b}\x{44c}\x{437}\x{43e}\x{432}\x{430}\x{442}\x{435}\x{43b}\x{44c} \x{43d}\x{435} \x{43d}\x{430}\x{439}\x{434}\x{435}\x{43d} \x{432} \x{431}\x{430}\x{437}\x{435}",
'_utime' => 1442395429,
'ipAddr' => '192.168.140.54'
}
]
},
'uid' => '',
'_lastAuthnUTime' => 1442486207,
'dn' => 'CN=п░п╩п╣п╨я│п╟пҐпЄя─ п╗п╟п╠п╟п╣п╡,CN=Users,,
'updateTime' => '20150917153647',
'UA' => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0',
'_passwordDB' => 'AD',
'cn' => 'п░п╩п╣п╨я│п╟пҐпЄя─ п╗п╟п╠п╟п╣п╡',
'_userDB' => 'AD#Openldap',
'_timezone' => '5',
'_auth' => 'AD#Openldap',
'ipAddr' => '192.168.140.54',
'_AD_pwdLastSet' => '130842564725041136',
'_whatToTrace' => 'shabaev_av',
'_user' => 'shabaev_av'
};