Commit Graph

798 Commits (32938dadd71b57cb60a70039e1fb018f97571ca9)

Author SHA1 Message Date
Renaud Chaput b95867ad1f
Allow setting a custom HTTP method in CacheBuster (#26528)
Co-authored-by: Jorijn Schrijvershof <jorijn@jorijn.com>
1 year ago
Claire dd049fc37a
Fix ES_PRESET not being applied to Chewy's internal index (#26489) 1 year ago
Claire 3a8370e1f4
Fix `repo:changelog` task matching strings that are not Pull Request identifiers (#26280) 1 year ago
Claire f5778caa3a
Add `ES_PRESET` option to customize numbers of shards and replicas (#26483)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
1 year ago
Jeong Arm 496eb6f7a4
Add missing instances option to tootctl search deploy (#26461) 1 year ago
Claire dab54ccbba
Prepare v4.2.0-beta1 (#26339) 1 year ago
Eugen Rochko 0e2a4d3897
Fix adding column with default value taking longer on Postgres >= 11 (#26375) 1 year ago
Claire 6b896b20cc
Add primary key to preview_cards_statuses join table (includes deduplication migration) (#25243) 1 year ago
Claire 425d77f812
Fix crash in `tootctl status remove` and some old migrations (#26210) 1 year ago
Christian Schmidt f2257069b2
Fix AVIF attachments (#26264) 1 year ago
Claire 51768de16e
Bump version to v4.1.6 (#26272) 1 year ago
Christian Schmidt d76f79f647
Remove obsolete backport from Rails 7 (#26254) 1 year ago
Matt Jankowski 30f5ec7303
Rubocop fix: `Perfomance/UnfreezeString` (#26217) 1 year ago
Renaud Chaput 4d1b67f664
Add end-to-end (system) tests (#25461) 1 year ago
Misty De Méo 12a6cf569e
Storage: add :azure to remaining callers (#26080) 1 year ago
Claire b4e739ff0f
Change interaction modal in web UI (#26075)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
1 year ago
Claire f2c683336b
Bump version to v4.1.5 (#26108) 1 year ago
Renaud Chaput 42698b4c5c
Fix the crossorigin attribute (#26096) 1 year ago
Matt Jankowski f831452037
Refactor `Snowflake` to avoid brakeman sql injection warnings (#25879) 1 year ago
Matt Jankowski b8b2470cf8
Fix `Style/SlicingWithRange` cop (#25923) 1 year ago
Nick Schonning 1d557305d2
Enable Rubocop Style/FrozenStringLiteralComment (#23793) 1 year ago
Claire 0051128387
Bump version to v4.1.4 (#25805) 2 years ago
Claire 71d44949bf
Fix branding:generate_app_icons failing because of disallowed ICO coder (#25794) 2 years ago
Claire 5e1752ce3f
Bump version to v4.1.3 (#25757) 2 years ago
Claire dc8f1fbd97
Merge pull request from GHSA-9928-3cp5-93fm
* Fix attachments getting processed despite failing content-type validation

* Add a restrictive ImageMagick security policy tailored for Mastodon

* Fix misdetection of MP3 files with large cover art

* Reject unprocessable audio/video files instead of keeping them unchanged
2 years ago
Claire 6d8e0fae3e
Merge pull request from GHSA-ccm4-vgcc-73hp
* Tighten allowed HTML in oEmbed-based preview cards

* Sanitize preview cards at render time

* Add `sandbox` attribute to preview card iframes
2 years ago
Claire fed9cbfd2b
Add hardened headers to user-uploaded files (#25756) 2 years ago
Claire c78280a8ce
Add translate="no" to outgoing mentions and links (#25524) 2 years ago
Matt Jankowski b5675e265e
Add coverage for `CLI::Feeds` command (#25319) 2 years ago
Matt Jankowski 07933db788
Add coverage for `CLI::Cache` command (#25238) 2 years ago
Nick Schonning c66250abf1
Autofix Rubocop Regex Style rules (#23690)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Jed Fox 768b00c4d0
Consistently use middle dot (·) instead of bullet (•) to separate items (#25248) 2 years ago
Matt Jankowski cd4f0feab8
Extract verify options method in search cli (#25121) 2 years ago
Matt Jankowski 35c1c3e57a
Add CLI area progress bar helper (#25208) 2 years ago
Matt Jankowski dc26140d54
Use thor methods instead of tty prompt in maintenance cli (#25207) 2 years ago
Matt Jankowski 1baf40077b
Fix FormatStringToken cop in CLI (#25122) 2 years ago
Matt Jankowski 80c7de9984
Fix Rails/WhereExists cop in CLI (#25123) 2 years ago
Matt Jankowski b7b96efd17
Extract helper method for error report in cli/accounts command (#25119) 2 years ago
Matt Jankowski 2cecb2dc9e
Increment index which was previously not used in maintenance CLI loop (#25118) 2 years ago
Matt Jankowski ec9bc7e604
Consistent usage of CLI `dry_run?` method (#25116) 2 years ago
Matt Jankowski 55785b1603
Extract methods for user de-duping in maintenance CLI (#25117) 2 years ago
Claire 1d588d58f1
Improve various queries against account domains (#25126) 2 years ago
Matt Jankowski 384345b0de
Add CLI Base class for command line code (#25106) 2 years ago
Matt Jankowski b6b4ea4ca5
Move the mastodon/*_cli files to mastodon/cli/* (#24139) 2 years ago
Nick Schonning 99e2e9b81f
Fix minor typos in comments and spec names (#21831) 2 years ago
Daniel M Brasil 536dd046d4
Add ability to block sign-ups from IP using the CLI (#24870) 2 years ago
Daniel M Brasil ffb3fef7db
Fix uncaught `ActiveRecord::StatementInvalid` in Mastodon::IpBlocksCLI (#24861) 2 years ago
Renaud Chaput 830e6cefae
Add version suffixes to nightly & edge image builds (#24823) 2 years ago
Nick Schonning 569b39256b
Bump rubocop-rails 2.19.1 with update .rubocop_todo.yml (#24469) 2 years ago
Nick Schonning da3bd913ae
Autofix Rubocop Style/HashSyntax (#23754) 2 years ago
Matt Jankowski 2c6c398c60
Fix Performance/CollectionLiteralInLoop cop (#24819) 2 years ago
Matt Jankowski 24491abf6d
Fix Rails/DeprecatedActiveModelErrorsMethods cop (#24742) 2 years ago
Matt Jankowski 5e060e1f44
Fix Performance/Sum cop (#24788) 2 years ago
Claire 1ed0ff30d3
Fix `tootctl accounts cull` crashing when encountering a domain resolving to a private address (#23378) 2 years ago
Matt Jankowski 88d33f361f
Fix Lint/DuplicateBranch cop (#24766) 2 years ago
Daniel M Brasil e8fe941015
Fix `tootctl accounts approve --number N` not aproving N earliest registrations (#24605) 2 years ago
Matt Jankowski 2e43461100
Fix Rails/Output cop (#24687) 2 years ago
Matt Jankowski 60ac9e8634
Fix Rails/SquishedSQLHeredocs cop (#24694) 2 years ago
Daniel M Brasil 1d9969fadf
Fix `tootctl accounts create --reattach --force` not working with confirmed accounts (#24680) 2 years ago
Claire 528b8e7e3a
Fix crash in `tootctl accounts create --reattach --force` (#24557) 2 years ago
Daniel M Brasil faf657d709
Fix uncaught ActiveRecord::StatementInvalid exception in `Mastodon::AccountsCLI#approve` (#24590) 2 years ago
Eugen Rochko e98c86050a
Refactor `Cache-Control` and `Vary` definitions (#24347) 2 years ago
Daniel M Brasil 3afa1fda7a
Fix email confirmation skip option in `tootctl accounts modify USERNAME --email EMAIL --confirm` (#24578) 2 years ago
Daniel M Brasil b0800d602e
tootctl: add --approve option to tootctl accounts create (#24533) 2 years ago
Matt Jankowski a2a66300d9
Clean up the post deployment migration generator (#24233) 2 years ago
Claire 3d8bd093b9
Bump version to v4.1.2 (#24427) 2 years ago
Claire 5c499f54e3
Change root Chewy strategy to emit a warning instead of erroring out in production mode (#24327) 2 years ago
Alison Wheeler 2f7c3cb628
Update redis_config.rb to remove warning message (#24352) 2 years ago
Eugen Rochko a9b5598c97
Change user settings to be stored in a more optimal way (#23630)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Claire 0d70deee53
Add migration tests for user mail notification settings (#24277) 2 years ago
Matt Jankowski b9e34ef098
Migration warning helper, and only run in production env (#24253) 2 years ago
Claire 7f8e1bede4
Bump version to v4.1.1 (#24201) 2 years ago
Claire bdeb6ff180
Fix crash in `tootctl` commands making use of parallelization when Elasticsearch is enabled (#24182) 2 years ago
Nick Schonning aa947a143b
Regen rubocop-todo without Max shadowing (#24076) 2 years ago
Eugen Rochko f0e727f958
Add cache headers to static files served through Rails (#24120) 2 years ago
Nick Schonning 25d36b6edd
Autofix Rubocop Style/RedundantArgument (#23798) 2 years ago
Claire 1d0ad558ff
Change sidekiq-bulk's batch size from 10,000 to 1,000 jobs in one Redis call (#24034) 2 years ago
Nick Schonning e762a14c0a
Enable Rubocop Performance/DeleteSuffix (#24077) 2 years ago
Claire f432db7b9f
Fix sidekiq jobs not triggering Elasticsearch index updates (#24046) 2 years ago
9p4 b715bd8e53
Add refreshing many accounts at once with "tootctl accounts refresh" (#23304) 2 years ago
Jean byroot Boussier 922837dc96
Upgrade to latest redis-rb 4.x and fix deprecations (#23616)
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2 years ago
Claire 8784498ebf
Fix tootctl accounts migrate error due to typo (#23567) 2 years ago
Claire 3a6451c867
Add support for incoming rich text (#23913) 2 years ago
Nick Schonning 8fd3fc404d
Autofix Rubocop Rails/RootPathnameMethods (#23760) 2 years ago
Nick Schonning 0cfdd1a401
Enable Rubocop Style/StringConcatenation defaults (#23792) 2 years ago
Nick Schonning 59c8d43d94
Autofix Rubocop Style/RescueStandardError (#23745) 2 years ago
Nick Schonning af4c95100c
Autofix Rubocop Style/FormatString (#23743) 2 years ago
Nick Schonning 717683d1c3
Autofix Rubocop remaining Layout rules (#23679) 2 years ago
Nick Schonning d2dcb6c45a
Autofix Rubocop Style/UnpackFirst (#23741) 2 years ago
Nick Schonning bf785df9fe
Audofix Rubocop Style/WordArray (#23739) 2 years ago
Nick Schonning 81ad6c2e39
Autofix Rubocop Style/StringLiterals (#23695) 2 years ago
Nick Schonning 2177daeae9
Autofix Rubocop Style/RedundantBegin (#23703) 2 years ago
Nick Schonning ab7816a414
Autofix Rubocop Style/Lambda (#23696) 2 years ago
Nick Schonning e2a3ebb271
Autofix Rubocop Style/IfUnlessModifier (#23697) 2 years ago
Nick Schonning a6f77aa28a
Autofix Rubocop Lint/AmbiguousOperatorPrecedence (#23681) 2 years ago
Nick Schonning e2567df860
Enable Lint/RedundantCopDisableDirective (#23687) 2 years ago
Nick Schonning d65b2c1924
Apply Rubocop Style/RedundantConstantBase (#23463) 2 years ago
Nick Schonning ac59d6f19f
Enable Rubocop Style/NumericLiterals (#23647) 2 years ago
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length (#23632) 2 years ago
Nick Schonning 0c9d455ea5
Upgrade to Stylelint 15 with Prettier (#23558) 2 years ago
Claire 70c0d754a6
Bump version to 4.1.0 (#23471)
* Bump version to 4.1.0

* Editorialize changelog some more and highlight API changes

* Update changelog
2 years ago
Nick Schonning 11557d1c5a
Apply Rubocop Rails/RootPublicPath (#23447) 2 years ago
Nick Schonning f68bb52556
Apply Rubocop Style/NegatedIfElseCondition (#23451) 2 years ago
Nick Schonning 203739dd3a
Apply Rubocop Performance/StringIdentifierArgument (#23444) 2 years ago
Nick Schonning c92e033cdd
Apply Rubocop Performance/BindCall (#23437) 2 years ago
Claire 79ca19e9b2
Bump version to 4.1.0rc3 (#23384) 2 years ago
Claire 2f112432e6
Bump version to 4.1.0rc2 (#23220) 2 years ago
Claire 8180f7ba19
Bump version to 4.1.0rc1 (#23112) 2 years ago
JT Olio a5fd2fe1cb
Add Storj DCS to cloud object storage options (#21929)
* Add Storj DCS to cloud object storage options

More explanation here: https://forum.storj.io/t/object-storage-provider-for-mastodon-instance/11464/37

* more help for which command to use
2 years ago
Claire cb4e28f405
Add `tootctl domains purge` options to select subdomains and keep domain blocks (#22063)
* Add --include-subdomains option to tootctl domains purge

* Add support for '*.' subdomain wildcard patterns in `tootctl domains purge`

* Fix custom emojis deletion not following subdomain and URI options

* Change `tootctl domains purge` to not purge domain blocks unless --purge-domain-blocks is passed

* Refactor `tootctl domains purge`

* Add feedback on deleted domain blocks
2 years ago
Jeong Arm 0e8f8a1a1c
Implement tootctl accounts prune (#18397)
* Implement tootctl accounts prune

* Optimise query

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Claire 745bdb11a0
Add `tootctl accounts migrate` (#22330)
* Add tootctl accounts replay-migration

Fixes #22281

* Change `tootctl accounts replay-migration` to `tootctl accounts migrate`
2 years ago
Claire a3a5aa1597
Fix incorrect env file generation in mastodon:setup (#23072)
Regression from #23012
2 years ago
Claire 15b88a83ab
Fix sanitizer parsing link text as HTML when stripping unsupported links (#22558) 2 years ago
Claire a65f86ae55
Fix `$` not being escaped in `.env.production` file generated by `mastodon:setup` (#23012)
* Fix `$` not being escaped in `.env.production` file generated by `mastodon:setup`

* Improve robustness of dotenv escaping
2 years ago
Nick Schonning 558ac411c4
Expand Stylelint glob to include CSS files (#22469) 2 years ago
Dan Peterson 3d3429243f
Fix default S3_HOSTNAME used in mastodon:setup (#19932)
s3-us-east-1.amazonaws.com does not exist.

Co-authored-by: Effy Elden <effy@effy.space>
2 years ago
Claire f239d31f23
Add --email and --dry-run options to `tootctl accounts delete` (#22328) 2 years ago
Evan 78ef635980
Add command to remove avatar and header images of inactive remote accounts from the local database (#22149)
* Add tootctl subcommand media remove-profile-media

* Trigger workflows

* Correcting external linting

* External linting error

* External linting fix

* Merging with remove command

* Linting

* Correct long option names

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Correct long option names

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Correct long option names

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Remove saving a list of purged accounts

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Claire 55b210b3e5
Fix crash and incorrect behavior in tootctl domains crawl (#19004) 2 years ago
Claire c52263f6f8
Fix deprecation warning in `tootctl accounts rotate` (#22120) 2 years ago
Claire 66a70ebb6e
Fix pre-4.0 admin action logs (#22091)
* Fix BackfillAdminActionLogs post-deployment migration

* Improve migration tests

* Backfill admin action logs again
2 years ago
Claire 098ced7420
Remove support for Ruby 2.6 (#21477)
As pointed out by https://github.com/mastodon/mastodon/pull/21297#discussion_r1028372193
at least one of our dependencies already dropped support for Ruby 2.6, and we
had removed Ruby 2.6 tests from the CI over a year ago (#16861).

So stop advertising Ruby 2.6 support, bump targeted version, and drop some
compatibility code.
2 years ago
Claire d587a268fd
Add logging for Rails cache timeouts (#21667)
* Reduce redis cache store connect timeout from default 20 seconds to 5 seconds

* Log cache store errors
2 years ago
Eugen Rochko 03b0f3ac83
Bump version to 4.0.2 (#20725) 2 years ago
Eugen Rochko 4415dd6036
Bump version to 4.0.1 (#20696) 2 years ago
Eugen Rochko fb389bd73c
Bump version to 4.0.0 (#20636) 2 years ago
Eugen Rochko 75299a042c
Bump version to 4.0.0rc4 (#20634) 2 years ago
Claire 457c37e47a
Fix index name in fix-duplicates task (#20632) 2 years ago
Eugen Rochko b31afc6294
Fix error when passing unknown filter param in REST API (#20626)
Fix #19156
2 years ago
Claire bd806a3090
Update fix-duplicates (#20502)
Fixes #19133
2 years ago
Arthur Isac 1af482659d
Copied Spaces support from packer .rake (#20573) 2 years ago
Eugen Rochko 53028af10e
Bump version to 4.0.0rc3 (#20378) 2 years ago
Pierre Bourdon 36bc90e8aa
blurhash_transcoder: prevent out-of-bound reads with <8bpp images (#20388)
The Blurhash library used by Mastodon requires an input encoded as 24
bits raw RGB data. The conversion to raw RGB using Imagemagick did not
previously specify the desired bit depth. In some situations, this leads
Imagemagick to output in a pixel format using less bpp than expected.
This then manifested as segfaults of the Sidekiq process due to
out-of-bounds read, or potentially a (highly noisy) memory infoleak.

Fixes #19235.
2 years ago
Yamagishi Kazutoshi 19a8563905
Fix `ENV` (#20377) 2 years ago
F 9feba112a7
Make enable_starttls configurable by envvars (#20321)
ENABLE_STARTTLS is designed to replace ENABLE_STARTTLS_AUTO by accepting
three values: 'auto' (the default), 'always', and 'never'. If
ENABLE_STARTTLS isn't provided, we fall back to ENABLE_STARTTLS_AUTO. In
this way, this change should be fully backwards compatible.

Resolves #20311
2 years ago
Eugen Rochko 5187e4e758
Bump version to 4.0.0rc2 (#19831) 2 years ago
Eugen Rochko e02812d5b6
Add assets from Twemoji 14.0 (#19733) 2 years ago
Claire 1dca08b76f
Fix admin action logs page (#19649)
* Add tests

* Fix crash when trying to display orphaned action logs

* Add migration for older admin action logs
2 years ago
Claire e91418436a
Fix mastodon:setup not setting the admin's role properly (#19670)
* Fix mastodon:setup not setting the admin's role properly

* Set contact username when creating admin account in mastodon:setup
2 years ago
pea-sys c68e6b52d9
png optimization(loss less) (#19630) 2 years ago
Eugen Rochko 8ae0936ddd
Bump version to 4.0.0rc1 (#19473) 2 years ago
Eugen Rochko d7595adbf4
Add `--remove-role` option to `tootctl accounts modify` (#19477)
Fix #19152
2 years ago
Jeong Arm 882e54c786
Fix Ambiguous SQL error on tootctl media refresh (#19206) 2 years ago
Claire 1145dbd327
Improve error reporting and logging when processing remote accounts (#15605)
* Add a more descriptive PrivateNetworkAddressError exception class

* Remove unnecessary exception class to rescue clause

* Remove unnecessary include to JsonLdHelper

* Give more neutral error message when too many webfinger redirects

* Remove unnecessary guard condition

* Rework how “ActivityPub::FetchRemoteAccountService” handles errors

Add “suppress_errors” keyword argument to avoid raising errors in
ActivityPub::FetchRemoteAccountService#call (default/previous behavior).

* Rework how “ActivityPub::FetchRemoteKeyService” handles errors

Add “suppress_errors” keyword argument to avoid raising errors in
ActivityPub::FetchRemoteKeyService#call (default/previous behavior).

* Fix Webfinger::RedirectError not being a subclass of Webfinger::Error

* Add suppress_errors option to ResolveAccountService

Defaults to true (to preserve previous behavior). If set to false,
errors will be raised instead of caught, allowing the caller to be
informed of what went wrong.

* Return more precise error when failing to fetch account signing AP payloads

* Add tests

* Fixes

* Refactor error handling a bit

* Fix various issues

* Add specific error when provided Digest is not 256 bits of base64-encoded data

* Please CodeClimate

* Improve webfinger error reporting
2 years ago
luzpaz 4aa3b9bd01
Fix typos (#18604)
* Fix typos

Found via `codespell -q 3 -S ./CHANGELOG.md,./AUTHORS.md,./config/locales,./app/javascript/mastodon/locales -L ba,keypair,medias,pixelx,ro`

* Follow-up typo fix
2 years ago
Eugen Rochko c556c3a0d1
Add admin API for managing canonical e-mail blocks (#19067) 2 years ago
Jeong Arm e682975afd
Add '--days' option to tootctl media refresh (#18425)
* Add '--days' option to tootctl media refresh

* Fix undefined scope
2 years ago
Brayd fc46fa8f99
Minimal adjustments to the short description (#18001)
Minimal adjustments have been made to the short description so that it logically follows the long description
2 years ago
Eugen Rochko 44b2ee3485
Add customizable user roles (#18641)
* Add customizable user roles

* Various fixes and improvements

* Add migration for old settings and fix tootctl role management
3 years ago