GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    HeathenStorm (heathenstorm@mastodon.social)'s status on Friday, 08-Mar-2024 16:17:12 JST HeathenStorm HeathenStorm
    • Daniel Supernault
    • Matthias Pfefferle
    • Tim Nolte

    @tim @pfefferle @dansup

    Hate to be "that guy" again, but there's another edge case that breaks the Litespeed cache fix for the Activitypub WP plugin.

    When Pixelfed fires off ActivityPubFetchService.get, it sends an Accept header of:

    "application/activity+json, application/ld+json"

    Although this is matched in the ActivtyPub plugin, it isn't matched in the Litespeed Cache fix. With the same effects as before.

    I've amended the RewriteCond to match the plugin regex for now. That seems to work.

    In conversation about a year ago from mastodon.social permalink
    • Embed this notice
      HeathenStorm (heathenstorm@mastodon.social)'s status on Friday, 08-Mar-2024 16:16:54 JST HeathenStorm HeathenStorm
      in reply to
      • Daniel Supernault
      • Matthias Pfefferle
      • Tim Nolte

      @tim @pfefferle @dansup

      Aye, I think when I first implemented your fix those checks were in place. RegEx is a law unto itself!

      I've replaced the RewriteCond with what you have on the blog right now, and added the [NC] flag to cover the case issue.

      That's both the edge cases resolved from my side.

      Many thanks!

      In conversation about a year ago permalink
    • Embed this notice
      Matthias Pfefferle (pfefferle@mastodon.social)'s status on Friday, 08-Mar-2024 16:16:54 JST Matthias Pfefferle Matthias Pfefferle
      in reply to
      • Daniel Supernault
      • Tim Nolte

      @heathenstorm @tim @dansup awesome! feel free to add a PR for the FAQ of the plugin!

      In conversation about a year ago permalink
    • Embed this notice
      Tim Nolte (tim@mastodon.timnolte.com)'s status on Friday, 08-Mar-2024 16:17:01 JST Tim Nolte Tim Nolte
      in reply to
      • Daniel Supernault
      • Matthias Pfefferle

      @heathenstorm I just reviewed what I have and confirmed that I don't in fact have any checks for start and end of content. That's ringing a bell that I do believe I ran into issues if I did try that. So technically my regex is still compatible with multiple types in the request. I think the only potential issue is if those types actually vary then the cached versions could still be wrong. I'm wondering if I need to consider that. I was attempting to not blow up the cache.

      @pfefferle @dansup

      In conversation about a year ago permalink
    • Embed this notice
      HeathenStorm (heathenstorm@mastodon.social)'s status on Friday, 08-Mar-2024 16:17:06 JST HeathenStorm HeathenStorm
      in reply to
      • Daniel Supernault
      • Matthias Pfefferle
      • Tim Nolte

      @tim @pfefferle @dansup

      functions.php, line 343:
      if ( preg_match( '/(application\/(ld\+json|activity\+json|json))/i', $accept ) ) {

      Saying that, Tim's fix may work in this case. My RewriteCond had ^ and $ in the RegEx.

      In conversation about a year ago permalink
    • Embed this notice
      Tim Nolte (tim@mastodon.timnolte.com)'s status on Friday, 08-Mar-2024 16:17:06 JST Tim Nolte Tim Nolte
      in reply to
      • Daniel Supernault
      • Matthias Pfefferle

      @heathenstorm @pfefferle @dansup ah, OK yeah that would break things.

      In conversation about a year ago permalink
    • Embed this notice
      HeathenStorm (heathenstorm@mastodon.social)'s status on Friday, 08-Mar-2024 16:17:09 JST HeathenStorm HeathenStorm
      in reply to
      • Daniel Supernault
      • Matthias Pfefferle
      • Tim Nolte

      @tim @pfefferle @dansup

      These are the reproduction steps I'm using:

      * Latest WP with latest Litespeed and Activitypub plugins.
      * Add Tim's initial fix to .htaccess, with [NC] for case-insensitive matching.
      * Purge cache to be sure.
      * curl --header "Accept: application/activity+json, application/ld+json" (WP post url)
      * activitystream json should be returned
      * curl --header "Accept: */* " (same url)
      * Expected result is HTML, however the cached activitystream json is incorrectly returned.

      In conversation about a year ago permalink
    • Embed this notice
      Tim Nolte (tim@mastodon.timnolte.com)'s status on Friday, 08-Mar-2024 16:17:09 JST Tim Nolte Tim Nolte
      in reply to
      • Daniel Supernault
      • Matthias Pfefferle

      @heathenstorm where is the regex in the ActivityPub plugin that your are referring to? I just tried a GitHub code search and wasn't very successful tracking it down. I'm on my phone so code review/navigation is limited for me right now.

      @pfefferle @dansup

      In conversation about a year ago permalink
    • Embed this notice
      Tim Nolte (tim@mastodon.timnolte.com)'s status on Friday, 08-Mar-2024 16:17:12 JST Tim Nolte Tim Nolte
      in reply to
      • Daniel Supernault
      • Matthias Pfefferle

      @heathenstorm can you provide here what you are now using? I'll be honest that my testing was just based on some sample requests I had from logs, which were primarily just from Mastodon. I never looked at ActivityPub specs to see what all the possible variants there are allowed to be.

      @pfefferle @dansup

      In conversation about a year ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.