cast to bool, to be sure that '0' is false
This commit is contained in:
parent
b88c5f606d
commit
ca8aff1823
2 changed files with 2 additions and 2 deletions
|
@ -78,7 +78,7 @@ class Activitypub {
|
|||
\in_array( 'application/ld+json', $accept, true ) ||
|
||||
\in_array( 'application/json', $accept, true )
|
||||
) {
|
||||
$secure_mode = \get_option( 'activitypub_use_secure_mode', '0' );
|
||||
$secure_mode = (bool) \get_option( 'activitypub_use_secure_mode', '0' );
|
||||
if ( $secure_mode ) {
|
||||
$verification = Signature::verify_http_signature( $_SERVER );
|
||||
if ( \is_wp_error( $verification ) ) {
|
||||
|
|
|
@ -92,7 +92,7 @@ class Server {
|
|||
} else {
|
||||
if ( '/activitypub/1.0/webfinger' !== $route ) {
|
||||
// SecureMode/Authorized fetch.
|
||||
$secure_mode = \get_option( 'activitypub_use_secure_mode', '0' );
|
||||
$secure_mode = (bool) \get_option( 'activitypub_use_secure_mode', '0' );
|
||||
if ( $secure_mode ) {
|
||||
$verified_request = Signature::verify_http_signature( $request );
|
||||
if ( \is_wp_error( $verified_request ) ) {
|
||||
|
|
Loading…
Reference in a new issue