removing logging
This commit is contained in:
parent
3d4ae84573
commit
b0edf9a765
1 changed files with 0 additions and 6 deletions
|
@ -134,19 +134,13 @@ class Signature {
|
||||||
public static function verify_http_signature( $request ) {
|
public static function verify_http_signature( $request ) {
|
||||||
if ( is_object( $request ) ) { // REST Request object
|
if ( is_object( $request ) ) { // REST Request object
|
||||||
$headers = $request->get_headers();
|
$headers = $request->get_headers();
|
||||||
error_log( 'verify: $request: ' . print_r( $request, true ) );
|
|
||||||
$actor = isset( json_decode( $request->get_body() )->actor ) ? json_decode( $request->get_body() )->actor : '';
|
$actor = isset( json_decode( $request->get_body() )->actor ) ? json_decode( $request->get_body() )->actor : '';
|
||||||
$headers['(request-target)'][0] = strtolower( $request->get_method() ) . ' /wp-json' . $request->get_route();
|
$headers['(request-target)'][0] = strtolower( $request->get_method() ) . ' /wp-json' . $request->get_route();
|
||||||
error_log( 'request $headers: ' . print_r( $headers['(request-target)'], true ) );
|
|
||||||
} else {
|
} else {
|
||||||
$request = self::format_server_request( $request );
|
$request = self::format_server_request( $request );
|
||||||
$headers = $request['headers']; // $_SERVER array
|
$headers = $request['headers']; // $_SERVER array
|
||||||
// error_log( print_r( $headers, true ) );
|
|
||||||
$headers['(request-target)'][0] = strtolower( $headers['request_method'][0] ) . ' ' . $headers['request_uri'][0];
|
$headers['(request-target)'][0] = strtolower( $headers['request_method'][0] ) . ' ' . $headers['request_uri'][0];
|
||||||
// $post = get_page_by_path( $headers['request_uri'], ARRAY_A );
|
|
||||||
// $actor = post['post_author'] ?? '';
|
|
||||||
$actor = '';
|
$actor = '';
|
||||||
error_log( 'request $headers: ' . print_r( $headers, true ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! isset( $headers['signature'] ) ) {
|
if ( ! isset( $headers['signature'] ) ) {
|
||||||
|
|
Loading…
Reference in a new issue