[pmwiki-users] Custom Action and Authentication
crisses at kinhost.org
Mon Feb 10 21:04:44 CST 2014
I've spent a day trying to fix this, so I have to figure that the documentation or myself (or both) aren't up to the task...
I have an array of (xml scalar) variables being passed to PmWiki via ?action=xmlrpc, including the author & password. All the xmlrpc functions are in their own classes, including extracting the password from the xml data. It works just fine, can dump the vars and all is (apparently?) in order.
I'm using basic PmWiki passwording. I've set up the password to be passed to $_POST['authpw'] and the username to go into $_POST['authid'] and (global) $Author.
Later I call RetrieveAuthPage(), but the $page object response comes up blank. I checked my $pagename, etc. I even tried CondAuth() (pages fail) and ReadPage() (pages work) so I am certain it's an authentication issue. And I don't seem to have a crypt() issue on storing the password...unless I'm missing a step somewhere after $_POST['authpw'].
Is there a proper hook to use custom actions to pass along a user's credentials before calling RetrieveAuthPage()? [I suppose theoretically I could have the password in the link (i.e. ?action=xmlrpc&authpw=XXXXX), and pass the $_GET to $_POST in config.php if needed before the custom actions are run. But that's so messy and insecure.]
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pmwiki-users