Plugin Directory

Changeset 3167874


Ignore:
Timestamp:
10/13/2024 07:19:47 AM (18 months ago)
Author:
Tkama
Message:

Update to version 1.8.3 from GitHub

Location:
kama-spamblock
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • kama-spamblock/tags/1.8.3/Kama_Spamblock.php

    r3000349 r3167874  
    2222    private $process_comment_types = [ '', 'comment' ];
    2323
    24     /**
    25      * @param string $plug_file
    26      */
    27     public function __construct( $plug_file ) {
    28 
    29         $this->opt = new Kama_Spamblock_Options();
     24    public function __construct( string $plug_file, Kama_Spamblock_Options $opt ) {
     25        $this->opt = $opt;
    3026
    3127        $this->plug_file = $plug_file;
    32         $this->plug_dir = dirname( $plug_file );
     28        $this->plug_dir  = dirname( $plug_file );
    3329
    3430        $this->process_comment_types = apply_filters( 'kama_spamblock__process_comment_types', $this->process_comment_types );
     
    3632
    3733    public function init_plugin() {
    38 
    3934        if( ! defined( 'DOING_AJAX' ) ){
    4035            load_plugin_textdomain( 'kama-spamblock', false, basename( $this->plug_dir ) . '/languages' );
     
    5752
    5853        if( ! wp_doing_ajax() && ! is_admin() ){
    59             add_action( 'wp_footer', [ $this, 'main_js' ], 99 );
     54            add_action( 'wp_footer', [ $this, 'main_js' ], 0 );
    6055        }
    6156
    62         $this->nonce = self::make_nonce( date( 'jn' ) . $this->opt->unique_code );
     57        $this->nonce = self::make_hash( date( 'jn' ) . $this->opt->unique_code );
    6358
    6459        add_filter( 'preprocess_comment', [ $this, 'block_spam' ], 0 );
     
    6762    /**
    6863     * Check and block comment if needed.
    69      *
    70      * @param array $commentdata
    71      *
    72      * @return array
    7364     */
    74     public function block_spam( $commentdata ) {
     65    public function block_spam( array $commentdata ): array {
    7566
    7667        $this->block_pings_trackbacks( $commentdata );
     
    10293        }
    10394
    104         $ksbn_code = isset( $_POST['ksbn_code'] ) ? trim( $_POST['ksbn_code'] ) : '';
     95        $ksbn_code = trim( $_POST['ksbn_code'] ?? '' );
    10596
    106         if( self::make_nonce( $ksbn_code ) !== $this->nonce ){
     97        if( self::make_hash( $ksbn_code ) !== $this->nonce ){
    10798            /** @noinspection ForgottenDebugOutputInspection */
    10899            wp_die( $this->block_form() );
     
    111102
    112103    /**
    113      * @param string $key
    114      *
    115      * @return string
     104     * Creates hash from specified key if it's not hashed yet.
    116105     */
    117     private static function make_nonce( $key ) {
    118         // maybe already md5
     106    private static function make_hash( string $key ): string {
    119107        return preg_match( '/^[a-f0-9]{32}$/', $key ) ? $key : md5( $key );
    120108    }
     
    127115
    128116        // note: is_singular() may work incorrectly
    129         if( ! empty( $post ) && ( 'open' !== $post->comment_status ) && is_singular() ){
     117        if( $post && ( 'open' !== $post->comment_status ) && is_singular() ){
    130118            return;
    131119        }
    132120        ?>
    133121        <script id="kama_spamblock">
    134             (function(){
     122            window.addEventListener( 'DOMContentLoaded', function() {
     123                document.addEventListener( 'mousedown', handleSubmit );
     124                document.addEventListener( 'touchstart', handleSubmit );
     125                document.addEventListener( 'keypress', handleSubmit );
    135126
    136                 const catch_submit = function( ev ){
    137 
    138                     let sbmt = ev.target.closest( '#<?= esc_html( $this->opt->sibmit_button_id ) ?>' );
    139 
     127                function handleSubmit( ev ){
     128                    let sbmt = ev.target.closest( '#<?= esc_html( sanitize_html_class( $this->opt->sibmit_button_id ) ) ?>' );
    140129                    if( ! sbmt ){
    141130                        return;
     
    145134                    let date = new Date();
    146135
    147                     input.value = ''+ date.getUTCDate() + (date.getUTCMonth() + 1) + '<?= esc_html( $this->opt->unique_code ) ?>';
     136                    input.value = ''+ date.getUTCDate() + (date.getUTCMonth() + 1) + '<?= esc_html( Kama_Spamblock_Options::sanitize_uniue_code( $this->opt->unique_code ) ) ?>';
    148137                    input.name = 'ksbn_code';
    149138                    input.type = 'hidden';
     
    151140                    sbmt.parentNode.insertBefore( input, sbmt );
    152141                }
    153 
    154                 document.addEventListener( 'mousedown', catch_submit );
    155                 document.addEventListener( 'keypress', catch_submit );
    156             })()
     142            } );
    157143        </script>
    158144        <?php
     
    160146
    161147    /**
    162      * Output form when comment has been blocked.
    163      *
    164      * @return string
     148     * Gets Form HTML for blocked comment.
    165149     */
    166     private function block_form() {
     150    private function block_form(): string {
    167151        ob_start();
    168152        ?>
    169153        <h1><?= __( 'Antispam block your comment!', 'kama-spamblock' ) ?></h1>
    170154
    171         <form method="post" action="<?= site_url( '/wp-comments-post.php' ) ?>">
     155        <form method="POST" action="<?= site_url( '/wp-comments-post.php' ) ?>">
    172156            <p>
    173157                <?= sprintf(
    174158                   __( 'Copy %1$s to the field %2$s and press button', 'kama-spamblock' ),
    175                    '<code style="background:rgba(255,255,255,.2);">' . $this->nonce . '</code>',
     159                   '<code style="background:rgba(255,255,255,.2);">' . esc_html( $this->nonce ) . '</code>',
    176160                   '<input type="text" name="ksbn_code" value="" style="width:150px; border:1px solid #ccc; border-radius:3px; padding:.3em;" />'
    177161               ) ?>
     
    181165
    182166            <?php
    183             unset( $_POST['ksbn_code'] );
     167            foreach( $_POST as $key => $val ){
     168                if( $key === 'ksbn_code' ){
     169                    continue;
     170                }
    184171
    185             foreach( $_POST as $key => $val ){
    186                 echo sprintf( '<textarea style="display:none;" name="%s">%s</textarea>', $key, esc_textarea( stripslashes( $val ) ) );
     172                echo sprintf( '<textarea style="display:none;" name="%s">%s</textarea>',
     173                    esc_attr( $key ),
     174                    esc_textarea( stripslashes( $val ) )
     175                );
    187176            }
    188177            ?>
  • kama-spamblock/tags/1.8.3/Kama_Spamblock_Options.php

    r3000349 r3167874  
    1313    public function __construct() {
    1414        $opt = array_merge( $this->default_options(), get_option( self::OPT_NAME, [] ) );
     15        $this->check_empty_unique_code( $opt['unique_code'] );
     16
    1517        $opt = apply_filters( 'kama_spamblock__options', $opt );
    16         $opt = (object) $opt;
    1718
    18         $this->unique_code = $opt->unique_code;
    19         $this->sibmit_button_id = $opt->sibmit_button_id;
     19        $this->unique_code      = $opt['unique_code'];
     20        $this->sibmit_button_id = $opt['sibmit_button_id'];
    2021    }
    2122
    2223    /**
    23      * @return string[]
     24     * @return void
    2425     */
    25     public function default_options(){
     26    private function check_empty_unique_code( string $code ) {
     27        if( ! $code ){
     28            $opt = get_option( self::OPT_NAME, [] );
     29            $opt['unique_code'] = wp_generate_password( 10, false );
     30            update_option( self::OPT_NAME, $opt );
     31        }
     32    }
    2633
     34    public function default_options(): array {
    2735        return [
    2836            'sibmit_button_id' => 'submit',
    29             'unique_code'      => 'uniq9065',
     37            'unique_code'      => '', // default value will be auto-generated
    3038        ];
    3139    }
     
    3745            self::OPT_NAME . '_field',
    3846            __( 'Kama Spamblock settings', 'kama-spamblock' ),
    39             [ $this, 'options_field', ],
     47            [ $this, 'options_fields', ],
    4048            'discussion',
    4149            'kama_spamblock'
     
    5260            }
    5361            elseif( 'unique_code' === $key ){
    54                 $val = preg_replace( '~[^A-Za-z0-9*%$#@!_-]~', '', $val );
     62                $val = self::sanitize_uniue_code( $val );
     63                $val || $val = wp_generate_password( 10, false );
    5564            }
    5665            else{
     
    6271    }
    6372
    64     public function options_field() {
     73    public static function sanitize_uniue_code( string $code ) {
     74        return preg_replace( '~[^A-Za-z0-9*%$#@!_-]~', '', $code );
     75    }
     76
     77    public function options_fields() {
    6578        ?>
    6679        <p>
     
    7689
    7790    public static function settings_link( $links ) {
    78 
    7991        $links[] = sprintf( '<a href="%s">%s</a>', admin_url( '/options-discussion.php#wpfooter' ), __( 'Settings', 'kama-spamblock' ) );
    8092
  • kama-spamblock/tags/1.8.3/kama-spamblock.php

    r3000349 r3167874  
    1212 * Plugin URI: https://wp-kama.ru/95
    1313 *
    14  * Requires PHP: 5.6
    15  * Requires at least: 2.7
     14 * Requires PHP: 7.0
     15 * Requires at least: 5.7
    1616 *
    17  * Version: 1.8.2
     17 * Version: 1.8.3
    1818 */
    1919
     
    2323add_action( 'init', 'kama_spamblock_init', 11 );
    2424
    25 
    2625function kama_spamblock_init() {
    2726    return kama_spamblock()->init_plugin();
    2827}
    2928
    30 /**
    31  * @return Kama_Spamblock
    32  */
    33 function kama_spamblock() {
     29function kama_spamblock(): Kama_Spamblock {
    3430    static $inst;
    3531
    36     $inst || $inst = new Kama_Spamblock( __FILE__ );
     32    $inst || $inst = new Kama_Spamblock( __FILE__, new Kama_Spamblock_Options() );
    3733
    3834    return $inst;
  • kama-spamblock/tags/1.8.3/readme.txt

    r3001786 r3167874  
    22Stable tag: trunk
    33Contributors: Tkama
    4 Tested up to: 6.4.1
     4Tested up to: 6.6.2
    55License: GPLv2 or later
    66License URI: http://www.gnu.org/licenses/gpl-2.0.html
    77Tags: spam, spammer, autospam, spamblock, antispam, anti-spam, protect, comments, ping, trackback, bot, robot, human, captcha, invisible
    88
    9 A lightweight and discreet solution to prevent automatic spam when a spam comment is posted. Additionally, it conducts checks on pings and trackbacks to verify genuine backlinks.
     9Light and invisible method to block auto-spam when a spam comment is posted. Pings and trackbacks check for real backlinks.
    1010
    1111
     
    2121== Screenshots ==
    2222
    23 1. Plugin settings on standart WordPress <code>Settings > Discussion</code> page.
     231. Plugin settings on standard WordPress <code>Settings > Discussion</code> page.
    2424
    25 2. Spam alert, when spam comment detected or if user have javascript disabled in his browser. This alert allows send comment once again, when it was blocked in any nonstandard cases.
     252. Spam alert, when spam comment is detected or if the user has JavaScript disabled in their browser. This alert allows sending the comment once again when it was blocked in any nonstandard cases.
    2626
    2727
     
    3535
    3636
     37== Changelog ==
    3738
    38 == Changelog ==
     39= 1.8.3 =
     40* FIX: XSS vulnerability fixed. Thanks to [Wordfence](https://www.wordfence.com/) for the report.
     41* IMP: Other minor improvements.
    3942
    4043= 1.8.2 =
     
    4952
    5053= 1.7.5 =
    51 * FIX: bug with uniq code comparation
    52 * minor code fixes
    53 
     54* FIX: bug with unique code comparison.
     55* Minor code fixes.
    5456
    5557= 1.7.4 =
    56 * CHG: change sanitize-options-on-save function - sanitize_key() to sanitize_html_class() - it's not so hard but hard enough...
    57 * CHG: 'sanitize_setting' function call. Seems it hasn't have back-compat for wordpress versions less then 4.7
     58* CHG: changed sanitize-options-on-save function - sanitize_key() to sanitize_html_class() - it's not so hard but hard enough...
     59* CHG: 'sanitize_setting' function call. Seems it doesn't have back-compat for WordPress versions less than 4.7.
    5860
    5961= 1.7.3 =
    60 * FIX: options fix of 1.7.2
     62* FIX: options fix of 1.7.2.
    6163
    6264= 1.7.2 =
    63 * CHG: move translation to translation.wordpress.org
     65* CHG: moved translation to translation.wordpress.org.
    6466* ADD: new 'unique code' option.
    6567* IMP: some code improvements.
     
    6971
    7072= 1.6.0 =
    71 * CHG: check logic is little change in order to correctly work with page cache plugins
     73* CHG: check logic is slightly changed in order to work correctly with page cache plugins.
    7274
    7375= 1.5.2 =
    74 * ADD: delete is_singular check for themes where this check work wrong. Now plugin JS showen in all pages
     76* ADD: deleted is_singular check for themes where this check works incorrectly. Now plugin JS is shown on all pages.
    7577
    7678= 1.5.1 =
    77 * ADD: js include from numbers of hooks. If there is no "wp_footer" hook in theme
     79* ADD: JS included from a number of hooks if there is no "wp_footer" hook in the theme.
    7880
    7981= 1.5.0 =
    80 * ADD: Russian localization
    81 
     82* ADD: Russian localization.
  • kama-spamblock/trunk/Kama_Spamblock.php

    r3000349 r3167874  
    2222    private $process_comment_types = [ '', 'comment' ];
    2323
    24     /**
    25      * @param string $plug_file
    26      */
    27     public function __construct( $plug_file ) {
    28 
    29         $this->opt = new Kama_Spamblock_Options();
     24    public function __construct( string $plug_file, Kama_Spamblock_Options $opt ) {
     25        $this->opt = $opt;
    3026
    3127        $this->plug_file = $plug_file;
    32         $this->plug_dir = dirname( $plug_file );
     28        $this->plug_dir  = dirname( $plug_file );
    3329
    3430        $this->process_comment_types = apply_filters( 'kama_spamblock__process_comment_types', $this->process_comment_types );
     
    3632
    3733    public function init_plugin() {
    38 
    3934        if( ! defined( 'DOING_AJAX' ) ){
    4035            load_plugin_textdomain( 'kama-spamblock', false, basename( $this->plug_dir ) . '/languages' );
     
    5752
    5853        if( ! wp_doing_ajax() && ! is_admin() ){
    59             add_action( 'wp_footer', [ $this, 'main_js' ], 99 );
     54            add_action( 'wp_footer', [ $this, 'main_js' ], 0 );
    6055        }
    6156
    62         $this->nonce = self::make_nonce( date( 'jn' ) . $this->opt->unique_code );
     57        $this->nonce = self::make_hash( date( 'jn' ) . $this->opt->unique_code );
    6358
    6459        add_filter( 'preprocess_comment', [ $this, 'block_spam' ], 0 );
     
    6762    /**
    6863     * Check and block comment if needed.
    69      *
    70      * @param array $commentdata
    71      *
    72      * @return array
    7364     */
    74     public function block_spam( $commentdata ) {
     65    public function block_spam( array $commentdata ): array {
    7566
    7667        $this->block_pings_trackbacks( $commentdata );
     
    10293        }
    10394
    104         $ksbn_code = isset( $_POST['ksbn_code'] ) ? trim( $_POST['ksbn_code'] ) : '';
     95        $ksbn_code = trim( $_POST['ksbn_code'] ?? '' );
    10596
    106         if( self::make_nonce( $ksbn_code ) !== $this->nonce ){
     97        if( self::make_hash( $ksbn_code ) !== $this->nonce ){
    10798            /** @noinspection ForgottenDebugOutputInspection */
    10899            wp_die( $this->block_form() );
     
    111102
    112103    /**
    113      * @param string $key
    114      *
    115      * @return string
     104     * Creates hash from specified key if it's not hashed yet.
    116105     */
    117     private static function make_nonce( $key ) {
    118         // maybe already md5
     106    private static function make_hash( string $key ): string {
    119107        return preg_match( '/^[a-f0-9]{32}$/', $key ) ? $key : md5( $key );
    120108    }
     
    127115
    128116        // note: is_singular() may work incorrectly
    129         if( ! empty( $post ) && ( 'open' !== $post->comment_status ) && is_singular() ){
     117        if( $post && ( 'open' !== $post->comment_status ) && is_singular() ){
    130118            return;
    131119        }
    132120        ?>
    133121        <script id="kama_spamblock">
    134             (function(){
     122            window.addEventListener( 'DOMContentLoaded', function() {
     123                document.addEventListener( 'mousedown', handleSubmit );
     124                document.addEventListener( 'touchstart', handleSubmit );
     125                document.addEventListener( 'keypress', handleSubmit );
    135126
    136                 const catch_submit = function( ev ){
    137 
    138                     let sbmt = ev.target.closest( '#<?= esc_html( $this->opt->sibmit_button_id ) ?>' );
    139 
     127                function handleSubmit( ev ){
     128                    let sbmt = ev.target.closest( '#<?= esc_html( sanitize_html_class( $this->opt->sibmit_button_id ) ) ?>' );
    140129                    if( ! sbmt ){
    141130                        return;
     
    145134                    let date = new Date();
    146135
    147                     input.value = ''+ date.getUTCDate() + (date.getUTCMonth() + 1) + '<?= esc_html( $this->opt->unique_code ) ?>';
     136                    input.value = ''+ date.getUTCDate() + (date.getUTCMonth() + 1) + '<?= esc_html( Kama_Spamblock_Options::sanitize_uniue_code( $this->opt->unique_code ) ) ?>';
    148137                    input.name = 'ksbn_code';
    149138                    input.type = 'hidden';
     
    151140                    sbmt.parentNode.insertBefore( input, sbmt );
    152141                }
    153 
    154                 document.addEventListener( 'mousedown', catch_submit );
    155                 document.addEventListener( 'keypress', catch_submit );
    156             })()
     142            } );
    157143        </script>
    158144        <?php
     
    160146
    161147    /**
    162      * Output form when comment has been blocked.
    163      *
    164      * @return string
     148     * Gets Form HTML for blocked comment.
    165149     */
    166     private function block_form() {
     150    private function block_form(): string {
    167151        ob_start();
    168152        ?>
    169153        <h1><?= __( 'Antispam block your comment!', 'kama-spamblock' ) ?></h1>
    170154
    171         <form method="post" action="<?= site_url( '/wp-comments-post.php' ) ?>">
     155        <form method="POST" action="<?= site_url( '/wp-comments-post.php' ) ?>">
    172156            <p>
    173157                <?= sprintf(
    174158                   __( 'Copy %1$s to the field %2$s and press button', 'kama-spamblock' ),
    175                    '<code style="background:rgba(255,255,255,.2);">' . $this->nonce . '</code>',
     159                   '<code style="background:rgba(255,255,255,.2);">' . esc_html( $this->nonce ) . '</code>',
    176160                   '<input type="text" name="ksbn_code" value="" style="width:150px; border:1px solid #ccc; border-radius:3px; padding:.3em;" />'
    177161               ) ?>
     
    181165
    182166            <?php
    183             unset( $_POST['ksbn_code'] );
     167            foreach( $_POST as $key => $val ){
     168                if( $key === 'ksbn_code' ){
     169                    continue;
     170                }
    184171
    185             foreach( $_POST as $key => $val ){
    186                 echo sprintf( '<textarea style="display:none;" name="%s">%s</textarea>', $key, esc_textarea( stripslashes( $val ) ) );
     172                echo sprintf( '<textarea style="display:none;" name="%s">%s</textarea>',
     173                    esc_attr( $key ),
     174                    esc_textarea( stripslashes( $val ) )
     175                );
    187176            }
    188177            ?>
  • kama-spamblock/trunk/Kama_Spamblock_Options.php

    r3000349 r3167874  
    1313    public function __construct() {
    1414        $opt = array_merge( $this->default_options(), get_option( self::OPT_NAME, [] ) );
     15        $this->check_empty_unique_code( $opt['unique_code'] );
     16
    1517        $opt = apply_filters( 'kama_spamblock__options', $opt );
    16         $opt = (object) $opt;
    1718
    18         $this->unique_code = $opt->unique_code;
    19         $this->sibmit_button_id = $opt->sibmit_button_id;
     19        $this->unique_code      = $opt['unique_code'];
     20        $this->sibmit_button_id = $opt['sibmit_button_id'];
    2021    }
    2122
    2223    /**
    23      * @return string[]
     24     * @return void
    2425     */
    25     public function default_options(){
     26    private function check_empty_unique_code( string $code ) {
     27        if( ! $code ){
     28            $opt = get_option( self::OPT_NAME, [] );
     29            $opt['unique_code'] = wp_generate_password( 10, false );
     30            update_option( self::OPT_NAME, $opt );
     31        }
     32    }
    2633
     34    public function default_options(): array {
    2735        return [
    2836            'sibmit_button_id' => 'submit',
    29             'unique_code'      => 'uniq9065',
     37            'unique_code'      => '', // default value will be auto-generated
    3038        ];
    3139    }
     
    3745            self::OPT_NAME . '_field',
    3846            __( 'Kama Spamblock settings', 'kama-spamblock' ),
    39             [ $this, 'options_field', ],
     47            [ $this, 'options_fields', ],
    4048            'discussion',
    4149            'kama_spamblock'
     
    5260            }
    5361            elseif( 'unique_code' === $key ){
    54                 $val = preg_replace( '~[^A-Za-z0-9*%$#@!_-]~', '', $val );
     62                $val = self::sanitize_uniue_code( $val );
     63                $val || $val = wp_generate_password( 10, false );
    5564            }
    5665            else{
     
    6271    }
    6372
    64     public function options_field() {
     73    public static function sanitize_uniue_code( string $code ) {
     74        return preg_replace( '~[^A-Za-z0-9*%$#@!_-]~', '', $code );
     75    }
     76
     77    public function options_fields() {
    6578        ?>
    6679        <p>
     
    7689
    7790    public static function settings_link( $links ) {
    78 
    7991        $links[] = sprintf( '<a href="%s">%s</a>', admin_url( '/options-discussion.php#wpfooter' ), __( 'Settings', 'kama-spamblock' ) );
    8092
  • kama-spamblock/trunk/kama-spamblock.php

    r3000349 r3167874  
    1212 * Plugin URI: https://wp-kama.ru/95
    1313 *
    14  * Requires PHP: 5.6
    15  * Requires at least: 2.7
     14 * Requires PHP: 7.0
     15 * Requires at least: 5.7
    1616 *
    17  * Version: 1.8.2
     17 * Version: 1.8.3
    1818 */
    1919
     
    2323add_action( 'init', 'kama_spamblock_init', 11 );
    2424
    25 
    2625function kama_spamblock_init() {
    2726    return kama_spamblock()->init_plugin();
    2827}
    2928
    30 /**
    31  * @return Kama_Spamblock
    32  */
    33 function kama_spamblock() {
     29function kama_spamblock(): Kama_Spamblock {
    3430    static $inst;
    3531
    36     $inst || $inst = new Kama_Spamblock( __FILE__ );
     32    $inst || $inst = new Kama_Spamblock( __FILE__, new Kama_Spamblock_Options() );
    3733
    3834    return $inst;
  • kama-spamblock/trunk/readme.txt

    r3001786 r3167874  
    22Stable tag: trunk
    33Contributors: Tkama
    4 Tested up to: 6.4.1
     4Tested up to: 6.6.2
    55License: GPLv2 or later
    66License URI: http://www.gnu.org/licenses/gpl-2.0.html
    77Tags: spam, spammer, autospam, spamblock, antispam, anti-spam, protect, comments, ping, trackback, bot, robot, human, captcha, invisible
    88
    9 A lightweight and discreet solution to prevent automatic spam when a spam comment is posted. Additionally, it conducts checks on pings and trackbacks to verify genuine backlinks.
     9Light and invisible method to block auto-spam when a spam comment is posted. Pings and trackbacks check for real backlinks.
    1010
    1111
     
    2121== Screenshots ==
    2222
    23 1. Plugin settings on standart WordPress <code>Settings > Discussion</code> page.
     231. Plugin settings on standard WordPress <code>Settings > Discussion</code> page.
    2424
    25 2. Spam alert, when spam comment detected or if user have javascript disabled in his browser. This alert allows send comment once again, when it was blocked in any nonstandard cases.
     252. Spam alert, when spam comment is detected or if the user has JavaScript disabled in their browser. This alert allows sending the comment once again when it was blocked in any nonstandard cases.
    2626
    2727
     
    3535
    3636
     37== Changelog ==
    3738
    38 == Changelog ==
     39= 1.8.3 =
     40* FIX: XSS vulnerability fixed. Thanks to [Wordfence](https://www.wordfence.com/) for the report.
     41* IMP: Other minor improvements.
    3942
    4043= 1.8.2 =
     
    4952
    5053= 1.7.5 =
    51 * FIX: bug with uniq code comparation
    52 * minor code fixes
    53 
     54* FIX: bug with unique code comparison.
     55* Minor code fixes.
    5456
    5557= 1.7.4 =
    56 * CHG: change sanitize-options-on-save function - sanitize_key() to sanitize_html_class() - it's not so hard but hard enough...
    57 * CHG: 'sanitize_setting' function call. Seems it hasn't have back-compat for wordpress versions less then 4.7
     58* CHG: changed sanitize-options-on-save function - sanitize_key() to sanitize_html_class() - it's not so hard but hard enough...
     59* CHG: 'sanitize_setting' function call. Seems it doesn't have back-compat for WordPress versions less than 4.7.
    5860
    5961= 1.7.3 =
    60 * FIX: options fix of 1.7.2
     62* FIX: options fix of 1.7.2.
    6163
    6264= 1.7.2 =
    63 * CHG: move translation to translation.wordpress.org
     65* CHG: moved translation to translation.wordpress.org.
    6466* ADD: new 'unique code' option.
    6567* IMP: some code improvements.
     
    6971
    7072= 1.6.0 =
    71 * CHG: check logic is little change in order to correctly work with page cache plugins
     73* CHG: check logic is slightly changed in order to work correctly with page cache plugins.
    7274
    7375= 1.5.2 =
    74 * ADD: delete is_singular check for themes where this check work wrong. Now plugin JS showen in all pages
     76* ADD: deleted is_singular check for themes where this check works incorrectly. Now plugin JS is shown on all pages.
    7577
    7678= 1.5.1 =
    77 * ADD: js include from numbers of hooks. If there is no "wp_footer" hook in theme
     79* ADD: JS included from a number of hooks if there is no "wp_footer" hook in the theme.
    7880
    7981= 1.5.0 =
    80 * ADD: Russian localization
    81 
     82* ADD: Russian localization.
Note: See TracChangeset for help on using the changeset viewer.