Skip to content

Conversation

@pfefferle
Copy link
Member

@pfefferle pfefferle commented Jul 31, 2025

We currently use WebFinger lookup to verify that a remote URL or object is an Actor. This approach is rather lazy and only works because, so far, non-Actor objects don’t include a self link.

Proposed changes:

  • Check remote Object for Type Actor

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  • Go to '..'

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

More reliable Actor checks during the follow process.

Copilot AI review requested due to automatic review settings July 31, 2025 19:06
@pfefferle pfefferle self-assigned this Jul 31, 2025
@pfefferle pfefferle requested a review from obenland July 31, 2025 19:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves validation of remote ActivityPub objects by adding a type check to ensure that fetched objects are actually Actors before processing them. The change addresses a gap where the system previously relied solely on WebFinger lookup as proof of Actor type, which was unreliable since non-Actor objects don't typically provide self links.

  • Adds explicit Actor type validation using the is_actor() function
  • Returns a proper error response when a fetched object is not an Actor type
  • Reorganizes import statements for better code organization

@pfefferle pfefferle merged commit e382749 into trunk Jul 31, 2025
12 checks passed
@pfefferle pfefferle deleted the fix/check-for-actor branch July 31, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants