PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-beta
Jetpack – WP Security, Backup, Speed, & Growth v16.3-beta
16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 All 507 releases
← All changes | jetpack_vendor/automattic/jetpack-status/src/class-status.php +9 -2 16.2-beta → 16.3-beta View file →
@@ -162,9 +162,14 @@
162 162 */
163 163 $host = '';
164 164 }
165 165
166 - // Check for localhost and sites using an IP only first.
166 + /*
167 + * Check for localhost and sites using an IP only first. No dot means it can't be a
168 + * public domain. Dotless IPv6 literals land here too, routable ones included:
169 + * WordPress.com won't register an IPv6 site URL, so offline mode is where they belong.
170 + * An IPv4-mapped literal like [::ffff:127.0.0.1] keeps its dots and reads as remote.
171 + */
167 172 $is_local = '' !== $host && false === strpos( $host, '.' );
168 173
169 174 // Use Core's environment check, if available.
170 175 if ( 'local' === wp_get_environment_type() ) {
@@ -180,9 +185,11 @@
180 185 '#\.docksal\.site$#i', // Docksal.
181 186 '#\.dev\.cc$#i', // ServerPress.
182 187 '#\.lndo\.site$#i', // Lando.
183 188 '#\.ddev\.site$#i', // DDEV.
184 - '#^127\.0\.0\.1$#',
189 + // The whole 127.0.0.0/8 range is loopback; each octet is capped at 255.
190 + '#^127\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){2}$#',
191 + '#^0\.0\.0\.0$#', // All-interfaces bind, common under Docker and `wp server`.
185 192 '#^playground\.wordpress\.net$#i', // WordPress Playground, which runs entirely in the browser.
186 193 );
187 194
188 195 if ( ! $is_local && '' !== $host ) {