Commit Graph

263 Commits

Author SHA1 Message Date
0eb421cc64 Revert "Add reject pattern to Admin setting"
This reverts commit 0cd5faaa9d.
2024-02-22 20:46:08 +09:00
noellabo
0cd5faaa9d Add reject pattern to Admin setting 2024-02-22 20:15:49 +09:00
Sho Kusano
c2f59a2848 :sad: 2024-02-18 23:07:24 +09:00
Sho Kusano
6e76cbb0e4 Reject spammer 2024-02-18 22:34:53 +09:00
5e2bc7aa95 Merge pull request #130 from Y-zu-don-maintenance-org/features/v4.1.13
Merge pull request from GHSA-3fjr-858r-92rw
2024-02-02 21:32:09 +09:00
2ab80bc511 Merge pull request #129 from Y-zu-don-maintenance-org/features/v4.1.12
Features/v4.1.12
2024-02-02 21:31:08 +09:00
Claire
5799bc4af7 Merge pull request from GHSA-3fjr-858r-92rw
* Fix insufficient origin validation

* Bump version to v4.1.13
2024-02-01 15:56:46 +01:00
Claire
803e15a3cf Fix incoming status creation date not being restricted to standard ISO8601 (#27655) 2023-12-04 15:28:02 +01:00
Claire
1210524a3d Fix processing LDSigned activities from actors with unknown public keys (#27474) 2023-12-04 15:28:02 +01:00
70cf68fc6e Merge tag 'v4.1.9' into features/4.1.9 2023-10-11 18:13:24 +09:00
Claire
d6c0ae995c Fix post edits not being forwarded as expected (#26936) 2023-09-19 17:01:44 +02:00
Emelia Smith
cf80d54cba Allow reports with long comments from remote instances, but truncate (#25028) 2023-09-05 19:16:09 +02:00
1b02b4bfde Merge remote-tracking branch 'accelforce/custom/quote' into features/v4.1.2 2023-06-30 20:52:31 +09:00
Claire
0c9eac80d8 Fix unbounded recursion in post discovery (#23506)
* Add a limit to how many posts can get fetched as a result of a single request

* Add tests

* Always pass `request_id` when processing `Announce` activities

---------

Co-authored-by: nametoolong <nametoolong@users.noreply.github.com>
2023-02-10 22:16:37 +01:00
Nick Schonning
ed570050c6 Autofix Rails/EagerEvaluationLogMessage (#23429)
* Autofix Rails/EagerEvaluationLogMessage

* Update spec for debug block syntax
2023-02-07 03:44:36 +01:00
Claire
c8849d6cee Fix unbounded recursion in account discovery (#22025)
* Fix trying to fetch posts from other users when fetching featured posts

* Rate-limit discovery of new subdomains

* Put a limit on recursively discovering new accounts
2022-12-07 00:15:24 +01:00
kyori19
4be8ece78d Merge remote-tracking branch 'mastodon/main' into custom/quote 2022-11-05 19:56:50 +00:00
Takeshi Umeda
1d34eff63f Add featured tag add/remove activity handler (#19408) 2022-10-22 11:49:41 +02:00
Claire
8cf7006d4e Refactor ActivityPub handling to prepare for non-Account actors (#19212)
* Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService

ActivityPub::FetchRemoteAccountService is kept as a wrapper for when the actor is
specifically required to be an Account

* Refactor SignatureVerification to allow non-Account actors

* fixup! Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService

* Refactor ActivityPub::FetchRemoteKeyService to potentially return non-Account actors

* Refactor inbound ActivityPub payload processing to accept non-Account actors

* Refactor inbound ActivityPub processing to accept activities relayed through non-Account

* Refactor how Account key URIs are built

* Refactor Request and drop unused key_id_format parameter

* Rename ActivityPub::Dereferencer `signature_account` to `signature_actor`
2022-09-21 22:45:57 +02:00
Takeshi Umeda
9c571a95db Fix missing , (#18660) 2022-06-23 23:10:03 +02:00
Yamagishi Kazutoshi
c3fac61f56 Fix Mastodon::RaceConditionError that occurs when external status is reblogged (#18424)
* Fix `Mastodon::RaceConditionError` that occurs when external status is reblogged

* Replace to `@object`
2022-05-16 01:00:09 +02:00
Eugen Rochko
6cf57c6765 Refactor how Redis locks are created (#18400)
* Refactor how Redis locks are created

* Fix autorelease duration on account deletion lock
2022-05-13 00:02:35 +02:00
kyori19
0c206d8711 Merge remote-tracking branch 'tootsuite/main' into custom/quote 2022-05-10 02:47:45 +00:00
Eugen Rochko
3917353645 Fix single Redis connection being used across all threads (#18135)
* Fix single Redis connection being used across all Sidekiq threads

* Fix tests
2022-04-28 17:47:34 +02:00
Claire
0360135d4d Fix PeerTube videos appearing with an erroneous “Edited at” marker (#18100)
* Fix PeerTube videos appearing with an erroneous “Edited at” marker

PeerTube videos have an `updated` field equal to `published`.
When processing an incoming activity that has the same value for `updated` and
`published`, assume this doesn't represent an actual edit.

* Please CodeClimate
2022-04-26 21:25:26 +02:00
Eugen Rochko
cefa526c6d Refactor formatter (#17828)
* Refactor formatter

* Move custom emoji pre-rendering logic to view helpers

* Move more methods out of Formatter

* Fix code style issues

* Remove Formatter

* Add inline poll options to RSS feeds

* Remove unused helper method

* Fix code style issues

* Various fixes and improvements

* Fix test
2022-03-26 02:53:34 +01:00
Eugen Rochko
71f2b95106 Fix edits with no actual changes being allowed (#17843)
* Fix edits with no actual changes being allowed locally

* Fix edits with no actual changes being allowed through ActivityPub

* Fix false positive changes caused by description processing in model

* Fix not recording poll expiration update

* Fix test

* Revert changes to ProcessStatusUpdateService

* Various fixes and improvements

* Fix code style issues

* Various changes and improvements

* Add guard clause
2022-03-26 00:38:44 +01:00
Claire
c9b3cf8510 Fix searching already-known converted activities by URL (#17814)
Fixes #17813
2022-03-17 00:46:49 +01:00
Eugen Rochko
ddbe906c25 Fix not updating a status when newer version is fetched manually (#17745) 2022-03-12 09:11:36 +01:00
Eugen Rochko
2ea754b861 Fix duplicate notifications being possible after poll expiration (#17697) 2022-03-04 01:06:33 +01:00
Eugen Rochko
04c3ac896a Fix infinite re-forwarding of update activities temporarily (#17698) 2022-03-04 01:00:13 +01:00
kyori19
c15001381b Merge remote-tracking branch 'tootsuite/main' into custom/quote
# Conflicts:
#	app/controllers/api/v1/statuses_controller.rb
#	app/javascript/mastodon/actions/compose.js
#	app/javascript/mastodon/actions/notifications.js
#	app/javascript/mastodon/components/status_action_bar.js
#	app/javascript/mastodon/containers/status_container.js
#	app/javascript/mastodon/features/compose/containers/reply_indicator_container.js
#	app/javascript/mastodon/reducers/compose.js
2022-02-27 02:32:06 +00:00
Eugen Rochko
0dc57ab6ed Fix status updates not being forwarded like deletes through ActivityPub (#17648)
Fix #17521
2022-02-26 17:51:59 +01:00
Eugen Rochko
27965ce5ed Add trending statuses (#17431)
* Add trending statuses

* Fix dangling items with stale scores in localized sets

* Various fixes and improvements

- Change approve_all/reject_all to approve_accounts/reject_accounts
- Change Trends::Query methods to not mutate the original query
- Change Trends::Query#skip to offset
- Change follow recommendations to be refreshed in a transaction

* Add tests for trending statuses filtering behaviour

* Fix not applying filtering scope in controller
2022-02-25 00:34:14 +01:00
Claire
8f537a1168 Change relays handling to not record boosts (#17571)
* Change relays handling to not record boosts

* Update tests
2022-02-16 14:36:44 +01:00
Eugen Rochko
b6d7726ecb Remove language detection through cld3 (#17478)
* Remove language detection through cld3

* Update app/helpers/languages_helper.rb

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-02-08 02:41:17 +01:00
kyori19
725569e8ab Merge remote-tracking branch 'tootsuite/main' into custom/quote 2022-02-03 13:31:02 +00:00
Claire
d1ecc323e7 Compact JSON-LD signed incoming activities (#17426)
Co-authored-by: Puck Meerburg <puck@puck.moe>
2022-02-03 14:07:29 +01:00
kyori19
71530857a5 Merge remote-tracking branch 'tootsuite/main' into custom/quote
# Conflicts:
#	app/services/fetch_link_card_service.rb
2022-02-01 16:28:14 +00:00
Claire
03d59340da Fix Sidekiq warnings about JSON serialization (#17381)
* Fix Sidekiq warnings about JSON serialization

This occurs on every symbol argument we pass, and every symbol key in hashes,
because Sidekiq expects strings instead.

See https://github.com/mperham/sidekiq/pull/5071

We do not need to change how workers parse their arguments because this has
not changed and we were already converting to symbols adequately or using
`with_indifferent_access`.

* Set Sidekiq to raise on unsafe arguments in test mode

In order to more easily catch issues that would produce warnings in production
code.
2022-01-28 00:43:56 +01:00
Eugen Rochko
1060666c58 Add support for editing for published statuses (#16697)
* 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
2022-01-19 22:37:27 +01:00
Claire
d5c9feb7b7 Add support for private pinned posts (#16954)
* Add support for private pinned toots

* Allow local user to pin private toots

* Change wording to avoid "direct message"
2022-01-17 00:49:55 +01:00
Eugen Rochko
7de0ee7aba Remove Keybase integration (#17045) 2021-11-26 05:58:18 +01:00
Eugen Rochko
6e50134a42 Add trending links (#16917)
* Add trending links

* Add overriding specific links trendability

* Add link type to preview cards and only trend articles

Change trends review notifications from being sent every 5 minutes to being sent every 2 hours

Change threshold from 5 unique accounts to 15 unique accounts

* Fix tests
2021-11-25 13:07:38 +01:00
kyori19
e7eab1a6ae Merge remote-tracking branch 'tootsuite/main' into custom/quote
# Conflicts:
#	app/javascript/mastodon/components/status.js
#	app/javascript/mastodon/features/status/components/detailed_status.js
#	app/serializers/rest/instance_serializer.rb
2021-10-12 16:53:07 +00:00
Claire
12cd097e7c Fix addressing of remote groups' followers (#16700)
Fixes #16699
2021-09-08 23:33:23 +02:00
Takeshi Umeda
709876bd6c Fix invalid blurhash handling in Create activity (#16583) 2021-08-09 13:33:19 +02:00
Claire
d8629e7b86 Add logging of S3-related errors (#16381) 2021-07-21 18:34:39 +02:00
kyori19
043ab77449 Merge remote-tracking branch 'tootsuite/main' into custom/quote 2021-07-09 04:27:34 +00:00
Claire
9a19227f17 Fix some RedisLocks auto-releasing too fast (#16276)
* Fix Delete and Create-related locks expiring too fast

Fixes #16238

By default, RedisLock expires after 10 seconds, which may not be enough to
process statuses, especially when those have attached media files.

This commit extends those 10 seconds to 15 minutes, which should be plenty
enough to handle any status, while being short enough to not waste many
sidekiq job retries in the exceedingly rare case in which a sidekiq process
would crash when processing a `Create` or `Delete`.

* Fix other RedisLock autorelease durations

Fixes #15645

- things that only perform a few simple database queries (e.g. finding and
  saving a record) have been left unchanged, so they'll still use the default
  10s duration
- things that perform significantly more complex database queries have been
  changed to a 5 minutes timeout
- things that perform multiple HTTP queries have been changed to a 15 minutes
  timeout
2021-05-19 23:52:08 +02:00