| @@ -41,20 +41,9 @@ | ||
| 41 | 41 | ) { |
| 42 | 42 | return; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - /* | |
| 46 | - * For a Follow Accept, the sender must be the actor that was followed. | |
| 47 | - * Without this, a signed Accept from one actor could confirm a Follow that | |
| 48 | - * targeted another actor by referencing that pending Follow's outbox GUID. | |
| 49 | - */ | |
| 50 | - $accept_actor = object_to_uri( $accept['actor'] ?? '' ); | |
| 51 | - $followed_actor = object_to_uri( $accept['object']['object'] ?? '' ); | |
| 52 | - if ( ! $accept_actor || ! $followed_actor || $accept_actor !== $followed_actor ) { | |
| 53 | - return; | |
| 54 | - } | |
| 55 | - | |
| 56 | - $actor_post = Remote_Actors::get_by_uri( $followed_actor ); | |
| 45 | + $actor_post = Remote_Actors::get_by_uri( object_to_uri( $accept['object']['object'] ) ); | |
| 57 | 46 | |
| 58 | 47 | if ( \is_wp_error( $actor_post ) ) { |
| 59 | 48 | return; |
| 60 | 49 | } |