Skip to content

Commit 7d0e27c

Browse files
committed
Release new version 2.4.15
* This is an important security release that patches a SQL injection vulnerability that affects all previous versions. Please run this immediately. * Security - Patch for SQL injection attack vulnerability
1 parent 633ec20 commit 7d0e27c

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

page-views-count.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
Plugin Name: Page Views Count
44
Description: Show front end users all time views and views today on posts, pages, index pages and custom post types with the Page Views Count Plugin. Use the Page Views Count function to add page views to any content type or object created by your theme or plugins.
5-
Version: 2.4.14
5+
Version: 2.4.15
66
Requires at least: 5.6
77
Tested up to: 5.9
88
Author: a3rev Software
@@ -23,7 +23,7 @@
2323

2424
define( 'A3_PVC_KEY', 'a3_page_view_count' );
2525
define( 'A3_PVC_PREFIX', 'wp_pvc_' );
26-
define( 'A3_PVC_VERSION', '2.4.14' );
26+
define( 'A3_PVC_VERSION', '2.4.15' );
2727
define( 'A3_PVC_G_FONTS', false );
2828

2929
use \A3Rev\PageViewsCount\FrameWork;

readme.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: a3rev, a3rev Software, nguyencongtuan
33
Tags: wordpress page view, page view count , post views, post view count, gutenberg
44
Requires at least: 5.6
55
Tested up to: 5.9
6-
Stable tag: 2.4.14
6+
Stable tag: 2.4.15
77
License: GPLv3
88
License URI: http://www.gnu.org/licenses/gpl-3.0.html
99

@@ -102,6 +102,10 @@ The manual installation method involves down loading our plugin and uploading it
102102

103103
== Changelog ==
104104

105+
= 2.4.15 - 2022/02/01 =
106+
* This is an important security release that patches a SQL injection vulnerability that affects all previous versions. Please run this immediately.
107+
* Security - Patch for SQL injection attack vulnerability
108+
105109
= 2.4.14 - 2022/01/21 =
106110
* This is a maintenance release for compatibility with WordPress major version 5.9
107111
* Tweak - Test for compatibility with WordPress 5.9
@@ -484,6 +488,9 @@ The manual installation method involves down loading our plugin and uploading it
484488

485489
== Upgrade Notice ==
486490

491+
= 2.4.15 =
492+
This is an important security release that patches a SQL injection vulnerability that affects all previous versions. Please run this immediately.
493+
487494
= 2.4.14 =
488495
This is a maintenance release for compatibility with WordPress major version 5.9
489496

src/pvc_class.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,15 @@ public static function pvc_fetch_posts_stats( $post_ids ) {
4848
$nowisnow = date('Y-m-d');
4949

5050
if ( !is_array( $post_ids ) ) $post_ids = array( $post_ids );
51+
$post_ids = array_map( function( $value ) {
52+
global $wpdb;
53+
return $wpdb->prepare( '%s', $value );
54+
}, $post_ids );
5155

5256
$sql = $wpdb->prepare( "SELECT t.postnum AS post_id, t.postcount AS total, d.postcount AS today FROM ". $wpdb->prefix . "pvc_total AS t
5357
LEFT JOIN ". $wpdb->prefix . "pvc_daily AS d ON t.postnum = d.postnum
5458
WHERE t.postnum IN ( ".implode( ',', $post_ids )." ) AND d.time = %s", $nowisnow );
59+
5560
return $wpdb->get_results($sql);
5661
}
5762

0 commit comments

Comments
 (0)