Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
I can't log in using authpdo or how dokuwiki generates :hash from :clear?
Avatar
ef1 #1
Member for 2 months · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: I can't log in using authpdo or how dokuwiki generates :hash from :clear?
dokiwiki 2018-04-22b "Greebo"
nginx 1.16.1
PHP 7.3.13
MariaDB 10.4.11
table
users - id, login, pass, name, mail
groups - id, name
usergroup - uid, gid


adds a user to the users table - everything is OK
$conf['plugin']['authpdo']['insert-user'] = 'INSERT INTO users (login, pass, name, mail)
              VALUES (:user, :hash, :name, :mail)';
for example
login - test
pass (:hash) - $1$faeXB3YP$Fy2Ed6YSG.16cGZ3CMp/2.
:clear - 'tiihivkab46#'


and when I check the check-pass at the entrance-the passwords do not match
pass <> MD5(CONCAT(MD5(:user), MD5(:clear)))

$conf['plugin']['authpdo']['check-pass'] = 'SELECT id AS "uid"
       FROM users
      WHERE login = :user
            AND pass = MD5(CONCAT(MD5(:user), MD5(:clear)))';

what the error is?

...
SELECT id AS "uid",
            pass,
            MD5('tiihivkab46#') 
       FROM users
      WHERE login = 'test'
    /*        AND pass = MD5(CONCAT(MD5('test'), MD5('tiihivkab46#')))*/
pass=                       $1$faeXB3YP$Fy2Ed6YSG.16cGZ3CMp/2.
MD5('tiihivkab46#') = 56335c62603eceb64e68ab6422d531a0

how dokuwiki generates :hash from :clear= 'tiihivkab46#' for correct comparison in ['authpdo'] ['checkpass'] ?
This post was edited 2 times, last on 2020-01-27, 12:10 by ef1.
Avatar
ef1 #2
Member for 2 months · 3 posts
Group memberships: Members
Show profile · Link to this post
stop :))
setting dokuwiki - SMD5/ Query "Select - MD5

edit
set dokuwiki - MD5
and
$conf['plugin']['authpdo']['check-pass'] = 'SELECT id AS "uid"
       FROM users
      WHERE login = :user
            AND pass = MD5(:clear)';

everything is OK
This post was edited on 2020-01-27, 13:04 by ef1.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-04-04, 11:41:31 (UTC +02:00)