Commit Graph

935 Commits (70405db63ccfc7b9b2816e0e6bfeb6d99a8c6ec1)

Author SHA1 Message Date
ThibG aeb124491d Reject existing Follow in addition to sending a Block (#9811)
Mastodon expects remote servers to remove follow relationships upon receiving
a Block. However, the spec only evokes Block activities in a C2S context, never
in a S2S context.

This PR, in addition to federating the Block, explicitly sends a Reject for any
affected follow relationship, which makes a bit more sense with regards to the
spec.
6 years ago
Eugen Rochko bc642ac24b
Redesign public hashtag page to use a masonry layout (#9822) 6 years ago
Moritz Heiber ecf40d09ed Disable Same-Site cookie implementation to fix SSO issues on WebKit browsers (#9819) 6 years ago
Renato "Lond" Cerqueira 5c5e14c816 Fix undefined method error in sidekiq (#9807)
* Fix undefined method error in sidekiq

Body can be not nil but still be empty, which causes a
`NoMethodError: undefined method `[]' for nil:NilClass` further in the
code. This checks for an empty body to avoid the issue.

* Fix codeclimate issue
6 years ago
ysksn c059999ab3 Add a spec for Admin::ActionLog (#9775) 6 years ago
ysksn 09c3c96607 Add specs for Admin::AccountAction (#9767) 6 years ago
ysksn 61ecda1575 Not to skip executable specs (#9753)
* Not to skip executable specs

* Combine specs

Combine specs to one to reduce multiple slow http post.
6 years ago
Eugen Rochko 1c6588accc
Redesign admin instances area (#9645) 6 years ago
ysksn 9a38357111 Remove `pending` (#9752)
Some specs have already been added.
6 years ago
ysksn 274109e9f3 Remove spec files (#9751)
Nothing to test.
6 years ago
ysksn 88deca16ca Add pending specs for jsonld helper (#9750)
* Add specs for JsonLdHelper#first_of_value

* Add specs for JsonLdHelper#supported_context?
6 years ago
Eugen Rochko a49d43d112
Add scheduled statuses (#9706)
Fix #340
6 years ago
ysksn 5efedb5d5e Add specs for UrlValidator (#9699) 6 years ago
ysksn 19abf4ef0b Add specs for UnreservedUsernameValidator (#9698)
* Add specs for UnreservedUsernameValidator

* Use instance variable
6 years ago
Eugen Rochko 66436d0895
Improve e-mail digest (#9689)
- Reduce time-to-digest from 20 to 7 days
- Fetch mentions starting from +1 day since last login
- Fix case when last login is more recent than last e-mail
- Do not render all mentions, only 40, but show number in subject
- Do not send digest to moved accounts
- Do send digest to silenced accounts
6 years ago
ThibG 70be301d69 Ensure blocked user unfollows blocker if Block/Undo Block are processed out of order (#9687)
* Ensure blocked user unfollows blocker if Block/Undo Block are processed out of order

* Add specs for Block causing unfollow and for out-of-order Block + Undo
6 years ago
ThibG 290932602b Reduce usage of LD signatures (#9659)
* Do not LDS-sign Follow, Accept, Reject, Undo, Block

* Do not use LDS for Create activities of private toots

* Minor cleanup

* Ignore unsigned activities instead of misattributing them

* Use status.distributable? instead of querying visibility directly
6 years ago
ysksn fb08039de5 Add specs for FollowLimitValidator (#9655) 6 years ago
ysksn 05edec6917 Add specs for BlackListedEmailValidator (#9651)
* Add specs for BlackListedEmailValidator

* Use instance variable
6 years ago
ysksn 4725aeec9f Add specs for DisallowedHashtagsValidator (#9653)
In order to implement tests easier, `#select_tags` created.
6 years ago
Eugen Rochko 0f938ff29c
Add handler for Move activity (#9629) 6 years ago
ysksn d01c840e14 Add specs for StatusPinValidator (#9648) 6 years ago
ysksn ccb9c1b952 Add pending specs for StatusLengthValidator (#9647)
* Add pending specs of StatusLengthValidator

* Use instance variable
6 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
6 years ago
ThibG 5f387995d9 Limit maximum visibility of local silenced users to unlisted (#9583)
Fixes #9580
6 years ago
Eugen Rochko 3c033c4352
Add moderation warnings (#9519)
* Add moderation warnings

Replace individual routes for disabling, silencing, and suspending
a user, as well as the report update route, with a unified account
action controller that allows you to select an action (none,
disable, silence, suspend) as well as whether it should generate an
e-mail notification with optional custom text. That notification,
with the optional custom text, is saved as a warning.

Additionally, there are warning presets you can configure to save
time when performing the above.

* Use Account#local_username_and_domain
6 years ago
ysksn eee2b05ea2 Add specs for CustomEmojiFilter (#9599) 6 years ago
ysksn de3cecf37a Add specs for AdminMailer (#9597) 6 years ago
ysksn 1bc78ec50e Add specs for InstancePresenter (#9596) 6 years ago
ysksn 6a2d030c2f Add specs for ReportNotePolicy (#9592) 6 years ago
ysksn b93e317886 Add specs for policies (#9591)
* Add spec for RelayPolicy

* Add specs for SubscriptionPolicy

* Add specs for SettingsPolicy

* Add specs for TagPolicy

* Add specs for ReportPolicy
6 years ago
ysksn be9640bfc2 Add specs for UserPolicy (#9593) 6 years ago
ysksn d649d84594 Add specs for InvitePolicy (#9589) 6 years ago
ysksn 44189c33d1 Add specs for EmailDomainBlockPolicy (#9586) 6 years ago
ysksn 08cb8a1ff3 Add specs for InstancePolicy (#9587) 6 years ago
ysksn e181f99739 Add specs for DomainBlockPolicy (#9585) 6 years ago
ysksn 5088213f5e Add specs for CustomEmojiPolicy (#9584) 6 years ago
ysksn 5d724aa129 Add specs for BackupPolicy (#9576) 6 years ago
ysksn af56efdec5 Add specs for AccountPolicy (#9575) 6 years ago
ysksn 0a1ade4f02 Add specs for AccountModerationNotePolicy (#9571) 6 years ago
ysksn 102e4cfa32 Add specs for StatusPolicy (#9569) 6 years ago
ysksn dd85700a3e Add spec for AccountableConcern#log_action (#9559) 6 years ago
ThibG e709b8da0d Ignore low-confidence CharlockHolmes guesses when parsing link cards (#9510)
* Add failing test for windows-1251 link cards

* Ignore low-confidence CharlockHolmes guesses

Fixes #9466

* Fix no method error when charlock holmes cannot detect charset
6 years ago
ysksn 0c80715235 Add spec for Api::V1::Timelines::DirectController (#9547) 6 years ago
ysksn 351938520d Add specs for Api::V1::Instances::PeersController (#9546) 6 years ago
ysksn 2d871feb10 Add spec for Api::V1::EndorsementsController (#9543) 6 years ago
ysksn 3fa9615cb3 Add spec for Api::V1::Instances::ActivityController (#9545) 6 years ago
ysksn a3dcbfddd6 Add specs for Accounts::PinsController (#9542) 6 years ago
ysksn 3c31c28605 Add spec for Admin::ActionLogsController#index (#9522) 6 years ago
ysksn 458e2b0c5b Add specs for RemoteInteractionController (#9524) 6 years ago