Skip to content

Commit 05d9292

Browse files
Merge pull request #137 from wp-media/develop
Deploy polyfill fix
2 parents 911d6fa + 592bef3 commit 05d9292

File tree

4 files changed

+7
-19
lines changed

4 files changed

+7
-19
lines changed

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smili
44
Requires at least: 4.7
55
Tested up to: 6.3
66
Requires PHP: 5.6
7-
Stable tag: 2.3.6
7+
Stable tag: 2.3.7
88
Tags: lazy load, lazy loading, defer offscreen images, lazy load plugin, lazy load images, image lazy loading, iframe lazy load, video lazy load
99

1010
The best free lazy load plugin for WordPress. Lazy load images, videos, and iframes to improve performance and Core Web Vitals scores.
@@ -113,6 +113,9 @@ You can report any security bugs found in the source code of the site-reviews pl
113113
* [Increase Max upload file size](https://wordpress.org/plugins/upload-max-file-size/) is the best plugin to increase the upload file size limit to any value with one click.
114114

115115
== Changelog ==
116+
= 2.3.7 =
117+
Bugfix: Removed `rocket_lazyload_polyfill` filter due to a vulnerability on polyfill
118+
116119
= 2.3.5 =
117120
Enhancement: Test the plugin with latest version of WordPress v5.9.3
118121
Enhancement: Change WP readme content.

rocket-lazy-load.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Lazy Load - Optimize Images
44
* Plugin URI: http://wordpress.org/plugins/rocket-lazy-load/
55
* Description: The tiny Lazy Load script for WordPress without jQuery or others libraries.
6-
* Version: 2.3.6
6+
* Version: 2.3.7
77
* Requires PHP: 5.6
88
* Author: WP Rocket
99
* Author URI: https://wp-rocket.me
@@ -30,7 +30,7 @@
3030

3131
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3232

33-
define( 'ROCKET_LL_VERSION', '2.3.6' );
33+
define( 'ROCKET_LL_VERSION', '2.3.7' );
3434
define( 'ROCKET_LL_WP_VERSION', '4.9' );
3535
define( 'ROCKET_LL_PHP_VERSION', '5.6' );
3636
define( 'ROCKET_LL_BASENAME', plugin_basename( __FILE__ ) );

src/Dependencies/RocketLazyload/Assets.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,12 @@ public function getLazyloadScript( $args = [] ) {
155155
$defaults = [
156156
'base_url' => '',
157157
'version' => '',
158-
'polyfill' => false,
159158
];
160159

161160
$args = wp_parse_args( $args, $defaults );
162161
$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
163162
$script = '';
164163

165-
if ( isset( $args['polyfill'] ) && $args['polyfill'] ) {
166-
$script .= '<script crossorigin="anonymous" src="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=default%2CIntersectionObserver%2CIntersectionObserverEntry"></script>';
167-
}
168-
169164
/**
170165
* Filters the script tag for the lazyload script
171166
*

src/Subscriber/LazyloadSubscriber.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,10 @@ public function insertLazyloadScript() {
120120
*/
121121
$threshold = apply_filters( 'rocket_lazyload_threshold', 300 );
122122

123-
/**
124-
* Filters the use of the polyfill for intersectionObserver
125-
*
126-
* @since 3.3
127-
* @author Remy Perona
128-
*
129-
* @param bool $polyfill True to use the polyfill, false otherwise.
130-
*/
131-
$polyfill = apply_filters( 'rocket_lazyload_polyfill', false );
132-
133123
$script_args = [
134124
'base_url' => ROCKET_LL_FRONT_JS_URL,
135125
'version' => '16.1',
136-
'polyfill' => $polyfill,
126+
'polyfill' => false,
137127
];
138128

139129
$inline_args = [

0 commit comments

Comments
 (0)