Commit Graph

48 Commits (553b169d483e9b2f28007e130a494aec08a1720a)

Author SHA1 Message Date
Claire 86f6631d28
Remove dead code and refactor status threading code ()
* Remove dead code

* Remove unneeded/broken parameters and refactor descendant computation
Eugen Rochko 839f893168
Change public accounts pages to mount the web UI ()
* Change public accounts pages to mount the web UI

* Fix handling of remote usernames in routes

- When logged in, serve web app
- When logged out, redirect to permalink
- Fix `app-body` class not being set sometimes due to name conflict

* Fix missing `multiColumn` prop

* Fix failing test

* Use `discoverable` attribute to control indexing directives

* Fix `<ColumnLoading />` not using `multiColumn`

* Add `noindex` to accounts in REST API

* Change noindex directive to not be rendered by default before a route is mounted

* Add loading indicator for detailed status in web UI

* Fix missing indicator appearing while account is loading in web UI
Eugen Rochko 62782babd0
Change public statuses pages to mount the web UI ()
Claire 8cf7006d4e
Refactor ActivityPub handling to prepare for non-Account actors ()
* 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`
Eugen Rochko 351c744590
Fix error when trying to render component for media without meta ()
ThibG 2ff01f78f7
Fix /activity endpoint not require signature in authorized fetch mode ()
Fixes 

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
ThibG ac8a788370
Fix functional user requirements in whitelist mode ()
Fixes 
Eugen Rochko 5d8398c8b8
Add E2EE API ()
Eugen Rochko 988b0493fe
Add more tests for ActivityPub controllers ()
Eugen Rochko c4c315ea40
Fix OEmbed leaking information about existence of non-public statuses ()
Eugen Rochko de5305a3a5
Fix redirecting non-functional accounts on public pages ()
Fix 
ThibG 646f96d448 Fix ActivityPub and REST API queries setting cookies and preventing caching ()
Regression from 
Eugen Rochko c669bb42ba
Add (back) rails-level JSON caching ()
Eugen Rochko 5bf67ca913
Add ActivityPub secure mode ()
* Add HTTP signature requirement for served ActivityPub resources

* Change `SECURE_MODE` to `AUTHORIZED_FETCH`

* Add 'Signature' to 'Vary' header and improve code style

* Improve code style by adding `public_fetch_mode?` method
Eugen Rochko 63c7fe8e48
Refactor controllers for statuses, accounts, and more ()
Eugen Rochko b851456139
Remove Atom feeds and old URLs in the form of `GET /:username/updates/:id` ()
ThibG cac9110533 Cleanup various controllers ()
* Remove skip_session! as it is not supported in Rails 5

* Minor cleanup in StreamEntriesController

* Remove redundant mark_cacheable! calls
ThibG 7fa23ec697 Fix potential private status leak ()
ThibG 26fc21c188 Add some caching for HTML versions of statuses pages ()
Ben Lubar c3d1594576 Reduce server load caused by anonymous viewing. ()
Do not start a session if the current user is not logged in for public-facing pages.

Mark pages that don't care about sessions as publicly cacheable.

Keep the max age as 0 so proxies and browsers will still try to retrieve an updated version but can still fall back to the stale version if the site is down or too slow.

Fixes .
ThibG d8498b3983 Give the `replies` collection an identifier and enable pagination ()
ThibG e88c6a5c3c Fix thread depth computation in statuses_controller ()
* Add test that should currently fail

* Fix depth computation (will still fail if statuses have been filtered out)

* Fix handling of broken threads
ThibG 2d27c11061 Set Content-Security-Policy rules through RoR's config ()
* Set CSP rules in RoR's configuration

* Override CSP setting in the embed controller to allow frames
Renato "Lond" Cerqueira 11658d8653 Add animate custom emoji param to embed pages ()
* Add animate custom emoji param to embed pages

* Rename param, use it for avatars and gifs

* Fix issues pointed by codeclimate and breaking test

* Ignore brakeman warning
abcang 9e75aa30cd Unuse ActiveRecord::Base#cache_key ()
* Unuse ActiveRecord::Base#cache_key

* Enable cache_versioning

* Call cache_collection
Eugen Rochko 60df87f6f0
Compensate for scrollbar disappearing when media modal visible ()
* Compensate for scrollbar disappearing when media modal visible

Make auth pages backgrounds lighter

* Fix typo
Eugen Rochko bb71538bb5
Redesign public profiles and toots ()
Eugen Rochko 2092d5c0ad
Improve embeds ()
* Make embeds cacheable by reverse proxy

* Make follow button on embeds open remote follow modal

Instead of web+mastodon://, also, turn the button blue, and add a
sign up prompt to the remote follow modal
Eugen Rochko da61352fab
Fix "Show more" URL on paginated threads for remote statuses ()
* Fix URL of "Show more" link in paginated threads (ancestors side)

Increase item limits in threads

Fix 

* Fix "Show more" link in paginated threads (descendants side)
Akihiko Odaki 1258efa882 Paginate descendant statuses in public page ()
Eugen Rochko aab5581c43
Set Referrer-Policy to origin in web UI and public pages of private toots ()
Fix 
Akihiko Odaki 519119f657 Paginate ancestor statuses in public page ()
This also limits the statuses returned by API, but pagination is not
implemented in Web API yet. I still expect it brings user experience
better than making a user wait to fetch all ancestor statuses and flooding
the column with them.
puckipedia 8e4cf6282b Allow retrieval of private statuses (single or in outbox) using HTTP signatures ()
ThibG 3bee0996c5 Make sure private toots remain private and do not end up in HTTP caches ()
Eugen Rochko c10f4bdb03
Cache JSON of immutable ActivityPub representations ()
ThibG 99f962ba73 Allow HTTP caching of json view of public statuses ()
* Allow HTTP caching of json view of public statuses

HTML views are not cached as they can contain private statuses as well

* Disable session cookies for ActivityPub json rendering of public toots
Eugen Rochko 3a3475450e Encode custom emojis as resolveable objects in ActivityPub ()
* Encode custom emojis as resolveable objects in ActivityPub

* Improve code style
Eugen Rochko e95bdec7c5 Update status embeds ()
- Use statuses controller for embeds instead of stream entries controller
- Prefer /@:username/:id/embed URL for embeds
- Use /@:username as author_url in OEmbed
- Add follow link to embeds which opens web intent in new window
- Use redis cache in development
- Cache entire embed
unarist b01a19fe39 Fetch reblogs as Announce activity instead of Note object ()
* Process Create / Announce activity in FetchRemoteStatusService

* Use activity URL in ActivityPub for reblogs

* Redirect to the original status on StatusesController#show
Eugen Rochko 6df8bd277b Set correct content-type for ActivityPub JSON ()
Eugen Rochko a2aeacbfee Add alternate links to ActivityPub resources from HTML/HEAD variants ()
Eugen Rochko 8c45cd0e36 Improve ActivityPub representations ()
* Improve webfinger templates and make tests more flexible

* Clean up AS2 representation of actor

* Refactor outbox

* Create activities representation

* Add representations of followers/following collections, do not redirect /users/:username route if format is empty

* Remove unused translations

* ActivityPub endpoint for single statuses, add ActivityPub::TagManager for better
URL/URI generation

* Add ActivityPub::TagManager#to

* Represent all attachments as Document instead of Image/Video specifically
(Because for remote ones we may not know for sure)

Add mentions and hashtags representation to AP notes

* Add AP-resolvable hashtag URIs

* Use ActiveModelSerializers for ActivityPub

* Clean up unused translations

* Separate route for object and activity

* Adjust cc/to matrices

* Add to/cc to activities, ensure announce activity embeds target status and
not the wrapper status, add "id" to all collections
Jack Jennings 3a2003ba86 Extract authorization policy for viewing statuses ()
Eugen Rochko d6ed2eb512 Prettier account and stream entry URLs
Eugen Rochko eec0dc46a6 PostStatusService can attach media to status, ProcessFeedService likewise
Eugen Rochko 49520d6e62 Adding React.js, Redux, revamping dashboard
Eugen Rochko a08e724476 Fix subscriptions:clear task, refactor feeds, refactor streamable activites
and atom feed generation to some extent, as well as the way mentions are
stored
Eugen Rochko f14f462eaf Adding Turbolinks, adding status posting form on homepage