Plugin Directory

Changeset 3081914


Ignore:
Timestamp:
05/06/2024 12:18:39 PM (20 months ago)
Author:
advancedads
Message:

Update to version 1.52.2 from GitHub

Location:
advanced-ads
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • advanced-ads/tags/1.52.2/advanced-ads.php

    r3064590 r3081914  
    1313 * Plugin URI:        https://wpadvancedads.com
    1414 * Description:       Manage and optimize your ads in WordPress
    15  * Version:           1.52.1
     15 * Version:           1.52.2
    1616 * Author:            Advanced Ads GmbH
    1717 * Author URI:        https://wpadvancedads.com
     
    3434
    3535define( 'ADVADS_FILE', __FILE__ );
    36 define( 'ADVADS_VERSION', '1.52.1' );
     36define( 'ADVADS_VERSION', '1.52.2' );
    3737
    3838// Load the autoloader.
  • advanced-ads/tags/1.52.2/includes/utilities/class-wordpress.php

    r3050336 r3081914  
    118118        return $is_gutenberg && $is_writing;
    119119    }
     120
     121    /**
     122     * Unserializes data only if it was serialized.
     123     *
     124     * @link https://patchstack.com/articles/unauthenticated-php-object-injection-in-flatsome-theme-3-17-5/
     125     *
     126     * @param string $data Data that might be unserialized.
     127     *
     128     * @return mixed Unserialized data can be any type.
     129     */
     130    public static function maybe_unserialize( $data ) {
     131        if ( is_serialized( $data ) ) { // Don't attempt to unserialize data that wasn't serialized going in.
     132            return @unserialize( trim( $data ), [ 'allowed_classes' => false ] ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize
     133        }
     134
     135        return $data;
     136    }
    120137}
  • advanced-ads/tags/1.52.2/languages/advanced-ads.pot

    r3064590 r3081914  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Advanced Ads 1.52.0\n"
     5"Project-Id-Version: Advanced Ads 1.52.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ads/\n"
    77"Last-Translator: Thomas Maier <[email protected]>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-04-04T11:02:12+00:00\n"
     12"POT-Creation-Date: 2024-05-06T12:18:03+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.6.0\n"
  • advanced-ads/tags/1.52.2/modules/gutenberg/includes/class-gutenberg.php

    r3035032 r3081914  
    218218
    219219        if ( isset( $attr['fixed_widget'] ) ) {
    220             $output['wrapper_attrs']['data-fixed_widget'] = $attr['fixed_widget'];
     220            $output['wrapper_attrs']['data-fixed_widget'] = esc_attr( $attr['fixed_widget'] );
    221221        }
    222222
    223223        if ( ! empty( $attr['width'] ) ) {
    224             $output['output']['wrapper_attrs']['style']['width'] = $attr['width'] . 'px';
     224            $output['output']['wrapper_attrs']['style']['width'] = absint( $attr['width'] ) . 'px';
    225225        }
    226226
    227227        if ( ! empty( $attr['height'] ) ) {
    228             $output['output']['wrapper_attrs']['style']['height'] = $attr['height'] . 'px';
    229         }
    230 
    231         $align           = $attr['align'] ?? 'default';
     228            $output['output']['wrapper_attrs']['style']['height'] = absint( $attr['height'] ) . 'px';
     229        }
     230
     231        $align           = esc_attr( $attr['align'] ) ?? 'default';
    232232        $after_ad_filter = function( $output, $ad ) {
    233233            return $output . '<br style="clear: both; display: block; float: none;">';
  • advanced-ads/tags/1.52.2/modules/import-export/classes/import.php

    r2991956 r3081914  
    153153                    foreach ( $ad['meta_input'] as $meta_k => &$meta_v ) {
    154154                        if ( Advanced_Ads_Ad::$options_meta_field !== $meta_k ) {
    155                             $meta_v = maybe_unserialize( $meta_v );
     155                            $meta_v = WordPress::maybe_unserialize( $meta_v );
    156156                        }
    157157                    }
     
    535535                /* translators: %s: Option name. */
    536536                $this->messages[] = [ 'update', sprintf( __( 'Option was updated: <em>%s</em>', 'advanced-ads' ), $option_name ) ];
    537                 update_option( $option_name, maybe_unserialize( $option_to_import ) );
     537                update_option( $option_name, WordPress::maybe_unserialize( $option_to_import ) );
    538538            }
    539539        }
  • advanced-ads/tags/1.52.2/readme.txt

    r3064590 r3081914  
    55Tested up to: 6.5
    66Requires PHP: 7.2
    7 Stable tag: 1.52.1
     7Stable tag: 1.52.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    339339== Changelog ==
    340340
     341= 1.52.2 (May 6, 2024) =
     342
     343- Fix: enhance data handling in Gutenberg block module for improved security
     344- Fix: replace function 'maybe_unserialize' with a more secure custom function
     345
    341346= 1.52.1 (April 4, 2024) =
    342347
  • advanced-ads/trunk/advanced-ads.php

    r3064590 r3081914  
    1313 * Plugin URI:        https://wpadvancedads.com
    1414 * Description:       Manage and optimize your ads in WordPress
    15  * Version:           1.52.1
     15 * Version:           1.52.2
    1616 * Author:            Advanced Ads GmbH
    1717 * Author URI:        https://wpadvancedads.com
     
    3434
    3535define( 'ADVADS_FILE', __FILE__ );
    36 define( 'ADVADS_VERSION', '1.52.1' );
     36define( 'ADVADS_VERSION', '1.52.2' );
    3737
    3838// Load the autoloader.
  • advanced-ads/trunk/includes/utilities/class-wordpress.php

    r3050336 r3081914  
    118118        return $is_gutenberg && $is_writing;
    119119    }
     120
     121    /**
     122     * Unserializes data only if it was serialized.
     123     *
     124     * @link https://patchstack.com/articles/unauthenticated-php-object-injection-in-flatsome-theme-3-17-5/
     125     *
     126     * @param string $data Data that might be unserialized.
     127     *
     128     * @return mixed Unserialized data can be any type.
     129     */
     130    public static function maybe_unserialize( $data ) {
     131        if ( is_serialized( $data ) ) { // Don't attempt to unserialize data that wasn't serialized going in.
     132            return @unserialize( trim( $data ), [ 'allowed_classes' => false ] ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize
     133        }
     134
     135        return $data;
     136    }
    120137}
  • advanced-ads/trunk/languages/advanced-ads.pot

    r3064590 r3081914  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Advanced Ads 1.52.0\n"
     5"Project-Id-Version: Advanced Ads 1.52.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ads/\n"
    77"Last-Translator: Thomas Maier <[email protected]>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-04-04T11:02:12+00:00\n"
     12"POT-Creation-Date: 2024-05-06T12:18:03+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.6.0\n"
  • advanced-ads/trunk/modules/gutenberg/includes/class-gutenberg.php

    r3035032 r3081914  
    218218
    219219        if ( isset( $attr['fixed_widget'] ) ) {
    220             $output['wrapper_attrs']['data-fixed_widget'] = $attr['fixed_widget'];
     220            $output['wrapper_attrs']['data-fixed_widget'] = esc_attr( $attr['fixed_widget'] );
    221221        }
    222222
    223223        if ( ! empty( $attr['width'] ) ) {
    224             $output['output']['wrapper_attrs']['style']['width'] = $attr['width'] . 'px';
     224            $output['output']['wrapper_attrs']['style']['width'] = absint( $attr['width'] ) . 'px';
    225225        }
    226226
    227227        if ( ! empty( $attr['height'] ) ) {
    228             $output['output']['wrapper_attrs']['style']['height'] = $attr['height'] . 'px';
    229         }
    230 
    231         $align           = $attr['align'] ?? 'default';
     228            $output['output']['wrapper_attrs']['style']['height'] = absint( $attr['height'] ) . 'px';
     229        }
     230
     231        $align           = esc_attr( $attr['align'] ) ?? 'default';
    232232        $after_ad_filter = function( $output, $ad ) {
    233233            return $output . '<br style="clear: both; display: block; float: none;">';
  • advanced-ads/trunk/modules/import-export/classes/import.php

    r2991956 r3081914  
    153153                    foreach ( $ad['meta_input'] as $meta_k => &$meta_v ) {
    154154                        if ( Advanced_Ads_Ad::$options_meta_field !== $meta_k ) {
    155                             $meta_v = maybe_unserialize( $meta_v );
     155                            $meta_v = WordPress::maybe_unserialize( $meta_v );
    156156                        }
    157157                    }
     
    535535                /* translators: %s: Option name. */
    536536                $this->messages[] = [ 'update', sprintf( __( 'Option was updated: <em>%s</em>', 'advanced-ads' ), $option_name ) ];
    537                 update_option( $option_name, maybe_unserialize( $option_to_import ) );
     537                update_option( $option_name, WordPress::maybe_unserialize( $option_to_import ) );
    538538            }
    539539        }
  • advanced-ads/trunk/readme.txt

    r3064590 r3081914  
    55Tested up to: 6.5
    66Requires PHP: 7.2
    7 Stable tag: 1.52.1
     7Stable tag: 1.52.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    339339== Changelog ==
    340340
     341= 1.52.2 (May 6, 2024) =
     342
     343- Fix: enhance data handling in Gutenberg block module for improved security
     344- Fix: replace function 'maybe_unserialize' with a more secure custom function
     345
    341346= 1.52.1 (April 4, 2024) =
    342347
Note: See TracChangeset for help on using the changeset viewer.