[CWB] CQPweb: Small bug in group management regexp

Hardie, Andrew a.hardie at lancaster.ac.uk
Fri Sep 2 21:52:14 CEST 2011


Hi Erik-Lân,

Thanks for the bug report. Fixed in commit 271.

best

Andrew.

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Erik-Lân Do Dinh
Sent: 02 September 2011 18:30
To: cwb at sslmit.unibo.it
Subject: [CWB] CQPweb: Small bug in group management regexp

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
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://devel.sslmit.unibo.it/mailman/listinfo/cwb


More information about the CWB mailing list