PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | admin/notifiers/dismissible-notification.php +8 -3 18.2 → trunk View file →
@@ -89,12 +89,17 @@
89 89 * Retrieves the value where listener is listening for.
90 90 *
91 91 * @codeCoverageIgnore
92 92 *
93 - * @return string The listener value.
93 + * @return string|null The listener value or null if not set.
94 94 */
95 95 protected function get_listener_value() {
96 - return filter_input( INPUT_GET, 'yoast_dismiss' );
96 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: Normally we would need to check for a nonce here but this class is not used anymore.
97 + if ( isset( $_GET['yoast_dismiss'] ) && is_string( $_GET['yoast_dismiss'] ) ) {
98 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: Normally we would need to check for a nonce here but this class is not used anymore.
99 + return sanitize_text_field( wp_unslash( $_GET['yoast_dismiss'] ) );
100 + }
101 + return null;
97 102 }
98 103
99 104 /**
100 105 * Dismisses the notification.
@@ -115,7 +120,7 @@
115 120 * @return void
116 121 */
117 122 protected function redirect_to_dashboard() {
118 123 wp_safe_redirect( admin_url( 'admin.php?page=wpseo_dashboard' ) );
119 - exit;
124 + exit();
120 125 }
121 126 }