Skip to content

add path to route #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 21, 2023
Merged

add path to route #438

merged 2 commits into from
Sep 21, 2023

Conversation

pfefferle
Copy link
Member

@pfefferle pfefferle commented Sep 15, 2023

fix #421

Proposed changes:

  • The current code ignores the 'path' when generating the signature string. This PR should fix the issue.

Other information:

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

Testing instructions:

  • Install WordPress in a sub directory
  • Install ActivityPub
  • Try to follow your blog from Mastodon or a similar platform

@pfefferle
Copy link
Member Author

@edent can you verify that this PR fixes your issue?

@edent
Copy link
Contributor

edent commented Sep 15, 2023

🙌🙌🙌🙌🙌

I can now follow @blog@shkspr.mobi!

Will check in an hour or so if it pushes out the scheduled post to subscriber.

@pfefferle
Copy link
Member Author

pfefferle commented Sep 15, 2023

@mattwiebe @ebinnion might this break something on WP.com?

wp_parse_url( get_home_url(), PHP_URL_PATH ); should be empty on public-api.wordpress.com/!?!

@github-actions github-actions bot added the Docs label Sep 15, 2023
Copy link
Contributor

@mattwiebe mattwiebe left a comment

Choose a reason for hiding this comment

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

wp_parse_url( get_home_url(), PHP_URL_PATH ); should be empty on public-api.wordpress.com/!?!

This shouldn't cause any trouble on dotcom or any non-subdirectory-based install. Looks good.

$path = wp_parse_url( get_home_url(), PHP_URL_PATH );
$path = trim( $path, '/' );

if ( $path ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd maybe check instead for ! empty( $path ) here instead, although this would probably be ok.

@pfefferle pfefferle merged commit 4a94eae into master Sep 21, 2023
@pfefferle pfefferle deleted the fix/wp-in-subpath branch September 21, 2023 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Follower requests never complete - ModSecurity off
3 participants