Last modified: 2006-10-11 08:21:11 UTC
The AutoAuthenticate hook is specially crafted for intranets with single signon environments so that they can automatically authenticate in Mediawiki, however in revision 15823 the hook has disappeared while applying the Stub Object code. in includes/Setup.php the code should be changed from: if( !is_object( $wgAuth ) ) { $wgAuth = new StubObject( 'wgAuth', 'AuthPlugin' ); } to: if( !is_object( $wgAuth ) ) { $wgAuth = new StubObject( 'wgAuth', 'AuthPlugin' ); } if(! $wgCommandLineMode ) { wfRunHooks('AutoAuthenticate',array(&$wgUser)); }
I am not a developer, and I don't know much about how the MediaWiki bug tracker works, but your bug has been sitting here for a month. You may want to reassign this bug to the person who committed the offending revision. Also, you may get a quicker response if you post your patch in standard patch format using the Unix 'diff -pruN' command.
(In reply to comment #1) > Also, you may get a > quicker response if you post your patch in standard patch format using the Unix > 'diff -pruN' command. Using "svn diff", not "diff -pruN". Please see http://www.mediawiki.org/wiki/Subversion#Making_a_diff .
Assigning bug to tim starling, since the autoauthenticate hook disappeared after his implementation of the Stub Object code.
Created attachment 2374 [details] Changes to includes/setup.php to reinistate the AutoAuthenticate hook. the patch as an svn diff.
Please do not reassign bugs away from wikibugs-l without adding it to the CC list. Also, Tim is out sick and will not likely be paying attention to bugs for a while.
The patch looks wrong; shouldn't it be in StubUser::_newObject() so you're not wasting time running an authentication hook if the user object never gets used?
the user is always initialized in setup.php I think, but you're right StubUser::_newObject() is a better place for the autoauthentication hook, I have created a new patch for this.
Created attachment 2412 [details] Changes to includes/stubobject.php to reapply the autoauthentication hook. (ignore the patch provided in includes/setup.php) Changes to includes/stubobject.php to reinstate the autoauthentication hook.
the patch in text format in case you prefer it that way... :) open includes/stubobject.php and search for: function _newObject() { global $wgCommandLineMode; if( $wgCommandLineMode ) { $user = new User; $user->setLoaded( true ); } else { $user = User::loadFromSession(); } return $user; } replace this with: function _newObject() { global $wgCommandLineMode; if( $wgCommandLineMode ) { $user = new User; $user->setLoaded( true ); } else { $user = User::loadFromSession(); wfRunHooks('AutoAuthenticate',array($user)); } return $user; }
Added wikibugs to the cc as asked by brion. Assign bug to Tim, I saw him active on the mailing list so I hope he's no longer sick, so that he can apply this one line patch. :)
*sigh* All the trouble to create bug-reports and patches doesn't seem to help much... I just read on the mailing list that Tim Starling doesn't even look at bugzilla mails, so I'm assigning it back to wikibugs-l in the hope that someone else can fix his bug. See attached patch for the bugfix.
Don't just assign bugs to people and never mention it to them -- they probably just won't see it. :) Applied in r16911
thanks Brion.