Warn if cookie name has changed + little things

This commit is contained in:
Xavier Guimard 2010-10-30 09:03:52 +00:00
parent 58f8937cd0
commit 8d1df60bee
3 changed files with 19 additions and 6 deletions

View File

@ -17,8 +17,8 @@ our $VERSION = 0.3;
sub _load {
my $backend = shift;
unless ( $backend->can('populate') ) {
eval "require $backend"
or die $@;
eval "require $backend";
die $@ if($@);
}
}

View File

@ -2031,10 +2031,22 @@ sub globalTests {
eval { tied(%h)->delete; };
return ( -1, "Unable to delete session ($@)" ) if ($@);
my $gc = $Lemonldap::NG::Handler::CGI::globalStorage;
return ( -1, 'All sessions may be lost' )
if ( $conf->{globalStorage} ne $gc );
return ( -1,
'All sessions may be lost and you <b>must</b> restart all your Apache servers'
) if ( $conf->{globalStorage} ne $gc );
return 1;
},
cookieNameChanged => sub {
return (
1,
(
$Lemonldap::NG::Handler::CGI::cookieName ne
$conf->{cookieName}
? 'Cookie name has changed, you <b>must</b> restart all your Apache servers'
: ()
)
);
},
};
}

View File

@ -225,8 +225,9 @@ sub get_key_from_all_sessions {
no strict 'refs';
return $self->{globalStorage}
->get_key_from_all_sessions( $self->{globalStorageOptions}, @_ );
return &{"$tmp\::get_key_from_all_sessions"}( $self->{globalStorage},
$self->{globalStorageOptions}, @_ );
#return &{"$tmp\::get_key_from_all_sessions"}( $self->{globalStorage},
# $self->{globalStorageOptions}, @_ );
}
=begin WSDL