[dokuwiki] Bug in Usermanager

  • From: Matthias Grimm <matthiasgrimm@xxxxxxxxxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sat, 5 Nov 2005 14:32:07 +0100

Hi,
I found a bug in the usermanager

In the function _retrieveUser() the line

$user[4] = preg_split('/\s*,\s*/',$_REQUEST['usergroups'],PREG_SPLIT_NO_EMPTY);

must be replaced by this one:

$user[4] = 
preg_split('/\s*,\s*/',$_REQUEST['usergroups'],-1,PREG_SPLIT_NO_EMPTY);

The function preg_split() needs 4 parameters, not only three. This bug causes
that all entered groups won't be split up and the array will contain only
one single field. The string format is the same as used in plain auth mode so
that this bug can't be seen while using plain_class.php. Very tricky one .-)

  Best regards
    Matthias


-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: