Commit Graph

89 Commits (f195c466350754a1e34810947faafeb9e6ae6a26)

Author SHA1 Message Date
Matt Jankowski 469028b6d3
Remove unneeded `type: :service` from spec/services files (#29304) 10 months ago
Claire 9d8dfeb5fb
Fix processing of `Link` objects in `Image` objects (#29335) 11 months 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
11 months ago
Matt Jankowski fc4f823464
Avoid local block var assignment in ap/process_status_update_service spec (#29210) 11 months ago
Matt Jankowski 978fdc71ca
Reduce expectation count in example from `ProcessAccountService` spec (#29100) 11 months ago
Claire 1726085db5
Merge pull request from GHSA-3fjr-858r-92rw
* Fix insufficient origin validation

* Bump version to 4.3.0-alpha.1
12 months ago
Matt Jankowski 44f6d285af
Combine repeated subject in ap fetch remote actor service spec (#28953) 12 months ago
Matt Jankowski 239244e2ed
Combine repeated subject in ap fetch remote account service spec (#28952) 12 months ago
Matt Jankowski 7c9c6c7f80
Fix remaining `Rails/WhereExists` cop violations, regenerate todo (#28892) 12 months ago
Claire cf2a2ed71c
Fix processing of compacted single-item JSON-LD collections (#28816) 1 year ago
Matt Jankowski 00341c70ff
Use Sidekiq `fake!` instead of `inline!` in specs (#25369) 1 year ago
Matt Jankowski a4d49c236d
Fix `RSpec/LetSetup` cop in ap/fetch_featured_collection_service (#28461) 1 year ago
Matt Jankowski efd16f3c2c
Clean up of `RSpec/LetSetup` within `spec/services/activitypub` (#28445) 1 year ago
Matt Jankowski 5517df61de
Remove double subject call in `services/activitypub/process_account_service` spec (#28214) 1 year ago
Matt Jankowski bb0efe16e6
Remove `default_scope` from `MediaAttachment` class (#28043) 1 year ago
Matt Jankowski b2c5b20ef2
Fix `RSpec/AnyInstance` cop (#27810) 1 year ago
Matt Jankowski 49e2772064
Fix `RSpec/MessageSpies` cop (#27751) 1 year ago
Jeong Arm 8f998cd96a
Handle featured collections without items (#27581) 1 year ago
Claire 6273416292
Fix post edits not being forwarded as expected (#26936) 1 year ago
Matt Jankowski 2d9808f648
Reformat large key values in service specs (#26181) 1 year 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 c75df62ccc
Fix `RSpec/SubjectDeclaration` cop (#25312) 2 years ago
Matt Jankowski 4c5aa0e470
Update rubocop-rspec to version 2.22.0, fix `RSpec/IndexedLet` cop (#24698) 2 years ago
Matt Jankowski c42591356d
Fix `RSpec/DescribedClass` cop (#25104) 2 years ago
Nick Schonning 99e2e9b81f
Fix minor typos in comments and spec names (#21831) 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
Nick Schonning a3393d0d07
Autofix Rubocop RSpec/MatchArray (#24050) 2 years ago
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs (#23790) 2 years ago
Nick Schonning 5116347eb7
Autofix Rubocop RSpec/BeEq (#23740) 2 years ago
Nick Schonning bf785df9fe
Audofix Rubocop Style/WordArray (#23739) 2 years ago
Nick Schonning 4552685f6b
Autofix Rubocop RSpec/LeadingSubject (#23670) 2 years ago
Nick Schonning 5179c47087
Autofix Rubocops RSpec/ScatteredLet (#23725) 2 years ago
Nick Schonning 65ba0d92ef
Enable Rubocop RSpec/NotToNot (#23723) 2 years ago
Nick Schonning 81ad6c2e39
Autofix Rubocop Style/StringLiterals (#23695) 2 years ago
Nick Schonning 08289a38fa
Autofix Rubocop Style/TrailingCommaInArrayLiteral (#23692) 2 years ago
Nick Schonning 5069769cbe
Autofix Rubocop Style/TrailingCommaInHashLiteral (#23693) 2 years ago
Nick Schonning 634368c491
Autofix Rubocop Lint/SymbolConversion (#23683) 2 years ago
Nick Schonning 669f6d2c0a
Run rubocop formatting except line length (#23632) 2 years ago
Nick Schonning 37914c8757
Autofix Rubocop Style/MethodCallWithoutArgsParentheses (#23645) 2 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>
2 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
2 years ago
Claire 625216d8e1
Fix attachments of edited statuses not being fetched (#21565)
* Fix attachments of edited statuses not being fetched

* Fix tests
2 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
2 years ago
Yamagishi Kazutoshi 94feb2b93f
Fix `FetchFeaturedCollectionService` spec (#19401)
Regression from #19380
2 years ago
Claire 7165e89362
Add tests to ActivityPub::FetchRemoteKeyService (#19226) 2 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`
2 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
2 years ago
Claire e0bdaeab65
Fix NoMethodError when resolving a link that redirects to a local post (#18314)
* Fix NoMethodError when resolving a link that redirects to a local post

* Fix tests
3 years ago