Skip to content

Commit 2ef72a0

Browse files
committed
API changes
1 parent fd6cb84 commit 2ef72a0

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
**Tags:** OStatus, fediverse, activitypub, activitystream
44
**Requires at least:** 4.7
55
**Tested up to:** 6.3
6-
**Stable tag:** 1.0.5
6+
**Stable tag:** 1.0.6
77
**Requires PHP:** 5.6
88
**License:** MIT
99
**License URI:** http://opensource.org/licenses/MIT
@@ -105,6 +105,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
105105

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

108+
### 1.0.6 ###
109+
110+
* Fixed: more restrictive request verification
111+
108112
### 1.0.5 ###
109113

110114
* Fixed: compatibility with WebFinger and NodeInfo plugin

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: 1.0.5
6+
* Version: 1.0.6
77
* Author: Matthias Pfefferle & Automattic
88
* Author URI: https://automattic.com/
99
* License: MIT

includes/rest/class-inbox.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static function register_routes() {
3838
'/inbox',
3939
array(
4040
array(
41-
'methods' => WP_REST_Server::EDITABLE,
41+
'methods' => WP_REST_Server::CREATABLE,
4242
'callback' => array( self::class, 'shared_inbox_post' ),
4343
'args' => self::shared_inbox_post_parameters(),
4444
'permission_callback' => '__return_true',
@@ -51,7 +51,7 @@ public static function register_routes() {
5151
'/users/(?P<user_id>[\w\-\.]+)/inbox',
5252
array(
5353
array(
54-
'methods' => WP_REST_Server::EDITABLE,
54+
'methods' => WP_REST_Server::CREATABLE,
5555
'callback' => array( self::class, 'user_inbox_post' ),
5656
'args' => self::user_inbox_post_parameters(),
5757
'permission_callback' => '__return_true',

includes/rest/class-server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public static function authorize_activitypub_requests( $response, $handler, $req
8686
}
8787

8888
// POST-Requets are always signed
89-
if ( 'post' === \strtolower( $request->get_method() ) ) {
89+
if ( 'get' !== \strtolower( $request->get_method() ) ) {
9090
$verified_request = Signature::verify_http_signature( $request );
9191
if ( \is_wp_error( $verified_request ) ) {
9292
return $verified_request;

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: automattic, pfefferle, mediaformat, mattwiebe, akirk, jeherve, nur
33
Tags: OStatus, fediverse, activitypub, activitystream
44
Requires at least: 4.7
55
Tested up to: 6.3
6-
Stable tag: 1.0.5
6+
Stable tag: 1.0.6
77
Requires PHP: 5.6
88
License: MIT
99
License URI: http://opensource.org/licenses/MIT
@@ -105,6 +105,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
105105

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

108+
= 1.0.6 =
109+
110+
* Fixed: more restrictive request verification
111+
108112
= 1.0.5 =
109113

110114
* Fixed: compatibility with WebFinger and NodeInfo plugin

0 commit comments

Comments
 (0)