| @@ -57,8 +57,24 @@ | ||
| 57 | 57 | } else { |
| 58 | 58 | vigilante_uninstall_site(); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | + /* | |
| 62 | + * Network options. Since 2.11.3 the baseline of the critical files lives in | |
| 63 | + * a single network option, because both files it watches, wp-config.php and | |
| 64 | + * the root .htaccess, belong to the installation and not to any one site. | |
| 65 | + * It is stored redacted, but it is still a copy of the configuration and it | |
| 66 | + * goes when the plugin goes. Once, not per site. | |
| 67 | + */ | |
| 68 | + if ( is_multisite() ) { | |
| 69 | + delete_site_option( 'vigilante_critical_files_baseline' ); | |
| 70 | + delete_site_option( 'vigilante_baseline_sweep' ); | |
| 71 | + delete_site_option( 'vigilante_owned_blocks' ); | |
| 72 | + delete_site_option( 'vigilante_owned_blocks_claim' ); | |
| 73 | + delete_site_option( 'vigilante_config_copies_sweep' ); | |
| 74 | + delete_site_option( 'vigilante_results_sweep' ); | |
| 75 | + } | |
| 76 | + | |
| 61 | 77 | // Remove backup directory. WP_CONTENT_DIR is shared by the whole network, |
| 62 | 78 | // so this happens once. |
| 63 | 79 | $backup_dir = WP_CONTENT_DIR . '/vigilante-backups/'; |
| 64 | 80 | if ( is_dir( $backup_dir ) ) { |
| @@ -142,8 +158,12 @@ | ||
| 142 | 158 | // Delete options |
| 143 | 159 | $options_to_delete = array( |
| 144 | 160 | 'vigilante_options', |
| 145 | 161 | 'vigilante_db_version', |
| 162 | + 'vigilante_purge_2_11_0_done', | |
| 163 | + 'vigilante_baseline_redaction', | |
| 164 | + 'vigilante_owned_blocks', | |
| 165 | + 'vigilante_owned_blocks_claim', | |
| 146 | 166 | 'vigilante_backup_timestamp', |
| 147 | 167 | 'vigilante_last_integrity_scan', |
| 148 | 168 | 'vigilante_last_integrity_results', |
| 149 | 169 | 'vigilante_ignored_files', |
| @@ -167,8 +187,11 @@ | ||
| 167 | 187 | // authentication salts, so leaving it behind would keep them readable in |
| 168 | 188 | // the options table long after the plugin is gone. |
| 169 | 189 | 'vigilante_htaccess_backup', |
| 170 | 190 | 'vigilante_wpconfig_backup', |
| 191 | + 'vigilante_config_copies_purged', | |
| 192 | + 'vigilante_config_copies_sweep_lock', | |
| 193 | + 'vigilante_htaccess_write_lock', | |
| 171 | 194 | 'vigilante_plugin_status_state', |
| 172 | 195 | 'vigilante_plugin_status_last_check', |
| 173 | 196 | 'vigilante_ignored_closed_plugins', |
| 174 | 197 | ); |
| @@ -234,8 +257,13 @@ | ||
| 234 | 257 | OR option_name LIKE 'vigilante_backup_info\_%' |
| 235 | 258 | OR option_name IN ( |
| 236 | 259 | 'vigilante_options', |
| 237 | 260 | 'vigilante_db_version', |
| 261 | + 'vigilante_purge_2_11_0_done', | |
| 262 | + 'vigilante_baseline_redaction', | |
| 263 | + 'vigilante_critical_files_baseline', | |
| 264 | + 'vigilante_owned_blocks', | |
| 265 | + 'vigilante_owned_blocks_claim', | |
| 238 | 266 | 'vigilante_ignored_closed_plugins', |
| 239 | 267 | 'vigilante_ignored_files', |
| 240 | 268 | 'vigilante_dismissed_notices', |
| 241 | 269 | 'vigilante_under_attack_mode', |