Skip to content
Snippets Groups Projects
  1. Sep 12, 2017
    • ThibG's avatar
      [WiP] Whenever a remote keypair changes, unfollow them and re-subscribe to … (#4907) · f29918e7
      ThibG authored
      * Whenever a remote keypair changes, unfollow them and re-subscribe to them
      
      In Mastodon (it could be different for other OStatus or AP-enabled software),
      a keypair change is indicative of whole user (or instance) data loss. In this
      situation, the “new” user might be different, and almost certainly has an empty
      followers list. In this case, Mastodon instances will disagree on follower
      lists, leading to unreliable delivery and “shadow followers”, that is users
      believed by a remote instance to be followers, without the affected user
      knowing.
      
      Drawbacks of this change are:
      1. If an user legitimately changes public key for some reason without losing
         data (not possible in Mastodon at the moment), they will have their remote
         followers unsubscribed/re-subscribed needlessly.
      2. Depending of the number of remote followers, this may generate quite some
         traffic.
      3. If the user change is an attempt at usurpation, the remote followers will
         unknowingly follow the usurper. Note that this is *not* a change of
         behavior, Mastodon already behaves like that, although delivery might be
         unreliable, and the usurper would not have known the former user's
         followers.
      
      * Rename ResubscribeWorker to RefollowWorker
      
      * Process followers in batches
      f29918e7
  2. Aug 14, 2017
  3. Aug 08, 2017
    • Eugen Rochko's avatar
      Add ActivityPub inbox (#4216) · dd7ef0dc
      Eugen Rochko authored
      * Add ActivityPub inbox
      
      * Handle ActivityPub deletes
      
      * Handle ActivityPub creates
      
      * Handle ActivityPub announces
      
      * Stubs for handling all activities that need to be handled
      
      * Add ActivityPub actor resolving
      
      * Handle conversation URI passing in ActivityPub
      
      * Handle content language in ActivityPub
      
      * Send accept header when fetching actor, handle JSON parse errors
      
      * Test for ActivityPub::FetchRemoteAccountService
      
      * Handle public key and icon/image when embedded/as array/as resolvable URI
      
      * Implement ActivityPub::FetchRemoteStatusService
      
      * Add stubs for more interactions
      
      * Undo activities implemented
      
      * Handle out of order activities
      
      * Hook up ActivityPub to ResolveRemoteAccountService, handle
      Update Account activities
      
      * Add fragment IDs to all transient activity serializers
      
      * Add tests and fixes
      
      * Add stubs for missing tests
      
      * Add more tests
      
      * Add more tests
      dd7ef0dc
  4. Jul 19, 2017
    • Eugen Rochko's avatar
      Fix webfinger retries (#4275) · 1fcdaafa
      Eugen Rochko authored
      * Do not raise unretryable exceptions in ResolveRemoteAccountService
      
      * Removed fatal exceptions from ResolveRemoteAccountService
      
      Exceptions that cannot be retried should not be raised. New exception
      class for those that can be retried (Mastodon::UnexpectedResponseError)
      1fcdaafa
    • Eugen Rochko's avatar
      Refactor ResolveRemoteAccountService (#4258) · 8400bee3
      Eugen Rochko authored
      * Refactor ResolveRemoteAccountService
      
      * Remove trailing whitespace
      
      * Use redis locks around critical ResolveRemoteAccountService code
      
      * Add test for race condition of lock
      8400bee3
  5. Jul 14, 2017
    • Eugen Rochko's avatar
      HTTP signatures (#4146) · 1618b68b
      Eugen Rochko authored
      * Add Request class with HTTP signature generator
      
      Spec: https://tools.ietf.org/html/draft-cavage-http-signatures-06
      
      * Add HTTP signature verification concern
      
      * Add test for SignatureVerification concern
      
      * Add basic test for Request class
      
      * Make PuSH subscribe/unsubscribe requests use new Request class
      
      Accidentally fix lease_seconds not being set and sent properly, and
      change the new minimum subscription duration to 1 day
      
      * Make all PuSH workers use new Request class
      
      * Make Salmon sender use new Request class
      
      * Make FetchLinkService use new Request class
      
      * Make FetchAtomService use the new Request class
      
      * Make Remotable use the new Request class
      
      * Make ResolveRemoteAccountService use the new Request class
      
      * Add more tests
      
      * Allow +-30 seconds window for signed request to remain valid
      
      * Disable time window validation for signed requests, restore 7 days
      as PuSH subscription duration (which was previous default due to a bug)
      1618b68b
  6. Jun 18, 2017
  7. Jun 15, 2017
  8. Jun 08, 2017
  9. May 06, 2017
  10. Apr 27, 2017
    • Eugen Rochko's avatar
      OEmbed support for PreviewCard (#2337) · 88725d6c
      Eugen Rochko authored
      * OEmbed support for PreviewCard
      
      * Improve ProviderDiscovery code failure treatment
      
      * Do not crawl links if there is a content warning, since those
      don't display a link card anyway
      
      * Reset db schema
      
      * Fresh migrate
      
      * Fix rubocop style issues
      Fix #1681 - return existing access token when applicable instead of creating new
      
      * Fix test
      
      * Extract http client to helper
      
      * Improve oembed controller
      88725d6c
  11. Apr 25, 2017
    • Eugen's avatar
      Punycode URI normalization (#2370) · 17c591ff
      Eugen authored
      * Fix #2119 - Whenever about to send a HTTP request, normalize the URI
      
      * Add test for IDN request in FetchLinkCardService
      
      * Perform IDN normalization on domains before they are stored in the DB
      17c591ff
  12. Apr 19, 2017
  13. Apr 16, 2017
  14. Apr 15, 2017
    • ThibG's avatar
      Refresh webfinger (#1323) · 31f0bcf8
      ThibG authored
      * Refresh local info for remote accounts when webfinger returns new values
      
      It only refreshes account info if one of the URLs or the public-key changes,
      in which cases it refreshes the full info, re-downloading the feeds from that
      user.
      
      Some special handling should probably be done when the public key changes,
      but I have been unable to find any use for it in Mastodon yet.
      
      * Re-fetch remote users we aren't subscribed to.
      
      This might induce performance issues, we might want to only do that for users
      we explicitly attempted to subscribe but failed to.
      
      * Refactor changes
      
      * Do not refresh existing remote account details more than once a day
      
      * Avoid re-fetching webfinger info in tests unless otherwise specified
      31f0bcf8
  15. Apr 08, 2017
    • Yann GUERN's avatar
      #1141 on remote follow · 485d75a8
      Yann GUERN authored
      The async action is send before persist, account.id not yet generated
      
      Pull queue receive 'nil' so no profile update.
      485d75a8
  16. Apr 07, 2017
  17. Apr 05, 2017
  18. Jan 23, 2017
  19. Jan 20, 2017
  20. Nov 26, 2016
  21. Nov 15, 2016
  22. Nov 03, 2016
  23. Oct 13, 2016
  24. Oct 12, 2016
  25. Oct 09, 2016
  26. Oct 06, 2016
  27. Sep 29, 2016
  28. Sep 20, 2016
    • Eugen Rochko's avatar
      Fix #24 - Thread resolving for remote statuses · 4bec6138
      Eugen Rochko authored
      This is a big one, so let me enumerate:
      
      Accounts as well as stream entry pages now contain Link headers that
      reference the Atom feed and Webfinger URL for the former and Atom entry
      for the latter. So you only need to HEAD those resources to get that
      information, no need to download and parse HTML <link>s.
      
      ProcessFeedService will now queue ThreadResolveWorker for each remote
      status that it cannot find otherwise. Furthermore, entries are now
      processed in reverse order (from bottom to top) in case a newer entry
      references a chronologically previous one.
      
      ThreadResolveWorker uses FetchRemoteStatusService to obtain a status
      and attach the child status it was queued for to it.
      
      FetchRemoteStatusService looks up the URL, first with a HEAD, tests
      if it's an Atom feed, in which case it processes it directly. Next
      for Link headers to the Atom feed, in which case that is fetched
      and processed. Lastly if it's HTML, it is checked for <link>s to the Atom
      feed, and if such is found, that is fetched and processed. The account for
      the status is derived from author/name attribute in the XML and the hostname
      in the URL (domain). FollowRemoteAccountService and ProcessFeedService
      are used.
      
      This means that potentially threads are resolved recursively until a dead-end
      is encountered, however it is performed asynchronously over background jobs,
      so it should be ok.
      4bec6138
  29. Sep 19, 2016
  30. Sep 17, 2016
  31. Sep 08, 2016
  32. Sep 04, 2016
  33. Mar 21, 2016
  34. Feb 29, 2016
  35. Feb 28, 2016
  36. Feb 24, 2016
Loading