Commit Graph

919 Commits (5339554076648ee17aa714b3b73a7fcc807e303b)

Author SHA1 Message Date
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
ysksn c1600a0f69 Add spec for Admin::DashboardController#index (#9523) 6 years ago
Sumit Khanna 769c2d2680 Error message for avatar image that's too large. #9204 (#9518)
* Error message for avatar image that's too large. #9204

* Code climate/formatting

* Removed avatar error message

* Moved valid image dimentions check to update service

* removed unnescessary begin block

* code climate formatting

* code climate indent fix
6 years ago
ysksn 795bac44fd Add spec for Settings::ExportsController#create (#9512) 6 years ago
Adam Copp 7d00e4edbd Make custom emoji domains case insensitive #9351 (#9474)
* Make custom emoji domains case sensitive #9351

* Fixup style in downcase_domain to comply with codeclimate.

* switch if! to unless

* Don't use transactions, operate in batches.

Also revert spurious schema change.
6 years ago
Eugen Rochko dbb1ee269f
Improve e-mail MX validator and add tests (#9489) 6 years ago
ysksn ed24bb2c3e Add specs for activitypub collections controller (#9484)
* Add specs for ActivityPub::CollectionsController#show

* Raise ActiveRecord::RecordNotFound

Raising ActiveRecord::NotFound raises NameError: uninitialized constant
ActiveRecord::NotFound.
6 years ago
ysksn 6eae8f77af Add spec for Admin::SuspentionsController#new (#9483) 6 years ago
ysksn 361818e931 Fix Admin::TagsController#unhide (#9481) 6 years ago
ysksn ae3d2f446a Add specs for Admin::InvitesController (#9471) 6 years ago
ysksn dfd123d5b3 Remove pending spec (#9453) 6 years ago
ysksn d3547fa005 Add specs for ActivityPub::InboxesController (#9456) 6 years ago
ysksn 88b3eed16f Add specs for Admin::AccountModerationNotesHelper (#9455) 6 years ago
ysksn 57bb62d5cf Remove pending spec (#9454)
Since dots are not allowed in username,
this spec is no longer needed.
6 years ago
ysksn 51cbd045da Add specs for AccountTagStat model (#9452) 6 years ago
Eugen Rochko 73be8f38c1
Add profile directory (#9427)
Fix #5578
6 years ago
ysksn 155cf12680 Remove pending spec (#9442)
`#from_account` isn't defined.
6 years ago