MoroGasper / yii-usergroups

Automatically exported from code.google.com/p/yii-usergroups
0 stars 0 forks source link

extractControllers method doesn't look far enough into the file #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. vanilla install
2. open up the add group panel
3. click add group and be greeted by an eval error and failure to retrieve 
admincontroller perms

What is the expected output? What do you see instead?
no error

What version of the product are you using? On what operating system?
1.7.1 on linux

Please provide any additional information below.
just change line 204 of usergroupsaccess to a higher value.. like 600.

$controller_file = file_get_contents($controller, false, NULL, 0, 600);

Original issue reported on code.google.com by omnomnom...@gmail.com on 8 Jun 2011 at 3:36

GoogleCodeExporter commented 9 years ago
i new it would've happened soon or later <.< damn it

thanks anyway for the report.... maybe the best solution is to just not set any 
maxlen value... what do you think about it?

Original comment by nic...@creationgears.com on 9 Jun 2011 at 9:41

GoogleCodeExporter commented 9 years ago
I'd prefer to just include the file and read the value.. Doing it the way you 
did doesn't take into account semicolons within the string literals etc. 
causing more problems down the line.

Original comment by omnomnom...@gmail.com on 9 Jun 2011 at 12:03

GoogleCodeExporter commented 9 years ago
the file is already included, the parsing is performed that way when there are 
two controllers with the same name.

including both would trigger a php error due to having two classes sharing the 
same error ^^

thanks anyway

Original comment by nic...@creationgears.com on 9 Jun 2011 at 1:49