Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/soliloquy-lite/blocks/soliloquy/index.asset.php
+++ b/soliloquy-lite/blocks/soliloquy/index.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'b4fedc7556e7f230797d');
+<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '3cc29643e4bde5ab67e2');
--- a/soliloquy-lite/includes/admin/addons.php
+++ b/soliloquy-lite/includes/admin/addons.php
@@ -105,6 +105,10 @@
*/
public function enqueue_admin_styles() {
+ // Enqueue jquery-confirm CSS for upgrade modal.
+ wp_register_style( $this->base->plugin_slug . '-jquery-confirm', plugins_url( 'assets/lib/jquery.confirm/jquery-confirm.min.css', $this->base->file ), [], $this->base->version );
+ wp_enqueue_style( $this->base->plugin_slug . '-jquery-confirm' );
+
wp_register_style( $this->base->plugin_slug . '-addons-style', plugins_url( 'assets/css/addons.css', $this->base->file ), [], $this->base->version );
wp_enqueue_style( $this->base->plugin_slug . '-addons-style' );
@@ -125,26 +129,30 @@
wp_register_script( $this->base->plugin_slug . '-chosen', plugins_url( 'assets/js/min/chosen.jquery-min.js', $this->base->file ), [], $this->base->version, true );
wp_enqueue_script( $this->base->plugin_slug . '-chosen' );
- wp_register_script( $this->base->plugin_slug . '-addons-script', plugins_url( 'assets/js/addons.js', $this->base->file ), [ 'jquery', 'jquery-ui-tabs' ], $this->base->version, true );
+ // Register jquery-confirm JS for upgrade modal; it will be enqueued
+ // automatically as a dependency of the addons script.
+ wp_register_script( $this->base->plugin_slug . '-jquery-confirm', plugins_url( 'assets/lib/jquery.confirm/jquery-confirm.min.js', $this->base->file ), [ 'jquery' ], $this->base->version, true );
+
+ wp_register_script( $this->base->plugin_slug . '-addons-script', plugins_url( 'assets/js/addons.js', $this->base->file ), [ 'jquery', 'jquery-ui-tabs', $this->base->plugin_slug . '-jquery-confirm' ], $this->base->version, true );
wp_enqueue_script( $this->base->plugin_slug . '-addons-script' );
wp_localize_script(
$this->base->plugin_slug . '-addons-script',
'soliloquy_addons',
[
- 'active' => __( 'Active', 'soliloquy' ),
- 'activate' => __( 'Activate', 'soliloquy' ),
- 'activate_nonce' => wp_create_nonce( 'soliloquy-activate' ),
- 'activating' => __( 'Activating...', 'soliloquy' ),
- 'ajax' => admin_url( 'admin-ajax.php' ),
- 'deactivate' => __( 'Deactivate', 'soliloquy' ),
- 'deactivate_nonce' => wp_create_nonce( 'soliloquy-deactivate' ),
- 'deactivating' => __( 'Deactivating...', 'soliloquy' ),
- 'inactive' => __( 'Inactive', 'soliloquy' ),
- 'install' => __( 'Install Addon', 'soliloquy' ),
- 'install_nonce' => wp_create_nonce( 'soliloquy-install' ),
- 'installing' => __( 'Installing...', 'soliloquy' ),
- 'proceed' => __( 'Proceed', 'soliloquy' ),
- 'redirect' => esc_url(
+ 'active' => esc_html__( 'Active', 'soliloquy' ),
+ 'activate' => esc_html__( 'Activate', 'soliloquy' ),
+ 'activate_nonce' => wp_create_nonce( 'soliloquy-activate' ),
+ 'activating' => esc_html__( 'Activating...', 'soliloquy' ),
+ 'ajax' => admin_url( 'admin-ajax.php' ),
+ 'deactivate' => esc_html__( 'Deactivate', 'soliloquy' ),
+ 'deactivate_nonce' => wp_create_nonce( 'soliloquy-deactivate' ),
+ 'deactivating' => esc_html__( 'Deactivating...', 'soliloquy' ),
+ 'inactive' => esc_html__( 'Inactive', 'soliloquy' ),
+ 'install' => esc_html__( 'Install Addon', 'soliloquy' ),
+ 'install_nonce' => wp_create_nonce( 'soliloquy-install' ),
+ 'installing' => esc_html__( 'Installing...', 'soliloquy' ),
+ 'proceed' => esc_html__( 'Proceed', 'soliloquy' ),
+ 'redirect' => esc_url(
add_query_arg(
[
'post_type' => 'soliloquy',
@@ -153,7 +161,22 @@
admin_url( 'edit.php' )
)
),
- 'upgrade_nonce' => wp_create_nonce( 'soliloquy-upgrade' ),
+ 'upgrade_nonce' => wp_create_nonce( 'soliloquy-upgrade' ),
+ 'thanks_for_interest' => esc_html__( 'Thanks for your interest in Soliloquy Pro!', 'soliloquy' ),
+ 'upgrade_modal' => sprintf(
+ '<p>%s <a href="https://soliloquywp.com/support/" target="_blank" rel="noopener noreferrer"><strong>%s</strong></a></p><p>%s <strong>%s</strong> %s <strong>%s</strong>. %s</p><p>%s <a href="https://soliloquywp.com/docs/" target="_blank" rel="noopener noreferrer"><strong>%s</strong></a> %s</p>',
+ esc_html__( 'If you have any questions or issues just', 'soliloquy' ),
+ esc_html__( 'let us know', 'soliloquy' ),
+ esc_html__( 'After purchasing a license, just', 'soliloquy' ),
+ esc_html__( 'enter your license key', 'soliloquy' ),
+ esc_html__( 'on the', 'soliloquy' ),
+ esc_html__( 'Soliloquy Settings page', 'soliloquy' ),
+ esc_html__( "This will let your site automatically upgrade to Soliloquy Pro! (Don't worry, all your sliders and settings will be preserved.)", 'soliloquy' ),
+ esc_html__( 'Check out', 'soliloquy' ),
+ esc_html__( 'our documentation', 'soliloquy' ),
+ esc_html__( 'for step-by-step instructions.', 'soliloquy' )
+ ),
+ 'ok' => esc_html__( 'OK', 'soliloquy' ),
]
);
@@ -203,6 +226,10 @@
if ( is_ssl() ) {
$addon->image = str_replace( 'http://', 'https://', $addon->image );
}
+
+ // Get the minimum required license level from the plans array (first plan is the minimum).
+ $min_license = ! empty( $addon->plans ) && is_array( $addon->plans ) && ! empty( $addon->plans[0] ) ? $addon->plans[0] : 'Pro';
+ $badge_label = $min_license;
?>
<div class="soliloquy-addon <?php echo sanitize_html_class( $last ); ?>">
@@ -218,12 +245,8 @@
</div>
<div class="soliloquy-addon-footer">
-
- <div class="soliloquy-addon-unlock soliloquy-addon-message">
-
- <a href="<?php echo esc_url( $this->common->get_upgrade_link() ); ?>" target="_blank" class="button button-soliloquy soliloquy-addon-action-button soliloquy-unlock-addon" rel="<?php echo esc_attr( $addon->title ); ?>"><?php esc_html_e( 'Upgrade Now', 'soliloquy' ); ?></a>
-
- </div>
+ <span class="soliloquy-badge soliloquy-badge-lg soliloquy-badge-rounded" aria-label="<?php esc_attr_e( 'Required plan:', 'soliloquy' ); ?> <?php echo esc_attr( $badge_label ); ?>"><?php echo esc_html( $badge_label ); ?></span>
+ <a href="<?php echo esc_url( $this->common->get_upgrade_link() ); ?>" target="_blank" rel="noopener noreferrer" class="button button-soliloquy soliloquy-addon-action-button soliloquy-unlock-addon soliloquy-upgrade-modal"><?php esc_html_e( 'Upgrade Now', 'soliloquy' ); ?></a>
</div>
</div>
<?php
@@ -232,6 +255,9 @@
endif
?>
+ </div>
+
+ </div>
</div>
@@ -309,7 +335,7 @@
];
// Perform the query and retrieve the response.
- $response = wp_remote_post( 'http://soliloquywp.com/', $post );
+ $response = wp_remote_post( 'https://soliloquywp.com/', $post );
$response_code = wp_remote_retrieve_response_code( $response );
$response_body = wp_remote_retrieve_body( $response );
--- a/soliloquy-lite/includes/admin/common.php
+++ b/soliloquy-lite/includes/admin/common.php
@@ -194,7 +194,7 @@
esc_html__( 'Upgrade to Pro', 'soliloquy' ),
esc_html__( 'Upgrade to Pro', 'soliloquy' ),
apply_filters( 'soliloquy_gallery_menu_cap', 'manage_options' ),
- esc_url( $this->get_upgrade_link( 'http://soliloquywp.com/lite/', 'adminsidebar', 'unlockprosidebar' ) )
+ esc_url( $this->get_upgrade_link( 'https://soliloquywp.com/lite/', 'adminsidebar', 'unlockprosidebar' ) )
);
if ( ! current_user_can( 'manage_options' ) ) {
@@ -205,7 +205,7 @@
array_filter(
$submenu['edit.php?post_type=soliloquy'],
static function ( $item ) {
- return strpos( $item[2], 'http://soliloquywp.com/lite/' ) !== false;
+ return strpos( $item[2], 'https://soliloquywp.com/lite/' ) !== false;
}
)
);
--- a/soliloquy-lite/includes/admin/metaboxes.php
+++ b/soliloquy-lite/includes/admin/metaboxes.php
@@ -709,7 +709,7 @@
<div>
<img class="soliloquy-item-img" src="<?php echo esc_url( plugins_url( 'assets/images/logo-color.png', $this->base->file ) ); ?>" />
<h3><?php esc_html_e( 'Create your slider by adding your media files above.', 'soliloquy' ); ?></h3>
- <p class="soliloquy-help-text"><?php esc_html_e( 'Need some help?', 'soliloquy' ); ?> <a href="http://soliloquywp.com/docs/creating-your-first-slider/" target="_blank"><?php esc_html_e( 'Watch a video how to add media and create a slider', 'soliloquy' ); ?></a></p>
+ <p class="soliloquy-help-text"><?php esc_html_e( 'Need some help?', 'soliloquy' ); ?> <a href="https://soliloquywp.com/docs/creating-your-first-slider/" target="_blank"><?php esc_html_e( 'Watch a video how to add media and create a slider', 'soliloquy' ); ?></a></p>
</div>
</div>
@@ -1130,7 +1130,7 @@
<p class="soliloquy-intro"><?php esc_attr_e( 'Want to add Thumbnail Navigation?', 'soliloquy' ); ?></p>
<p><?php esc_html_e( 'By upgrading to Soliloquy Pro, you can add thumbnail images as navigation for your WordPress slider. ', 'soliloquy' ); ?>
- <a target="_blank" href="<?php echo esc_url( 'http://soliloquywp.com/addons/thumbnails/' ); ?>"><?php esc_attr_e( '(See Demo)', 'soliloquy' ); ?></a>
+ <a target="_blank" href="<?php echo esc_url( 'https://soliloquywp.com/addons/thumbnails/' ); ?>"><?php esc_attr_e( '(See Demo)', 'soliloquy' ); ?></a>
</p>
<a href="<?php echo esc_url( $this->common->get_upgrade_link() ); ?>" target="_blank" class="button button-soliloquy"><?php esc_attr_e( 'Click here to Upgrade', 'soliloquy' ); ?></a>
--- a/soliloquy-lite/includes/global/posttype.php
+++ b/soliloquy-lite/includes/global/posttype.php
@@ -90,9 +90,7 @@
'show_in_rest' => true,
'rest_base' => 'soliloquy',
'capability_type' => 'post',
- 'capabilities' => [
- 'read_post' => 'read', // Allow any logged-in user to read (filtered by map_meta_cap).
- ],
+ 'map_meta_cap' => true,
'menu_position' => apply_filters( 'soliloquy_post_type_menu_position', 248 ),
'menu_icon' => plugins_url( 'assets/css/images/menu-icon@2x.png', $this->base->file ),
'supports' => [ 'title', 'author' ],
@@ -119,6 +117,12 @@
*/
public function prepare_meta( $data, $post, $context ) {
+ // Belt-and-suspenders gate: only expose slider_data when the post is published or the current user can read it.
+ // REST controller already enforces this via map_meta_cap; this guards against future regressions in cap mapping.
+ if ( 'publish' !== $post->post_status && ! current_user_can( 'read_post', $post->ID ) ) {
+ return $data;
+ }
+
$slider_data = get_post_meta( $post->ID, '_sol_slider_data', true );
if ( $slider_data ) {
@@ -174,7 +178,14 @@
}
if ( 'read_post' === $cap ) {
- $caps = ( 'private' === $post->post_status ) ? [ 'read_private_posts' ] : [ 'read' ];
+ if ( 'private' === $post->post_status ) {
+ $caps = [ 'read_private_posts' ];
+ } elseif ( 'publish' === $post->post_status ) {
+ $caps = [ 'read' ];
+ } else {
+ // Non-public statuses (draft, pending, future, auto-draft, trash, inherit, etc.) require edit caps.
+ $caps = ( $user_id === $post_author ) ? [ 'edit_posts' ] : [ 'edit_others_posts' ];
+ }
}
return $caps;
--- a/soliloquy-lite/soliloquy-lite.php
+++ b/soliloquy-lite/soliloquy-lite.php
@@ -5,7 +5,7 @@
* Description: Soliloquy is the best responsive WordPress slider plugin. This is the lite version.
* Author: Soliloquy Team
* Author URI: https://soliloquywp.com
- * Version: 2.8.1
+ * Version: 2.8.2
* Text Domain: soliloquy
* Domain Path: languages
*
@@ -58,7 +58,7 @@
*
* @var string
*/
- public $version = '2.8.1';
+ public $version = '2.8.2';
/**
* The name of the plugin.