This commit is contained in:
Django Doucet 2023-04-02 00:30:17 -06:00
parent 9ec09c5407
commit 90b45438b2
2 changed files with 1 additions and 11 deletions

View file

@ -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;
}

View file

@ -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;