PluginProbe
Vigilant – 100% Free Security Suite: Firewall, 2FA, Login, Headers, Scanner… / 3.0.0
Vigilant – 100% Free Security Suite: Firewall, 2FA, Login, Headers, Scanner… v3.0.0
3.0.0 2.11.12 2.11.11 2.11.10 2.11.9 2.11.7 2.11.8 2.11.6 2.11.5 2.11.4 2.11.3 2.11.1 2.11.2 2.11.0 2.10.5 2.10.4 2.10.3 2.10.2 2.10.1 2.10.0 2.9.9 2.9.8 2.9.6 2.9.7 2.9.5 All 88 releases
← All changes | includes/class-activator.php +30 -0 2.11.83.0.0 View file →
@@ -106,8 +106,11 @@
106 106
107 107 // Schedule cron events
108 108 self::schedule_events();
109 109
110 + // Capture the self-integrity anchor (A3: manifest fingerprint in DB).
111 + self::anchor_self_integrity( $settings );
112 +
110 113 // Set activation transient for admin notice
111 114 set_transient( 'vigilante_activated', true, 30 );
112 115
113 116 // Store activation time
@@ -120,8 +123,35 @@
120 123 flush_rewrite_rules();
121 124
122 125 // Clean any output that may have been generated
123 126 ob_end_clean();
127 + }
128 +
129 + /**
130 + * Anchor the self-integrity check on activation
131 + *
132 + * The first activation captures the fingerprint of the shipped manifest,
133 + * unless WordPress.org distributes something else for that version, so
134 + * the self-check has a baseline from the very first run. A
135 + * reactivation keeps the anchor it already has and checks against it:
136 + * capturing again adopted whatever manifest the folder held at that
137 + * moment, a regenerated one included, the same reason the critical files
138 + * baseline is not thrown away on reactivation.
139 + *
140 + * @since 3.0.0
141 + *
142 + * @param Vigilante_Settings $settings Settings instance.
143 + * @return void
144 + */
145 + public static function anchor_self_integrity( $settings ) {
146 + if ( ! class_exists( 'Vigilante_Self_Integrity' ) ) {
147 + require_once VIGILANTE_INCLUDES_DIR . 'class-self-integrity.php';
148 + }
149 + // run_check() captures on the first run itself, but only when
150 + // WordPress.org does not contradict the manifest; with an anchor already
151 + // there it checks against it.
152 + $self_integrity = new Vigilante_Self_Integrity( $settings );
153 + $self_integrity->run_check( 'activation' );
124 154 }
125 155
126 156 /**
127 157 * Idempotent migrations for existing installations.