mastodon/app/controllers
0x2019 012537452a
Fix error resposes for `from` search prefix ()
* Fix error responses in `from` search prefix (addresses )

Using unsupported prefixes now reports a 422; searching for posts from an
account the instance is not aware of reports a 404. TODO: The UI for this
on the front end is abysmal.

Searching `from:username@domain` now succeeds when `domain` is the local
domain; searching `from:@username(@domain)?` now works as expected.

* Remove unused methods on new Error classes as they are not being used

Currently when `raise`d there are error messages being supplied, but
this is not actually being used. The associated `raise`s have been
edited accordingly.

* Remove needless comments

* Satisfy rubocop

* Try fixing tests being unable to find AccountFindingConcern methods

* Satisfy rubocop

* Simplify `from` prefix logic

This incorporates @ClearlyClaire's suggestion (see
https://github.com/mastodon/mastodon/pull/17963#pullrequestreview-933986737).

Accepctable account strings in `from:` clauses are more lenient than
before this commit; for example, `from:@user@example.org@asnteo +cat`
will not error, and return posts by @user@example.org containing the
word "cat". This is more consistent with how Mastodon matches mentions
in statuses. In addition, `from` clauses will not be checked for
syntatically invalid usernames or domain names, simply 404ing when
`Account.find_remote!` raises ActiveRecord::NotFound.

New code for this PR that is no longer used has been removed.
..
activitypub Fix locale not being set in REST API ()
admin Remove sign-in token authentication, instead send e-mail about new sign-in ()
api Fix error resposes for `from` search prefix ()
auth Remove sign-in token authentication, instead send e-mail about new sign-in ()
concerns Remove sign-in token authentication, instead send e-mail about new sign-in ()
disputes Change old moderation strikes to be displayed in a separate page ()
oauth Refactor settings controllers ()
settings Change e-mail notifications to only be sent when recipient is offline ()
well_known Remove Keybase integration ()
about_controller.rb Add server rules ()
account_follow_controller.rb Add specific rate limits for posting and following ()
account_unfollow_controller.rb
accounts_controller.rb Add support for private pinned posts ()
application_controller.rb Add logging of S3-related errors ()
authorize_interactions_controller.rb Add specific rate limits for posting and following ()
custom_css_controller.rb Remove set-cookie header on custom.css ()
directories_controller.rb Change trending hashtags to be affected be reblogs ()
emojis_controller.rb
filters_controller.rb Sort filters by “keyword or phrase” in Settings ()
follower_accounts_controller.rb Add `/api/v1/accounts/familiar_followers` to REST API ()
following_accounts_controller.rb Add `/api/v1/accounts/familiar_followers` to REST API ()
health_controller.rb Change health check ()
home_controller.rb Change routing paths to use usernames in web UI ()
instance_actors_controller.rb Fix instance actor not being dereferenceable ()
intents_controller.rb
invites_controller.rb
manifests_controller.rb Fix redirecting non-functional accounts on public pages ()
media_controller.rb Fix error when rendering public pages with media attachments ()
media_proxy_controller.rb Fix media proxy RedisLocks auto-releasing too fast ()
public_timelines_controller.rb
relationships_controller.rb Add interrelationship icon ()
remote_follow_controller.rb Fix redirecting non-functional accounts on public pages ()
remote_interaction_controller.rb Fix functional user requirements in whitelist mode ()
shares_controller.rb
statuses_cleanup_controller.rb Add feature to automatically delete old toots ()
statuses_controller.rb Fix error when trying to render component for media without meta ()
tags_controller.rb Refactor how public and tag timelines are queried ()