Plugin Directory

Changeset 1650132


Ignore:
Timestamp:
05/03/2017 07:37:35 AM (9 years ago)
Author:
Tom Braider
Message:

3.5.7

+ Bugfix: security fixes in notes, options

Location:
count-per-day/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • count-per-day/trunk/counter-core.php

    r1467511 r1650132  
    510510    global $wpdb, $cpd_path, $cpd_version, $cpd_geoip_dir;
    511511   
    512     $serverinfo = (isset($wpdb->dbh->server_info)) ? $wpdb->dbh->server_info : mysql_get_server_info($wpdb->dbh);
    513     $clientinfo = (isset($wpdb->dbh->client_info)) ? $wpdb->dbh->client_info : mysql_get_client_info();
     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();
    514514   
    515515    echo '<div style="position:absolute;margin:10px;padding:10px;border:1px red solid;background:#fff;clear:both">
  • count-per-day/trunk/counter-options.php

    r1467511 r1650132  
    1515        // update options
    1616        case 'cpd_update' :
    17             $_POST['cpd_bots'] = preg_replace('/\r\n\r\n/', '', $_POST['cpd_bots']);
     17            $_POST['cpd_bots'] = preg_replace('/\r\n\r\n/', '', strip_tags($_POST['cpd_bots']));
    1818            $count_per_day->options['onlinetime'] = $_POST['cpd_onlinetime'];
    1919            $count_per_day->options['user'] = empty( $_POST['cpd_user'] ) ? 0 : 1 ;
     
    3333            $count_per_day->options['anoip'] = empty( $_POST['cpd_anoip'] ) ? 0 : 1 ;
    3434            $count_per_day->options['clients'] = $_POST['cpd_clients'];
    35             $count_per_day->options['exclude_countries'] = strtolower(str_replace(' ', '', $_POST['cpd_exclude_countries']));
     35            $count_per_day->options['exclude_countries'] = strtolower(str_replace(' ', '', strip_tags($_POST['cpd_exclude_countries'])));
    3636            $count_per_day->options['ajax'] = empty( $_POST['cpd_ajax'] ) ? 0 : 1 ;
    3737            $count_per_day->options['debug'] = empty( $_POST['cpd_debug'] ) ? 0 : 1 ;
  • count-per-day/trunk/counter.php

    r1468351 r1650132  
    44Plugin URI: http://www.tomsdimension.de/wp-plugins/count-per-day
    55Description: Counter, shows reads and visitors per page; today, yesterday, last week, last months ... on dashboard, per shortcode or in widget.
    6 Version: 3.5.6
     6Version: 3.5.7
    77License: Postcardware
    88Author: Tom Braider
     
    1414
    1515$cpd_dir_name = 'count-per-day';
    16 $cpd_version = '3.5.6';
     16$cpd_version = '3.5.7';
    1717
    1818if (strpos($_SERVER['SERVER_NAME'], '.test'))
  • count-per-day/trunk/notes.php

    r1401848 r1650132  
    3535
    3636// save changes
     37$id = isset($_POST['id']) ? (int) strip_tags($_POST['id']) : 0;
    3738if ( isset($_POST['new']) )
    3839    $n[] = array( $date, $note );
    3940else if ( isset($_POST['edit']) )
    40     $n[$_POST['id']] = array( $date, $note );
     41    $n[$id] = array( $date, $note );
    4142else if ( isset($_POST['delete']) )
    42     unset($n[$_POST['id']]);
     43    unset($id);
    4344update_option('count_per_day_notes', $n);
    4445?>
  • count-per-day/trunk/readme.txt

    r1489009 r1650132  
    33Tags: counter, count, posts, visits, reads, dashboard, widget, shortcode
    44Requires at least: 3.0
    5 Tested up to: 4.7
    6 Stable tag: 3.5.6
     5Tested up to: 4.8
     6Stable tag: 3.5.7
    77License: GPLv2
    88Donate link: http://www.tomsdimension.de/postcards
     
    307307== Changelog ==
    308308
     309= 3.5.7 =
     310+ Bugfix: security fixes in notes, options
     311
    309312= 3.5.6 =
    310313+ Bugfix: check/block stored bad referrers
Note: See TracChangeset for help on using the changeset viewer.