Jump to content

Topic on Extension talk:WPMW

1.27 Broke this extension

11
Swennet (talkcontribs)

MediaWIki 1.2.7 broke this extension. It seems that many changes were made to the Authentication system of MediaWiki. I get the following error message:

Exception encountered, of type "InvalidArgumentException"

I feel like fixing this extension is out of my coding ability, but I will try anyway.

Has anyone else had the same error? And if you've already found a solution, then please do share!

Swennet (talkcontribs)

Ok, so it seems like there have been many changes to the Authentication framework of MediaWiki, which is why this extension stopped working. I'm currently trying to update it, but so far I have no idea what I'm doing. I did set some excellent pointers from @anomie in the IRC, which I've pasted below. Perhaps they might prove to be more useful to someone who does know what they're doing.

I see right now it wants $wgAuth set to an instance of the AuthWP class, and it also hooks UserLoadFromSession and UserLogout. The UserLogout hook is fine, you can keep that without issue.

The UserLoadFromSession hook is deprecated, if you want to keep that functionality you'd need to create a SessionProvider to do it. The tricky part there is that right now a SessionProvider has to either accept arbitrary logins (which you likely don't want) or cannot support any login or logout while it's in effect (which would also be problematic). I should probably make a way to have a SessionProvider that doesn't allow arbitrary login but still allows logging out.

As for the AuthWP class, that looks like it should be a failry straightforward subclass of AbstractPasswordPrimaryAuthenticationProvider. https://www.mediawiki.org/wiki/Manual:SessionManager_and_AuthManager/Updating_tips#The_AuthPlugin_and_AuthPluginUser_classes describes what the AuthManager equivalents are for each of the AuthPlugin methods.

I note that allowing logging in to both systems via either system's interface is going to allow bypassing of security provisions in one or the other's login process. For example, if MediaWiki is configured with a two-factor extension, someone could log in to WordPress without two-factor and be logged in on MediaWiki too. (that's regarding the UserLoadFromSession hook function)

Honoring the WordPress cookies may also break AuthManager's flow if MediaWiki has any SecondaryAuthenticationProviders that need UI, since I expect wp_signon() sets WordPress's cookies right then where MediaWiki wants to keep using its current session to finish the process.
오징 (talkcontribs)

I hope this extension maintain as soon as possible.

123.3.9.239 (talkcontribs)

I concur, a solution would be greatly appreciated

Swennet (talkcontribs)

Has anyone found an alternative to this extension yet?

Tomlzz1 (talkcontribs)

It would be great to have this extension available. Alternately I'll need to run MW by itself, loosing the flexibility that WP would offer. My capacity to address this is quie limited, but I'll keep an eye here and try to find someone with the requisite capabilities.

Swennet (talkcontribs)

I have previously contacted sought a developer to fix this extension, and the price range was between $250 and #350. Unfortunately, I do not have that kind of money to spend, but if anyone else does then I can redirect you towards a developer.

2001:E68:5400:E40:3D11:D760:8E84:406B (talkcontribs)

Hi Please help to find the developer who can fix this. hhharishhh@gmail.com

IlseMul (talkcontribs)

Is there any update on this? Has anyone been able to get Mediawiki and Wordpress integrated? I really hope this gets fixed in the future :)

Belovolk (talkcontribs)

Is there any solution to integrate Mediawiki with Wordpress?

Swennet (talkcontribs)

No solution that I know of as of yet.

Reply to "1.27 Broke this extension"