fix phpcs
This commit is contained in:
parent
023ba25f38
commit
b641cb03f3
1 changed files with 4 additions and 1 deletions
|
@ -175,7 +175,10 @@ class Signature {
|
||||||
} else {
|
} else {
|
||||||
$public_key = \rtrim( $public_key );
|
$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
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue