PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / trunk
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript vtrunk
4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.0.30 4.0.29 4.0.28 4.0.27 4.0.26 4.0.24 4.0.25 4.0.23 4.0.22 4.0.21 4.0.19 4.0.18 4.0.17 4.0.16 1.9.3 1.9.4 1.9.5 1.9.6 All 170 releases
← All changes | inc/queue/class-berqHeartbeat.php +2 -2 4.0.17trunk View file →
@@ -69,9 +69,9 @@
69 69
70 70 ?>
71 71 <script id="bwp-heartbeat">
72 72 (function() {
73 - var config = <?php echo json_encode($config); ?>;
73 + var config = <?php echo wp_json_encode($config); ?>;
74 74 var active = true;
75 75 var failures = 0;
76 76 var maxFailures = 3;
77 77 var beatCount = 0;
@@ -491,9 +491,9 @@
491 491
492 492 private function get_current_url(): string
493 493 {
494 494 $protocol = is_ssl() ? 'https://' : 'http://';
495 - return $protocol . $_SERVER['HTTP_HOST'] . strtok($_SERVER['REQUEST_URI'], '?');
495 + return $protocol . sanitize_text_field(wp_unslash($_SERVER['HTTP_HOST'] ?? '')) . strtok(sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'] ?? '/')), '?');
496 496 }
497 497 }
498 498
499 499 // add_action('init', fn() => new berqHeartbeat());