You are here: Foswiki>Tasks Web>Item13216 (15 Jan 2015, GeorgeClark)Edit Attach

Item13216: login manager breaks toggling UseClientSessions a few times

pencil
Priority: Urgent
Current State: Closed
Released In: 1.2.0
Target Release: minor
Applies To: Extension
Component: Configure, ConfigurePlugin
Branches: master
Reported By: MichaelDaum
Waiting For:
Last Change By: GeorgeClark
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
 

ItemTemplate edit

Summary login manager breaks toggling UseClientSessions a few times
ReportedBy MichaelDaum
Codebase
SVN Range
AppliesTo Extension
Component Configure, ConfigurePlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:b0906d46036f
TargetRelease minor
ReleasedIn 1.2.0
CheckinsOnBranches master
trunkCheckins
masterCheckins distro:b0906d46036f
ItemBranchCheckins
Release01x01Checkins
Topic revision: r2 - 15 Jan 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy