Changeset 3068647 for jetpack/trunk/jetpack_vendor/automattic/jetpack-connection/src/class-rest-authentication.php
- Timestamp:
- 04/10/2024 08:25:49 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
jetpack/trunk/jetpack_vendor/automattic/jetpack-connection/src/class-rest-authentication.php
r3067143 r3068647 8 8 namespace Automattic\Jetpack\Connection; 9 9 10 use WP_Error;11 12 10 /** 13 11 * The Jetpack Connection Rest Authentication class. … … 121 119 122 120 if ( ! isset( $_SERVER['REQUEST_METHOD'] ) ) { 123 $this->rest_authentication_status = new WP_Error(121 $this->rest_authentication_status = new WP_Error( 124 122 'rest_invalid_request', 125 123 __( 'The request method is missing.', 'jetpack-connection' ), … … 134 132 // needed. 135 133 if ( 'GET' !== $_SERVER['REQUEST_METHOD'] && 'POST' !== $_SERVER['REQUEST_METHOD'] ) { 136 $this->rest_authentication_status = new WP_Error(134 $this->rest_authentication_status = new WP_Error( 137 135 'rest_invalid_request', 138 136 __( 'This request method is not supported.', 'jetpack-connection' ), … … 142 140 } 143 141 if ( 'POST' !== $_SERVER['REQUEST_METHOD'] && ! empty( file_get_contents( 'php://input' ) ) ) { 144 $this->rest_authentication_status = new WP_Error(142 $this->rest_authentication_status = new WP_Error( 145 143 'rest_invalid_request', 146 144 __( 'This request method does not support body parameters.', 'jetpack-connection' ), … … 176 174 177 175 // Something else went wrong. Probably a signature error. 178 $this->rest_authentication_status = new WP_Error(176 $this->rest_authentication_status = new WP_Error( 179 177 'rest_invalid_signature', 180 178 __( 'The request is not signed correctly.', 'jetpack-connection' ),
Note: See TracChangeset
for help on using the changeset viewer.