Plugin Directory

Changeset 3153120


Ignore:
Timestamp:
09/17/2024 08:40:02 AM (18 months ago)
Author:
whiletrue
Message:

release 2.5.19

Location:
most-and-least-read-posts-widget
Files:
5 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • most-and-least-read-posts-widget/trunk/most_and_least_read_posts.php

    r3056663 r3153120  
    66Author: WhileTrue
    77Text Domain: most-and-least-read-posts-widget
    8 Version: 2.5.18
     8Version: 2.5.19
    99Author URI: https://www.whiletrue.it/
    1010*/
     
    106106
    107107        $spiders = array(
    108             'Googlebot', 'Yammybot', 'Openbot', 'Yahoo', 'Slurp', 'msnbot',
    109             'ia_archiver', 'Lycos', 'Scooter', 'AltaVista', 'Teoma', 'Gigabot',
    110             'Mediapartners', 'AdsBot'
     108            'Googlebot',
     109            'Yammybot',
     110            'Openbot',
     111            'Yahoo',
     112            'Slurp',
     113            'msnbot',
     114            'ia_archiver',
     115            'Lycos',
     116            'Scooter',
     117            'AltaVista',
     118            'Teoma',
     119            'Gigabot',
     120            'Mediapartners',
     121            'AdsBot'
    111122        );
    112123        foreach ($spiders as $spider) {
     
    299310    // See if the user has posted us some information
    300311    if (isset($_POST['most_and_least_read_posts_position'])) {
    301         $option = array();
    302 
    303         $option['show_hits_in_post'] = (isset($_POST[$option_name . '_show_hits_in_post']) and $_POST[$option_name . '_show_hits_in_post'] == 'on') ? true : false;
    304         $option['position'] = esc_html($_POST[$option_name . '_position']);
    305         $option['text_shown_before'] = esc_html($_POST[$option_name . '_text_shown_before']);
    306         $option['text_shown_after'] = esc_html($_POST[$option_name . '_text_shown_after']);
    307         $option['css_style'] = esc_html($_POST[$option_name . '_css_style']);
    308 
    309         update_option($option_name, $option);
    310         // Put a settings updated message on the screen
    311         $out .= '<div class="updated"><p><strong>' . __('Settings saved.', 'most-and-least-read-posts-widget') . '</strong></p></div>';
     312        if (wp_verify_nonce($_REQUEST['mostLeastReadPostsNonce'], 'mostLeastReadPostsNonce')) {
     313            $option = array();
     314
     315            $option['show_hits_in_post'] = (isset($_POST[$option_name . '_show_hits_in_post']) and $_POST[$option_name . '_show_hits_in_post'] == 'on') ? true : false;
     316            $option['position'] = esc_html($_POST[$option_name . '_position']);
     317            $option['text_shown_before'] = esc_html($_POST[$option_name . '_text_shown_before']);
     318            $option['text_shown_after'] = esc_html($_POST[$option_name . '_text_shown_after']);
     319            $option['css_style'] = esc_html($_POST[$option_name . '_css_style']);
     320
     321            update_option($option_name, $option);
     322            // Put a settings updated message on the screen
     323            $out .= '<div class="updated"><p><strong>' . __('Settings saved.', 'most-and-least-read-posts-widget') . '</strong></p></div>';
     324        } else {
     325            $out .= '<div class="error"><p><strong>' . __('Form data is not valid, please try again.', 'most-and-least-read-posts-widget') . '</strong></p></div>';
     326        }
    312327    }
    313328
     
    336351
    337352        <form id="most_and_least_read_posts_form" name="form1" method="post" action="">
     353
     354        ' . wp_nonce_field('mostLeastReadPostsNonce', 'mostLeastReadPostsNonce') . '
    338355
    339356        <div class="postbox">
  • most-and-least-read-posts-widget/trunk/readme.txt

    r3056663 r3153120  
    55Requires at least: 2.9+
    66Requires PHP: 7.0
    7 Tested up to: 6.5
    8 Stable tag: 2.5.18
     7Tested up to: 6.6
     8Stable tag: 2.5.19
    99
    1010Provide two widgets, showing lists of the most and reast read posts.
     
    9797== Changelog ==
    9898
    99 = 2.5.18 =
     99= 2.5.19 =
    100100* Plugin tested up WordPress 6.5
    101101* Fixed: SQL injection
     102* Fixed: CSS injection
    102103
    103104= 2.5.5 =
Note: See TracChangeset for help on using the changeset viewer.