Commit Graph

19 Commits (1a565e4bea45828bfbe16c2c581ec5bc676c5223)

Author SHA1 Message Date
Emelia Smith e258b4cb64
Refactor: replace whitelist_mode mentions with limited_federation_mode ()
Matt Jankowski f1c1dd0118
Rename `with_lock` to `with_redis_lock` to avoid confusion with ActiveRecord's method ()
Claire 276c39361b
Fix anonymous visitors getting a session cookie on first visit ()
Matt Jankowski e633b26f4f
Add allow_other_host in redirects which may go outside app ()
Eugen Rochko 6cf57c6765
Refactor how Redis locks are created ()
* Refactor how Redis locks are created

* Fix autorelease duration on account deletion lock
Eugen Rochko 3917353645
Fix single Redis connection being used across all threads ()
* Fix single Redis connection being used across all Sidekiq threads

* Fix tests
Claire 12f8f39e25
Fix media proxy RedisLocks auto-releasing too fast ()
Follow-up to 
Justin Tracey c9e8e1739c
replace all instances of "ends_with?" with "end_with?" ()
The "ends_with?" method is just a Rails alias of Ruby's "end_with?" method.
Using the latter makes the code less brittle.
Eugen Rochko 6e25574ce5
Fix media attachments enumeration ()
* Fix media attachment enumeration

* Switch media_attachments id to snowflake ids

Co-authored-by: Thibaut Girka <thib@sitedethib.com>
Eugen Rochko 64aac30733
Add customizable thumbnails for audio and video attachments ()
- Change audio files to not be stripped of metadata
- Automatically extract cover art from audio if it exists
- Add `thumbnail` parameter to `POST /api/v1/media`, `POST /api/v2/media` and `PUT /api/v1/media/:id`
- Add `icon` to represent it in attachments in ActivityPub
- Fix `preview_url` containing URL of missing missing image when there is no thumbnail instead of null
- Fix duration of audio not being displayed on public pages until the file is loaded
Eugen Rochko de5305a3a5
Fix redirecting non-functional accounts on public pages ()
Fix 
Eugen Rochko 16cdaa1110
Fix uncaught errors in media proxy controller ()
Eugen Rochko a8b0bb355d
Fix uncaught 422 and 500 errors ()
Eugen Rochko 24552b5160
Add whitelist mode ()
Eugen Rochko 707ddf7808
Change domain blocks to automatically support subdomains ()
* Change domain blocks to automatically support subdomains

If a more authoritative domain is blocked (example.com), then the
same block will be applied to a subdomain (foo.example.com)

* Match subdomains of existing accounts when blocking/unblocking domains

* Improve code style
Eugen Rochko 8514ef723c
Fix login sometimes redirecting to paths that are not pages ()
Fix 
Akihiko Odaki 55fd55714a Raise Mastodon::RaceConditionError if Redis lock failed ()
An explicit error allows user agents to know the error and Sidekiq to
retry.
Eugen Rochko 41e6c8b151 Fix incomplete account records being read ()
* Fix incomplete account records being read

- Put account processing into redis lock
- Do not save until record is complete

* Fix spaces
Eugen Rochko 54edb4b853 When accessing uncached media attachment, redownload it ()
* When accessing uncached media attachment, redownload it

* Prevent re-download of rejected media