Commit Graph

491 Commits (v3.4.4)

Author SHA1 Message Date
Eugen Rochko 4a98e77d0e
Change `tootctl media refresh` to skip already downloaded attachments (#12118) 5 years ago
Eugen Rochko 0aaa3afc2d
Add `tootctl media usage` command (#12115) 5 years ago
Eugen Rochko 6c9b4f6b77
Fix tootctl not allocating enough database connections for main thread (#12097) 5 years ago
Eugen Rochko 38b6c34e32
Fix issues with tootctl's parallelization and progress reporting (#12093) 5 years ago
Jeong Arm c4fbfaf0b8 Remove unused option from tootctl accounts cull (#12074) 5 years ago
Eugen Rochko 83d3e7733d
Bump version to 3.0.0 (#12000) 5 years ago
Eugen Rochko bae268b2f6
Bump version to 3.0.0rc3 (#12063) 5 years ago
Eugen Rochko ca22a22d7f
Fix performance of GIF re-encoding (#12057)
* Change animated GIF detection to not shell out to ImageMagick

Signed-off-by: Eugen Rochko <eugen@zeonfederated.com>

* Change video encoding parameters to limit to 10800 video frames

Signed-off-by: Eugen Rochko <eugen@zeonfederated.com>

* Limit GIF image size further

Signed-off-by: Eugen Rochko <eugen@zeonfederated.com>

* Always strip metadata from video files

* Fix code style issues
5 years ago
Takeshi Umeda 0ce0baa9b5 Add parallelization to `tootctl search deploy` (#12051)
* Add parallel gem

* Modify parallel option in tootctl search deploy

* Add paralell option to tootctl search deploy

* Change 1 to false

* Clean up

* Rename --parallel to --processes
5 years ago
Eugen Rochko c7adf80827
Change `tootctl domains purge` to accept multiple domains at once (#12046) 5 years ago
Eugen Rochko 5c42f47617
Fix records not being indexed sometimes (#12024)
It's possible that after commit callbacks were not firing when
exceptions occurred in the process. Also, the default Sidekiq
strategy does not push indexing jobs immediately, which is not
necessary and could be part of the issue too.
5 years ago
Eugen Rochko 13b06d4b3b
Bump version to 3.0.0rc2 (#11999) 5 years ago
Eugen Rochko a1f04c1e34
Fix authentication before 2FA challenge (#11943)
Regression from #11831
5 years ago
Yamagishi Kazutoshi 172eaeba3f Add config of multipart threshold for S3 (#11924) 5 years ago
Eugen Rochko e87bcaa107
Bump version to 3.0.0rc1 (#11900) 5 years ago
Eugen Rochko 3c8372fa81
Bump version to 2.9.3 (#11899) 5 years ago
Eugen Rochko 9361981388
Add missing locale file for ga and add rake task to check for it (#11813)
* Add missing locale file for ga and add rake task to check for it

* Update lib/tasks/repo.rake

Co-Authored-By: Yamagishi Kazutoshi <ykzts@desire.sh>

* Fix check-i18n build
5 years ago
Eugen Rochko c5d37f18cb
Change deletes to preserve soft-deleted statuses in unresolved reports (#11805)
Change all account actions except "none" to resolve all unresolved reports

Refactor `SuspendAccountService` to be more readable
5 years ago
Eugen Rochko 031ca25014
Add retry for failed media downloads and `tootctl media refresh` (#11775) 5 years ago
Eugen Rochko 8674814825
Change tootctl to use inline parallelization instead of Sidekiq (#11776)
- Remove --background option
- Add --concurrency(=5) option
- Add progress bars
5 years ago
Eugen Rochko 96702e7f67
Add `tootctl cache recount` command (#11597) 5 years ago
Stanislas 3a77090d01 Limit "tootctl accounts follow" to local accounts (#11592)
To (somewhat) limit mass remote follow. Fix #11360
5 years ago
Darius Kazemi f96f45ef12 Add option to exclude suspended domains/subdomains from tootctl domains crawl (#11454)
* Add "--exclude-suspended" to tootctl domains crawl

This new option ignores any instances suspended server-wide as
well as their associated subdomains. This queries all domain
blocks up front, then runs a regexp on each domain. This improves
performance over what may be the obvious implementation, which is
to ask `DomainBlocks.blocked?(domain)` for each domain -- this
hits the DB many times, slowing things down considerably.

* cleaning up code style

* Compiling regex

* Removing ternary operator
5 years ago
Eugen Rochko 24552b5160
Add whitelist mode (#11291) 5 years ago
dependabot-preview[bot] 15de24a425 Bump json-ld-preloaded from 3.0.2 to 3.0.3 (#11316)
* Bump json-ld-preloaded from 3.0.2 to 3.0.3

Bumps [json-ld-preloaded](https://github.com/ruby-rdf/json-ld-preloaded) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/ruby-rdf/json-ld-preloaded/releases)
- [Commits](https://github.com/ruby-rdf/json-ld-preloaded/compare/3.0.2...3.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* use json-ld edge
5 years ago
mayaeh 0d80f686d8 Add `tootctl preview_cards remove` (#11320)
* Add `tootctl preview_cards remove`

* fix code style

* Remove `Scheduler::PreviewCardsCleanupScheduler` file

* fix code style again
Add exclude case where image_file_name is blank

* Added a function to output confirmation if the specified number of days is less than 2 weeks
5 years ago
Clar Fon a6b4440115 Remove pre from version, add extra suffix variable (#11407) 5 years ago
Eugen Rochko e64e6a03dd
Add categories for custom emojis (#11196)
Fix #7940
5 years ago
Eugen Rochko b5c772c3d4
Bump version to 2.9.2 (#11152) 5 years ago
Eugen Rochko 84f945d64c
Bump version to 2.9.1 (#11143) 5 years ago
Eugen Rochko 8f23726918
Fix converted media being saved with original extension and mime type (#11130) 5 years ago
Eugen Rochko c9eeb2e832
Bump version to 2.9.0 (#11074) 5 years ago
Eugen Rochko 275f09ccab
Bump version to 2.9.0rc2 (#11070) 5 years ago
Eugen Rochko 0949c43ab3
Bump version to 2.9.0rc1 (#11004) 5 years ago
Darius Kazemi 4431ce52a6 Specify gzip required in tootctl emoji help (#11000) 5 years ago
Eugen Rochko 5cdb4c483f
Forward port version bumps to 2.8.3 and 2.8.4 (#10819)
* Bump version to 2.8.3

* Bump version to 2.8.4
5 years ago
ThibG 14f6ce2885 Record account suspend/silence time and keep track of domain blocks (#10660)
* Record account suspend/silence time and keep track of domain blocks

* Also unblock users who were suspended/silenced before dates were recorded

* Add tests

* Keep track of suspending date for users suspended through the CLI

* Show accurate number of accounts that would be affected by unsuspending an instance

* Change migration to set silenced_at and suspended_at

* Revert "Also unblock users who were suspended/silenced before dates were recorded"

This reverts commit a015c65d2d1e28c7b7cfab8b3f8cd5fb48b8b71c.

* Switch from using suspended and silenced to suspended_at and silenced_at

* Add post-deployment migration script to remove `suspended` and `silenced` columns

* Use Account#silence! and Account#suspend! instead of updating the underlying property

* Add silenced_at and suspended_at migration to post-migration

* Change account fabricator to translate suspended and silenced attributes

* Minor fixes

* Make unblocking domains always retroactive
5 years ago
Jeong Arm 03801fcaa5 Remove custom emojis on "tootctl domains purge" (#10721)
* Remove custom emojis on domains purge

* Change message "Removing" to "Removed"
5 years ago
Eugen Rochko 2508370f44
Bump version to 2.8.2 (#10703) 5 years ago
Ushitora Anqou 56880fa76a Add SOURCE_TAG to show source repository's tag (#10698) 5 years ago
Eugen Rochko 8025a41a1f
Add `tootctl cache clear` (#10689) 5 years ago
Eugen Rochko 5f9f610a23
Bump version to 2.8.1 (#10687) 5 years ago
Eugen Rochko d77ee3f276
Fix accounts created through tootctl not being always pre-approved (#10684)
Add `--approve` option to `tootctl accounts modify`
5 years ago
Eugen Rochko fba96c808d
Add blurhash (#10630)
* Add blurhash

* Use fallback color for spoiler when blurhash missing

* Federate the blurhash and accept it as long as it's at most 5x5

* Display unknown media attachments as blurhash placeholders

* Improve style of embed actions and spoiler button

* Change blurhash resolution from 3x3 to 4x4

* Improve dependency definitions

* Fix code style issues
5 years ago
Sho Kusano 3e6c7f3617 Configrationable repository url (#10600)
* config: Add GITHUB_REPOSITORY for repository name

* config: Add SOURCE_BASE_URL for repository url

* Show source_url and repository name on getting started
5 years ago
Eugen Rochko 6afab2587d
Bump version to 2.8.0 (#10550) 5 years ago
Eugen Rochko 830c2a9ccb
Bump version to 2.8.0rc3 (#10535) 5 years ago
Eugen Rochko c03f926cf3
Bump version to 2.8.0rc2 (#10501) 5 years ago
Takeshi Umeda 08ba69b538 Add `tootctl accounts reset-relationships` (#10483)
* Add `tootctl accounts reset`

* Rename reset to reset-relationships

* Improve command description
5 years ago
Eugen Rochko 20d301c383
Fix missing long description on `tootctl statuses remove` (#10482) 5 years ago
Eugen Rochko 6689e572f3
Add `tootctl emoji purge` (#10481)
Fix #10441
5 years ago
Eugen Rochko e007c7a99b
Add `tootctl accounts approve` (#10480) 5 years ago
Ben Lubar e6814a332c Fix `tootctl accounts cull` (#10460)
* List the actual accounts that would have been culled during a dry run.

Otherwise, the dry run mode is basically useless.

* Prevent unreachable domains from inheriting the previous status code.

* Update CHANGELOG.md for #10460.
5 years ago
Jeong Arm 67eb47e25f Simplify culling and fix race condition (#10440) 5 years ago
Eugen Rochko ac650d7a13
Bump version to 2.8.0rc1 (#10340)
Update AUTHORS.md
Update CHANGELOG.md
5 years ago
Eugen Rochko 026dd75208
Add `tootctl self-destruct` (#10367)
Fix #10305
5 years ago
Eugen Rochko 5d41532d94
Add `tootctl search deploy` to avoid ugly rake task syntax (#10403) 5 years ago
Eugen Rochko 51e154f5e8
Admission-based registrations mode (#10250)
Fix #6856
Fix #6951
5 years ago
Eugen Rochko 67665023c3
Add `tootctl statuses remove` to sweep unreferenced statuses (#10063)
Query by @tateisu

Fix #1554
5 years ago
Eugen Rochko 7d5e2dda78
Bump version to 2.7.4 (#10179) 5 years ago
Eugen Rochko 96db7191d8
Bump version to 2.7.3 (#10102) 5 years ago
Eugen Rochko 7853be1f06
Bump version to 2.7.2 (#10067) 5 years ago
Eugen Rochko 28866d329b
Bump version to 2.7.1 (#9932) 5 years ago
Stanislas 01bc2f84a9 Fix SUPERUSER postgres command (#9877) 5 years ago
Eugen Rochko e9cd3636c6
Fix `tootctl accounts delete` not deleting user record as well (#9874) 5 years ago
Eugen Rochko 7cf85c0133
Bump version to 2.7.0 5 years ago
Eugen Rochko 9fd6443487
Add translators to AUTHORS.md (#9865) 5 years ago
Eugen Rochko 7c3fddeab4
Change CHANGELOG.md references from pull requests to authors (#9864)
Add `rake repo:changelog` to do that automatically
5 years ago
Eugen Rochko 57e79eb1c2
Bump to 2.7.0rc3 5 years ago
Eugen Rochko b59818d4ab
Bump version to 2.7.0rc2 (#9836) 5 years ago
Eugen Rochko 3c218cd76d
Add `tootctl --version` (#9835) 5 years ago
Eugen Rochko 59e3a7f87b
Fix `tootctl domains crawl` with JSON format output crash (#9820)
Fix #9817
5 years ago
Eugen Rochko ee5e24807f
Add `tootctl domains crawl` (#9809) 5 years ago
Eugen Rochko 15aed1ee6c
Bump version to 2.7.0rc1 (#9718) 5 years ago
Eugen Rochko ed12619985
Add tootctl accounts follow ACCT (#9414)
Fix #9369
5 years ago
Eugen Rochko 5d2fc6de32
Add REST API for creating an account (#9572)
* Add REST API for creating an account

The method is available to apps with a token obtained via the client
credentials grant. It creates a user and account records, as well as
an access token for the app that initiated the request. The user is
unconfirmed, and an e-mail is sent as usual.

The method returns the access token, which the app should save for
later. The REST API is not available to users with unconfirmed
accounts, so the app must be smart to wait for the user to click a
link in their e-mail inbox.

The method is rate-limited by IP to 5 requests per 30 minutes.

* Redirect users back to app from confirmation if they were created with an app

* Add tests

* Return 403 on the method if registrations are not open

* Require agreement param to be true in the API when creating an account
5 years ago
Eugen Rochko 2ee779dcd3
Update emoji codepoint mappings to v11.0 (#9618) 5 years ago
Eugen Rochko 857e8eb312
Fix tootctl accounts rotate not updating public keys (#9556)
This allowed you to brick your system when running that command, because the accounts would continue to advertise the old public key, but sign things with the new one
6 years ago
Eugen Rochko 6ddf0432e7
Improve account suspension speed and completeness (#9290)
- Some associations were missing from the clean-up
- Some attributes were not reset on suspension
- Skip federation and streaming deletes when purging a dead domain
- Move account association definitions to concern
6 years ago
Eugen Rochko 2df5ef18ae
Bump version to 2.6.5 (#9413) 6 years ago
ThibG 84e5ed43e7 Preload common JSON-LD contexts (#9412)
Fixes #9411
6 years ago
Eugen Rochko c480da375b
Bump version to 2.6.4 (#9402) 6 years ago
Eugen Rochko d037e88277
Bump version to 2.6.3 (#9391) 6 years ago
Eugen Rochko 637d0ed838
Bump version to 2.6.2 (#9370) 6 years ago
Renato "Lond" Cerqueira c66739b418 Touch account on successful response, change char shown when culled (#9293)
Just the color is not enough change since not everyone uses colored
terminals.
Touching the account makes it so that the account is not in the
threshold window in case of running again
6 years ago
mayaeh 8f7e3d3772 Fix "tootctl media remove" can't count the file size (#9288)
* Fixed an issue where "tootctl media remove" can not count the file size.

* Fixed the problem pointed out by codeclimate.
6 years ago
Eugen Rochko 16a16f62c7
Fix nil error regression from #9229 in tootctl media remove (#9239)
Fix #9237
6 years ago
Eugen Rochko 3ddb460449
Display amount of freed disk space in tootctl media remove (#9229)
* Display amount of freed disk space in tootctl media remove

Fix #9213

* Fix code style issue
6 years ago
Eugen Rochko ba06a5f485
Bump version to 2.6.1 (#9172) 6 years ago
Eugen Rochko 50ce347ef9
Bump version to 2.6.0 (#9149)
* Bump version to 2.6.0

* Update CHANGELOG.md
6 years ago
Eugen Rochko 66019b0ec4
Bump version to 2.6.0rc4 (#9164)
* Bump version to 2.6.0rc4

* Update CHANGELOG.md
6 years ago
Eugen Rochko e84da282f6
Bump version to 2.6.0rc3 (#9142)
* Bump version to 2.6.0rc3

* Update CHANGELOG.md
6 years ago
Eugen Rochko 6f78500d4f
Do not remove "dead" domains in tootctl accounts cull (#9108)
Leave `tootctl accounts cull` to simply check removed accounts from
live domains, and skip temporarily unavailable domains, while listing
them in the final output for further action.

Add `tootctl domains purge DOMAIN` to be able to purge a domain from
that list manually
6 years ago
Sascha b9d7021c1b cli: set exit_on_failure for all CLI classes (#9094) 6 years ago
Eugen Rochko 2f0797bdbd
Bump version to 2.6.0rc2 (#9087)
* Bump version to 2.6.0rc2

* Update CHANGELOG.md
6 years ago
Eugen Rochko f5b8bd4392
Fix cull tripping on nil in last_webfingered_at (#9051)
Fix #8741
6 years ago
Jeong Arm 2e18ad74dc Fix tootctl cull on dead servers (#9041)
* Delete first 9 accounts on dead servers

* Clean up code by moving dead server culling to the end
6 years ago
Jeong Arm 68f0e4d54e Handle if username is not found on tootctl feeds build (#9040) 6 years ago
Eugen Rochko f468bfb830
Bump version to 2.6.0rc1 (#9025)
* Bump version to 2.6.0rc1

* Update AUTHORS.md

* Update CHANGELOG.md
6 years ago
Eugen Rochko ef43f1d2ca
Bump version to 2.5.2 (#8960) 6 years ago
Eugen Rochko e6c01171de
Bump version to 2.5.1 (#8953) 6 years ago
ashleyhull-versent f194857ac9 rubocop issues - Cleaning up (#8912)
* cleanup pass

* undo mistakes

* fixed.

* revert
6 years ago
Eugen Rochko 186024a058
Add tootctl settings registrations open (#8829) 6 years ago
Eugen Rochko ac07bfb018 Fix tootctl accounts reattaching not unsuspending deleted account (#8812) 6 years ago
Eugen Rochko 38f5f9cf5b
Add tootctl accounts backup (#8811) 6 years ago
ThibG 9b32898e3c Unconditionally re-encode locally-uploaded images to strip metadata (#8714)
This strips metadata on file upload by re-encoding the files, at the cost
of possible slight image quality decrease and processing resources.
6 years ago
Eugen Rochko 6a3f9b7e53
Move more tasks to tootctl (#8675)
* Move more tasks to tootctl

- tootctl feeds build
- tootctl feeds clear
- tootctl accounts refresh

Clean up exit codes and help messages

* Move user modifying to tootctl

* Improve user modification through CLI, rename commands

add -> create
mod -> modify
del -> delete

To remove ambiguity

* Fix code style issues

* Fix not being able to unset admin/mod role
6 years ago
luzpaz 40dd19be37 Misc. typos (#8694)
Found via `codespell -q 3 --skip="./app/javascript/mastodon/locales,./config/locales"`
6 years ago
rinsuki 25dd523887 using mailto scheme in AUTHORS.md (#8663) 6 years ago
nightpool b0b484ba18 Add rake task for generating AUTHORS.md (#8661)
* add rake task for generating AUTHORS.md

* update AUTHORS.md

* rubocop
6 years ago
Eugen Rochko 47ea318479
tootctl accounts [add|del|cull] (#8642)
* CLI interface for creating/deleting local users

- tootctl accounts add USERNAME
- tootctl accounts del USERNAME

* Add CLI interface for culling remote users that no longer exist

- tootctl accounts cull
6 years ago
Eugen Rochko b65a9b7243
Bump version to 2.5.0 6 years ago
Eugen Rochko 08721170da
Bump version to 2.5.0rc2 6 years ago
Eugen Rochko 50f226348f
Fix wrong string being used on login failure when using LDAP (#8534)
Fix #8527
6 years ago
mayaeh 18eb565755 Add --verbose and --dry-run option to tootctl media remove (#8519)
* Add --verbose and --dry-run options to CLI interface for removing remote media.

* Fix coding style problem.
6 years ago
mayaeh cc26fd71ac Fix CLI interface for removing remote media (#8506)
* Fix that can't delete media files even if "tootctl media remove" execute when "--background" not attached.

* Revert

This reverts commit 5aa7e09645b27bae38a26030148b23e553ee2662.

* Change to obtain and pass all columns when "--background" option is false.
6 years ago
Eugen Rochko cabdbb7f9c
Add CLI task for rotating keys (#8466)
* If an Update is signed with known key, skip re-following procedure

Because it means the remote actor did *not* lose their database

* Add CLI method for rotating keys

    bin/tootctl accounts rotate [USERNAME]

Generates a new RSA key per account and sends out an Update activity
signed with the old key.

* Key rotation: Space out Update fan-outs every 5 minutes per 1000 accounts

* Skip suspended accounts in key rotation
6 years ago
Quint Guvernator da13fa5021 Fix low-hanging rubocop gripes (#8458)
* rubocop: quit being so picky

* rubocop: miscellany

* rubocop: prefer present to blank
6 years ago
Eugen Rochko b9c3788485
Fix NUM_DAYS in rake mastodon:media:remove_remote and print warning (#8462)
Remove old deprecated rake tasks
6 years ago
Eugen Rochko b378b4c5c7
Add CLI interface for importing custom emoji (#8437)
bin/tootctl emoji import PATH_TO_TAR

Fix #8435
6 years ago
M Somerville 2bba6e582d Rename S3_CLOUDFRONT_HOST to S3_ALIAS_HOST. (#8423)
Still check for S3_CLOUDFRONT_HOST for existing installs.
6 years ago
Eugen Rochko 793eea2982
Add improved CLI interface for removing remote media (#8411)
./bin/tootctl media remove --days 7 --background

Make the old rake task point to it
6 years ago
Eugen Rochko 23752639b2
Bump version to 2.5.0rc1 (#8356) 6 years ago
Eugen Rochko d98de8ada7
Get rid of all batch order warnings (#8334) 6 years ago
Immae b0f4fe456b Add ldap search filter (#8151) 6 years ago
Eugen Rochko 018a9e4e7f
Add post-deployment migration system (#8182)
Adopted from GitLab CE. Generate new migration with:

    rails g post_deployment_migration name_of_migration_here

By default they are run together with db:migrate. To not run them,
the env variable SKIP_POST_DEPLOYMENT_MIGRATIONS must be set

Code by Yorick Peterse <yorickpeterse@gmail.com>, see also:

83c8241160
6 years ago
ThibG 110b3f6335 Add some feedback to maintenance rake tasks (#8173) 6 years ago
Eugen Rochko bb71538bb5
Redesign public profiles and toots (#8068) 6 years ago
Eugen Rochko 0fb0037ca7
Resize images by area instead of fixed dimensions (#8083)
To improve the way super tall or super ride images are treated, the
numbers remain the same, 1280x1280 and 400x400, but if an image
is less in one dimension than the other, the other can become larger

Thanks to @WAHa_06x36@mastodon.social for the tip
6 years ago
Eugen Rochko 5a6645c922
Fix static GIFs being saved as empty files when using local storage (#8012)
Fix #7997
Fix #6237
6 years ago
Eugen Rochko 7ac5151b74
Bump version to 2.4.3 6 years ago
Eugen Rochko 89dc0c98ee
Bump version to 2.4.3rc3 6 years ago
Eugen Rochko 451e585b97
Bump version to 2.4.3rc2 6 years ago
Eugen Rochko cb36ab9a10
Bump version to 2.4.3rc1 6 years ago
Eugen Rochko d017f240f9
Bump version to 2.4.2 6 years ago
Eugen Rochko 86cce466b6
Bump version to 2.4.2rc3 6 years ago
Eugen Rochko a04dca36a3
Bump version to 2.4.2rc2 6 years ago
Eugen Rochko 3b8023f9f9
Bump version to 2.4.2rc1 6 years ago
Eugen Rochko 0979d4275a
Bump version to 2.4.1 6 years ago
Eugen Rochko 35ae960122
Bump version to 2.4.1rc4 6 years ago
Eugen Rochko 158cd7ee74
Bump version to 2.4.1rc3 6 years ago
Eugen Rochko fab65fb7e5
Bump version to 2.4.1rc2 6 years ago
Eugen Rochko c7405fda11
Fix missing column in select in mastodon:feeds:build task (#7720) 6 years ago
Eugen Rochko ad40bf5e0c
Speed up some rake tasks by moving execution to Sidekiq (#7678)
* Speed up some rake tasks by moving execution to Sidekiq

mastodon:media:remove_silenced
mastodon:media:remove_remote
mastodon:media:redownload_avatars
mastodon:feeds:build

* Fix code style issue
6 years ago
Eugen Rochko a29f196f95
Bump version to 2.4.1rc1 6 years ago
Eugen Rochko 7745a22ec7
Bump version to 2.4.0 6 years ago
Eugen Rochko 292c987522
Bump version to 2.4.0rc5 6 years ago
Eugen Rochko bcbb6aa46f
Bump version to 2.4.0rc4 6 years ago
MIYAGI Hikaru 919eef3098 User agent for WebFinger (#7531)
* User agent for WebFinger

* local_domain → web_domain

* 'http' is away accidentally...
6 years ago
Eugen Rochko 8756fd1e82
Bump version to 2.4.0rc3 6 years ago
Eugen Rochko d75b63e4fb
Bump version to 2.4.0rc2 6 years ago
Eugen Rochko 50ed1e83ac
Bump version to 2.4.0rc1 (#7283) 6 years ago
ThibG a24605961a Fixes/do not override timestamps (#7336)
* Revert "Fixes/do not override timestamps (#7331)"

This reverts commit 581a5c9d29.

* Document Snowflake ID corner-case a bit more

Snowflake IDs are used for two purposes: making object identifiers harder to
guess and ensuring they are in chronological order. For this reason, they
are based on the `created_at` attribute of the object.

Unfortunately, inserting items with older snowflakes IDs will break the
assumption of consumers of the paging APIs that new items will always have
a greater identifier than the last seen one.

* Add `override_timestamps` virtual attribute to not correlate snowflake ID with created_at
6 years ago
Eugen Rochko cb5b5cb5f7
Slightly reduce RAM usage (#7301)
* No need to re-require sidekiq plugins, they are required via Gemfile

* Add derailed_benchmarks tool, no need to require TTY gems in Gemfile

* Replace ruby-oembed with FetchOEmbedService

Reduce startup by 45382 allocated objects

* Remove preloaded JSON-LD in favour of caching HTTP responses

Reduce boot RAM by about 6 MiB

* Fix tests

* Fix test suite by stubbing out JSON-LD contexts
6 years ago
Eugen Rochko 63553c6b5c
Add support for separate Redis for cache (#7272)
* Add support for separate Redis for cache

CACHE_REDIS_URL to allow using a different Redis server for cache
purposes, with cache-specific configuration such as key eviction

* Fix code style issues
6 years ago
Alejandro Martinez Ruiz 06817b3c1f tasks/mastodon: fix prompt for Redis password (#7241) 6 years ago
David Baucum ca9192d9ba Ability to specify Redis passwd on mastodon:setup (#7222)
Closes #7221
6 years ago
Yamagishi Kazutoshi 084cf0babf Add extract_foreign_key_action to Mastodon::MigrationHelpers (#7195) 6 years ago
Eugen Rochko 36eac8ba90
Do not default SMTP verify mode to "peer", default to "none" (#6996) 6 years ago
Eugen Rochko 2a90da1837
Fix UniqueUsernameValidator comparison (#6926)
Comparison was downcasing only one side, therefore if previously
existing account had a non-lowercase spelling, it would be ignored
when checking for duplicates.

New rake task `mastodon:maintenance:find_duplicate_usernames` will
help find constraint violations that might have occured from the
presence of this bug.

Bump version to 2.3.3
6 years ago
Akihiko Odaki 54b273bf99 Close http connection in perform method of Request class (#6889)
HTTP connections must be explicitly closed in many cases, and letting
perform method close connections makes its callers less redundant and
prevent them from forgetting to close connections.
6 years ago
Eugen Rochko 6cc432bbc4
Bump version to 2.3.2 6 years ago
Eugen Rochko dafae9818d
Bump version to 2.3.2rc5 6 years ago
Eugen Rochko f64af6473f
Bump version to 2.3.2rc4 6 years ago
Eugen Rochko ac49c7932d
Add LDAP_TLS_NO_VERIFY option, don't require LDAP_ENABLED outside .env (#6845)
Fix #6816, fix #6790
6 years ago
Eugen Rochko 74c39fada0
Bump version to 2.3.2rc3 6 years ago
Eugen Rochko 092f1df9d0
Bump version to 2.3.2rc2 6 years ago
Eugen Rochko cdf8b92fea
Bump version to 2.3.2rc1 6 years ago
Akihiko Odaki 338bff8b93 Correct the reference to user's password in mastodon:add_user task (#6800) 6 years ago
Eugen Rochko 2ef1ce1182
Bump version to 2.3.1 6 years ago
Eugen Rochko 79d3a8553f
Bump version to 2.3.1rc3 6 years ago
Ushitora Anqou 051b649628 Detailed SMTP setup (#6759)
* add detailed SMTP settings setup in mastodon:setup

* add localhost SMTP settings setup in mastodon:setup

* SMTP settings setup should exit after successful delivery of test mail
6 years ago
艮 鮟鱇 f5f165a5eb set SAFETY_ASSURED=1 of db:setup in mastodon:setup (#6758) 6 years ago
Eugen Rochko f89ff65ec7
Bump version to 2.3.1rc2 6 years ago
Eugen Rochko ab27dccba5
Bump version to 2.3.1rc1 6 years ago
Eugen Rochko 6e309f5e45
Bump version to 2.3.0 6 years ago
Eugen Rochko e5f18ace2a
When inside Docker, output saved configuration during mastodon:setup (#6711) 6 years ago
Eugen Rochko bd077ad7d9
Bump version to 2.3.0rc3 6 years ago
Eugen Rochko 64db9ed5f6
After blocking domain with reject_media, invalidate cache (#6679)
Media attachments are part of the association cache of statuses,
since they are presumed to be immutable. Unless this cache is
cleared manually, the statuses will continue to look like they
have media embedded.
6 years ago
Eugen Rochko 4ca60c665e
Bump version to 2.3.0rc2 6 years ago
Eugen Rochko 78d772af86
Fix #3807: Increase avatars to 400x400 max (#6651)
But do not upscale when they are smaller
6 years ago
Akihiko Odaki 778b37790b Do not fetch environment variables to determine default locale (#6618)
The default locale is now set by config.
6 years ago
Thomas Leister ecd36c1ede Fixes #6584 (#6585) 6 years ago
Eugen Rochko 64f2ada5d4
Bump version to 2.3.0rc1 6 years ago
Eugen Rochko 47bdb9b33b
Fix #942: Seamless LDAP login (#6556) 6 years ago
Paul Woolcock 76198c63b6 Some images can cause `convert` to fail, which crashes this whole task (#6565)
* Some images can cause `convert` to fail, which crashes this whole task

* Add more specific exception
6 years ago
Eugen Rochko 5cc716688a
Ensure the app does not even start if OTP_SECRET is not set (#6557)
* Ensure the app does not even start if OTP_SECRET is not set

* Remove PAPERCLIP_SECRET (it's not used by anything, actually)

Imports are for internal consumption and the url option isn't even
used correctly, so we can remove the hash stuff from them
6 years ago
Eugen Rochko d3a62d2637
Fix #6525: Make sure file is opened in LazyThumbnail processor (#6529) 6 years ago
Eugen Rochko 61ed133fea
Account archive download (#6460)
* Fix #201: Account archive download

* Export actor and private key in the archive

* Optimize BackupService

- Add conversation to cached associations of status, because
  somehow it was forgotten and is source of N+1 queries
- Explicitly call GC between batches of records being fetched
  (Model class allocations are the worst offender)
- Stream media files into the tar in 1MB chunks
  (Do not allocate media file (up to 8MB) as string into memory)
- Use #bytesize instead of #size to calculate file size for JSON
  (Fix FileOverflow error)
- Segment media into subfolders by status ID because apparently
  GIF-to-MP4 media are all named "media.mp4" for some reason

* Keep uniquely generated filename in Paperclip::GifTranscoder

* Ensure dumped files do not overwrite each other by maintaing directory partitions

* Give tar archives a good name

* Add scheduler to remove week-old backups

* Fix code style issue
6 years ago
takayamaki f69d7cb43b fix purge_removed_accounts task should suspend account before delete it (#6521) 6 years ago
Eugen Rochko a7171af0a3
Fix avatar and header issues by using custom geometry detector (#6515)
* Fix avatar and header issues by using custom geometry detector

Revert a part of #6508. The file passed to dynamic styles method
was not actually a file, but an instance of Paperclip::Attachment,
which broke all styles by always returning {} from the method.

One problem with GIF avatars was that Paperclip::GeometryDetector
reported wrong dimensions for them, e.g. 120x120 GIF avatar would
for some reason be detected as 120x53. By writing our own geometry
parser, we can use FastImage, which also happens to be faster than
ImageMagick, to detect image dimensions, which are also correct.

Unfortunately, this PR does not implement skipping a `convert`
entirely if the dimensions are already correct, as I found no easy
way to write that behaviour into Paperclip without rewriting the
Paperclip::Thumbnail class.

* Only invoke convert if dimension or format needs to be changed
6 years ago
Eugen Rochko cf36d184f4
Interactive `rake mastodon:setup` task (#6451)
* Add better CLI prompt

* Add rake mastodon:setup interactive wizard

* Test db/redis/smtp configurations and add admin user at the end

* Test database connection even when database does not exist yet
6 years ago
Akihiko Odaki f7bf36d8fc Require environment for generate_static_pages (#6420)
It is required for ApplicationController.
6 years ago
Eugen Rochko e14c20582f
Bump version to 2.2.0 6 years ago
Eugen Rochko 97dcfb0f50
ASSET_HOST is wrong env variable. Fix to CDN_HOST (#6372) 6 years ago
Eugen Rochko e6db3427b7
Bump to 2.2.0rc2 6 years ago
Eugen Rochko b1daa71da5
Fix #6311: Replace relative URLs in CSS only for Premailer (#6335) 6 years ago
Eugen Rochko 0b7a0d15c7
Bump version to 2.2.0rc1 6 years ago
Eugen Rochko 872a0d5bd8
Improve HTML e-mails based on Litmus tests (#6301)
* Use PNG images in HTML e-mails

* Make webpack use URLs with host so fonts load inside HTML e-mails

Convert this back to a relative URL in the premailer CSS loader
since local requests are quicker

* Improve responsive design

* Add missing PNG icon
6 years ago
Eugen Rochko 9b3b40df66
Fix regeneration marker not expiring (#6290)
* Fix regeneration key not getting expired

* Add rake task to remove old regeneration markers
6 years ago