Skip to content
Snippets Groups Projects
  1. Dec 17, 2021
  2. Dec 05, 2021
  3. Nov 26, 2021
  4. Nov 25, 2021
  5. Nov 24, 2021
    • Claire's avatar
      Fix error when suspending user with an already-existing canonical email block (#17036) · 02a87431
      Claire authored
      * Fix error when suspending user with an already-existing canonical email block
      
      Fixes #17033
      
      While attempting to create a `CanonicalEmailBlock` with an existing hash would
      raise an `ActiveRecord::RecordNotUnique` error, this being done within a
      transaction would cancel the whole transaction. For this reason, checking for
      uniqueness in Rails would query the database within the transaction and avoid
      invalidating the whole transaction for this reason.
      
      A race condition is still possible, where multiple accounts sharing a canonical
      email would be blocked in concurrent transactions, in which only one would
      succeed, but that is way less likely to happen that the current issue, and can
      always be retried after the first failure, unlike the current situation.
      
      * Add tests
      Unverified
      02a87431
  6. Nov 05, 2021
  7. Oct 21, 2021
    • Claire's avatar
      Fix some link previews being incorrectly generated from other prior links (#16885) · ec059317
      Claire authored
      * Add tests
      
      * Fix some link previews being incorrectly generated from different prior links
      
      PR #12403 added a cache to avoid redundant queries when the OEmbed endpoint can
      be guessed from the URL. This caching mechanism is not perfectly correct as
      there is no guarantee that all pages from a given domain share the same
      OEmbed provider endpoint.
      
      This PR prevents the FetchOEmbedService from caching OEmbed endpoint that
      cannot be generalized by replacing a fully-qualified URL from the endpoint's
      parameters, greatly reducing the number of incorrect cached generalizations.
      Unverified
      ec059317
  8. Oct 20, 2021
  9. Oct 18, 2021
  10. Oct 14, 2021
  11. Oct 13, 2021
  12. Oct 06, 2021
    • Claire's avatar
      Fix media attachment size validation not correctly accounting for file type (#16819) · 84ceebe1
      Claire authored
      * Fix media attachment size validation not correctly accounting for file type
      
      Fixes a regression introduced in #16724 caused by the fact that kt-paperclip
      now correctly runs validations before processing, meaning that file size
      verification could not rely on our before_post_processing hook.
      
      Moved the `before_post_processing` hooks to `before_validate` to make sure
      the media attachment type is set correctly before the file gets validated.
      
      * Add tests
      Unverified
      84ceebe1
  13. Sep 30, 2021
  14. Sep 29, 2021
    • Claire's avatar
      Switch from unmaintained paperclip to kt-paperclip (#16724) · fc3ae134
      Claire authored
      * Switch from unmaintained paperclip to kt-paperclip
      
      * Drop some compatibility monkey-patches not required by kt-paperclip
      
      * Drop media spoof check monkey-patching
      
      It's broken with kt-paperclip and hopefully it won't be needed anymore
      
      * Fix regression introduced by paperclip 6.1.0
      
      * Do not rely on pathname to call FastImage
      
      * Add test for ogg vorbis file with cover art
      
      * Add audio/vorbis to the accepted content-types
      
      This seems erroneous as this would be the content-type for a vorbis stream
      without an ogg container, but that's what the `marcel` gem outputs, so…
      
      * Restore missing for_as_default method
      
      * Refactor Attachmentable concern and delay Paperclip's content-type spoof check
      
      Check for content-type spoofing *after* setting the extension ourselves, this
      fixes a regression with kt-paperclip's validations being more strict than
      paperclip 6.0.0 and rejecting some Pleroma uploads because of unknown
      extensions.
      
      * Please CodeClimate
      
      * Add audio/vorbis to the unreliable set
      
      It doesn't correspond to a file format and thus has no extension associated.
      Unverified
      fc3ae134
  15. Sep 26, 2021
  16. Sep 15, 2021
  17. Sep 13, 2021
    • Claire's avatar
      Stop setting a shortcode to newly-created media attachments (#16730) · db57bff1
      Claire authored
      * Stop setting a shortcode to newly-created media attachments
      
      The WebUI has stopped using the “short media URL” in ages. This isn't used
      anywhere except for mail notifications.
      
      Deprecating it would allow us to eventually get rid of at least a database
      column and corruption-prone index, as well as a controller.
      
      * Fix tests
      Unverified
      db57bff1
  18. Sep 08, 2021
  19. Sep 01, 2021
  20. Aug 25, 2021
    • Claire's avatar
      Fix authentication failures after going halfway through a sign-in attempt (#16607) · 94bcf453
      Claire authored
      * Add tests
      
      * Add security-related tests
      
      My first (unpublished) attempt at fixing the issues introduced (extremely
      hard-to-exploit) security vulnerabilities, addressing them in a test.
      
      * Fix authentication failures after going halfway through a sign-in attempt
      
      * Refactor `authenticate_with_sign_in_token` and `authenticate_with_two_factor` to make the two authentication steps more obvious
      Unverified
      94bcf453
  21. Aug 20, 2021
  22. Aug 11, 2021
  23. Aug 09, 2021
    • Claire's avatar
      Add feature to automatically delete old toots (#16529) · 4ac78e2a
      Claire authored
      * Add account statuses cleanup policy model
      
      * Record last inspected toot to delete to speed up successive calls to statuses_to_delete
      
      * Add service to cleanup a given account's statuses within a budget
      
      * Add worker to go through account policies and delete old toots
      
      * Fix last inspected status id logic
      
      All existing statuses older or equal to last inspected status id must be
      kept by the current policy. This is an invariant that must be kept so that
      resuming deletion from the last inspected status remains sound.
      
      * Add tests
      
      * Refactor scheduler and add tests
      
      * Add user interface
      
      * Add support for discriminating based on boosts/favs
      
      * Add UI support for min_reblogs and min_favs, rework UI
      
      * Address first round of review comments
      
      * Replace Snowflake#id_at_start with with_random parameter
      
      * Add tests
      
      * Add tests for StatusesCleanupController
      
      * Rework settings page
      
      * Adjust load-avoiding mechanisms
      
      * Please CodeClimate
      Unverified
      4ac78e2a
  24. Aug 08, 2021
  25. Jul 14, 2021
  26. Jul 13, 2021
  27. Jul 08, 2021
  28. Jul 07, 2021
  29. Jul 05, 2021
  30. Jul 03, 2021
    • Claire's avatar
      Fix anonymous access to outbox not being cached by the reverse proxy (#16458) · 49219508
      Claire authored
      * Fix anonymous access to outbox not being cached by the reverse proxy
      
      Up until now, anonymous access to outbox was marked as public, but with a
      0 duration for caching, which means remote proxies would only serve from cache
      when the server was completely overwhelmed.
      
      Changed that cache duration to one minute, so that repeated anonymous access
      to one account's outbox can be appropriately cached.
      
      Also added `Signature` to the `Vary` header in case a page is requested, so
      that authenticated fetches are never served from cache (which only contains
      public toots).
      
      * Remove Vary: Accept header from webfinger controller
      
      Indeed, we have stopped returning xrd, and only ever return jrd, so the
      Accept request header does not matter anymore.
      
      * Cache negative webfinger hits for 3 minutes
      Unverified
      49219508
  31. Jun 21, 2021
  32. May 10, 2021
Loading