← All changes
|
src/model/notification/class-firewall-notification.php
+7
-7
6.2.4
→
6.3.0
View file →
| @@ -277,10 +277,10 @@ | ||
| 277 | 277 | 'defender-security' |
| 278 | 278 | ); |
| 279 | 279 | $text = sprintf( |
| 280 | 280 | $text, |
| 281 | - '<strong>' . $model->ip . '</strong>', | |
| 282 | - '<a href="' . $network_site_url . '">' . $network_site_url . '</a>', | |
| 281 | + '<strong>' . esc_html( $model->ip ) . '</strong>', | |
| 282 | + '<a href="' . esc_url( $network_site_url ) . '">' . esc_html( $network_site_url ) . '</a>', | |
| 283 | 283 | '<strong>' . $attempt_limit . '</strong>', |
| 284 | 284 | $type, |
| 285 | 285 | $this->get_lockout_duration_text( $settings->lockout_type, $time_limit ) |
| 286 | 286 | ); |
| @@ -305,10 +305,10 @@ | ||
| 305 | 305 | $subject = wp_specialchars_decode( $subject, ENT_QUOTES ); |
| 306 | 306 | $text = sprintf( |
| 307 | 307 | /* translators: 1: User agent, 2: Site URL */ |
| 308 | 308 | __( 'The %1$s has been locked out of %2$s.', 'defender-security' ), |
| 309 | - '<strong>' . $model->user_agent . '</strong>', | |
| 310 | - '<a href="' . $network_site_url . '">' . $network_site_url . '</a>', | |
| 309 | + '<strong>' . esc_html( $model->user_agent ) . '</strong>', | |
| 310 | + '<a href="' . esc_url( $network_site_url ) . '">' . esc_html( $network_site_url ) . '</a>' | |
| 311 | 311 | ); |
| 312 | 312 | |
| 313 | 313 | return compact( 'subject', 'text' ); |
| 314 | 314 | } |
| @@ -332,12 +332,12 @@ | ||
| 332 | 332 | 'defender-security' |
| 333 | 333 | ); |
| 334 | 334 | $text = sprintf( |
| 335 | 335 | $text, |
| 336 | - '<strong>' . $model->ip . '</strong>', | |
| 337 | - '<a href="' . $network_site_url . '">' . $network_site_url . '</a>', | |
| 336 | + '<strong>' . esc_html( $model->ip ) . '</strong>', | |
| 337 | + '<a href="' . esc_url( $network_site_url ) . '">' . esc_html( $network_site_url ) . '</a>', | |
| 338 | 338 | '<strong>' . $settings->attempt . '</strong>', |
| 339 | - '<strong>' . $model->tried . '</strong>', | |
| 339 | + '<strong>' . esc_html( $model->tried ) . '</strong>', | |
| 340 | 340 | $this->get_lockout_duration_text( $settings->lockout_type, $settings->duration . ' ' . $settings->duration_unit ) |
| 341 | 341 | ); |
| 342 | 342 | |
| 343 | 343 | return compact( 'subject', 'text' ); |