[pmwiki-users] AuthUser group problem

akc jdcwki at jctux.selfip.org
Wed Aug 23 11:55:17 CDT 2006


On Wed, Aug 23, 2006 at 08:55:08AM -0500, Patrick R. Michaud wrote:
> On Tue, Aug 22, 2006 at 09:07:44PM -0800, akc wrote:
> > I am having a problem with the way the AuthUser script builds the $auth
> > array for authorization groups.  Several of the userids I need to be
> > included in authorization groups contain one or more spaces, which is
> > causing such userids to be considered as 2 or more separate usernames 
> > when building the $auth array.  My groups as specified in Site.AuthUser 
> > are similar to: 
> >  @usrgroup: user1, BarFoo, foo bar, user4, bar foo barbar, user6
> 
> The notion of having spaces in usernames is a little bizarre.
> I can't think of *any* other authentication systems in common use that
> allow usernames to have spaces, which is why PmWiki doesn't
> use them.
>
Pm,
Thanks for the quick reply!

I agree the use of spaces in usernames is for most applications bizarre,
but there are several message board systems such as phpBB that DO allow 
spaces and several other unusual characters in usernames.

> > I believe the regular expression patterns are the source of my problem, 
> > but I do not know enough about expression pattern syntax to resolve 
> > this.  
> > 
> > Any suggestions?
> 
> Since PmWiki is using spaces to separate items in lines, it's a bit
> difficult to have usernames with spaces in them.  It can be done, but
> we'd have to change the code to accept things like
> 
>     @usrgroup: user1, BarFoo, "foo bar", user4, "bar foo barbar", user6
> 
> so that we can tell when space is a separator and when it's part of a
> name.
> 
> If you have an existing authentication system where the usernames have
> spaces, I might be able to extend the group syntax to accommodate those.
> However, I don't have any plans to introduce spaces into PmWiki's
> usernames, because it just makes things too confusing in too many places.
> (And, as I said, I'm not aware of any other authentication system
> where spaces are allowed in usernames, so it's not common.)
> 
> Pm

A bit more background: I am using the AuthUser-Database recipe along with 
AuthUser to authenticate against the MySQL database of a phpBB message
board.  Authentication is working perfectly, except for the problem 
building the $auth array from the @group: lines in my Site.AuthUser.

I am willing to live with a non-standard version of the authuser.php
script (mine already is due to a one line change needed for 
AuthUser-Database), but need help setting up the expressions for parsing 
my Site.AuthUser page.  Your suggested format for a @group: line is
exactly what I would like to use, if a workable solution can be found
for the parsing problem. 

akc




More information about the pmwiki-users mailing list