[pmwiki-users] fix for bug in userauth recipe for pmwiki
Patrick Ogay
lists at basel-inside.ch
Sun Jul 31 16:11:35 CDT 2005
>Theron Parlin wrote
>I found a bug in the userauth recipe for pmwiki. Everything worked
until I tried to password protect a page. I would
>enter my password but it kept returning the password prompt to me,
never accepting my password.
I upgraded pmwiki to beta51, I had to upgrade userauth from 062 to 0.63
Thanks very much for your hint, I had exactly the same problem! (might
be because 0.63 uses new pmwiki-auth routine, instead of basicauth)
>The problem is in userauth.php in the CheckPmWikiPassword function,
there is a line that reads:
>$_POST['authpw'] = $page_passwd;
>It looks like the author was trying to pass the page password to the
PmWikiAuth function in pmwiki.php.
>This won't work in some environments (namely php safe mode, which I'm
running).
>I fixed it by changing all references of "wiki_pw" to "authpw" in
userauth.php and removed the line
>above from the CheckPmWikiPassword function and all was well.
I mean, it's not necessary to use wiki_pw and assign it to authpw before
calling pmwikiauth, but I can't see, why it should lead to an
misfunction. I logged the password $_POST['authpw'] in pmwikiauth and
it's the "correct" value, the correct password in clear text!!!! (as in
the other case too).
>This one kept me busy for a few hours! :)
seems like a good amusement! for me too.!!
I'm glad now, your propositon works (not everthing can be understood:-)
I will mention the problem on cookbook/userauth.
I think, it would be usefull to correct the module too.
regards
Patrick Ogay
More information about the pmwiki-users
mailing list