← All changes
|
src/component/security-tweaks/class-prevent-php.php
+11
-13
5.7.1
→
6.3.0
View file →
| @@ -71,9 +71,9 @@ | ||
| 71 | 71 | * |
| 72 | 72 | * @return string |
| 73 | 73 | */ |
| 74 | 74 | public function get_label(): string { |
| 75 | - return esc_html__( 'Prevent PHP Execution', 'defender-security' ); | |
| 75 | + return wp_strip_all_tags( __( 'Prevent PHP execution', 'defender-security' ) ); | |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | 79 | * Get the error reason. |
| @@ -80,9 +80,9 @@ | ||
| 80 | 80 | * |
| 81 | 81 | * @return string |
| 82 | 82 | */ |
| 83 | 83 | public function get_error_reason(): string { |
| 84 | - return esc_html__( 'PHP execution is currently allowed in all directories.', 'defender-security' ); | |
| 84 | + return ''; | |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * Return a summary data of this tweak. |
| @@ -92,20 +92,18 @@ | ||
| 92 | 92 | public function to_array(): array { |
| 93 | 93 | return array( |
| 94 | 94 | 'slug' => $this->slug, |
| 95 | 95 | 'title' => $this->get_label(), |
| 96 | - 'errorReason' => $this->get_error_reason(), | |
| 97 | - 'successReason' => esc_html__( 'You\'ve disabled PHP execution, good stuff.', 'defender-security' ), | |
| 96 | + | |
| 97 | + 'successReason' => wp_strip_all_tags( __( "You've disabled PHP execution, good stuff.", 'defender-security' ) ), | |
| 98 | 98 | 'misc' => array( |
| 99 | - 'active_server' => Server::get_current_server(), | |
| 100 | - 'apache_rules' => Server::create( 'apache' )->from( $this->slug )->get_rules_for_instruction(), | |
| 101 | - 'nginx_rules' => Server::create( 'nginx' )->from( $this->slug )->get_rules(), | |
| 102 | - 'wp_content_dir' => WP_CONTENT_DIR, | |
| 99 | + 'active_server' => Server::get_current_server(), | |
| 100 | + 'apache_rules' => Server::create( 'apache' )->from( $this->slug )->get_rules_for_instruction(), | |
| 101 | + 'litespeed_rules' => Server::create( 'litespeed' )->from( $this->slug )->get_litespeed_rules_for_instruction(), | |
| 102 | + 'nginx_rules' => Server::create( 'nginx' )->from( $this->slug )->get_rules(), | |
| 103 | + 'wp_content_dir' => WP_CONTENT_DIR, | |
| 103 | 104 | ), |
| 104 | - 'bulk_description' => esc_html__( | |
| 105 | - 'By default, a plugin/theme vulnerability could allow a PHP file to get uploaded into your site\'s directories and in turn execute harmful scripts that can wreak havoc on your website. We will disable PHP execution for you.', | |
| 106 | - 'defender-security' | |
| 107 | - ), | |
| 108 | - 'bulk_title' => esc_html__( 'PHP Execution', 'defender-security' ), | |
| 105 | + 'bulk_description' => wp_strip_all_tags( __( 'A plugin or theme vulnerability can allow harmful PHP files to run in your site directories. Prevent PHP execution where it isn’t needed to help block malicious files and reduce risk.', 'defender-security' ) ), | |
| 106 | + 'bulk_title' => wp_strip_all_tags( __( 'PHP Execution', 'defender-security' ) ), | |
| 109 | 107 | ); |
| 110 | 108 | } |
| 111 | 109 | } |