Changeset 3081914
- Timestamp:
- 05/06/2024 12:18:39 PM (20 months ago)
- Location:
- advanced-ads
- Files:
-
- 12 edited
- 1 copied
-
tags/1.52.2 (copied) (copied from advanced-ads/trunk)
-
tags/1.52.2/advanced-ads.php (modified) (2 diffs)
-
tags/1.52.2/includes/utilities/class-wordpress.php (modified) (1 diff)
-
tags/1.52.2/languages/advanced-ads.pot (modified) (2 diffs)
-
tags/1.52.2/modules/gutenberg/includes/class-gutenberg.php (modified) (1 diff)
-
tags/1.52.2/modules/import-export/classes/import.php (modified) (2 diffs)
-
tags/1.52.2/readme.txt (modified) (2 diffs)
-
trunk/advanced-ads.php (modified) (2 diffs)
-
trunk/includes/utilities/class-wordpress.php (modified) (1 diff)
-
trunk/languages/advanced-ads.pot (modified) (2 diffs)
-
trunk/modules/gutenberg/includes/class-gutenberg.php (modified) (1 diff)
-
trunk/modules/import-export/classes/import.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-ads/tags/1.52.2/advanced-ads.php
r3064590 r3081914 13 13 * Plugin URI: https://wpadvancedads.com 14 14 * Description: Manage and optimize your ads in WordPress 15 * Version: 1.52. 115 * Version: 1.52.2 16 16 * Author: Advanced Ads GmbH 17 17 * Author URI: https://wpadvancedads.com … … 34 34 35 35 define( 'ADVADS_FILE', __FILE__ ); 36 define( 'ADVADS_VERSION', '1.52. 1' );36 define( 'ADVADS_VERSION', '1.52.2' ); 37 37 38 38 // Load the autoloader. -
advanced-ads/tags/1.52.2/includes/utilities/class-wordpress.php
r3050336 r3081914 118 118 return $is_gutenberg && $is_writing; 119 119 } 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 } 120 137 } -
advanced-ads/tags/1.52.2/languages/advanced-ads.pot
r3064590 r3081914 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Advanced Ads 1.52. 0\n"5 "Project-Id-Version: Advanced Ads 1.52.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ads/\n" 7 7 "Last-Translator: Thomas Maier <[email protected]>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2024-0 4-04T11:02:12+00:00\n"12 "POT-Creation-Date: 2024-05-06T12:18:03+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.6.0\n" -
advanced-ads/tags/1.52.2/modules/gutenberg/includes/class-gutenberg.php
r3035032 r3081914 218 218 219 219 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'] ); 221 221 } 222 222 223 223 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'; 225 225 } 226 226 227 227 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'; 232 232 $after_ad_filter = function( $output, $ad ) { 233 233 return $output . '<br style="clear: both; display: block; float: none;">'; -
advanced-ads/tags/1.52.2/modules/import-export/classes/import.php
r2991956 r3081914 153 153 foreach ( $ad['meta_input'] as $meta_k => &$meta_v ) { 154 154 if ( Advanced_Ads_Ad::$options_meta_field !== $meta_k ) { 155 $meta_v = maybe_unserialize( $meta_v );155 $meta_v = WordPress::maybe_unserialize( $meta_v ); 156 156 } 157 157 } … … 535 535 /* translators: %s: Option name. */ 536 536 $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 ) ); 538 538 } 539 539 } -
advanced-ads/tags/1.52.2/readme.txt
r3064590 r3081914 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.2 7 Stable tag: 1.52. 17 Stable tag: 1.52.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 339 339 == Changelog == 340 340 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 341 346 = 1.52.1 (April 4, 2024) = 342 347 -
advanced-ads/trunk/advanced-ads.php
r3064590 r3081914 13 13 * Plugin URI: https://wpadvancedads.com 14 14 * Description: Manage and optimize your ads in WordPress 15 * Version: 1.52. 115 * Version: 1.52.2 16 16 * Author: Advanced Ads GmbH 17 17 * Author URI: https://wpadvancedads.com … … 34 34 35 35 define( 'ADVADS_FILE', __FILE__ ); 36 define( 'ADVADS_VERSION', '1.52. 1' );36 define( 'ADVADS_VERSION', '1.52.2' ); 37 37 38 38 // Load the autoloader. -
advanced-ads/trunk/includes/utilities/class-wordpress.php
r3050336 r3081914 118 118 return $is_gutenberg && $is_writing; 119 119 } 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 } 120 137 } -
advanced-ads/trunk/languages/advanced-ads.pot
r3064590 r3081914 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Advanced Ads 1.52. 0\n"5 "Project-Id-Version: Advanced Ads 1.52.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ads/\n" 7 7 "Last-Translator: Thomas Maier <[email protected]>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2024-0 4-04T11:02:12+00:00\n"12 "POT-Creation-Date: 2024-05-06T12:18:03+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.6.0\n" -
advanced-ads/trunk/modules/gutenberg/includes/class-gutenberg.php
r3035032 r3081914 218 218 219 219 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'] ); 221 221 } 222 222 223 223 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'; 225 225 } 226 226 227 227 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'; 232 232 $after_ad_filter = function( $output, $ad ) { 233 233 return $output . '<br style="clear: both; display: block; float: none;">'; -
advanced-ads/trunk/modules/import-export/classes/import.php
r2991956 r3081914 153 153 foreach ( $ad['meta_input'] as $meta_k => &$meta_v ) { 154 154 if ( Advanced_Ads_Ad::$options_meta_field !== $meta_k ) { 155 $meta_v = maybe_unserialize( $meta_v );155 $meta_v = WordPress::maybe_unserialize( $meta_v ); 156 156 } 157 157 } … … 535 535 /* translators: %s: Option name. */ 536 536 $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 ) ); 538 538 } 539 539 } -
advanced-ads/trunk/readme.txt
r3064590 r3081914 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.2 7 Stable tag: 1.52. 17 Stable tag: 1.52.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 339 339 == Changelog == 340 340 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 341 346 = 1.52.1 (April 4, 2024) = 342 347
Note: See TracChangeset
for help on using the changeset viewer.