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/component/class-malicious-bot.php +1 -13 6.2.0 → 6.3.0 View file →
@@ -233,21 +233,9 @@
233 233 * @param string $uri The URI that was accessed.
234 234 * @param string $scenario The scenario under which the event is logged.
235 235 */
236 236 public function log_event( $ip, $uri, $scenario ) {
237 - $model = new Lockout_Log();
238 - $model->ip = $ip;
239 - $user_agent = defender_get_data_from_request( 'HTTP_USER_AGENT', 's' );
240 - $model->user_agent = isset( $user_agent ) ? User_Agent::fast_cleaning( $user_agent ) : null;
241 - $model->date = time();
242 - $model->tried = $uri;
243 - $model->blog_id = get_current_blog_id();
244 -
245 - $ip_to_country = $this->ip_to_country( $ip );
246 -
247 - if ( isset( $ip_to_country['iso'] ) ) {
248 - $model->country_iso_code = $ip_to_country['iso'];
249 - }
237 + $model = Lockout_Log::create( $ip, $uri );
250 238
251 239 switch ( $scenario ) {
252 240 case self::SCENARIO_MALICIOUS_BOT:
253 241 default: