Last modified: 2006-10-11 08:21:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T8929, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6929 - AutoAuthenticate hook disappeared in r15823
AutoAuthenticate hook disappeared in r15823
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.8.x
All All
: High critical (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-05 13:14 UTC by Peter De Decker
Modified: 2006-10-11 08:21 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Changes to includes/setup.php to reinistate the AutoAuthenticate hook. (408 bytes, patch)
2006-09-20 06:20 UTC, Peter De Decker
Details
Changes to includes/stubobject.php to reapply the autoauthentication hook. (ignore the patch provided in includes/setup.php) (339 bytes, patch)
2006-09-25 08:55 UTC, Peter De Decker
Details

Description Peter De Decker 2006-08-05 13:14:19 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));
}
Comment 1 Jason Spiro 2006-09-18 14:36:32 UTC
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.
Comment 2 Rotem Liss 2006-09-18 14:47:36 UTC
(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 .
Comment 3 Peter De Decker 2006-09-20 06:08:43 UTC
Assigning bug to tim starling, since the autoauthenticate hook disappeared after
his implementation of the Stub Object code.
Comment 4 Peter De Decker 2006-09-20 06:20:32 UTC
Created attachment 2374 [details]
Changes to includes/setup.php to reinistate the AutoAuthenticate hook.

the patch as an svn diff.
Comment 5 Brion Vibber 2006-09-20 12:09:00 UTC
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.
Comment 6 Brion Vibber 2006-09-20 12:20:54 UTC
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?
Comment 7 Peter De Decker 2006-09-25 08:52:33 UTC
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.

Comment 8 Peter De Decker 2006-09-25 08:55:17 UTC
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.
Comment 9 Peter De Decker 2006-09-25 08:59:04 UTC
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;
	}
Comment 10 Peter De Decker 2006-09-26 09:47:04 UTC
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. :)




Comment 11 Peter De Decker 2006-10-10 13:23:46 UTC
*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. 
Comment 12 Brion Vibber 2006-10-10 21:20:36 UTC
Don't just assign bugs to people and never mention it to them -- 
they probably just won't see it. :)

Applied in r16911
Comment 13 Peter De Decker 2006-10-11 08:21:11 UTC
thanks Brion.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links