StatCounter – Free Real Time Visitor Stats - Version 2.0.9

Version Description

Updated security checks

Download this release

Release Info

Developer StatCounter
Plugin Icon StatCounter – Free Real Time Visitor Stats
Version 2.0.9
Comparing to
See all releases

Code changes from version 2.0.8 to 2.0.9

Files changed (2) hide show
  1. StatCounter-Wordpress-Plugin.php +4 -4
  2. readme.txt +9 -2
StatCounter-Wordpress-Plugin.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Plugin Name: Official StatCounter Plugin
4
- * Version: 2.0.8
5
  * Plugin URI: http://statcounter.com/
6
  * Description: Adds the StatCounter tracking code to your blog. <br>To get setup: 1) Activate this plugin 2) Enter your StatCounter Project ID and Security Code in the <a href="options-general.php?page=StatCounter-Wordpress-Plugin.php"><strong>options page</strong></a>.
7
  * Author: Aodhan Cullen
@@ -70,7 +70,7 @@ function add_statcounter_option_page() {
70
 
71
  function statcounter_options_page() {
72
  // If we are a postback, store the options
73
- if ( isset( $_POST[esc_html('info_update')] ) && check_admin_referer( 'update_sc_project_nonce', 'sc_project_nonce' ) ) {
74
 
75
  // Update the Project ID
76
  $sc_project = sanitize_text_field(trim($_POST[key_sc_project]));
@@ -105,7 +105,7 @@ function statcounter_options_page() {
105
  }
106
 
107
  // Update the position
108
- $sc_position = $_POST[esc_html(key_sc_position)];
109
  if (($sc_position != 'header') && ($sc_position != 'footer')) {
110
  $sc_position = sc_position_default;
111
  }
@@ -113,7 +113,7 @@ function statcounter_options_page() {
113
  update_option(key_sc_position, $sc_position);
114
 
115
  // Force invisibility
116
- $sc_invisible = $_POST[esc_html('sc_invisible')];
117
  if ($sc_invisible == 1) {
118
  update_option('sc_invisible', "1");
119
  } else {
1
  <?php
2
  /*
3
  * Plugin Name: Official StatCounter Plugin
4
+ * Version: 2.0.9
5
  * Plugin URI: http://statcounter.com/
6
  * Description: Adds the StatCounter tracking code to your blog. <br>To get setup: 1) Activate this plugin 2) Enter your StatCounter Project ID and Security Code in the <a href="options-general.php?page=StatCounter-Wordpress-Plugin.php"><strong>options page</strong></a>.
7
  * Author: Aodhan Cullen
70
 
71
  function statcounter_options_page() {
72
  // If we are a postback, store the options
73
+ if ( isset( $_POST['info_update'] ) && check_admin_referer( 'update_sc_project_nonce', 'sc_project_nonce' ) ) {
74
 
75
  // Update the Project ID
76
  $sc_project = sanitize_text_field(trim($_POST[key_sc_project]));
105
  }
106
 
107
  // Update the position
108
+ $sc_position = sanitize_text_field($_POST[key_sc_position]);
109
  if (($sc_position != 'header') && ($sc_position != 'footer')) {
110
  $sc_position = sc_position_default;
111
  }
113
  update_option(key_sc_position, $sc_position);
114
 
115
  // Force invisibility
116
+ $sc_invisible = sanitize_text_field(isset($_POST['sc_invisible'])) ? sanitize_text_field($_POST['sc_invisible']) : '';
117
  if ($sc_invisible == 1) {
118
  update_option('sc_invisible', "1");
119
  } else {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://statcounter.com/
4
  Tags: web, statistics, stats, hit, counter, visitor, ip, tracker, analytics
5
  Requires at least: 2.0.2
6
  Tested up to: 5.9
7
- Stable tag: 2.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -69,6 +69,13 @@ To activate the StatCounter service for your WordPress site:
69
  2. Using the magnify tool, you can "zoom in" on individual visitors and get a detailed report on where they are from, their system settings, and most importantly, what link reffered them to your site and their navigation path through your site.
70
 
71
  == Changelog ==
 
 
 
 
 
 
 
72
  = 2.0.7 =
73
  Added additional sanitation to prevent XSS attacks
74
 
@@ -170,4 +177,4 @@ Bug fix to prevent user entry of whitespace characters for Project ID and Securi
170
 
171
  = 1.6.2 =
172
  Upgrade to allow for fully functioning PayPal upgrade options.
173
-
4
  Tags: web, statistics, stats, hit, counter, visitor, ip, tracker, analytics
5
  Requires at least: 2.0.2
6
  Tested up to: 5.9
7
+ Stable tag: 2.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
69
  2. Using the magnify tool, you can "zoom in" on individual visitors and get a detailed report on where they are from, their system settings, and most importantly, what link reffered them to your site and their navigation path through your site.
70
 
71
  == Changelog ==
72
+
73
+ = 2.0.9 =
74
+ Updated security checks
75
+
76
+ = 2.0.8 =
77
+ Added additional security checks
78
+
79
  = 2.0.7 =
80
  Added additional sanitation to prevent XSS attacks
81
 
177
 
178
  = 1.6.2 =
179
  Upgrade to allow for fully functioning PayPal upgrade options.
180
+