On 21/06/07, aaron@svn.wikimedia.org aaron@svn.wikimedia.org wrote:
Revision: 23161 Author: aaron Date: 2007-06-21 13:53:32 +0000 (Thu, 21 Jun 2007)
Log Message:
*Return true for hooks
Er, not all hooks should return true, and these hooks relate to authentication. Please be sure that the intended purpose of the hook is understood before messing about with extension code in this manner.
Rob Church
On 21/06/07, aaron@svn.wikimedia.org aaron@svn.wikimedia.org wrote:
Revision: 23161 Author: aaron Date: 2007-06-21 13:53:32 +0000 (Thu, 21 Jun 2007)
Log Message:
*Return true for hooks
Er, not all hooks should return true, and these hooks relate to authentication. Please be sure that the intended purpose of the hook is understood before messing about with extension code in this manner.
In fact, returning true in many of these cases definitely does not make any sense. For instance:
//The user hasn't already been authenticated, let's check them $wgAuth->printDebug( "User is not logged in, we need to authenticate", 1 ); $authenticated = $wgAuth->authenticate( $wgLDAPSSLUsername ); if ( !$authenticated ) { //If the user doesn't exist in LDAP, there isn't much reason to //go any further. $wgAuth->printDebug("User wasn't found in LDAP, exiting.", 1 ); return true; }
In this case it makes sense to return false.
Messing around with authentication code is a pretty bad idea, unless you are pretty familiar with it. I doubt these changes would actually cause any problems, but I would appreciate it if someone would email me, or leave a message on my mediawiki.org talk page before changing this plugin.
V/r,
Ryan Lane
wikitech-l@lists.wikimedia.org