[pmwiki-users] authuser.php crash (ref PITS 00737)
marc
gmane at auxbuss.com
Wed May 31 09:54:56 CDT 2006
Hi,
I'm new to PmWiki, so apologies if my terminology is somewhat shaky.
All is well with my installation, and after getting my head around
authuser and authorization groups, I decided to give authorization via
MySQL a spin (using dbauth.php).
No problems here either, authentication via the db works fine.
Excellent.
However, when I add my testing db username to one of my existing
authorization groups (e.g. @testers: marc changed to @testers: marc,
test), then attempt to login, authuser.php crashes with:
Fatal error: [] operator not supported for strings in blah\pmwiki
\scripts\authuser.php on line 60
This is the same bug described here:
http://www.pmwiki.org/wiki/PITS/00737
Now, usually I would launch into debug mode, but I'm still unfamiliar
with PmWiki and the crashing code is rather symbolic, so I though I'd
ask here first.
The offending line 60 in authuser.php is:
foreach($v[0] as $g) $auth[$g][] = $m[1];
in the code snippet below.
$pn = FmtPageName($AuthUserPageFmt, $pagename);
$apage = ReadPage($pn, READPAGE_CURRENT);
if ($apage && preg_match_all("/^\\s*([@\\w][^\\s:]*):(.*)/m",
$apage['text'], $matches,
PREG_SET_ORDER)) {
foreach($matches as $m) {
if (!preg_match_all('/\\bldap:\\S+|[^\\s,]+/', $m[2], $v))
continue;
if ($m[1]{0} == '@')
foreach($v[0] as $g) $auth[$g][] = $m[1];
else $auth[$m[1]] = array_merge((array)@$auth[$m[1]], $v[0]);
}
}
The error message is: [] operator not supported for strings, so can
anyone suggest the next step?
I presume that dbauth.php is passing authuser.php something bad, but I'm
not sure what.
--
Best,
Marc
More information about the pmwiki-users
mailing list