[pmwiki-devel] crypt problem on WAMP
dominique.faure at gmail.com
Fri Jun 4 08:29:47 CDT 2010
On Fri, Jun 4, 2010 at 14:23, Peter Bowers <pbowers at pobox.com> wrote:
> I am having difficulty with some authorization code on a WAMP server
> and wondering if anybody can shed light...
> Here's what I've got in my config.php right now (minus comments):
> $hash0 = crypt('abc'); // as (:encrypt abc:) would output
> $hash2 = crypt('abc', $hash0); // as encrypted as part of Site.AuthForm login
> $hash3 = crypt('abc', $hash2); // ditto
> $hash4 = crypt('abc', $hash3); // ditto
> echo "local config: <br>\nhash0=$hash0,
> and here's what it outputs:
> local config:
> Note that the salt is identical, but the resulting crypted code is
> different between hash0 and the rest. Obviously this results in the
> password being stored in SiteAdmin.AuthUser (which is generated like
> hash0 is generated) does not match the passwords crypted from
> Site.AuthForm (which are generated as hash2 and etc. are generated).
> (At different points during my testing hash2-4 have been identical,
> but always different from hash0.)
> Eemeli tried this on linux servers and it results in identical hashes
> between hash0 and the rest (as expected). Any idea what could cause
> the WAMP server to do otherwise?
As a workaround, have you tried to use the _crypt(...) version defined
in scripts/authuser.php ?
More information about the pmwiki-devel