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

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.
2022-04-08 21:21:49 +02:00
..
activitypub Refactor formatter (#17828) 2022-03-26 02:53:34 +01:00
admin Add admin dashboard checks for Elasticsearch version (#17863) 2022-03-25 21:00:59 +01:00
connection_pool
nodeinfo Add a nodeinfo endpoint (#12002) 2019-09-29 21:31:51 +02:00
ostatus
rss Refactor formatter (#17828) 2022-03-26 02:53:34 +01:00
settings Update Mastodon to Rails 6.1 (#15910) 2021-03-24 10:44:31 +01:00
access_token_extension.rb Change authorized applications page (#17656) 2022-03-01 16:48:58 +01:00
account_reach_finder.rb Fix remote reporters not receiving suspend/unsuspend activities (#16050) 2021-04-17 14:55:46 +02:00
activity_tracker.rb Add graphs and retention metrics to admin dashboard (#16829) 2021-10-14 20:44:59 +02:00
application_extension.rb Change authorized applications page (#17656) 2022-03-01 16:48:58 +01:00
cache_buster.rb Add cache buster feature for media files (#15155) 2020-11-19 17:38:06 +01:00
delivery_failure_tracker.rb Change design of federation pages in admin UI (#17704) 2022-03-09 08:52:32 +01:00
emoji_formatter.rb Refactor formatter (#17828) 2022-03-26 02:53:34 +01:00
entity_cache.rb Fix cache_collection crashing when given an empty collection (#15921) 2021-03-18 00:41:32 +01:00
extractor.rb Fix being able to post URLs longer than 4096 characters (#17908) 2022-03-30 14:46:03 +02:00
fast_geometry_parser.rb Switch from unmaintained paperclip to kt-paperclip (#16724) 2021-09-29 23:52:36 +02:00
fast_ip_map.rb Add IP-based rules (#14963) 2020-10-12 16:33:49 +02:00
feed_manager.rb Fix error MethodError in Chewy::Strategy::Sidekiq::Worker (#17912) 2022-03-31 00:49:24 +02:00
hash_object.rb
html_aware_formatter.rb Refactor formatter (#17828) 2022-03-26 02:53:34 +01:00
inline_renderer.rb Add E2EE API (#13820) 2020-06-02 19:24:53 +02:00
link_details_extractor.rb Add workaround for YouTube Shorts links (#17869) 2022-03-25 19:31:35 +01:00
permalink_redirector.rb Change routing paths to use usernames in web UI (#16171) 2021-09-26 05:46:13 +02:00
plain_text_formatter.rb Refactor formatter (#17828) 2022-03-26 02:53:34 +01:00
potential_friendship_tracker.rb Change auto-following admin-selected accounts, show in recommendations (#16078) 2021-04-24 17:01:43 +02:00
rate_limiter.rb Add rate limit for reporting (#13390) 2020-04-05 14:40:08 +02:00
request.rb Add support for structured data and more OpenGraph tags to link cards (#16938) 2021-11-05 23:23:05 +01:00
request_pool.rb
response_with_limit.rb Fix remote files not using Content-Type header, streaming (#14184) 2020-06-30 23:58:02 +02:00
rss_builder.rb
scope_parser.rb Change authorized applications page (#17656) 2022-03-01 16:48:58 +01:00
scope_transformer.rb Change authorized applications page (#17656) 2022-03-01 16:48:58 +01:00
search_query_parser.rb
search_query_transformer.rb Fix error resposes for from search prefix (#17963) 2022-04-08 21:21:49 +02:00
status_filter.rb
status_finder.rb
status_reach_finder.rb Add support for editing for published statuses (#16697) 2022-01-19 22:37:27 +01:00
suspicious_sign_in_detector.rb Remove sign-in token authentication, instead send e-mail about new sign-in (#17970) 2022-04-06 20:58:12 +02:00
tag_manager.rb Change multiple mentions with same username to render with domain (#15718) 2021-04-10 11:51:02 +02:00
text_formatter.rb Refactor formatter (#17828) 2022-03-26 02:53:34 +01:00
themes.rb
toc_generator.rb Add fallback section ID with ToC (#11941) 2019-09-23 17:25:10 +02:00
user_settings_decorator.rb Change e-mail notifications to only be sent when recipient is offline (#17984) 2022-04-08 18:03:31 +02:00
validation_error_formatter.rb Add details to error response for POST /api/v1/accounts in REST API (#15803) 2021-03-01 04:59:13 +01:00
video_metadata_extractor.rb Fix some media attachments being converted with too high framerates (#17619) 2022-02-22 17:11:22 +01:00
webfinger.rb Fix confusing error when webfinger request returns empty document (#16986) 2021-11-14 21:55:40 +01:00
webfinger_resource.rb Fix webfinger returning wrong status code on malformed or missing param (#13759) 2020-05-14 23:28:06 +02:00