[pmwiki-users] FYI: htpasswd/htgroup and spaces in user/group ids

Dominique Faure dominique.faure at gmail.com
Thu Oct 5 04:23:22 CDT 2006


Hi,

Looking to the recent .htgroup-formatted file for authorization groups
handling introduced in v2.1.24, I noticed that:
* Only single worded groupids are handled.
* Groups can only contain indifferently space or comma separated user
ids, aka single words.

Remembering your response [1] to the space in user ids problem, I was
wondering how Apache was handling that.

Digging in the source code[2-3], I found that:
* The group and user names handled by Apache may be defined with the
regexp: /[^:]+/ (aka any char except two-colons which acts as field
separator).
* The group definition itself handles this by allowing userids to be
space separated words or (single ou double) quoted strings (containing
eventually backslash-escaped quotes). BTW, this is not clearly stated
(nor documented) whereas commas are allowed or not as separator.


Regards,
Dom

[1] http://pmichaud.com/pipermail/pmwiki-users/2006-August/030931.html

>From apache source code:
[2] httpd-2.2.3/modules/aaa/mod_authz_groupfile.c[groups_for_user]
[3] httpd-2.2.3/server/util.c[ap_getword, ap_getword_conf]




More information about the pmwiki-users mailing list