I did some debugging and came up with the following statement causing the issue : LoginManager.pm ~350
if((! defined($authUser) ) || ($sessionUser && $sessionUser eq $TWiki::cfg{AdminUserLogin} ) ) {
$authUser = $sessionUser;
}
This condition is never satisfied in IIS due to the "defined()" comparison.
Assumptions : Variable $authUser is blank
APACHE
-
defined($authUser)
returns "1"
-
!defined($authUser)
returns "1" -- This seems wrong, shouldn't inversing the result equal 0?
IIS 7.5:
-
(defined($authUser))
returns "1"
-
!defined($authUser)
returns "" -- Empty! This empty does not satisfy the condition to set the authuser
The problem here doesn't seem to be so much with the defined function as with the inverse, '!', operand. (Note I have also tried the "not" operator with the same results).
Corrected by changing the condition to:
if((!$authUser ) || ($sessionUser && $sessionUser eq $TWiki::cfg{AdminUserLogin} ){}
Found in support issue
http://twiki.org/cgi-bin/view/Support/SID-01983
--
TWiki:Main/NolanSedley
- 2014-10-28
Thank you Nolan!
Patch for TWiki-6.0.1:
--- TWiki/LoginManager.pm (revision 28280)
+++ TWiki/LoginManager.pm (working copy)
@@ -334,7 +334,7 @@
my $sessionUser = TWiki::Sandbox::untaintUnchecked(
$this->{_cgisession}->param( 'AUTHUSER' ));
_trace( $this, "session says user is ".($sessionUser||'undef') );
- if( ( !defined($authUser) ) || ($sessionUser && $sessionUser eq $TWiki::cfg{AdminUserLogin} ) ) {
+ if( ( ! $authUser ) || ($sessionUser && $sessionUser eq $TWiki::cfg{AdminUserLogin} ) ) {
$authUser = $sessionUser;
#_trace($this, "session set to $authUser");
}
--
Peter Thoeny - 2014-11-14
The same issue & fix also applies to Safari on iOS (iPhone and iPad).
--
TWiki:Main.PeterThoeny
- 2014-12-10