PluginProbe
ActivityPub / 8.0.2
ActivityPub v8.0.2
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
← All changes | includes/handler/class-undo.php +1 -18 9.3.08.0.2 View file →
@@ -30,26 +30,9 @@
30 30 * @param int|int[]|null $user_ids The user ID(s).
31 31 */
32 32 public static function handle_undo( $activity, $user_ids ) {
33 33 $success = false;
34 -
35 - /*
36 - * Resolve the sender so Inbox::undo() can verify ownership. A genuinely absent actor
37 - * maps to null (no ownership check, for programmatic callers), but an actor that is
38 - * present yet unparseable must be rejected rather than skipping the check — passing
39 - * null there would re-open the undo-by-id attack.
40 - */
41 - $actor = isset( $activity['actor'] ) ? object_to_uri( $activity['actor'] ) : null;
42 -
43 - if ( isset( $activity['actor'] ) && empty( $actor ) ) {
44 - $result = new \WP_Error(
45 - 'activitypub_undo_invalid_actor',
46 - \__( 'The Undo activity has an invalid actor.', 'activitypub' ),
47 - array( 'status' => 400 )
48 - );
49 - } else {
50 - $result = Inbox_Collection::undo( object_to_uri( $activity['object'] ), $actor );
51 - }
34 + $result = Inbox_Collection::undo( object_to_uri( $activity['object'] ) );
52 35
53 36 if ( $result && ! \is_wp_error( $result ) ) {
54 37 $success = true;
55 38 }