fix phpcs

This commit is contained in:
Django Doucet 2023-04-21 16:16:52 -06:00
parent 023ba25f38
commit b641cb03f3

View file

@ -175,7 +175,10 @@ class Signature {
} else {
$public_key = \rtrim( $public_key );
}
return \openssl_verify( $signed_data, $signature_block['signature'], $public_key, $algorithm ) > 0 ?? new \WP_Error( 'activitypub_signature', 'Invalid signature', array( 'status' => 403 ) );
$verified = \openssl_verify( $signed_data, $signature_block['signature'], $public_key, $algorithm ) > 0;
if ( ! $verified ) {
return new \WP_Error( 'activitypub_signature', 'Invalid signature', array( 'status' => 403 ) ); // phpcs:ignore null coalescing operator
}
}