Skip to content
Snippets Groups Projects
  1. Feb 24, 2022
  2. Feb 22, 2022
    • luzpaz's avatar
      Fix various typos (#17621) · 73f5e4a1
      luzpaz authored
      Found via `codespell -q 3 -S ./CHANGELOG.md,./AUTHORS.md,./config/locales,./app/javascript/mastodon/locales -L ba,keypair,medias,ro`
      Unverified
      73f5e4a1
  3. Feb 16, 2022
  4. Feb 14, 2022
    • Eugen Rochko's avatar
      Add appeals (#17364) · 564efd06
      Eugen Rochko authored
      * Add appeals
      
      * Add ability to reject appeals and ability to browse pending appeals in admin UI
      
      * Add strikes to account page in settings
      
      * Various fixes and improvements
      
      - Add separate notification setting for appeals, separate from reports
      - Fix style of links in report/strike header
      - Change approving an appeal to not restore statuses (due to federation complexities)
      - Change style of successfully appealed strikes on account settings page
      - Change account settings page to only show unappealed or recently appealed strikes
      
      * Change appealed_at to overruled_at
      
      * Fix missing method error
      Unverified
      564efd06
  5. Feb 11, 2022
  6. Feb 10, 2022
  7. Feb 09, 2022
  8. Feb 08, 2022
  9. Feb 07, 2022
  10. Feb 06, 2022
  11. Feb 03, 2022
  12. Jan 28, 2022
  13. Jan 27, 2022
    • Claire's avatar
      Refactor and improve tests (#17386) · e38fc319
      Claire authored
      * Change account and user fabricators to simplify and improve tests
      
      - `Fabricate(:account)` implicitly fabricates an associated `user` if
        no `domain` attribute is given (an account with `domain: nil` is
        considered a local account, but no user record was created), unless
        `user: nil` is passed
      - `Fabricate(:account, user: Fabricate(:user))` should still be possible
        but is discouraged.
      
      * Fix and refactor tests
      
      - avoid passing unneeded attributes to `Fabricate(:user)` or
        `Fabricate(:account)`
      - avoid embedding `Fabricate(:user)` into a `Fabricate(:account)` or the other
        way around
      - prefer `Fabricate(:user, account_attributes: …)` to
        `Fabricate(:user, account: Fabricate(:account, …)`
      - also, some tests were using remote accounts with local user records, which is
        not representative of production code.
      Unverified
      e38fc319
  14. Jan 26, 2022
  15. Jan 23, 2022
    • Claire's avatar
      Fix error-prone SQL queries (#15828) · 0a120d86
      Claire authored
      * Fix error-prone SQL queries in Account search
      
      While this code seems to not present an actual vulnerability, one could
      easily be introduced by mistake due to how the query is built.
      
      This PR parameterises the `to_tsquery` input to make the query more robust.
      
      * Harden code for Status#tagged_with_all and Status#tagged_with_none
      
      Those two scopes aren't used in a way that could be vulnerable to an SQL
      injection, but keeping them unchanged might be a hazard.
      
      * Remove unneeded spaces surrounding tsquery term
      
      * Please CodeClimate
      
      * Move advanced_search_for SQL template to its own function
      
      This avoids one level of indentation while making clearer that the SQL template
      isn't build from all the dynamic parameters of advanced_search_for.
      
      * Add tests covering tagged_with, tagged_with_all and tagged_with_none
      
      * Rewrite tagged_with_none to avoid multiple joins and make it more robust
      
      * Remove obsolete brakeman warnings
      
      * Revert "Remove unneeded spaces surrounding tsquery term"
      
      The two queries are not strictly equivalent.
      
      This reverts commit 86f16c537e06c6ba4a8b250f25dcce9f049023ff.
      Unverified
      0a120d86
  16. Jan 19, 2022
    • Eugen Rochko's avatar
      Add support for editing for published statuses (#16697) · 1060666c
      Eugen Rochko authored
      * Add support for editing for published statuses
      
      * Fix references to stripped-out code
      
      * Various fixes and improvements
      
      * Further fixes and improvements
      
      * Fix updates being potentially sent to unauthorized recipients
      
      * Various fixes and improvements
      
      * Fix wrong words in test
      
      * Fix notifying accounts that were tagged but were not in the audience
      
      * Fix mistake
      Unverified
      1060666c
  17. Jan 17, 2022
  18. Jan 16, 2022
  19. Dec 17, 2021
  20. Dec 05, 2021
  21. Nov 26, 2021
  22. Nov 25, 2021
  23. 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
  24. Nov 05, 2021
  25. 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
  26. Oct 20, 2021
Loading