• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item7584: Template login not working with IIS 7.5 on Windows and Safari on iOS

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   patch 6.0.2

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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

  1. defined($authUser) returns "1"
  2. !defined($authUser) returns "1" -- This seems wrong, shouldn't inversing the result equal 0?
IIS 7.5:
  1. (defined($authUser)) returns "1"
  2. !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

ItemTemplate
Summary Template login not working with IIS 7.5 on Windows and Safari on iOS
ReportedBy TWiki:Main.NolanSedley
Codebase ~twiki4, 6.0.1
SVN Range TWiki-6.0.1-trunk, Sat, 18 Oct 2014, build 28296
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:28440 TWikirev:28442
TargetRelease patch
ReleasedIn 6.0.2
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r8 - 2016-01-22 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback