-
Bug
-
Resolution: Fixed
-
3.0.0
-
None
-
PHP Environment: 5.2.4
Database: MySQL 5.0.45
I have a permission called u_gt4oc_member, which i was using in a ucp/info file as follows;
'modes' => array(
|
'general' => array('title' => 'UCP_GT4OC_GENERAL', 'auth' => 'acl_u_gt4oc_member', 'cat' => array('UCP_GT4OC')),
|
'address' => array('title' => 'UCP_GT4OC_ADDRESS', 'auth' => 'acl_u_gt4oc_member', 'cat' => array('UCP_GT4OC')),
|
),
|
the module would not show up, ive since found that the regex's inside of the function module_auth do not match when numbers are within the auth field to fix this, use the following;
FIND
if (!preg_match('#(?:acl_([a-z_]+)(,\$id)?)|(?:\$id)|(?:aclf_([a-z_]+))|(?:cfg_([a-z_]+))|(?:request_([a-z_]+))#', $token))
|
REPLACE WITH
if (!preg_match('#(?:acl_([a-z0-9_]+)(,\$id)?)|(?:\$id)|(?:aclf_([a-z0-9_]+))|(?:cfg_([a-z0-9_]+))|(?:request_([a-z0-9_]+))#', $token))
|
FIND
eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#', '#request_([a-z_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']', '!empty($_REQUEST[\'\\1\'])'), $module_auth) . ');');
|
REPLACE WITH
eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z0-9_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z0-9_]+)#', '#cfg_([a-z0-9_]+)#', '#request_([a-z0-9_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']', '!empty($_REQUEST[\'\\1\'])'), $module_auth) . ');');
|

