Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | # Support is available at http://www.mediawiki.org/wiki/Extension_talk:LDAP_Authentication |
41 | 41 | # |
42 | 42 | |
43 | | -if ( !defined( 'MEDIAWIKI' ) ) exit; |
| 43 | +//if ( !defined( 'MEDIAWIKI' ) ) exit; |
44 | 44 | |
45 | 45 | $wgLDAPDomainNames = array(); |
46 | 46 | $wgLDAPServerNames = array(); |
— | — | @@ -94,7 +94,7 @@ |
95 | 95 | $wgExtensionCredits['other'][] = array( |
96 | 96 | 'path' => __FILE__, |
97 | 97 | 'name' => 'LDAP Authentication Plugin', |
98 | | - 'version' => '1.2b', |
| 98 | + 'version' => '1.2c', |
99 | 99 | 'author' => 'Ryan Lane', |
100 | 100 | 'descriptionmsg' => 'ldapauthentication-desc', |
101 | 101 | 'url' => 'http://www.mediawiki.org/wiki/Extension:LDAP_Authentication', |
— | — | @@ -456,7 +456,7 @@ |
457 | 457 | array_push( $tempDomArr, 'local' ); |
458 | 458 | } |
459 | 459 | |
460 | | - if ( isset( $wgLDAPAutoAuthDomain ) ) { |
| 460 | + if ( isset( $wgLDAPAutoAuthDomain ) && $wgLDAPAutoAuthDomain != "" ) { |
461 | 461 | $this->printDebug( "Allowing auto-authentication login, removing the domain from the list.", NONSENSITIVE ); |
462 | 462 | |
463 | 463 | // There is no reason for people to log in directly to the wiki if the are using an |
— | — | @@ -919,7 +919,7 @@ |
920 | 920 | |
921 | 921 | $this->printDebug( "Entering strict.", NONSENSITIVE ); |
922 | 922 | |
923 | | - if ( $wgLDAPUseLocal || $wgLDAPMailPassword ) { |
| 923 | + if ( $wgLDAPUseLocal || ( isset( $wgLDAPMailPassword[$_SESSION['wsDomain']] ) && $wgLDAPMailPassword[$_SESSION['wsDomain']] ) ) { |
924 | 924 | $this->printDebug( "Returning false in strict().", NONSENSITIVE ); |
925 | 925 | return false; |
926 | 926 | } else { |
— | — | @@ -1836,16 +1836,16 @@ |
1837 | 1837 | $wgAuth->printDebug( "Entering AutoAuthSetup.", NONSENSITIVE ); |
1838 | 1838 | |
1839 | 1839 | // Set configuration options for backwards compatibility |
1840 | | - if ( isset( $wgLDAPSSLUsername ) ) { |
| 1840 | + if ( isset( $wgLDAPSSLUsername ) && $wgLDAPSSLUsername != "" ) { |
1841 | 1841 | $wgAuth->printDebug( 'Setting $wgLDAPAutoAuthUsername to $wgLDAPSSLUsername; please change your configuration to fix this deprecated configuration variable.', NONSENSITIVE ); |
1842 | 1842 | $wgLDAPAutoAuthUsername = $wgLDAPSSLUsername; |
1843 | 1843 | } |
1844 | | - if ( isset( $wgLDAPSmartcardDomain ) ) { |
| 1844 | + if ( isset( $wgLDAPSmartcardDomain ) && $wgLDAPSmartcardDomain != "" ) { |
1845 | 1845 | $wgAuth->printDebug( 'Setting $wgLDAPAutoAuthDomain to $wgLDAPSmartcardDomain; please change your configuration to fix this deprecated configuration variable.', NONSENSITIVE ); |
1846 | 1846 | $wgLDAPAutoAuthDomain = $wgLDAPSmartcardDomain; |
1847 | 1847 | } |
1848 | 1848 | |
1849 | | - if ( $wgLDAPAutoAuthUsername != null ) { |
| 1849 | + if ( $wgLDAPAutoAuthUsername != "" ) { |
1850 | 1850 | $wgAuth->printDebug( "wgLDAPAutoAuthUsername is not null, adding hooks.", NONSENSITIVE ); |
1851 | 1851 | if ( version_compare( $wgVersion, '1.14.0', '<' ) ) { |
1852 | 1852 | if ( version_compare( $wgVersion, '1.13.0', '<' ) ) { |