Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
thanks @mexon
  • Loading branch information
pfefferle committed Dec 10, 2022
1 parent 551f531 commit bf88341
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides.

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

### 0.14.1 ###

* Fix "WebFinger not compatible with PHP < 8.0". props [@mexon](https://github.com/mexon)

### 0.14.0 ###

* Friends support: https://wordpress.org/plugins/friends/ props [@akirk](https://github.com/akirk)
Expand Down
2 changes: 1 addition & 1 deletion activitypub.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: ActivityPub
* Plugin URI: https://github.com/pfefferle/wordpress-activitypub/
* Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
* Version: 0.14.0
* Version: 0.14.1
* Author: Matthias Pfefferle
* Author URI: https://notiz.blog/
* License: MIT
Expand Down
4 changes: 1 addition & 3 deletions includes/rest/class-webfinger.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ public static function register_routes() {
public static function webfinger( $request ) {
$resource = $request->get_param( 'resource' );

$matched = \str_contains( $resource, '@' );

if ( ! $matched ) {
if ( \strpos( $resource, '@' ) === false ) {
return new \WP_Error( 'activitypub_unsupported_resource', \__( 'Resource is invalid', 'activitypub' ), array( 'status' => 400 ) );
}

Expand Down
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides.

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

= 0.14.1 =

* Fix "WebFinger not compatible with PHP < 8.0". props [@mexon](https://github.com/mexon)

= 0.14.0 =

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

0 comments on commit bf88341

Please sign in to comment.