Skip to content
Extraits de code Groupes Projets
  1. jan. 31, 2022
    • Claire's avatar
      Fix followers synchronization mechanism not working when URI has empty path (#16510) · 03f0e98b
      Claire a rédigé
      * Fix followers synchronization mechanism not working when URI has empty path
      
      To my knowledge, there is no current implementation on the fediverse
      that can use bare domains (e.g., actor is at https://example.org instead of
      something like https://example.org/actor) that also plans to support the
      followers synchronization mechanism. However, Mastodon's current implementation
      would exclude such accounts from followers list.
      
      Also adds tests and rename them to reflect the proper method names.
      
      * Move url prefix regexp to its own constant
      03f0e98b
  2. nov. 26, 2021
    • Claire's avatar
      Fix filtering DMs from non-followed users (#17042) · f264cca1
      Claire a rédigé
      f264cca1
    • Claire's avatar
      Fix error when suspending user with an already-existing canonical email block (#17036) · 3c18311d
      Claire a rédigé
      * 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
      3c18311d
  3. nov. 05, 2021
  4. mai 10, 2021
  5. mai 07, 2021
  6. mai 06, 2021
    • Claire's avatar
      Add Ruby 3.0 support (#16046) · 566fc909
      Claire a rédigé
      * Fix issues with POSIX::Spawn, Terrapin and Ruby 3.0
      
      Also improve the Terrapin monkey-patch for the stderr/stdout issue.
      
      * Fix keyword argument handling throughout the codebase
      
      * Monkey-patch Paperclip to fix keyword arguments handling in validators
      
      * Change validation_extensions to please CodeClimate
      
      * Bump microformats from 4.2.1 to 4.3.1
      
      * Allow Ruby 3.0
      
      * Add Ruby 3.0 test target to CircleCI
      
      * Add test for admin dashboard warnings
      
      * Fix admin dashboard warnings on Ruby 3.0
      566fc909
  7. mai 03, 2021
  8. avr. 25, 2021
  9. avr. 24, 2021
  10. avr. 23, 2021
  11. avr. 21, 2021
    • Eugen Rochko's avatar
      9cc283f0
    • Claire's avatar
      Fix processing of remote Delete activities (#16084) · 0b36e341
      Claire a rédigé
      * Add tests
      
      * Ensure deleted statuses are marked as such
      
      * Save some redis memory by not storing URIs in delete_upon_arrival values
      
      * Avoid possible race condition when processing incoming Deletes
      
      * Avoid potential duplicate Delete forwards
      
      * Lower lock durations to reduce issues in case of hard crash of the Rails process
      
      * Check for `lock.aquired?` and improve comment
      
      * Refactor RedisLock usage in app/lib/activitypub
      
      * Fix using incorrect or non-existent sender for relaying Deletes
      0b36e341
  12. avr. 17, 2021
  13. avr. 15, 2021
  14. avr. 12, 2021
  15. avr. 11, 2021
  16. avr. 10, 2021
  17. mars 26, 2021
  18. mars 24, 2021
    • Claire's avatar
      Update Mastodon to Rails 6.1 (#15910) · cbd0ee1d
      Claire a rédigé
      * Update devise-two-factor to unreleased fork for Rails 6 support
      
      Update tests to match new `rotp` version.
      
      * Update nsa gem to unreleased fork for Rails 6 support
      
      * Update rails to 6.1.3 and rails-i18n to 6.0
      
      * Update to unreleased fork of pluck_each for Ruby 6 support
      
      * Run "rails app:update"
      
      * Add missing ActiveStorage config file
      
      * Use config.ssl_options instead of removed ApplicationController#force_ssl
      
      Disabled force_ssl-related tests as they do not seem to be easily testable
      anymore.
      
      * Fix nonce directives by removing Rails 5 specific monkey-patching
      
      * Fix fixture_file_upload deprecation warning
      
      * Fix yield-based test failing with Rails 6
      
      * Use Rails 6's index_with when possible
      
      * Use ActiveRecord::Cache::Store#delete_multi from Rails 6
      
      This will yield better performances when deleting an account
      
      * Disable Rails 6.1's automatic preload link headers
      
      Since Rails 6.1, ActionView adds preload links for javascript files
      in the Links header per default.
      
      In our case, that will bloat headers too much and potentially cause
      issues with reverse proxies. Furhermore, we don't need those links,
      as we already output them as HTML link tags.
      
      * Switch to Rails 6.0 default config
      
      * Switch to Rails 6.1 default config
      
      * Do not include autoload paths in the load path
      cbd0ee1d
    • Claire's avatar
      Fix Mastodon not understanding as:Public and Public (#15948) · 1c4dee45
      Claire a rédigé
      Fixes #5551
      1c4dee45
  19. mars 19, 2021
    • Claire's avatar
      Bypass MX validation for explicitly allowed domains (#15930) · 051efed5
      Claire a rédigé
      * Bypass MX validation for explicitly allowed domains
      
      This spares some lookups and prevent issues in some edge cases with
      local domains.
      
      * Add tests
      
      * Fix test
      051efed5
    • Claire's avatar
      Improve account counters handling (#15913) · 741d0952
      Claire a rédigé
      * Improve account counters handling
      
      * Use ActiveRecord::Base::sanitize_sql to pass values instead of interpolating them
      
      Keep using string interpolation for `key` as it is safe and using
      “ActiveRecord::Base::sanitize_sql_hash_for_assignment” would require stitching
      bits of SQL in a way that is not more easily checked for safety.
      
      * Add migration hook to catch PostgreSQL versions earlier than 9.5
      741d0952
Chargement en cours