From 90b45438b20202ce3f491712d2d7bf23b7b0322e Mon Sep 17 00:00:00 2001 From: Django Doucet Date: Sun, 2 Apr 2023 00:30:17 -0600 Subject: [PATCH] cleanup --- includes/class-signature.php | 7 +------ includes/functions.php | 5 ----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/includes/class-signature.php b/includes/class-signature.php index d10309f..a25d939 100644 --- a/includes/class-signature.php +++ b/includes/class-signature.php @@ -11,11 +11,6 @@ use DateTimeZone; */ class Signature { - /** - * How much leeway to provide on the date header in seconds. - * Not everybody uses NTP. - */ - const DEFAULT_SIGNING_ALGORITHM = 'sha256'; /** @@ -252,7 +247,7 @@ class Signature { } } if ( '(created)' === $header ) { - if ( ! \empty( $signature_block['(created)'] ) && \intval( $signature_block['(created)'] ) > \time() ) { + if ( ! empty( $signature_block['(created)'] ) && \intval( $signature_block['(created)'] ) > \time() ) { // created in future return false; } diff --git a/includes/functions.php b/includes/functions.php index 9df6311..8f2e5d9 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -200,11 +200,6 @@ function get_inbox_by_actor( $actor ) { */ function get_publickey_by_actor( $actor, $key_id ) { $metadata = \Activitypub\get_remote_metadata_by_actor( $actor ); - - //Other Implementations may include an 'operations' query (Zap) - if ( isset( $metadata['publicKey']['id'] ) ) { - $metadata['publicKey']['id'] = strtok($metadata['publicKey']['id'], "?"); - } if ( \is_wp_error( $metadata ) ) { return $metadata;