updated plugin Jetpack Protect
version 1.4.0
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
namespace Automattic\Jetpack\Sync;
|
||||
|
||||
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
|
||||
use Automattic\Jetpack\IP\Utils as IP_Utils;
|
||||
use Automattic\Jetpack\Roles;
|
||||
|
||||
/**
|
||||
@ -426,15 +427,9 @@ class Listener {
|
||||
);
|
||||
|
||||
if ( $this->should_send_user_data_with_actor( $current_filter ) ) {
|
||||
$ip = isset( $_SERVER['REMOTE_ADDR'] ) ? filter_var( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '';
|
||||
if ( defined( 'JETPACK__PLUGIN_DIR' ) ) {
|
||||
if ( ! function_exists( 'jetpack_protect_get_ip' ) ) {
|
||||
require_once JETPACK__PLUGIN_DIR . 'modules/protect/shared-functions.php';
|
||||
}
|
||||
$ip = jetpack_protect_get_ip();
|
||||
}
|
||||
$ip = IP_Utils::get_ip();
|
||||
|
||||
$actor['ip'] = $ip;
|
||||
$actor['ip'] = $ip ? $ip : '';
|
||||
$actor['user_agent'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? filter_var( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : 'unknown';
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ namespace Automattic\Jetpack\Sync;
|
||||
*/
|
||||
class Package_Version {
|
||||
|
||||
const PACKAGE_VERSION = '1.47.2';
|
||||
const PACKAGE_VERSION = '1.47.4';
|
||||
|
||||
const PACKAGE_SLUG = 'sync';
|
||||
|
||||
|
@ -45,8 +45,7 @@ class Protect extends Module {
|
||||
* @param array $failed_attempt Failed attempt data.
|
||||
*/
|
||||
public function maybe_log_failed_login_attempt( $failed_attempt ) {
|
||||
$protect = \Jetpack_Protect_Module::instance();
|
||||
if ( $protect->has_login_ability() && ! Jetpack_Constants::is_true( 'XMLRPC_REQUEST' ) ) {
|
||||
if ( $failed_attempt['has_login_ability'] && ! Jetpack_Constants::is_true( 'XMLRPC_REQUEST' ) ) {
|
||||
do_action( 'jetpack_valid_failed_login_attempt', $failed_attempt );
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user