Browse Source

#484 Fixed issue with IIS ("Wrong password" at first prompt)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1609 a333f486-631f-4898-b8df-5754b55c2be0
romainq 14 years ago
parent
commit
9e4db3f3b0
1 changed files with 4 additions and 6 deletions
  1. 4 6
      application/loginwebpage.class.inc.php

+ 4 - 6
application/loginwebpage.class.inc.php

@@ -346,12 +346,10 @@ EOF
 					case 'external':
 					// Web server supplied authentication
 					$bExternalAuth = false;
-                    $sExtAuthVar = MetaModel::GetConfig()->GetExternalAuthenticationVariable(); // In which variable is the info passed ?
-                    $sEval = '$bExternalAuth = isset('.$sExtAuthVar.');';
-                    eval($sEval);
-                    if ($bExternalAuth)
-                    {
-						eval('$sAuthUser = '.$sExtAuthVar.';'); // Retrieve the value
+					$sExtAuthVar = MetaModel::GetConfig()->GetExternalAuthenticationVariable(); // In which variable is the info passed ?
+					eval('$sAuthUser = isset('.$sExtAuthVar.') ? '.$sExtAuthVar.' : false;'); // Retrieve the value
+					if ($sAuthUser && (strlen($sAuthUser) > 0))
+					{
 						$sAuthPwd = ''; // No password in this case the web server already authentified the user...
 						$sLoginMode = 'external';
 						$sAuthentication = 'external';