Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/motors-car-dealership-classified-listings/includes/vehicle_functions.php
+++ b/motors-car-dealership-classified-listings/includes/vehicle_functions.php
@@ -1822,11 +1822,14 @@
if ( ! function_exists( 'stm_current_user_can_manage_listing_media' ) ) {
function stm_current_user_can_manage_listing_media( $post_id ) {
+ $post_id = absint( $post_id );
+
if ( ! is_user_logged_in() || empty( $post_id ) ) {
return false;
}
- if ( ! in_array( get_post_type( $post_id ), stm_add_a_car_listing_post_types(), true ) ) {
+ $post = get_post( $post_id );
+ if ( ! $post || ! in_array( $post->post_type, stm_add_a_car_listing_post_types(), true ) ) {
return false;
}
@@ -1836,6 +1839,10 @@
$listing_user_id = absint( get_post_meta( $post_id, 'stm_car_user', true ) );
+ if ( ! $listing_user_id ) {
+ $listing_user_id = absint( $post->post_author );
+ }
+
return $listing_user_id && absint( get_current_user_id() ) === $listing_user_id;
}
}
@@ -1890,6 +1897,11 @@
exit;
}
+ if ( ! in_array( get_post_type( $post_id ), stm_add_a_car_listing_post_types(), true ) ) {
+ wp_send_json( array( 'message' => esc_html__( 'You are not allowed to manage media for this post.', 'stm_vehicles_listing' ) ) );
+ exit;
+ }
+
$user_id = get_current_user_id();
$updating = $post_id && get_post_meta( $post_id, 'is_listing_updating', true );
@@ -2411,8 +2423,11 @@
}
if ( ( isset( $_GET['stm_unmark_as_sold_car'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'stm_unmark_as_sold_car' ) ) || ( isset( $_GET['stm_mark_as_sold_car'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'stm_mark_as_sold_car' ) ) ) {
- $post_id = ( isset( $_GET['stm_unmark_as_sold_car'] ) ) ? $_GET['stm_unmark_as_sold_car'] : $_GET['stm_mark_as_sold_car'];
- if ( in_array( get_post_type( $post_id ), $listings_post_types, true ) ) {
+ $post_id = ( isset( $_GET['stm_unmark_as_sold_car'] ) ) ? intval( $_GET['stm_unmark_as_sold_car'] ) : intval( $_GET['stm_mark_as_sold_car'] );
+ $author = get_post_meta( $post_id, 'stm_car_user', true );
+ $user = wp_get_current_user();
+
+ if ( ( current_user_can( 'manage_options' ) || ( ! empty( $author ) && intval( $user->ID ) !== 0 && intval( $author ) === intval( $user->ID ) ) ) && in_array( get_post_type( $post_id ), $listings_post_types, true ) ) {
update_post_meta( $post_id, 'car_mark_as_sold', isset( $_GET['stm_mark_as_sold_car'] ) ? 'on' : '' );
}
}
--- a/motors-car-dealership-classified-listings/stm_vehicles_listing.php
+++ b/motors-car-dealership-classified-listings/stm_vehicles_listing.php
@@ -8,7 +8,7 @@
* License: GNU General Public License v2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: stm_vehicles_listing
- * Version: 1.4.111
+ * Version: 1.4.112
*/
if ( ! defined( 'ABSPATH' ) ) {
@@ -50,7 +50,7 @@
define( 'STM_LISTINGS_URL', plugins_url( '', STM_LISTINGS_FILE ) );
define( 'STM_LISTINGS', 'stm_vehicles_listing' );
define( 'STM_THEME_V_NEED', '5.6.33' );
- define( 'STM_LISTINGS_V', '1.4.111' );
+ define( 'STM_LISTINGS_V', '1.4.112' );
define( 'STM_LISTINGS_DB_VERSION', '1.0.0' );
define( 'STM_LISTINGS_IMAGES', STM_LISTINGS_URL . '/includes/admin/butterbean/images/' );
}
--- a/motors-car-dealership-classified-listings/templates/button-go-pro.php
+++ b/motors-car-dealership-classified-listings/templates/button-go-pro.php
@@ -188,8 +188,8 @@
}
$freemius_info = get_freemius_info();
-$start_date = new DateTime( '2026-03-16 00:00:00' );
-$deadline = new DateTime( '2026-03-22 23:59:00' );
+$start_date = new DateTime( '2026-06-22 00:00:00' );
+$deadline = new DateTime( '2026-06-28 23:59:00' );
$current_time = time();
$is_promotion = $current_time >= $start_date->format('U') && $current_time < $deadline->format('U'); //phpcs:ignore
$only_annual = true;
@@ -229,7 +229,7 @@
<?php endif; ?>
</p>
<?php if ( $is_promotion ) : ?>
- <div class="stm-discount"><a href="<?php echo esc_url( 'https://stylemixthemes.com/car-dealer-plugin/pricing/?utm_source=wpadmin&utm_medium=push&utm_campaign=motors&utm_content=gopro&utm_term=springsale2026&plugin_coupon=SPRING26' ); ?>" target="_blank"></a></div>
+ <div class="stm-discount"><a href="<?php echo esc_url( 'https://stylemixthemes.com/car-dealer-plugin/pricing/?utm_source=wpadmin&utm_medium=push&utm_campaign=motors&utm_content=gopro&utm_term=summersale2026&plugin_coupon=MIDSUMMER26' ); ?>" target="_blank"></a></div>
<?php endif; ?>
</div>
<?php if ( isset( $freemius_info['plan'] ) ) : ?>
@@ -331,7 +331,7 @@
$lifetime_url = $base_url . '&utm_medium=' . $utm_medium . '&billing_cycle=lifetime';
$coupon = '';
if ( $is_promotion ) {
- $coupon .= '&plugin_coupon=SPRING26';
+ $coupon .= '&plugin_coupon=MIDSUMMER26';
}
$annual_url .= $coupon;
?>
--- a/motors-car-dealership-classified-listings/vendor/composer/installed.php
+++ b/motors-car-dealership-classified-listings/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => 'motors_vehicles_listing/plugin',
'pretty_version' => 'dev-release',
'version' => 'dev-release',
- 'reference' => 'ca7d9a1b7a5d9946a13fc9bdfc8a4251238dcf15',
+ 'reference' => '2eff37527d891ad39dd46f679e40e4648f8b6b7e',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -13,7 +13,7 @@
'motors_vehicles_listing/plugin' => array(
'pretty_version' => 'dev-release',
'version' => 'dev-release',
- 'reference' => 'ca7d9a1b7a5d9946a13fc9bdfc8a4251238dcf15',
+ 'reference' => '2eff37527d891ad39dd46f679e40e4648f8b6b7e',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),