Commit Graph

509 Commits (renovate/express-5.x)

Author SHA1 Message Date
Matt Jankowski a6ed148769
Use heredoc on the `HTML` blocks in verify link spec (#29365) 2 years ago
Claire 9d8dfeb5fb
Fix processing of `Link` objects in `Image` objects (#29335) 2 years ago
Claire 5152dd869e
Fix link verifications when page size exceeds 1MB (#29358) 2 years ago
Matt Jankowski e9b0f0c314
Add basic coverage for `RemoveDomainsFromFollowersService` class (#29327) 2 years ago
Matt Jankowski 7c7dfe7de3
Add basic coverage for `RemoveFeaturedTagService` class (#29328) 2 years ago
Matt Jankowski 6342ddd698
Add basic coverage for `UnfavouriteService` class (#29329) 2 years ago
Matt Jankowski f70905f127
Add basic coverage for `UnmuteService` class (#29330) 2 years ago
Matt Jankowski a69fe534e3
Add basic coverage for `WebhookService` class (#29331) 2 years ago
Matt Jankowski d1602c017d
Add basic coverage for `ApproveAppealService` class (#29333) 2 years ago
Matt Jankowski ab2ef63a03
Add basic coverage for `VoteService` class (#29334) 2 years ago
Matt Jankowski 08342ad40c
Add basic coverage for `AfterUnallowDomainService` class (#29324) 2 years ago
Matt Jankowski 8f61e32569
Add basic coverage for `AppealService` class (#29322) 2 years ago
Matt Jankowski b73932461f
Add basic coverage for `CreateFeaturedTagService` class (#29321) 2 years ago
Matt Jankowski 5f19e7e799
Add basic coverage for `ProcessHashtagsService` class (#29320) 2 years ago
Matt Jankowski 64f9939e39
Use `capture_emails` helper to improve email assertions in specs (#29245) 2 years ago
Claire 9fee5e8526
Merge pull request from GHSA-jhrq-qvrm-qr36
* Fix insufficient Content-Type checking of fetched ActivityStreams objects

* Allow JSON-LD documents with multiple profiles
2 years ago
Matt Jankowski 4b7f04e3ea
Reduce `RSpec/MultipleExpectations` in post_status_service spec (#29225) 2 years ago
Matt Jankowski fc4f823464
Avoid local block var assignment in ap/process_status_update_service spec (#29210) 2 years ago
Matt Jankowski 95da28d201
Add common `ThreadingHelper` module for specs (#29116) 2 years ago
Matt Jankowski 0df86d77fd
Reduce `RSpec/ExampleLength` in PostStatusService spec example (#29105) 2 years ago
Matt Jankowski 978fdc71ca
Reduce expectation count in example from `ProcessAccountService` spec (#29100) 2 years ago
Claire 1726085db5
Merge pull request from GHSA-3fjr-858r-92rw
* Fix insufficient origin validation

* Bump version to 4.3.0-alpha.1
2 years ago
Matt Jankowski 44f6d285af
Combine repeated subject in ap fetch remote actor service spec (#28953) 2 years ago
Matt Jankowski 239244e2ed
Combine repeated subject in ap fetch remote account service spec (#28952) 2 years ago
Matt Jankowski 7c9c6c7f80
Fix remaining `Rails/WhereExists` cop violations, regenerate todo (#28892) 2 years ago
Claire cf2a2ed71c
Fix processing of compacted single-item JSON-LD collections (#28816) 2 years ago
Matt Jankowski 3d82040b26
Reduced repeated setup in `UnallowDomainService` spec (#28785) 2 years ago
Matt Jankowski 6c5a2d51bc
Reduced repeated setup in `PurgeDomainService` spec (#28786) 2 years ago
Claire e621c1c44c
Fix registrations not checking MX records for email domain blocks requiring approval (#28608) 2 years ago
Matt Jankowski a2f02a0775
Disable `Rails/SkipsModelValidations` cop (#28712) 2 years ago
MitarashiDango 2c05b8a60d
Fix Undo Announce activity is not sent, when not followed by the reblogged post author (#18482)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Matt Jankowski 00341c70ff
Use Sidekiq `fake!` instead of `inline!` in specs (#25369) 2 years ago
Matt Jankowski 5dc634796a
Misc coverage improvements re: sidekiq/inline (#28651) 2 years ago
Matt Jankowski 832b92ac3e
Add attachment check to spec/service/suspend_account_service spec (#28619) 2 years ago
Claire dfdadb92e8
Add ability to require approval when users sign up using specific email domains (#28468) 2 years ago
Matt Jankowski a4d49c236d
Fix `RSpec/LetSetup` cop in ap/fetch_featured_collection_service (#28461) 2 years ago
Matt Jankowski 9251779d75
Fix `RSpec/LetSetup` cop in spec/services (#28459) 2 years ago
Matt Jankowski efd16f3c2c
Clean up of `RSpec/LetSetup` within `spec/services/activitypub` (#28445) 2 years ago
Claire 6fed0fcbaa
Remove unneeded settings cleanup from specs (#28425) 2 years ago
Matt Jankowski db897eaa5a
Unwind `map` on single-item array in `spec/services/delete_account_service` spec (#28358) 2 years ago
Claire 89a496b42f
Fix status edits not always being streamed to mentioned users (#28324) 2 years ago
Matt Jankowski ed7b5c091b
Remove double subject call in `services/delete_account_service` spec (#28212) 2 years ago
Matt Jankowski be6bb1a10d
Remove double subject call in `services/suspend_account_service` spec (#28213) 2 years ago
Matt Jankowski 5517df61de
Remove double subject call in `services/activitypub/process_account_service` spec (#28214) 2 years ago
Matt Jankowski faffd81976
Remove double subject call in `services/unsuspend_account_service` spec (#28215) 2 years ago
Matt Jankowski bb0efe16e6
Remove `default_scope` from `MediaAttachment` class (#28043) 2 years ago
Matt Jankowski 6b46bf9953
Handle scenario when webfinger response `subject` is missing host value (#28088) 2 years ago
Matt Jankowski 973597c6f1
Consolidate configuration of `Sidekiq::Testing.fake!` setup (#28046) 2 years ago
Matt Jankowski b2c5b20ef2
Fix `RSpec/AnyInstance` cop (#27810) 2 years ago
Claire 07a4059901
Add support for invite codes in the registration API (#27805) 2 years ago
Eugen Rochko 0d14fcebae
Change link previews to keep original URL from the status (#27312) 2 years ago
Matt Jankowski 69d00e2721
Fix `RSpec/InstanceVariable` cop (#27766) 2 years ago
Matt Jankowski 45770c9306
Fix `Performance/MapMethodChain` cop (#27744) 2 years ago
Matt Jankowski 49e2772064
Fix `RSpec/MessageSpies` cop (#27751) 2 years ago
Matt Jankowski b06284c572
Fix `RSpec/HookArgument` cop (#27747) 2 years ago
Jeong Arm 8f998cd96a
Handle featured collections without items (#27581) 2 years ago
Matt Jankowski bcd0171e5e
Fix `Lint/UselessAssignment` cop (#27472) 2 years ago
Matt Jankowski f8afa0f614
Remove unused stub json ld context (#25454) 2 years ago
Claire 27e84c0691
Fix duplicate reports being sent when reporting some remote posts (#27355) 2 years ago
Claire 6273416292
Fix post edits not being forwarded as expected (#26936) 2 years ago
Claire 16681e0f20
Add admin notifications for new Mastodon versions (#26582) 2 years ago
Eugen Rochko 2304cc6456
Fix bad search type heuristic (#26673) 2 years ago
Nick Schonning b970ed6098
Update rubocop and rubocop-rspec (#26329) 2 years ago
Claire 30c64bf616
Fix list import concurrently creating lists of the same name (#26372) 2 years ago
Emelia Smith e258b4cb64
Refactor: replace whitelist_mode mentions with limited_federation_mode (#26252) 2 years ago
Matt Jankowski 6f1fa1364f
Fix `RSpec/EmptyExampleGroup` cop (#24735) 2 years ago
Christian Schmidt f96e4b3047
Use original URL in preview if it redirects to 4xx page (#26200) 2 years ago
Matt Jankowski 2d9808f648
Reformat large key values in service specs (#26181) 2 years ago
Matt Jankowski 7d62e3b198
Reformat large text arg in `FetchLinkCardService` spec (#26183) 2 years ago
Claire 1e3b19230a
Add stricter protocol fields validation for accounts (#25937) 2 years ago
Matt Jankowski 1cceb62afd
Fix `Lint/Void` cop (#25922) 2 years ago
Claire f18618d7f9
Fix some incorrect tests (#26035) 2 years ago
Matt Jankowski 6c5a2233a8
Fix `RSpec/StubbedMock` cop (#25552)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Matt Jankowski 658742b3cd
Fix `Lint/AmbiguousBlockAssociation` cop (#25921) 2 years ago
Matt Jankowski 74806deb2c
Fix `RSpec/SubjectStub` cop (#25550)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Matt Jankowski c75df62ccc
Fix `RSpec/SubjectDeclaration` cop (#25312) 2 years ago
jsgoldstein 99be47f8b9
Change searching with # to include account index (#25638) 2 years ago
Claire c27b82a437
Add `forward_to_domains` parameter to `POST /api/v1/reports` (#25866) 2 years ago
Eugen Rochko 93e8a15415
Add forwarding of reported replies to servers being replied to (#25341) 2 years ago
Daniel M Brasil 383c00819c
Fix `/api/v2/search` not working with following query param (#25681) 2 years ago
Claire a209d1e683
Fix ResolveURLService not resolving local URLs for remote content (#25637) 2 years ago
jsgoldstein 4581a528f7
Change account search to match by text when opted-in (#25599)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
2 years ago
Matt Jankowski 05f9e39b32
Fix `RSpec/VerifiedDoubles` cop (#25469) 2 years ago
Matt Jankowski 0b39b9abee
Speed-up on `BackupService` spec (#25527) 2 years ago
Matt Jankowski 4c5aa0e470
Update rubocop-rspec to version 2.22.0, fix `RSpec/IndexedLet` cop (#24698) 2 years ago
Matt Jankowski 62c996b52d
Reduce `RSpec/MultipleExpectations` cop max to 8 (#25313) 2 years ago
Matt Jankowski 6c0e3f490a
Fix RSpec/MissingExampleGroupArgument cop (#25310) 2 years ago
Matt Jankowski c42591356d
Fix `RSpec/DescribedClass` cop (#25104) 2 years ago
Claire 8884d1ece0
Add support for importing lists (#25203) 2 years ago
Renaud Chaput 942d850b0a
Allow carets in URL search params (#25216) 2 years ago
Christian Schmidt 69057467cb
Translate CW, poll options and media descriptions (#24175)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Matt Jankowski 0f2c16ac4b
Fix RSpec/NoExpectationExample cop (#25103) 2 years ago
Matt Jankowski d2e5430d4a
Fix RSpec/ExpectChange cop (#25101) 2 years ago
Matt Jankowski b896b16cb3
Fix RSpec/PredicateMatcher cop (#25102) 2 years ago
Emelia Smith 19f9098551
Allow reports with long comments from remote instances, but truncate (#25028) 2 years ago
Nick Schonning 99e2e9b81f
Fix minor typos in comments and spec names (#21831) 2 years ago
Claire b805b7f021
Add tests for avatar/header in backup service (#25037) 2 years ago
Matt Jankowski bf3ebeb42f
Fix RSpec/SharedContext cop (#24847) 2 years ago
Matt Jankowski a610a02d4f
Fix RSpec/ScatteredSetup cop (#24848) 2 years ago
Matt Jankowski 710745e16b
Fix RSpec/ContextWording cop (#24739) 2 years ago
Matt Jankowski bdcd8a9e88
Misc spec cleanup (#24822) 2 years ago
Claire b233da5996
Optimize archive export service and export zip files instead of gzipped tar files (#23360) 2 years ago
Claire 32a030dd74
Rewrite import feature (#21054) 2 years ago
Nick Schonning a3393d0d07
Autofix Rubocop RSpec/MatchArray (#24050) 2 years ago
Matt Jankowski 10f0de4212
Refactor race condition reblog service spec (#24526) 2 years ago
Claire f53d009778
Refactor `Status._insert_record` slightly and tighten the test around reblogs of discarded statuses (#24516) 2 years ago
Eugen Rochko a9b5598c97
Change user settings to be stored in a more optimal way (#23630)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Christian Schmidt eb38e9df31
Requeue expiration notification (#24311) 2 years ago
Matt Jankowski 9da52ac044
Update rspec-rails to version 6.0.1 (#23908) 3 years ago
Nick Schonning 6bd7003799
Fix mispelled spec filenames (#23834) 3 years ago
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs (#23790) 3 years ago
Nick Schonning 5116347eb7
Autofix Rubocop RSpec/BeEq (#23740) 3 years ago
Nick Schonning bf785df9fe
Audofix Rubocop Style/WordArray (#23739) 3 years ago
Nick Schonning 4552685f6b
Autofix Rubocop RSpec/LeadingSubject (#23670) 3 years ago
Nick Schonning 5179c47087
Autofix Rubocops RSpec/ScatteredLet (#23725) 3 years ago
Nick Schonning bd1d57c230
Autofix Rubocop RSpec/EmptyLineAfterSubject (#23719) 3 years ago
Nick Schonning 65ba0d92ef
Enable Rubocop RSpec/NotToNot (#23723) 3 years ago
Nick Schonning 81ad6c2e39
Autofix Rubocop Style/StringLiterals (#23695) 3 years ago
Nick Schonning 3680e032b4
Autofix Rubocop RSpec/EmptyLineAfterFinalLet (#23707) 3 years ago
Nick Schonning 08289a38fa
Autofix Rubocop Style/TrailingCommaInArrayLiteral (#23692) 3 years ago
Nick Schonning 5069769cbe
Autofix Rubocop Style/TrailingCommaInHashLiteral (#23693) 3 years ago
Nick Schonning c38bd17657
Autofix Rubocop Style/TrailingCommaInArguments (#23694) 3 years ago
Nick Schonning e5cf23cf3a
Enable Rubocop RSpec/HooksBeforeExamples (#23668) 3 years ago
Nick Schonning 634368c491
Autofix Rubocop Lint/SymbolConversion (#23683) 3 years ago
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length (#23632) 3 years ago
Nick Schonning 6ed6c41724
Autofix Rubocop RSpec/EmptyLineAfterExample (#23661) 3 years ago
Nick Schonning 936204b9ea
Autofix Rubocop Style/NestedParenthesizedCalls (#23646) 3 years ago
Nick Schonning 37914c8757
Autofix Rubocop Style/MethodCallWithoutArgsParentheses (#23645) 3 years ago
Claire d6930b3847
Add API parameter to safeguard unexpect mentions in new posts (#18350) 3 years ago
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>
3 years ago
Markus Unterwaditzer f2a6e71bb6
Suppress AddressFamilyError in link verification (#23204)
* Suppress AddressFamilyError

* clarify comment
3 years ago
Claire 4b92e59f4f
Add support for editing media description and focus point of already-posted statuses (#20878)
* Add backend support for editing media attachments of existing posts

* Allow editing media attachments of already-posted toots

* Add tests
3 years ago
Markus Unterwaditzer 0c689b9d01
fix: allow verification when page size exceeds 1MB (using HTML5 parser) (#22879)
* fix: allow verification when page size exceeds 1MB
Truncates the page after 1MB instead

Closes #15316

* switch to HTML5 parser, fix rubocop errors

* undo rubocop fixes

Co-authored-by: Chris Zubak-Skees <chriszs@gmail.com>
3 years ago
Claire 18fb01ef7c
Fix possible race conditions when suspending/unsuspending accounts (#22363)
* Fix possible race conditions when suspending/unsuspending accounts

* Fix tests

Tests were assuming SuspensionWorker and UnsuspensionWorker would do the
suspending/unsuspending themselves, but this has changed.
3 years ago
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
3 years ago
Claire 625216d8e1
Fix attachments of edited statuses not being fetched (#21565)
* Fix attachments of edited statuses not being fetched

* Fix tests
3 years ago
Rose 4f15fd0ba1
Fix style for hashes (#20518)
* Fix style for hashes

Make the style for hashes consistent.

* New style

More consistency
3 years ago
Joshua Wood daf6f3453e
Handle links with no href in VerifyLinkService (#20741)
Before this change, the following error would cause VerifyAccountLinksWorker to fail:

NoMethodError: undefined method `downcase' for nil:NilClass
  [PROJECT_ROOT]/app/services/verify_link_service.rb:31 :in `block in link_back_present?`
3 years ago
Hampton Lintorn-Catlin 147d8bd8fc
Support UTF-8 Characters in Domains During CSV Import (#20592)
* Support UTF-8 Characters in Domains During Import

* Update Changelong
3 years ago
Claire bbf74498f5
Fix validation error in SynchronizeFeaturedTagsCollectionWorker (#20018)
* Fix followers count not being updated when migrating follows

Fixes #19900

* Fix validation error in SynchronizeFeaturedTagsCollectionWorker

Also saves remote user's chosen case for hashtags

* Limit remote featured tags before validation
3 years ago
Claire 4fb0aae636
Change mentions of blocked users to not be processed (#19725)
Fixes #19698
3 years ago
Claire 9387beb3b3
Change flaky AccountSearchService test (#19650) 3 years ago
Yamagishi Kazutoshi 94feb2b93f
Fix `FetchFeaturedCollectionService` spec (#19401)
Regression from #19380
3 years ago
Claire 7165e89362
Add tests to ActivityPub::FetchRemoteKeyService (#19226) 3 years ago
Claire 26c51cfa07
Fix various rspec warnings in ReportService tests (#19189)
* Fix various rspec warnings in ReportService tests

* Add tests to ReportService
3 years ago
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`
3 years ago
Eugen Rochko 50948b46aa
Add ability to filter followed accounts' posts by language (#19095) 3 years ago
Claire 1145dbd327
Improve error reporting and logging when processing remote accounts (#15605)
* Add a more descriptive PrivateNetworkAddressError exception class

* Remove unnecessary exception class to rescue clause

* Remove unnecessary include to JsonLdHelper

* Give more neutral error message when too many webfinger redirects

* Remove unnecessary guard condition

* Rework how “ActivityPub::FetchRemoteAccountService” handles errors

Add “suppress_errors” keyword argument to avoid raising errors in
ActivityPub::FetchRemoteAccountService#call (default/previous behavior).

* Rework how “ActivityPub::FetchRemoteKeyService” handles errors

Add “suppress_errors” keyword argument to avoid raising errors in
ActivityPub::FetchRemoteKeyService#call (default/previous behavior).

* Fix Webfinger::RedirectError not being a subclass of Webfinger::Error

* Add suppress_errors option to ResolveAccountService

Defaults to true (to preserve previous behavior). If set to false,
errors will be raised instead of caught, allowing the caller to be
informed of what went wrong.

* Return more precise error when failing to fetch account signing AP payloads

* Add tests

* Fixes

* Refactor error handling a bit

* Fix various issues

* Add specific error when provided Digest is not 256 bits of base64-encoded data

* Please CodeClimate

* Improve webfinger error reporting
3 years ago
Eugen Rochko d83faa1a89
Add ability to block sign-ups from IP (#19037) 3 years ago
Claire 1b4054256f
Fix crash when a remote Flag activity mentions a private post (#18760)
* Add tests

* Fix crash when a remote Flag activity mentions a private post
3 years ago