Advertisement:

Author Topic: DokuWiki, authPDO & Simple Machines  (Read 138 times)

Offline NFG

  • Semi-Newbie
  • *
  • Posts: 38
DokuWiki, authPDO & Simple Machines
« on: December 09, 2019, 08:48:34 AM »
I've been bashing my head against this all night and I'm ready to admit I need help.

Dokuwiki has an AuthPDO module for user authentication, and I've got code that pulls out the username, password hash and so on from SMF, but it constantly fails to match the wiki user's password with the hash in the SMF DB.  Now dokuwiki supports bcrypt, but I'm guessing it needs to understand the salt, and I'm having trouble making that part of it work when I don't understand the salt myself. 

Is password_salt in smf_members the actual salt used to generate the passwd hash?  Are those two elements plus the wiki user's plaintext password enough to authenticate the user?

And...  Can this be done in MySQL, so that I can return the user ID knowing these three things?  (select uid from smf_members where member_name = 'dave' and <password magic>) ?

Or am I doing this entirely wrong?  Happy to get an answer either way.  =)

Offline NFG

  • Semi-Newbie
  • *
  • Posts: 38
Re: DokuWiki & Simple Machines
« Reply #1 on: December 09, 2019, 06:28:44 PM »
Iit seems like SMF does way more work on the passwords than a simple MySQL query will work with.

But I found this:  https://github.com/realdigger/DokuWiki-SMF2-Authentication-Plugin

And it seems to work just fine.  So the question is moot.