This topic contains 13 replies, has 1 voice, and was last updated by Profile photo of Paul Rogalinski Paul Rogalinski 7 years ago.

Error accessing the wiki

  • Profile photo of Paul Rogalinski

    yeah, did already think about it. The solution right now is a hotfix untill the author of the plugin comes up with a better solution. This might require changes on the mediawiki side in order to recognize underscored logins.

    Profile photo of Jonathan Hall

    Thanks it works for me now. Complicated one… Hope it didn’t give you too many headaches.

    Have you considered replacing ‘_’ with the ‘.’ may cause further problems? For example if you have “the_mighty_user” and “the.mighty.user” both have Drupal accounts.

    Profile photo of Paul Rogalinski

    Maaan, this was a nasty one – and it have me good headaches.

    The Drupoal/MediaWiki SSO plugin had to be patched. I’ve already commited my fixes back to the plugin author so we won’t run into this issue once again after we update our system.

    For those who really want to know:
    It was a bug, more precisely an incompatibility between the drupal and mediawiki user handling.

    Media-Wiki will replace the ‘_’ (underscore char) in each users name by a space char. So each time you query the wiki database for the_mighty_user" the user get be reformatted to "the mighty user". This leads to serious problems during the registration process where users are added to the wiki database based on their drupal counterpart.

    What the plugin basically does, is mirroring the drupal user in the wiki user database each time you go to the wiki site. Once it has been saved to the database, the wiki system will try to authenticate you based on your user name obtained from the session against its database. Unfortunately the session will contain the username with an underscore, while the local database will not. This lets the system assume that there is no such user in the wiki database so it will attempt to mirror the drupal user once again. BOOM.
    The fix is rather stupid, but it will work. Your user names on the wiki site will contain an dot char instead of an underscore.

    Cheers!

    Paul.

    Profile photo of Paul Rogalinski

    Thanks,

    I’ll just reset it back to your current password. I’ll drop you an email before I start and when I’m finished.

    Again, Thanks for your patience and support!

    Cheers,

    Paul.

    Profile photo of Jonathan Hall

    hijack away (as you have database access I assume you can replace my password with one of your choosing) … Just don’t impersonate me in any forum/wiki postings :p

    Trigger a “request new password” when your finished, so I’ll be emailed new credentials.

    Profile photo of Paul Rogalinski

    At least this is reproduceable, this will help me to hunt it down. Do you mind if I borrow (read hijack) your account this weekend to fix this? I will have to temporarely change your password so i can use it.

    Profile photo of Jonathan Hall

    Thanks for trying but I’m still getting the same error :(

    I can read it when I’m not logged in so its not urgent for me…. Although, I doubt I’m the only person who signed up recently who’s having the same issue.

    Profile photo of Maia W

    I logged into my account here first and was able to get in to the Wiki with no problems. Just thought I’d let ya know.
    The only thing I noticed is that some junkies need to start posting in the Siglerpedia about Noturnal now…

    ————
    KnitWitch
    http://www.knitwitchzone.com

    Profile photo of Paul Rogalinski

    nah, nothing that fancy. Actually those are two plugins, one for drupal injecting user data into the wiki database when you log in over here, and a mediawiki counterpart acting as an authorization filter. Some sort of cookie sharing is also involved, did not look closer into it though.

    Funny btw… right now I am implementing a X509 based SSO mechanism for an application i am currently developing for my daytime job :) I might have some articles about WCF’s (Webservices on Steroids for .NET) authentication / authorization framework if you are interessted.

    Profile photo of Kevin Mest

    Whats the SSO plugin you’re using? Is it SAML-based? Just wondering… I’ve dabbled in federated identity in the past but never had a real opportunity to do resume-worthy stuff with it.

    Profile photo of Paul Rogalinski

    seems so, yeah.

    Currently we are using an cutting-edge (beta) SSO Plugin in order to bring the wiki and drupal authorization together. Perhaps your account was registered in the wiki database AND in the drupal database during the sign up process. Furthermore the wiki-user db will get updated each time you log in into the drupal site. I think this is where those two worlds collide.

    I’ve altered the wiki database to remove the primary-key collsion, please try once again. If this works now for you, I have an idea where to look for the bug.

    Cheers!

    Paul. 

    Profile photo of Jonathan Hall

    Paul,
    Thanks for the prompt response.

    I can access the wiki when I’m not logged in. Relogging in and retrying gives me the same error.

    Just guessing here, but seems like somehow my wiki account was created, but a flag wasn’t updated on my drupal account. Meaning every time I try and access the wiki it is trying to recreate my wiki account and failing?

    Profile photo of Paul Rogalinski

    I’ll put this on my ToDo list for the next weekend. But here is something you could try in the meanwhile: try logging out and logging in on the drupal site and try to visit the wiki page once again. Let me know if that helps.

    Cheers!

    Paul. 

    Profile photo of Jonathan Hall

    I just created a new account, then started looking around, when I login and try and access the wiki I get this error:


    Database error
    A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database

    query was:
    (SQL query hidden)

    from within function "User::addToDatabase". MySQL returned error "1062: Duplicate entry 'The_Spide' for key 2 (localhost)".

You must be logged in to reply to this topic.