PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.2
6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 All 155 releases
← All changes | pages/page-mainwp-security-issues.php +136 -208 5.1 → 6.2.2 View file →
@@ -8,8 +8,13 @@
8 8 */
9 9
10 10 namespace MainWP\Dashboard;
11 11
12 +// Exit if accessed directly.
13 +if ( ! defined( 'ABSPATH' ) ) {
14 + exit;
15 +}
16 +
12 17 /**
13 18 * Class MainWP_Security_Issues
14 19 *
15 20 * Detect, display & fix known Security Issues.
@@ -45,276 +50,222 @@
45 50
46 51 if ( ! MainWP_System_Utility::can_edit_website( $website ) ) {
47 52 return;
48 53 }
49 - $unset_scripts = apply_filters( 'mainwp_unset_security_scripts_stylesheets', true );
50 54 ?>
51 - <table class="ui table" id="mainwp-security-issues-table" un-set="<?php echo $unset_scripts ? 'versions,registered_versions' : ''; ?>">
55 + <table class="ui table" id="mainwp-security-issues-table">
52 56 <thead>
53 57 <tr>
54 - <th scope="col" class="collapsing"><?php esc_html_e( 'Status', 'mainwp' ); ?></th>
55 - <th scope="col" ><?php esc_html_e( 'Detected Issues', 'mainwp' ); ?></th>
56 - <th scope="col" class="collapsing"><?php esc_html_e( '', 'mainwp' ); ?></th>
58 + <th scope="col" class="center aligned collapsing"></th>
59 + <th scope="col"><?php esc_html_e( 'Site Hardening Checks', 'mainwp' ); ?></th>
60 + <th scope="col" class="collapsing"></th>
57 61 </tr>
58 62 </thead>
59 63 <tbody>
60 64 <tr>
61 65 <td>
62 - <span id="listing_loading"><i class="notched circle big loading icon"></i></span>
63 - <span id="listing_ok" style="display: none;"><i class="big check circle green icon"></i></span>
64 - <span id="listing_nok" style="display: none;"><i class="big times circle red icon"></i></span>
66 + <span id="wp_uptodate_loading"><i class="notched circle big loading icon"></i></span>
67 + <span id="wp_uptodate_ok" style="display: none;"><span class="ui small green label"><?php esc_html_e( 'Good', 'mainwp' ); ?></span></span>
68 + <span id="wp_uptodate_nok" style="display: none;"><span class="ui small red label"><?php esc_html_e( 'Bad', 'mainwp' ); ?></span></span>
65 69 </td>
66 70 <td>
67 - <strong id="listing-status-nok"><?php esc_html_e( '/wp-content/, /wp-content/plugins/, /wp-content/themes/ and /wp-content/uploads/ directories listing has not been prevented', 'mainwp' ); ?></strong>
68 - <strong id="listing-status-ok" style="display: none;"><?php esc_html_e( '/wp-content/, /wp-content/plugins/, /wp-content/themes/ and /wp-content/uploads/ directories listing has been prevented', 'mainwp' ); ?></strong>
69 - <br />
70 - <em><?php esc_html_e( 'After fixing this issue, an empty index.php will be inserted in these directories to prevent listing.', 'mainwp' ); ?></em>
71 + <div class="ui small header">
72 + <?php esc_html_e( 'WordPress Version', 'mainwp' ); ?>
73 + <div class="sub header">
74 + <div id="wp_uptodate-status-nok" style="display: none;"><?php esc_html_e( 'WordPress is not up to date.', 'mainwp' ); ?></div>
75 + <div id="wp_uptodate-status-ok" style="display: none;"><?php esc_html_e( 'WordPress is up to date.', 'mainwp' ); ?></div>
76 + </div>
77 + </div>
71 78 </td>
72 79 <td>
73 - <span id="listing_fix" style="display: none"><a href="#" class="ui mini green fluid button"><?php esc_html_e( 'Fix', 'mainwp' ); ?></a></span>
80 + <span id="wp_uptodate_fix" style="display: none"><a href="#" onClick="updatesoverview_global_upgrade_all('wp', <?php echo intval( $website->id ); ?>); return false;" class="ui mini green fluid button" data-inverted="" data-position="left center" data-tooltip="<?php esc_attr_e( 'Click here to update the WordPress core on the site.', 'mainwp' ); ?>"><?php esc_html_e( 'Update WordPress', 'mainwp' ); ?></a></span>
74 81 </td>
75 82 </tr>
83 +
76 84 <tr>
77 85 <td>
78 - <span id="wp_version_loading"><i class="notched circle big loading icon"></i></span>
79 - <span id="wp_version_ok" style="display: none;"><i class="big check circle green icon"></i></span>
80 - <span id="wp_version_nok" style="display: none;"><i class="big times circle red icon"></i></span>
86 + <span id="phpversion_matched_loading"><i class="notched circle big loading icon"></i></span>
87 + <span id="phpversion_matched_ok" style="display: none;"><span class="ui small green label"><?php esc_html_e( 'Good', 'mainwp' ); ?></span></span>
88 + <span id="phpversion_matched_nok" style="display: none;"><span class="ui small red label"><?php esc_html_e( 'Bad', 'mainwp' ); ?></span></span>
81 89 </td>
82 90 <td>
83 - <strong id="wp_version-status-nok"><?php esc_html_e( 'WordPress version has not been hidden', 'mainwp' ); ?></strong>
84 - <strong id="wp_version-status-ok" style="display: none;"><?php esc_html_e( 'WordPress version has been hidden', 'mainwp' ); ?></strong>
85 - <br />
86 - <em><?php esc_html_e( 'After fixing this issue, WordPress generator meta tag will be removed from the head sections of the Child Site', 'mainwp' ); ?></em>
91 + <div class="ui small header">
92 + <?php esc_html_e( 'PHP Version', 'mainwp' ); ?>
93 + <div class="sub header">
94 + <div id="phpversion_matched-status-nok" style="display: none;"><?php esc_html_e( 'PHP version older than 8.0 reached end of development and no longer receive security updates.', 'mainwp' ); ?></div>
95 + <div id="phpversion_matched-status-ok" style="display: none;"><?php esc_html_e( 'PHP version is up to date.', 'mainwp' ); ?></div>
96 + </div>
97 + </div>
87 98 </td>
88 - <td>
89 - <span id="wp_version_fix" style="display: none"><a href="#" class="ui mini green fluid button"><?php esc_html_e( 'Fix', 'mainwp' ); ?></a></span>
90 - <span id="wp_version_unfix" style="display: none"><a href="#" class="ui mini fluid button"><?php esc_html_e( 'Unfix', 'mainwp' ); ?></a></span>
91 - </td>
99 + <td></td>
92 100 </tr>
101 +
93 102 <tr>
94 103 <td>
95 - <span id="rsd_loading"><i class="notched circle big loading icon"></i></span>
96 - <span id="rsd_ok" style="display: none;"><i class="big check circle green icon"></i></span>
97 - <span id="rsd_nok" style="display: none;"><i class="big times circle red icon"></i></span>
104 + <span id="php_reporting_loading"><i class="notched circle big loading icon"></i></span>
105 + <span id="php_reporting_ok" style="display: none;"><span class="ui small green label"><?php esc_html_e( 'Good', 'mainwp' ); ?></span></span>
106 + <span id="php_reporting_nok" style="display: none;"><span class="ui small red label"><?php esc_html_e( 'Bad', 'mainwp' ); ?></span></span>
98 107 </td>
99 108 <td>
100 - <strong id="rsd-status-nok"><?php esc_html_e( 'Really Simple Discovery meta tag has not been removed from front-end', 'mainwp' ); ?></strong>
101 - <strong id="rsd-status-ok" style="display: none;"><?php esc_html_e( 'Really Simple Discovery meta tag has been removed from front-end', 'mainwp' ); ?></strong>
102 - <br />
103 - <em><?php esc_html_e( 'After fixing this issue, RSD meta tag will be removed from head sections of the Child Site', 'mainwp' ); ?></em>
109 + <div class="ui small header">
110 + <?php esc_html_e( 'PHP Error Reporting', 'mainwp' ); ?>
111 + <div class="sub header">
112 + <div id="php_reporting-status-nok" style="display: none;"><?php esc_html_e( 'PHP Error reporting is not disabled. Error messages can reveal sensitive details.', 'mainwp' ); ?></div>
113 + <div id="php_reporting-status-ok" style="display: none;"><?php esc_html_e( 'PHP Error reporting is disabled.', 'mainwp' ); ?></div>
114 + </div>
115 + </div>
104 116 </td>
105 117 <td>
106 - <span id="rsd_fix" style="display: none"><a href="#" class="ui mini green fluid button"><?php esc_html_e( 'Fix', 'mainwp' ); ?></a></span>
107 - <span id="rsd_unfix" style="display: none"><a href="#" class="ui mini fluid button"><?php esc_html_e( 'Unfix', 'mainwp' ); ?></a></span>
118 + <span id="php_reporting_fix" style="display: none"><a href="#" class="ui mini fluid green button"> <?php esc_html_e( 'Disable PHP Error Reporting', 'mainwp' ); ?></a></span>
119 + <span id="php_reporting_unfix" style="display: none"><a href="#" class="ui mini fluid button"><?php esc_html_e( 'Reenable PHP Error Reporting', 'mainwp' ); ?></a></span>
108 120 </td>
109 121 </tr>
122 +
110 123 <tr>
111 124 <td>
112 - <span id="wlw_loading"><i class="notched circle big loading icon"></i></span>
113 - <span id="wlw_ok" style="display: none;"><i class="big check circle green icon"></i></span>
114 - <span id="wlw_nok" style="display: none;"><i class="big times circle red icon"></i></span>
115 - </td>
116 - <td>
117 - <strong id="wlw-status-nok"><?php esc_html_e( 'Windows Live Writer meta tag has not been removed from front-end', 'mainwp' ); ?></strong>
118 - <strong id="wlw-status-ok" style="display: none;"><?php esc_html_e( 'Windows Live Writer meta tag has been removed from front-end', 'mainwp' ); ?></strong>
119 - <br />
120 - <em><?php esc_html_e( 'After fixing this issue, WLW meta tag will be removed from head sections of the Child Site', 'mainwp' ); ?></em>
121 - </td>
122 - <td>
123 - <span id="wlw_fix" style="display: none"><a href="#" class="ui mini fluid green button"> <?php esc_html_e( 'Fix', 'mainwp' ); ?></a></span>
124 - <span id="wlw_unfix" style="display: none"><a href="#" class="ui mini fluid button"><?php esc_html_e( 'Unfix', 'mainwp' ); ?></a></span>
125 - </td>
126 - </tr>
127 - <tr>
128 - <td>
129 125 <span id="db_reporting_loading"><i class="notched circle big loading icon"></i></span>
130 - <span id="db_reporting_ok" style="display: none;"><i class="big check circle green icon"></i></span>
131 - <span id="db_reporting_nok" style="display: none;"><i class="big times circle red icon"></i></span>
126 + <span id="db_reporting_ok" style="display: none;"><span class="ui small green label"><?php esc_html_e( 'Good', 'mainwp' ); ?></span></span>
127 + <span id="db_reporting_nok" style="display: none;"><span class="ui small red label"><?php esc_html_e( 'Bad', 'mainwp' ); ?></span></span>
132 128 </td>
133 129 <td>
134 - <strong id="db_reporting-status-nok"><?php esc_html_e( 'Database error reporting has not been disabled', 'mainwp' ); ?></strong>
135 - <strong id="db_reporting-status-ok" style="display: none;"><?php esc_html_e( 'Database error reporting has been disabled', 'mainwp' ); ?></strong>
136 - <br />
137 - <em><?php esc_html_e( 'After fixing this issue, database error reporting will be disabled', 'mainwp' ); ?></em>
130 + <div class="ui small header">
131 + <?php esc_html_e( 'Database Error Reporting', 'mainwp' ); ?>
132 + <div class="sub header">
133 + <div id="db_reporting-status-nok" style="display: none;"><?php esc_html_e( 'Database Error reporting is not disabled. Error messages can reveal sensitive details.', 'mainwp' ); ?></div>
134 + <div id="db_reporting-status-ok" style="display: none;"><?php esc_html_e( 'Database Error reporting is disabled.', 'mainwp' ); ?></div>
135 + </div>
136 + </div>
138 137 </td>
139 138 <td>
140 - <span id="db_reporting_fix" style="display: none"><a href="#" class="ui mini fluid green button"><?php esc_html_e( 'Fix', 'mainwp' ); ?></a></span>
141 - <span id="db_reporting_unfix" style="display: none"><a href="#" class="ui mini fluid button"><?php esc_html_e( 'Unfix', 'mainwp' ); ?></a></span>
139 + <span id="db_reporting_fix" style="display: none"><a href="#" class="ui mini fluid green button"><?php esc_html_e( 'Disable DB Error Reporting', 'mainwp' ); ?></a></span>
140 + <span id="db_reporting_unfix" style="display: none"><a href="#" class="ui mini fluid button"><?php esc_html_e( 'Reenable DB Error Reporting', 'mainwp' ); ?></a></span>
142 141 </td>
143 142 </tr>
143 +
144 144 <tr>
145 145 <td>
146 - <span id="php_reporting_loading"><i class="notched circle big loading icon"></i></span>
147 - <span id="php_reporting_ok" style="display: none;"><i class="big check circle green icon"></i></span>
148 - <span id="php_reporting_nok" style="display: none;"><i class="big times circle red icon"></i></span>
146 + <span id="sslprotocol_loading"><i class="notched circle big loading icon"></i></span>
147 + <span id="sslprotocol_ok" style="display: none;"><span class="ui small green label"><?php esc_html_e( 'Good', 'mainwp' ); ?></span></span>
148 + <span id="sslprotocol_nok" style="display: none;"><span class="ui small red label"><?php esc_html_e( 'Bad', 'mainwp' ); ?></span></span>
149 149 </td>
150 150 <td>
151 - <strong id="php_reporting-status-nok"><?php esc_html_e( 'PHP error reporting has not been disabled', 'mainwp' ); ?></strong>
152 - <strong id="php_reporting-status-ok" style="display: none;"><?php esc_html_e( 'PHP error reporting has been disabled', 'mainwp' ); ?></strong>
153 - <br />
154 - <em><?php esc_html_e( 'After fixing this issue, PHP error reporting will be disabled', 'mainwp' ); ?></em>
151 + <div class="ui small header">
152 + <?php esc_html_e( 'SSL Protocol', 'mainwp' ); ?>
153 + <div class="sub header">
154 + <div id="sslprotocol-status-nok" style="display: none;"><?php esc_html_e( 'SSL Protocol is not in place.', 'mainwp' ); ?></div>
155 + <div id="sslprotocol-status-ok" style="display: none;"><?php esc_html_e( 'SSL Protocol is in place.', 'mainwp' ); ?></div>
156 + </div>
157 + </div>
155 158 </td>
156 - <td>
157 - <span id="php_reporting_fix" style="display: none"><a href="#" class="ui mini fluid green button"> <?php esc_html_e( 'Fix', 'mainwp' ); ?></a></span>
158 - <span id="php_reporting_unfix" style="display: none"><a href="#" class="ui mini fluid button"><?php esc_html_e( 'Unfix', 'mainwp' ); ?></a></span>
159 - </td>
159 + <td></td>
160 160 </tr>
161 - <?php if ( ! $unset_scripts ) { ?>
161 +
162 162 <tr>
163 163 <td>
164 - <span id="versions_loading"><i class="notched circle big loading icon"></i></span>
165 - <span id="versions_ok" style="display: none;"><i class="big check circle green icon"></i></span>
166 - <span id="versions_nok" style="display: none;"><i class="big times circle red icon"></i></span>
164 + <span id="debug_disabled_loading"><i class="notched circle big loading icon"></i></span>
165 + <span id="debug_disabled_ok" style="display: none;"><span class="ui small green label"><?php esc_html_e( 'Good', 'mainwp' ); ?></span></span>
166 + <span id="debug_disabled_nok" style="display: none;"><span class="ui small red label"><?php esc_html_e( 'Bad', 'mainwp' ); ?></span></span>
167 167 </td>
168 168 <td>
169 - <strong id="versions-status-nok"><?php esc_html_e( 'Scripts and Stylesheets version information has not been removed from URLs', 'mainwp' ); ?></strong>
170 - <strong id="versions-status-ok" style="display: none;"><?php esc_html_e( 'Scripts and Stylesheets version information has been removed from URLs', 'mainwp' ); ?></strong>
171 - <br />
172 - <em><?php esc_html_e( 'After fixing this issue, versions will be removed', 'mainwp' ); ?></em>
169 + <div class="ui small header">
170 + <?php esc_html_e( 'Debug Mode', 'mainwp' ); ?>
171 + <div class="sub header">
172 + <div id="debug_disabled-status-nok" style="display: none;"><?php esc_html_e( 'WP Debug mode is not disabled. Error messages can reveal sensitive details.', 'mainwp' ); ?></div>
173 + <div id="debug_disabled-status-ok" style="display: none;"><?php esc_html_e( 'WP Debug mode is disabled.', 'mainwp' ); ?></div>
174 + </div>
175 + </div>
173 176 </td>
174 - <td>
175 - <span id="versions_fix" style="display: none"><a href="#" class="ui mini green fluid button"><?php esc_html_e( 'Fix', 'mainwp' ); ?></a></span>
176 - <span id="versions_unfix" style="display: none"><a href="#" class="ui mini fluid button"><?php esc_html_e( 'Unfix', 'mainwp' ); ?></a></span>
177 - </td>
177 + <td></td>
178 178 </tr>
179 +
179 180 <tr>
180 181 <td>
181 - <span id="registered_versions_loading"><i class="notched circle big loading icon"></i></span>
182 - <span id="registered_versions_ok" style="display: none;"><i class="big check circle green icon"></i></span>
183 - <span id="registered_versions_nok" style="display: none;"><i class="big times circle red icon"></i></span>
182 + <span id="sec_outdated_plugins_loading"><i class="notched circle big loading icon"></i></span>
183 + <span id="sec_outdated_plugins_ok" style="display: none;"><span class="ui small green label"><?php esc_html_e( 'Good', 'mainwp' ); ?></span></span>
184 + <span id="sec_outdated_plugins_nok" style="display: none;"><span class="ui small red label"><?php esc_html_e( 'Bad', 'mainwp' ); ?></span></span>
184 185 </td>
185 186 <td>
186 - <strong id="registered_versions-status-nok"><?php esc_html_e( 'Scripts and Stylesheets registered version information has not been removed from URLs', 'mainwp' ); ?></strong>
187 - <strong id="registered_versions-status-ok" style="display: none;"><?php esc_html_e( 'Scripts and Stylesheets registered version information has been removed from URLs', 'mainwp' ); ?></strong>
188 - <br />
189 - <em><?php esc_html_e( 'After fixing this issue, registered versions will be removed', 'mainwp' ); ?></em>
187 + <div class="ui small header">
188 + <?php esc_html_e( 'Outdated Plugins', 'mainwp' ); ?>
189 + <div class="sub header">
190 + <div id="sec_outdated_plugins-status-nok" style="display: none;"><?php esc_html_e( 'Plugins are not up to date. Outdated plugins can contain known vulnerabilities that attackers may exploit.', 'mainwp' ); ?></div>
191 + <div id="sec_outdated_plugins-status-ok" style="display: none;"><?php esc_html_e( 'Plugins are up to date.', 'mainwp' ); ?></div>
192 + </div>
193 + </div>
190 194 </td>
191 195 <td>
192 - <span id="registered_versions_fix" style="display: none"><a href="#" class="ui mini fluid green button"><?php esc_html_e( 'Fix', 'mainwp' ); ?></a></span>
193 - <span id="registered_versions_unfix" style="display: none"><a href="#" class="ui mini fluid button"><?php esc_html_e( 'Unfix', 'mainwp' ); ?></a></span>
196 + <span id="sec_outdated_plugins_fix" style="display: none"><a href="admin.php?page=managesites&updateid=<?php echo intval( $website->id ); ?>" class="ui mini basic button"><?php esc_html_e( 'Manage Updates', 'mainwp' ); ?></a></span>
194 197 </td>
195 198 </tr>
196 - <?php } ?>
197 - <?php
198 - $is_wpengine = false;
199 - if ( property_exists( $website, 'wpe' ) && 1 === (int) $website->wpe ) {
200 - $is_wpengine = true;
201 - }
202 - ?>
199 +
203 200 <tr>
204 201 <td>
205 - <span id="readme_loading"><i class="notched circle big loading icon"></i></span>
206 - <span id="readme_ok" style="display: none;"><i class="big check circle green icon"></i></span>
207 - <span id="readme_nok" style="display: none;"><i class="big times circle red icon"></i></span>
202 + <span id="sec_inactive_plugins_loading"><i class="notched circle big loading icon"></i></span>
203 + <span id="sec_inactive_plugins_ok" style="display: none;"><span class="ui small green label"><?php esc_html_e( 'Good', 'mainwp' ); ?></span></span>
204 + <span id="sec_inactive_plugins_nok" style="display: none;"><span class="ui small red label"><?php esc_html_e( 'Bad', 'mainwp' ); ?></span></span>
208 205 </td>
209 206 <td>
210 - <strong id="readme-status-nok"><?php esc_html_e( 'readme.html file has not been removed from WordPress root', 'mainwp' ); ?></strong>
211 - <strong id="readme-status-ok" style="display: none;"><?php esc_html_e( 'readme.html file has been removed from WordPress root', 'mainwp' ); ?></strong>
212 - <br />
213 - <em><?php esc_html_e( 'After fixing this issue, the readme.html file will be removed from the Child Site root directory', 'mainwp' ); ?></em>
214 - <?php if ( $is_wpengine ) { ?>
215 - <strong id="readme-wpe-nok"><?php esc_html_e( 'Removing the file on WPEngine hosting can cause issues. If you need to remove the file, please consult the WPEngine support first.', 'mainwp' ); ?></strong>
216 - <?php } ?>
207 + <div class="ui small header">
208 + <?php esc_html_e( 'Inactive Plugins', 'mainwp' ); ?>
209 + <div class="sub header">
210 + <div id="sec_inactive_plugins-status-nok" style="display: none;"><?php esc_html_e( 'Inactive plugins detected. Removing unused plugins minimizes the risk of hidden vulnerabilities that could be exploited.', 'mainwp' ); ?></div>
211 + <div id="sec_inactive_plugins-status-ok" style="display: none;"><?php esc_html_e( 'No inactive plugins.', 'mainwp' ); ?></div>
212 + </div>
213 + </div>
217 214 </td>
218 215 <td>
219 - <?php if ( ! $is_wpengine ) { ?>
220 - <span id="readme_fix" style="display: none"><a href="#" class="ui mini green fluid button"><?php esc_html_e( 'Fix', 'mainwp' ); ?></a></span>
221 - <?php esc_html_e( 'You need to re-upload the readme.html file manually to unfix this.', 'mainwp' ); ?></span>
222 - <?php } else { ?>
223 - <span><a href="javascript:void(0)" class="ui mini fluid button"><?php esc_html_e( 'Fix', 'mainwp' ); ?></a>
224 - <?php } ?>
216 + <span id="sec_inactive_plugins_fix" style="display: none"><a href="admin.php?page=PluginsManage" class="ui mini basic button"><?php esc_html_e( 'Manage Plugins', 'mainwp' ); ?></a></span>
225 217 </td>
226 218 </tr>
227 - <tr>
228 - <td>
229 - <span id="admin_loading"><i class="notched circle big loading icon"></i></span>
230 - <span id="admin_ok" style="display: none;"><i class="big check circle green icon"></i></span>
231 - <span id="admin_nok" style="display: none;"><i class="big times circle red icon"></i></span>
232 - </td>
233 - <td>
234 - <strong id="admin-status-nok"><?php esc_html_e( 'Administrator username should not be "admin"', 'mainwp' ); ?></strong>
235 - <strong id="admin-status-ok" style="display: none;"><?php esc_html_e( 'Administrator username is not "admin"', 'mainwp' ); ?></strong>
236 - <br />
237 - <em><?php esc_html_e( 'You have to change this yourself. If this user was used as your MainWP Secure Link Admin, you will need to change your Administrator Username in the MainWP Dashboard for the site.', 'mainwp' ); ?></em>
238 - </td>
239 - <td></td>
240 - </tr>
241 219
242 220 <tr>
243 221 <td>
244 - <span id="wp_uptodate_loading"><i class="notched circle big loading icon"></i></span>
245 - <span id="wp_uptodate_ok" style="display: none;"><i class="big check circle green icon"></i></span>
246 - <span id="wp_uptodate_nok" style="display: none;"><i class="big times circle red icon"></i></span>
222 + <span id="sec_outdated_themes_loading"><i class="notched circle big loading icon"></i></span>
223 + <span id="sec_outdated_themes_ok" style="display: none;"><span class="ui small green label"><?php esc_html_e( 'Good', 'mainwp' ); ?></span></span>
224 + <span id="sec_outdated_themes_nok" style="display: none;"><span class="ui small red label"><?php esc_html_e( 'Bad', 'mainwp' ); ?></span></span>
247 225 </td>
248 226 <td>
249 - <strong id="wp_uptodate-status-nok"><?php esc_html_e( 'WordPress is not up to date.', 'mainwp' ); ?></strong>
250 - <strong id="wp_uptodate-status-ok" style="display: none;"><?php esc_html_e( 'WordPress is up to date.', 'mainwp' ); ?></strong>
251 - <br />
252 - <em><?php esc_html_e( 'Checks if WP is up to date. You have to change this yourself.', 'mainwp' ); ?></em>
227 + <div class="ui small header">
228 + <?php esc_html_e( 'Outdated Themes', 'mainwp' ); ?>
229 + <div class="sub header">
230 + <div id="sec_outdated_themes-status-nok" style="display: none;"><?php esc_html_e( 'Themes are not up to date. Outdated themes can contain known vulnerabilities that attackers may exploit.', 'mainwp' ); ?></div>
231 + <div id="sec_outdated_themes-status-ok" style="display: none;"><?php esc_html_e( 'Themes are up to date.', 'mainwp' ); ?></div>
232 + </div>
233 + </div>
253 234 </td>
254 - <td></td>
255 - </tr>
256 - <tr>
257 235 <td>
258 - <span id="phpversion_matched_loading"><i class="notched circle big loading icon"></i></span>
259 - <span id="phpversion_matched_ok" style="display: none;"><i class="big check circle green icon"></i></span>
260 - <span id="phpversion_matched_nok" style="display: none;"><i class="big times circle red icon"></i></span>
236 + <span id="sec_outdated_themes_fix" style="display: none"><a href="admin.php?page=managesites&updateid=<?php echo intval( $website->id ); ?>&tab=themes-updates" class="ui mini basic button"><?php esc_html_e( 'Manage Updates', 'mainwp' ); ?></a></span>
261 237 </td>
262 - <td>
263 - <strong id="phpversion_matched-status-nok"><?php esc_html_e( 'PHP version does not match the WordPress requirement', 'mainwp' ); ?></strong>
264 - <strong id="phpversion_matched-status-ok" style="display: none;"><?php esc_html_e( 'PHP version matches the WordPress requirement', 'mainwp' ); ?></strong>
265 - <br />
266 - <em><?php esc_html_e( 'Checks if PHP version matches the WP requirement. You have to change this yourself.', 'mainwp' ); ?></em>
267 - </td>
268 - <td></td>
269 238 </tr>
270 239
271 240 <tr>
272 241 <td>
273 - <span id="sslprotocol_loading"><i class="notched circle big loading icon"></i></span>
274 - <span id="sslprotocol_ok" style="display: none;"><i class="big check circle green icon"></i></span>
275 - <span id="sslprotocol_nok" style="display: none;"><i class="big times circle red icon"></i></span>
242 + <span id="sec_inactive_themes_loading"><i class="notched circle big loading icon"></i></span>
243 + <span id="sec_inactive_themes_ok" style="display: none;"><span class="ui small green label"><?php esc_html_e( 'Good', 'mainwp' ); ?></span></span>
244 + <span id="sec_inactive_themes_nok" style="display: none;"><span class="ui small red label"><?php esc_html_e( 'Bad', 'mainwp' ); ?></span></span>
276 245 </td>
277 246 <td>
278 - <strong id="sslprotocol-status-nok"><?php esc_html_e( 'SSL protocol is not in place', 'mainwp' ); ?></strong>
279 - <strong id="sslprotocol-status-ok" style="display: none;"><?php esc_html_e( 'SSL protocol is in place', 'mainwp' ); ?></strong>
280 - <br />
281 - <em><?php esc_html_e( 'Checks if SSL protocol is in place. You have to change this yourself.', 'mainwp' ); ?></em>
247 + <div class="ui small header">
248 + <?php esc_html_e( 'Inactive Themes', 'mainwp' ); ?>
249 + <div class="sub header">
250 + <div id="sec_inactive_themes-status-nok" style="display: none;"><?php esc_html_e( 'Inactive themes detected. Removing unused themes minimizes the risk of hidden vulnerabilities that could be exploited.', 'mainwp' ); ?></div>
251 + <div id="sec_inactive_themes-status-ok" style="display: none;"><?php esc_html_e( 'No inactive themes.', 'mainwp' ); ?></div>
252 + </div>
253 + </div>
282 254 </td>
283 - <td></td>
284 - </tr>
285 -
286 - <tr>
287 255 <td>
288 - <span id="debug_disabled_loading"><i class="notched circle big loading icon"></i></span>
289 - <span id="debug_disabled_ok" style="display: none;"><i class="big check circle green icon"></i></span>
290 - <span id="debug_disabled_nok" style="display: none;"><i class="big times circle red icon"></i></span>
256 + <span id="sec_inactive_themes_fix" style="display: none"><a href="admin.php?page=ThemesManage" class="ui mini basic button"><?php esc_html_e( 'Manage Themes', 'mainwp' ); ?></a></span>
291 257 </td>
292 - <td>
293 - <strong id="debug_disabled-status-nok"><?php esc_html_e( 'WP Config debugging is enabled', 'mainwp' ); ?></strong>
294 - <strong id="debug_disabled-status-ok" style="display: none;"><?php esc_html_e( 'WP Config debugging is disabled', 'mainwp' ); ?></strong>
295 - <br />
296 - <em><?php esc_html_e( 'Checks if WP Config debugging is disabled. You have to change this yourself.', 'mainwp' ); ?></em>
297 - </td>
298 - <td></td>
299 258 </tr>
300 259
301 - </tbody>
302 - <?php
303 - $is_demo = MainWP_Demo_Handle::is_demo_mode();
304 - ?>
305 - <tfoot class="full-width">
306 - <tr>
307 - <th scope="col" colspan="3">
308 - <?php if ( ! $is_demo ) : ?>
309 - <input type="button" id="securityIssues_fixAll" class="ui green button right floated" value="<?php esc_html_e( 'Fix All', 'mainwp' ); ?>"/>
310 - <input type="button" id="securityIssues_refresh" class="ui green basic button" value="<?php esc_html_e( 'Refresh', 'mainwp' ); ?>"/>
311 - <input type="hidden" id="securityIssueSite" value="<?php echo intval( $website->id ); ?>"/>
312 - <?php endif; ?>
313 - </th>
314 - </tr>
315 - </tfoot>
260 + </tbody>
316 261 </table>
262 +
263 +
264 + <input type="hidden" id="securityIssueSite" value="<?php echo intval( $website->id ); ?>"/>
265 + <div id="wp_upgrades">
266 + <div updated="-1" site_id="<?php echo intval( $website->id ); ?>" site_name="<?php echo esc_attr( $website->name ); ?>" ></div>
267 + </div>
317 268 <?php
318 269 }
319 270
320 271
@@ -346,9 +297,9 @@
346 297 * Filters the default security checks and enables user to disable certain checks.
347 298 *
348 299 * @param bool false Whether security issues should be filtered.
349 300 * @param object $information Object containing data from che chid site related to security issues.
350 - * Available options: 'listing', 'wp_version', 'rsd', 'wlw', 'db_reporting', 'php_reporting', 'versions', 'registered_versions', 'readme'.
301 + * Available options: 'db_reporting', 'php_reporting'.
351 302 * @param object $website Object containing child site data.
352 303 *
353 304 * @since 4.1
354 305 */
@@ -365,9 +316,8 @@
365 316 * Fix the selected security issue.
366 317 *
367 318 * @uses \MainWP\Dashboard\MainWP_Connect::fetch_url_authed()
368 319 * @uses \MainWP\Dashboard\MainWP_DB::get_website_by_id()
369 - * @uses \MainWP\Dashboard\MainWP_Sync::sync_information_array()
370 320 * @uses \MainWP\Dashboard\MainWP_System_Utility::can_edit_website()
371 321 */
372 322 public static function fix_security_issue() { // phpcs:ignore -- NOSONAR - complex.
373 323 $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : false; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.NonceVerification.Recommended
@@ -384,17 +334,10 @@
384 334 return '';
385 335 }
386 336
387 337 $skip_features = array(
388 - 'listing',
389 - 'wp_version',
390 - 'rsd',
391 - 'wlw',
392 338 'db_reporting',
393 339 'php_reporting',
394 - 'versions',
395 - 'registered_versions',
396 - 'readme',
397 340 'wp_uptodate',
398 341 'phpversion_matched',
399 342 'sslprotocol',
400 343 'debug_disabled',
@@ -406,9 +349,9 @@
406 349 * Filters the default security checks and enables user to disable certain issues from being fixed by using the Fix All button.
407 350 *
408 351 * @param bool false Whether security issues should be filtered.
409 352 * @param object $skip_features Object containing data from che chid site related to security issues.
410 - * Available options: 'listing', 'wp_version', 'rsd', 'wlw', 'db_reporting', 'php_reporting', 'versions', 'registered_versions', 'readme'.
353 + * Available options: 'db_reporting', 'php_reporting'.
411 354 * @param object $website Object containing child site data.
412 355 *
413 356 * @since 4.1
414 357 */
@@ -428,20 +371,11 @@
428 371
429 372 if ( ! in_array( 'versions', $post_data['skip_features'] ) ) {
430 373 $post_data['skip_features'][] = 'versions';
431 374 }
432 -
433 - if ( ! in_array( 'registered_versions', $post_data['skip_features'] ) ) {
434 - $post_data['skip_features'][] = 'registered_versions';
435 - }
436 375 }
437 376
438 377 $information = MainWP_Connect::fetch_url_authed( $website, 'securityFix', $post_data );
439 - if ( isset( $information['sync'] ) && ! empty( $information['sync'] ) ) {
440 - MainWP_Sync::sync_information_array( $website, $information['sync'] );
441 - unset( $information['sync'] );
442 - }
443 -
444 378 return $information;
445 379 }
446 380
447 381 /**
@@ -450,9 +384,8 @@
450 384 * Un-Fix the selected security issue.
451 385 *
452 386 * @uses \MainWP\Dashboard\MainWP_Connect::fetch_url_authed()
453 387 * @uses \MainWP\Dashboard\MainWP_DB::get_website_by_id()
454 - * @uses \MainWP\Dashboard\MainWP_Sync::sync_information_array()
455 388 * @uses \MainWP\Dashboard\MainWP_System_Utility::can_edit_website()
456 389 */
457 390 public static function unfix_security_issue() {
458 391 $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : false; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.NonceVerification.Recommended
@@ -471,12 +404,7 @@
471 404
472 405 $feature = isset( $_REQUEST['feature'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['feature'] ) ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.NonceVerification.Recommended
473 406
474 407 $information = MainWP_Connect::fetch_url_authed( $website, 'securityUnFix', array( 'feature' => $feature ) );
475 - if ( isset( $information['sync'] ) && ! empty( $information['sync'] ) ) {
476 - MainWP_Sync::sync_information_array( $website, $information['sync'] );
477 - unset( $information['sync'] );
478 - }
479 -
480 408 return $information;
481 409 }
482 410 }