Item13216: login manager breaks toggling UseClientSessions a few times
Priority: Urgent
Current State: Closed
Released In: 1.2.0
Target Release: minor
Applies To: Extension
Component: Configure,
ConfigurePlugin
Branches: master
Using
FastCGIEngineContrib.
This breaks all of the foswiki service and it has to be restarted to recover.
Can't call method "param" on an undefined value at ...core/lib/Foswiki/LoginManager.pm line 822
IRC logs
--
MichaelDaum - 15 Jan 2015
It appears that pending configuration changes are leaking into the in-memory
$Foswiki::cfg{}
hash. That's not good. With the below patch applied, toggle
$Foswiki::cfg{UseClientSessions}
twice. Probably need to be under FCGI because the fail happens when the login manager id re-entered. ie, the disable works, and then the enable crashes.
diff --git a/core/lib/Foswiki/LoginManager.pm b/core/lib/Foswiki/LoginManager.pm
index 373c883..10b11d0 100644
--- a/core/lib/Foswiki/LoginManager.pm
+++ b/core/lib/Foswiki/LoginManager.pm
@@ -788,6 +788,9 @@ sub userLoggedIn {
. ( $authUser || 'undef' ) . " - "
. ( $wikiName || 'undef' ) );
+ print STDERR "USE CLIENT SESSIONS ENABLED" if ( $Foswiki::cfg{UseClientSessions} );
+ print STDERR "USE CLIENT SESSIONS DISABLED" unless ( $Foswiki::cfg{UseClientSessions} );
+
my $session = $this->{session};
if ( $session->{users} ) {
$session->{user} = $session->{users}->getCanonicalUserID($authUser);
--
GeorgeClark - 15 Jan 2015
Found the issue I think. At least it fixed it here.
Foswiki::Configure::Query::check_current_value()
didn't localize
%Foswiki::cfg
hash and instead applied values to be checked to the running configuration.
--
GeorgeClark - 15 Jan 2015