Capability Manager Enhanced - Version 2.3.1

Version Description

Fixed : Security issue. Please update.

=

Download this release

Release Info

Developer stevejburge
Plugin Icon 128x128 Capability Manager Enhanced
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3 to 2.3.1

capsman-enhanced.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: PublishPress Capabilities
4
  * Plugin URI: https://publishpress.com/capability-manager/
5
  * Description: Manage WordPress role definitions, per-site or network-wide. Organizes post capabilities by post type and operation.
6
- * Version: 2.3
7
  * Author: PublishPress
8
  * Author URI: https://publishpress.com/
9
  * Text Domain: capsman-enhanced
@@ -25,13 +25,13 @@
25
  * @copyright Copyright (C) 2009, 2010 Jordi Canals; modifications Copyright (C) 2020 PublishPress
26
  * @license GNU General Public License version 3
27
  * @link https://publishpress.com/
28
- * @version 2.3
29
  */
30
 
31
  if (!defined('CAPSMAN_VERSION')) {
32
- define('CAPSMAN_VERSION', '2.3');
33
- define('CAPSMAN_ENH_VERSION', '2.3');
34
- define('PUBLISHPRESS_CAPS_VERSION', '2.3');
35
  }
36
 
37
  foreach (get_option('active_plugins') as $plugin_file) {
@@ -145,7 +145,7 @@ if ( is_multisite() )
145
  // Display message inviting to install Permissions
146
  if (
147
  ((defined('WP_DEBUG') && defined('CAPSMAN_INSTALL_PERMISSIONS')) || (!cme_is_plugin_active('press-permit-core.php') && !cme_is_plugin_active('presspermit-pro.php')))
148
- && !isset($_GET['pp-after-click'])
149
  && !defined('CAPSMAN_DISABLE_PERMISSIONS_PROMO')
150
  ) {
151
  add_action('init', function() {
@@ -156,6 +156,6 @@ if (
156
  || (!empty($_REQUEST['action']) && ('ppc_permissions_action' == $_REQUEST['action']))
157
  ) {
158
  require_once ( dirname(__FILE__) . '/includes-core/pp-capabilities-permissions.php' );
159
- }
160
  });
161
  }
3
  * Plugin Name: PublishPress Capabilities
4
  * Plugin URI: https://publishpress.com/capability-manager/
5
  * Description: Manage WordPress role definitions, per-site or network-wide. Organizes post capabilities by post type and operation.
6
+ * Version: 2.3.1
7
  * Author: PublishPress
8
  * Author URI: https://publishpress.com/
9
  * Text Domain: capsman-enhanced
25
  * @copyright Copyright (C) 2009, 2010 Jordi Canals; modifications Copyright (C) 2020 PublishPress
26
  * @license GNU General Public License version 3
27
  * @link https://publishpress.com/
28
+ * @version 2.3.1
29
  */
30
 
31
  if (!defined('CAPSMAN_VERSION')) {
32
+ define('CAPSMAN_VERSION', '2.3.1');
33
+ define('CAPSMAN_ENH_VERSION', '2.3.1');
34
+ define('PUBLISHPRESS_CAPS_VERSION', '2.3.1');
35
  }
36
 
37
  foreach (get_option('active_plugins') as $plugin_file) {
145
  // Display message inviting to install Permissions
146
  if (
147
  ((defined('WP_DEBUG') && defined('CAPSMAN_INSTALL_PERMISSIONS')) || (!cme_is_plugin_active('press-permit-core.php') && !cme_is_plugin_active('presspermit-pro.php')))
148
+ && !isset( $_GET['pp-after-click'])
149
  && !defined('CAPSMAN_DISABLE_PERMISSIONS_PROMO')
150
  ) {
151
  add_action('init', function() {
156
  || (!empty($_REQUEST['action']) && ('ppc_permissions_action' == $_REQUEST['action']))
157
  ) {
158
  require_once ( dirname(__FILE__) . '/includes-core/pp-capabilities-permissions.php' );
159
+ }
160
  });
161
  }
includes/admin.php CHANGED
@@ -693,6 +693,10 @@ if( defined('PRESSPERMIT_ACTIVE') ) {
693
  } // end foreach item type
694
  }
695
 
 
 
 
 
696
  do_action('publishpress-caps_manager_postcaps_section', compact('current', 'rcaps', 'pp_metagroup_caps', 'is_administrator', 'default_caps', 'custom_types', 'defined', 'unfiltered', 'pp_metagroup_caps','caps_manager_postcaps_section', 'active_tab_id'));
697
 
698
  $type_caps = apply_filters('publishpress_caps_manager_typecaps', $type_caps);
693
  } // end foreach item type
694
  }
695
 
696
+ if (empty($caps_manager_postcaps_section)) {
697
+ $caps_manager_postcaps_section = '';
698
+ }
699
+
700
  do_action('publishpress-caps_manager_postcaps_section', compact('current', 'rcaps', 'pp_metagroup_caps', 'is_administrator', 'default_caps', 'custom_types', 'defined', 'unfiltered', 'pp_metagroup_caps','caps_manager_postcaps_section', 'active_tab_id'));
701
 
702
  $type_caps = apply_filters('publishpress_caps_manager_typecaps', $type_caps);
includes/settings-handler.php CHANGED
@@ -7,18 +7,23 @@
7
  */
8
 
9
  add_action('init', function() {
10
-
11
- if (!empty($_POST['all_options'])) {
12
- foreach(explode(',', $_POST['all_options']) as $option_name) {
13
- $value = isset($_POST[$option_name]) ? $_POST[$option_name] : '';
14
-
15
- if (!is_array($value)) {
16
- $value = trim($value);
17
- }
18
-
19
- update_option($option_name, stripslashes_deep($value));
20
- }
 
 
 
 
 
 
 
21
  }
22
-
23
- do_action('pp-capabilities-update-settings');
24
- });
7
  */
8
 
9
  add_action('init', function() {
10
+ if (wp_verify_nonce($_REQUEST['_wpnonce'], 'pp-capabilities-settings') && current_user_can('manage_capabilities')) {
11
+ if (!empty($_POST['all_options'])) {
12
+ foreach(explode(',', $_POST['all_options']) as $option_name) {
13
+ foreach (['cme_', 'capsman', 'pp_capabilities'] as $prefix) {
14
+ if (0 === strpos($option_name, $prefix)) {
15
+ $value = isset($_POST[$option_name]) ? $_POST[$option_name] : '';
16
+
17
+ if (!is_array($value)) {
18
+ $value = trim($value);
19
+ }
20
+
21
+ update_option($option_name, stripslashes_deep($value));
22
+ }
23
+ }
24
+ }
25
+ }
26
+
27
+ do_action('pp-capabilities-update-settings');
28
  }
29
+ });
 
 
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: user roles, capabilities, permissions, admin menus, post editing, post typ
7
  Requires at least: 4.9.7
8
  Tested up to: 5.8
9
  Requires PHP: 5.6.20
10
- Stable tag: 2.3
11
  License: GPLv3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
@@ -404,8 +404,15 @@ Common and incorrect typos include Capabilitise, Cpabilities, Capabiliites, Cspa
404
  = 1.5.1 =
405
  Fixed : Non-administrators with user editing capabilities could add new Administrators
406
 
 
 
 
407
  == Changelog ==
408
 
 
 
 
 
409
  = 2.3 - 28 Oct 2021 =
410
  * Change : Role Capabilities screen uses tabs
411
  * Feature : New "Admin Features" screen #200
7
  Requires at least: 4.9.7
8
  Tested up to: 5.8
9
  Requires PHP: 5.6.20
10
+ Stable tag: 2.3.1
11
  License: GPLv3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
404
  = 1.5.1 =
405
  Fixed : Non-administrators with user editing capabilities could add new Administrators
406
 
407
+ = 2.3.1 =
408
+ Fixed : Security issue. Please update.
409
+
410
  == Changelog ==
411
 
412
+ = 2.3.1 - 6 Dec 2021 =
413
+ * Fixed : Security issue
414
+ * Fixed : PHP Notice on Capabilities screen
415
+
416
  = 2.3 - 28 Oct 2021 =
417
  * Change : Role Capabilities screen uses tabs
418
  * Feature : New "Admin Features" screen #200