[dokuwiki] Re: Turn superuser or manager into lists (patch)

On Sat, 23 Feb 2008 21:01:27 +0100
Guy Brand <gb@xxxxxxxxxxxxxxxxx> wrote:

> Andreas Gohr wrote:
> 
> > A question on one part of your patch:
> > 
> > hunk ./inc/auth.php 296
> > -      $groups[$i] = '@'.auth_nameencode($groups[$i]);
> > +      $groups[$i] = auth_nameencode('@' . $groups[$i]);
> > 
> > Why are you doing this?
> 
> Because not doing it leads to a double @@ for groups a user is member
> of (bug in the auth_nameencode function?). I was surprised myself to
> have to call auth_nameencode that way.

This shouldn't be possible. Groups returned from getUserInfo have to be
returned unencoded and without a leading @ in the grps array of
$USERINFO.

Groups in the config file have to be encoded and then be prepended by
an unencoded @. The same goes for groups inside the ACL file. The ACL
manager takes care of this encoding.

AFAIK this mechanism works fine currently - otherwise please submit a
bugreport.

So either you broke something somewhere else in your patch or the above
mentioned change will break group authentication.

Andi

-- 
http://www.splitbrain.org

Other related posts: