Version Description
- Bugfix: security fixes in notes, options
Download this release
Release Info
Developer | Tom Braider |
Plugin | Count per Day |
Version | 3.5.7 |
Comparing to | |
See all releases |
Code changes from version 3.5.6 to 3.5.7
- counter-core.php +2 -2
- counter-options.php +2 -2
- counter.php +2 -2
- notes.php +3 -2
- readme.txt +5 -2
counter-core.php
CHANGED
@@ -509,8 +509,8 @@ function showQueries()
|
|
509 |
{
|
510 |
global $wpdb, $cpd_path, $cpd_version, $cpd_geoip_dir;
|
511 |
|
512 |
-
$serverinfo = (isset($wpdb->dbh->server_info)) ? $wpdb->dbh->server_info :
|
513 |
-
$clientinfo = (isset($wpdb->dbh->client_info)) ? $wpdb->dbh->client_info :
|
514 |
|
515 |
echo '<div style="position:absolute;margin:10px;padding:10px;border:1px red solid;background:#fff;clear:both">
|
516 |
<b>Count per Day - DEBUG: '.round($this->queries[0], 3).' s</b><ol>'."\n";
|
509 |
{
|
510 |
global $wpdb, $cpd_path, $cpd_version, $cpd_geoip_dir;
|
511 |
|
512 |
+
$serverinfo = (isset($wpdb->dbh->server_info)) ? $wpdb->dbh->server_info : mysqli_get_server_info($wpdb->dbh);
|
513 |
+
$clientinfo = (isset($wpdb->dbh->client_info)) ? $wpdb->dbh->client_info : mysqli_get_client_info();
|
514 |
|
515 |
echo '<div style="position:absolute;margin:10px;padding:10px;border:1px red solid;background:#fff;clear:both">
|
516 |
<b>Count per Day - DEBUG: '.round($this->queries[0], 3).' s</b><ol>'."\n";
|
counter-options.php
CHANGED
@@ -14,7 +14,7 @@ if(!empty($_POST['do']))
|
|
14 |
{
|
15 |
// update options
|
16 |
case 'cpd_update' :
|
17 |
-
$_POST['cpd_bots'] = preg_replace('/\r\n\r\n/', '', $_POST['cpd_bots']);
|
18 |
$count_per_day->options['onlinetime'] = $_POST['cpd_onlinetime'];
|
19 |
$count_per_day->options['user'] = empty( $_POST['cpd_user'] ) ? 0 : 1 ;
|
20 |
$count_per_day->options['user_level'] = $_POST['cpd_user_level'];
|
@@ -32,7 +32,7 @@ if(!empty($_POST['do']))
|
|
32 |
$count_per_day->options['startreads'] = $_POST['cpd_startreads'];
|
33 |
$count_per_day->options['anoip'] = empty( $_POST['cpd_anoip'] ) ? 0 : 1 ;
|
34 |
$count_per_day->options['clients'] = $_POST['cpd_clients'];
|
35 |
-
$count_per_day->options['exclude_countries'] = strtolower(str_replace(' ', '', $_POST['cpd_exclude_countries']));
|
36 |
$count_per_day->options['ajax'] = empty( $_POST['cpd_ajax'] ) ? 0 : 1 ;
|
37 |
$count_per_day->options['debug'] = empty( $_POST['cpd_debug'] ) ? 0 : 1 ;
|
38 |
$count_per_day->options['localref'] = empty( $_POST['cpd_localref'] ) ? 0 : 1 ;
|
14 |
{
|
15 |
// update options
|
16 |
case 'cpd_update' :
|
17 |
+
$_POST['cpd_bots'] = preg_replace('/\r\n\r\n/', '', strip_tags($_POST['cpd_bots']));
|
18 |
$count_per_day->options['onlinetime'] = $_POST['cpd_onlinetime'];
|
19 |
$count_per_day->options['user'] = empty( $_POST['cpd_user'] ) ? 0 : 1 ;
|
20 |
$count_per_day->options['user_level'] = $_POST['cpd_user_level'];
|
32 |
$count_per_day->options['startreads'] = $_POST['cpd_startreads'];
|
33 |
$count_per_day->options['anoip'] = empty( $_POST['cpd_anoip'] ) ? 0 : 1 ;
|
34 |
$count_per_day->options['clients'] = $_POST['cpd_clients'];
|
35 |
+
$count_per_day->options['exclude_countries'] = strtolower(str_replace(' ', '', strip_tags($_POST['cpd_exclude_countries'])));
|
36 |
$count_per_day->options['ajax'] = empty( $_POST['cpd_ajax'] ) ? 0 : 1 ;
|
37 |
$count_per_day->options['debug'] = empty( $_POST['cpd_debug'] ) ? 0 : 1 ;
|
38 |
$count_per_day->options['localref'] = empty( $_POST['cpd_localref'] ) ? 0 : 1 ;
|
counter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Count Per Day
|
4 |
Plugin URI: http://www.tomsdimension.de/wp-plugins/count-per-day
|
5 |
Description: Counter, shows reads and visitors per page; today, yesterday, last week, last months ... on dashboard, per shortcode or in widget.
|
6 |
-
Version: 3.5.
|
7 |
License: Postcardware
|
8 |
Author: Tom Braider
|
9 |
Author URI: http://www.tomsdimension.de
|
@@ -13,7 +13,7 @@ if (!defined('ABSPATH'))
|
|
13 |
exit;
|
14 |
|
15 |
$cpd_dir_name = 'count-per-day';
|
16 |
-
$cpd_version = '3.5.
|
17 |
|
18 |
if (strpos($_SERVER['SERVER_NAME'], '.test'))
|
19 |
$cpd_path = str_replace('/', DIRECTORY_SEPARATOR, ABSPATH.PLUGINDIR.'/'.$cpd_dir_name.'/');
|
3 |
Plugin Name: Count Per Day
|
4 |
Plugin URI: http://www.tomsdimension.de/wp-plugins/count-per-day
|
5 |
Description: Counter, shows reads and visitors per page; today, yesterday, last week, last months ... on dashboard, per shortcode or in widget.
|
6 |
+
Version: 3.5.7
|
7 |
License: Postcardware
|
8 |
Author: Tom Braider
|
9 |
Author URI: http://www.tomsdimension.de
|
13 |
exit;
|
14 |
|
15 |
$cpd_dir_name = 'count-per-day';
|
16 |
+
$cpd_version = '3.5.7';
|
17 |
|
18 |
if (strpos($_SERVER['SERVER_NAME'], '.test'))
|
19 |
$cpd_path = str_replace('/', DIRECTORY_SEPARATOR, ABSPATH.PLUGINDIR.'/'.$cpd_dir_name.'/');
|
notes.php
CHANGED
@@ -34,12 +34,13 @@ $note = isset($_POST['note']) ? strip_tags($_POST['note']) : '';
|
|
34 |
$n = (array) get_option('count_per_day_notes');
|
35 |
|
36 |
// save changes
|
|
|
37 |
if ( isset($_POST['new']) )
|
38 |
$n[] = array( $date, $note );
|
39 |
else if ( isset($_POST['edit']) )
|
40 |
-
$n[$
|
41 |
else if ( isset($_POST['delete']) )
|
42 |
-
unset($
|
43 |
update_option('count_per_day_notes', $n);
|
44 |
?>
|
45 |
|
34 |
$n = (array) get_option('count_per_day_notes');
|
35 |
|
36 |
// save changes
|
37 |
+
$id = isset($_POST['id']) ? (int) strip_tags($_POST['id']) : 0;
|
38 |
if ( isset($_POST['new']) )
|
39 |
$n[] = array( $date, $note );
|
40 |
else if ( isset($_POST['edit']) )
|
41 |
+
$n[$id] = array( $date, $note );
|
42 |
else if ( isset($_POST['delete']) )
|
43 |
+
unset($id);
|
44 |
update_option('count_per_day_notes', $n);
|
45 |
?>
|
46 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: Tom Braider
|
3 |
Tags: counter, count, posts, visits, reads, dashboard, widget, shortcode
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 3.5.
|
7 |
License: GPLv2
|
8 |
Donate link: http://www.tomsdimension.de/postcards
|
9 |
|
@@ -306,6 +306,9 @@ show( $before, $after, $show, $count, $page )'
|
|
306 |
|
307 |
== Changelog ==
|
308 |
|
|
|
|
|
|
|
309 |
= 3.5.6 =
|
310 |
+ Bugfix: check/block stored bad referrers
|
311 |
|
2 |
Contributors: Tom Braider
|
3 |
Tags: counter, count, posts, visits, reads, dashboard, widget, shortcode
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 4.8
|
6 |
+
Stable tag: 3.5.7
|
7 |
License: GPLv2
|
8 |
Donate link: http://www.tomsdimension.de/postcards
|
9 |
|
306 |
|
307 |
== Changelog ==
|
308 |
|
309 |
+
= 3.5.7 =
|
310 |
+
+ Bugfix: security fixes in notes, options
|
311 |
+
|
312 |
= 3.5.6 =
|
313 |
+ Bugfix: check/block stored bad referrers
|
314 |
|