PluginProbe
Vigilant – 100% Free Security Suite: Firewall, 2FA, Login, Headers, Scanner… / 2.11.8
Vigilant – 100% Free Security Suite: Firewall, 2FA, Login, Headers, Scanner… v2.11.8
3.0.0 2.11.12 2.11.11 2.11.10 2.11.9 2.11.7 2.11.8 2.11.6 2.11.5 2.11.4 2.11.3 2.11.1 2.11.2 2.11.0 2.10.5 2.10.4 2.10.3 2.10.2 2.10.1 2.10.0 2.9.9 2.9.8 2.9.6 2.9.7 2.9.5 All 88 releases
← All changes | includes/class-https-enforcer.php +5 -25 2.9.62.11.8 View file →
@@ -77,10 +77,13 @@
77 77 add_filter( 'wp_get_attachment_url', array( $this, 'fix_url_scheme' ), 10, 1 );
78 78 add_filter( 'the_content', array( $this, 'fix_content_urls' ), 999 );
79 79 add_filter( 'widget_text', array( $this, 'fix_content_urls' ), 999 );
80 80
81 - // The rewriters above only cover same-domain URLs; external
82 - // http:// references need the browser-side CSP directive.
81 + }
82 +
83 + // Its own setting since 2.9.8: the rewriters above are same-domain and
84 + // harmless, this one governs everybody else's resources too.
85 + if ( ! empty( $this->options['upgrade_insecure_requests'] ) ) {
83 86 add_action( 'send_headers', array( $this, 'emit_upgrade_insecure_requests' ) );
84 87 }
85 88 }
86 89
@@ -306,31 +309,8 @@
306 309 return $content;
307 310 }
308 311
309 312 return $this->replace_http_with_https( $content );
310 - }
311 -
312 - /**
313 - * Update WordPress site URLs to HTTPS
314 - *
315 - * @return bool
316 - */
317 - public function update_site_urls() {
318 - $siteurl = get_option( 'siteurl' );
319 - $home = get_option( 'home' );
320 - $updated = false;
321 -
322 - if ( strpos( $siteurl, 'http://' ) === 0 ) {
323 - update_option( 'siteurl', str_replace( 'http://', 'https://', $siteurl ) );
324 - $updated = true;
325 - }
326 -
327 - if ( strpos( $home, 'http://' ) === 0 ) {
328 - update_option( 'home', str_replace( 'http://', 'https://', $home ) );
329 - $updated = true;
330 - }
331 -
332 - return $updated;
333 313 }
334 314
335 315 /**
336 316 * Check if site is properly configured for HTTPS