| @@ -92,13 +92,10 @@ | ||
| 92 | 92 | $model->log = esc_html__( 'Locked out due to attempted login with banned user agent', 'defender-security' ); |
| 93 | 93 | break; |
| 94 | 94 | } |
| 95 | 95 | $model->save(); |
| 96 | - // The 'defender_notify' hook doesn't work, so send notify directly. | |
| 97 | - $module = wd_di()->get( Firewall_Notification::class ); | |
| 98 | - if ( $module->check_options( $model ) ) { | |
| 99 | - $module->send( $model ); | |
| 100 | - } | |
| 96 | + // Notify directly because the 'defender_notify' hook isn't registered yet at firewall-time. | |
| 97 | + wd_di()->get( Firewall_Notification::class )->notify_lockout( $model ); | |
| 101 | 98 | } |
| 102 | 99 | |
| 103 | 100 | /** |
| 104 | 101 | * Queue hooks when this class init. |
| @@ -305,8 +302,9 @@ | ||
| 305 | 302 | 'dotbot' => 'DotBot (Moz)', |
| 306 | 303 | 'mj12bot' => 'MJ12Bot (Majestic)', |
| 307 | 304 | 'ahrefsbot' => 'AhrefsBot', |
| 308 | 305 | 'semrushbot' => 'SEMrushBot', |
| 306 | + 'thinkbot' => 'Thinkbot', | |
| 309 | 307 | ), |
| 310 | 308 | ); |
| 311 | 309 | } |
| 312 | 310 | |
| @@ -346,13 +344,13 @@ | ||
| 346 | 344 | public static function get_script_presets(): array { |
| 347 | 345 | return array( |
| 348 | 346 | self::PYTHON_REQUESTS_KEY => array( |
| 349 | 347 | 'label' => 'Python Script', |
| 350 | - 'desc' => __( '( This will block all requests from python-requests/* agent )', 'defender-security' ), | |
| 348 | + 'desc' => __( '(blocks python-requests/* agent)', 'defender-security' ), | |
| 351 | 349 | ), |
| 352 | 350 | self::GO_HTTP_CLIENT_KEY => array( |
| 353 | - 'label' => 'Go Http Clients', | |
| 354 | - 'desc' => __( '( This will block all requests from Go-http-client/* agent )', 'defender-security' ), | |
| 351 | + 'label' => 'Go HTTP Clients', | |
| 352 | + 'desc' => __( '(blocks Go-http-client/* agent)', 'defender-security' ), | |
| 355 | 353 | ), |
| 356 | 354 | ); |
| 357 | 355 | } |
| 358 | 356 | |