Skip to content

Commit bf88341

Browse files
committed
fix #214
thanks @mexon
1 parent 551f531 commit bf88341

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
8888

8989
Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
9090

91+
### 0.14.1 ###
92+
93+
* Fix "WebFinger not compatible with PHP < 8.0". props [@mexon](https://github.com/mexon)
94+
9195
### 0.14.0 ###
9296

9397
* Friends support: https://wordpress.org/plugins/friends/ props [@akirk](https://github.com/akirk)

activitypub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: ActivityPub
44
* Plugin URI: https://github.com/pfefferle/wordpress-activitypub/
55
* Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
6-
* Version: 0.14.0
6+
* Version: 0.14.1
77
* Author: Matthias Pfefferle
88
* Author URI: https://notiz.blog/
99
* License: MIT

includes/rest/class-webfinger.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ public static function register_routes() {
4444
public static function webfinger( $request ) {
4545
$resource = $request->get_param( 'resource' );
4646

47-
$matched = \str_contains( $resource, '@' );
48-
49-
if ( ! $matched ) {
47+
if ( \strpos( $resource, '@' ) === false ) {
5048
return new \WP_Error( 'activitypub_unsupported_resource', \__( 'Resource is invalid', 'activitypub' ), array( 'status' => 400 ) );
5149
}
5250

readme.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
8888

8989
Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
9090

91+
= 0.14.1 =
92+
93+
* Fix "WebFinger not compatible with PHP < 8.0". props [@mexon](https://github.com/mexon)
94+
9195
= 0.14.0 =
9296

9397
* Friends support: https://wordpress.org/plugins/friends/ props [@akirk](https://github.com/akirk)

0 commit comments

Comments
 (0)