Expose expires_at datetime in mastoAPI only for the activity actor
authorMike Verdone <spiral@arcseconds.net>
Wed, 24 Jul 2019 10:43:20 +0000 (12:43 +0200)
committerMike Verdone <spiral@arcseconds.net>
Wed, 24 Jul 2019 12:47:22 +0000 (14:47 +0200)
commit3cb471ec0688b81c8ef37dd27f2b82e6c858431f
treefa538e4012cfbff2ad99f68fe818b9df582fa01c
parent36012ef6c1dfea2489e61063e14783fa3fb52700
Expose expires_at datetime in mastoAPI only for the activity actor

In the "pleroma" section of the MastoAPI for status activities you can
see an expires_at item that states when the activity will expire, or
nothing if the activity will not expire.

The expires_at date is only visible to the person who posted the
activity. This is the conservative approach in case some attacker
decides to write a logger for expiring posts. However, in the future of
OCAP, signed requests, and all that stuff, this attack might not be that
likely. Some other pleroma dev should remove the restriction in the code
at that time, if they're satisfied with the security implications of
doing so.
docs/api/differences_in_mastoapi_responses.md
lib/pleroma/web/mastodon_api/views/status_view.ex
test/web/mastodon_api/mastodon_api_controller_test.exs
test/web/mastodon_api/status_view_test.exs