Skip to content

Commit 8bbd2f5

Browse files
committed
Fix h1 report 3399191
1 parent 8242644 commit 8bbd2f5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

www/admin/account-preferences-plugin.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
// Security check
2626
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER, OA_ACCOUNT_TRAFFICKER);
2727

28-
phpAds_registerGlobal('group');
28+
$pattern = '/[^a-zA-Z0-9\._-]/';
29+
$group = preg_replace($pattern, '', $_REQUEST['group'] ?? '');
2930

3031
// Load the account's preferences, with additional information, into a specially named array
3132
$GLOBALS['_MAX']['PREF_EXTRA'] = OA_Preferences::loadPreferences(true, true);
@@ -38,6 +39,9 @@
3839

3940
$oComponentGroupManager = new OX_Plugin_ComponentGroupManager();
4041
$aGroup = $oComponentGroupManager->_getComponentGroupConfiguration($group);
42+
43+
OA_Permission::enforceTrue(!empty($aGroup['preferences']));
44+
4145
$enabled = $GLOBALS['_MAX']['CONF']['pluginGroupComponents'][$group];
4246
$disabled = ((!$enabled) && (OA_Permission::getAccountType() != OA_ACCOUNT_ADMIN));
4347

0 commit comments

Comments
 (0)