PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.0
Jetpack – WP Security, Backup, Speed, & Growth v16.0
12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 14.4.2 All 500 releases
← All changes | modules/sharedaddy/sharedaddy.php +6 -1 14.4.216.0 View file →
@@ -5,8 +5,12 @@
5 5 *
6 6 * @package automattic/jetpack
7 7 */
8 8
9 +if ( ! defined( 'ABSPATH' ) ) {
10 + exit( 0 );
11 +}
12 +
9 13 // Set up Sharing in wp-admin.
10 14 require_once plugin_dir_path( __FILE__ ) . 'sharing.php';
11 15
12 16 /**
@@ -113,9 +117,10 @@
113 117 $post_type_object = get_post_type_object( sanitize_key( $_POST['post_type'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Core takes care of the validation.
114 118
115 119 // Record sharing disable.
116 120 if (
117 - $post_type_object->public
121 + $post_type_object instanceof \WP_Post_Type
122 + && $post_type_object->public
118 123 && current_user_can( 'edit_post', $post_id )
119 124 && isset( $_POST['sharing_status_hidden'] ) // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Core takes care of the validation.
120 125 ) {
121 126 if ( ! isset( $_POST['enable_post_sharing'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Core takes care of the validation.