Hi...
On 09/24/22 12:52 am, Steven Levine wrote:
> In <
632E80DB...@2rosenthals.com>, on 09/24/22
> at 12:00 AM, Lewis G Rosenthal <
lgros...@2rosenthals.com> said:
>
> Hi,
>
>> Okay! No more APR_DSOPATH in my startup, but I've never been quite so
>> happy to get a password failure before. :-)
>> I think the issue now is how to properly match the hash from WordPress.
>> Oh, and also, I had to swap:
>> AuthDBDUserRealmQuery
> There's probably a reason the provider is implemented that way, but I
> don't know what it is.
It's interesting. The difference between:
AuthDBDUserPWQuery
and
AuthDBDUserRealmQuery
is that in the latter case, the username and the realm are generally ANDed
in the query (...WHERE username = %s AND realm = %s) and "realm" is taken
from AuthName. Leaving the AND in the query results in the expected auth
failure. Quite odd, indeed. Omitting the AND clause sends what should be the
proper query, though I'm 99% sure the password hash is not right.
>> Anyway, some sources suggest telling Apache to hash the password given
>> for comparison, as in:
>> SELECT CONCAT('{MD5}',password) as password FROM...
> Take a look at
>
> apr_passwd.c:82
> APU_DECLARE(apr_status_t) apr_password_validate(const char *passwd,
>
> This should give you an idea of what hash methods are supported.
>
By {MD5} above, I actually should have said $apr1$. However, this doesn't
seem to get it.
As we know, WordPress uses PHPass. This was the entire reason for the
patched mod_auth_mysql which we use with Apache 2.2. Apache by default
doesn't handle PHPass.
More:
https://barry.blog/2008/05/19/mod_auth_mysql-and-phpass/
I need to do some more sleuthing to find out whether the WordPress upgrade
to 6.x from 4.9 might use something newer (bcrypt?) as well as recognize and
accept the existing hashes in the db (can't very well re-hash them, as that
would imply going backwards to the clear text and hashing again). For now,
though, I'd say this is a non-starter in thi configuration, so I'll have to
find an alternative.