[CWB] CQPweb: Small bug in group management regexp

Erik-Lân Do Dinh eriklan.dodinh at googlemail.com
Fri Sep 2 19:30:14 CEST 2011


Hello everybody,

I just wanted to inform you of a small bug in the group management
component of CQPweb.

Assume you have two user groups, "superusers" and "users" (in this order).
Calling the function list_users_in_group("users") from apache.inc.php
then returns the users in the "superusers" line, because of the
following regexp:

apache.inc.php, rev 270, line 372:
if (preg_match("/$group: (.*)\n/", $data, $m) > 0)

I changed this regexp to "/^$group: (.*)\$/m" which solved the problem for me.

The problem occurs similarly in functions:
* list_users_in_group($group)
* add_user_to_group($user, $group)
* delete_user_from_group($user, $group)
* delete_group($group)

Best regards,
Erik-Lân


More information about the CWB mailing list