PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
← All changes | src/model/setting/class-security-headers.php +16 -24 5.5.1 → 6.3.0 View file →
@@ -243,34 +243,26 @@
243 243 *
244 244 * @return void
245 245 */
246 246 protected function after_validate(): void {
247 - if ( true === $this->sh_xframe
248 - && ( empty( $this->sh_xframe_mode )
249 - || ! in_array( $this->sh_xframe_mode, array( 'sameorigin', 'deny' ), true ) )
250 - ) {
247 + if ( true === $this->sh_xframe && ! in_array( $this->sh_xframe_mode, array( 'sameorigin', 'deny' ), true ) ) {
251 248 $this->errors[] = esc_html__( 'X-Frame-Options mode is invalid', 'defender-security' );
252 - } elseif ( true === $this->sh_xss_protection
253 - && ( empty( $this->sh_xss_protection_mode )
254 - || ! in_array( $this->sh_xss_protection_mode, array( 'sanitize', 'block', 'none' ), true ) )
255 - ) {
249 + } elseif ( true === $this->sh_xss_protection && ! in_array( $this->sh_xss_protection_mode, array( 'sanitize', 'block', 'none' ), true ) ) {
256 250 $this->errors[] = esc_html__( 'X-XSS-Protection mode is invalid', 'defender-security' );
257 251 } elseif ( true === $this->sh_referrer_policy
258 - && ( empty( $this->sh_referrer_policy_mode )
259 - || ! in_array(
260 - $this->sh_referrer_policy_mode,
261 - array(
262 - 'no-referrer',
263 - 'no-referrer-when-downgrade',
264 - 'origin',
265 - 'origin-when-cross-origin',
266 - 'same-origin',
267 - 'strict-origin',
268 - 'strict-origin-when-cross-origin',
269 - 'unsafe-url',
270 - ),
271 - true
272 - )
252 + && ! in_array(
253 + $this->sh_referrer_policy_mode,
254 + array(
255 + 'no-referrer',
256 + 'no-referrer-when-downgrade',
257 + 'origin',
258 + 'origin-when-cross-origin',
259 + 'same-origin',
260 + 'strict-origin',
261 + 'strict-origin-when-cross-origin',
262 + 'unsafe-url',
263 + ),
264 + true
273 265 )
274 266 ) {
275 267 $this->errors[] = esc_html__( 'Referrer Policy mode is invalid', 'defender-security' );
276 268 }
@@ -365,7 +357,7 @@
365 357 *
366 358 * @return string
367 359 */
368 360 public static function get_module_name(): string {
369 - return esc_html__( 'Security Headers', 'defender-security' );
361 + return esc_html__( 'Security Policy', 'defender-security' );
370 362 }
371 363 }