updated plugin Jetpack Protect version 3.0.2

This commit is contained in:
2024-10-09 12:44:31 +00:00
committed by Gitium
parent a35dc419bc
commit f970470c59
283 changed files with 6970 additions and 2338 deletions

View File

@ -77,7 +77,7 @@ class Jetpack_IXR_Client extends IXR_Client {
/**
* Perform the IXR request.
*
* @param string[] ...$args IXR args.
* @param mixed ...$args IXR method and args.
*
* @return bool True if request succeeded, false otherwise.
*/

View File

@ -40,7 +40,6 @@ class Jetpack_Options {
'allowed_xsite_search_ids', // (array) Array of WP.com blog ids that are allowed to search the content of this site
'available_modules',
'do_activate',
'edit_links_calypso_redirect', // (bool) Whether post/page edit links on front end should point to Calypso.
'log',
'slideshow_background_color',
'widget_twitter',
@ -66,7 +65,6 @@ class Jetpack_Options {
'safe_mode_confirmed', // (bool) True if someone confirms that this site was correctly put into safe mode automatically after an identity crisis is discovered.
'migrate_for_idc', // (bool) True if someone confirms that this site should migrate stats and subscribers from its previous URL
'ab_connect_banner_green_bar', // (int) Version displayed of the A/B test for the green bar at the top of the connect banner.
'onboarding', // (string) Auth token to be used in the onboarding connection flow
'tos_agreed', // (bool) Whether or not the TOS for connection has been agreed upon.
'static_asset_cdn_files', // (array) An nested array of files that we can swap out for cdn versions.
'mapbox_api_key', // (string) Mapbox API Key, for use with Map block.
@ -86,7 +84,6 @@ class Jetpack_Options {
case 'network':
return array(
'onboarding', // (string) Auth token to be used in the onboarding connection flow
'file_data', // (array) List of absolute paths to all Jetpack modules
);
}
@ -128,6 +125,9 @@ class Jetpack_Options {
'identity_crisis_url_secret', // (array) The IDC URL secret and its expiration date.
'identity_crisis_ip_requester', // (array) The IDC IP address and its expiration date.
'dismissed_welcome_banner', // (bool) Determines if the welcome banner has been dismissed or not.
'recommendations_evaluation', // (object) Catalog of recommended modules with corresponding score following successful site evaluation in Welcome Banner.
'dismissed_recommendations', // (bool) Determines if the recommendations have been dismissed or not.
'historically_active_modules', // (array) List of installed plugins/enabled modules that have at one point in time been active and working
);
}
@ -228,8 +228,6 @@ class Jetpack_Options {
}
}
trigger_error( sprintf( 'Invalid Jetpack option name: %s', esc_html( $name ) ), E_USER_WARNING ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error -- Don't wish to change legacy behavior.
return $default;
}
@ -284,9 +282,9 @@ class Jetpack_Options {
/**
* Updates the single given option. Updates jetpack_options or jetpack_$name as appropriate.
*
* @param string $name Option name. It must come _without_ `jetpack_%` prefix. The method will prefix the option name.
* @param mixed $value Option value.
* @param string $autoload If not compact option, allows specifying whether to autoload or not.
* @param string $name Option name. It must come _without_ `jetpack_%` prefix. The method will prefix the option name.
* @param mixed $value Option value.
* @param bool|null $autoload If not compact option, allows specifying whether to autoload or not.
*
* @return bool Was the option successfully updated?
*/
@ -636,10 +634,6 @@ class Jetpack_Options {
'jetpack_sso_require_two_step',
'jetpack_sso_remove_login_form',
'jetpack_last_connect_url_check',
'jpo_business_address',
'jpo_site_type',
'jpo_homepage_format',
'jpo_contact_page',
'jetpack_excluded_extensions',
);
}

View File

@ -521,6 +521,7 @@ class Jetpack_XMLRPC_Server {
* Getter for the local user to act as.
*
* @param array $request the current request data.
* @return WP_User|IXR_Error|false IXR_Error if the request is missing a local_user field, WP_User object on success, or false on failure to find a user.
*/
private function fetch_and_verify_local_user( $request ) {
if ( empty( $request['local_user'] ) ) {
@ -544,6 +545,7 @@ class Jetpack_XMLRPC_Server {
* Gets the user object by its data.
*
* @param string $user_id can be any identifying user data.
* @return WP_User|false WP_User object on success, false on failure.
*/
private function get_user_by_anything( $user_id ) {
$user = get_user_by( 'login', $user_id );