Commit Graph

2882 Commits

Author SHA1 Message Date
Alexander Strizhakov c2ca1f22a2 it is changed in compile time
we can't change module attributes and endpoint settings in runtime
2019-06-14 15:45:05 +00:00
Maksim ee4ed87fb4 [#948] /api/v1/account_search added optional parameters (limit, offset, following) 2019-06-14 11:39:57 +00:00
lain eac298083f MastodonAPI: Add a way to update the background image. 2019-06-14 11:19:22 +02:00
lain 5965efb216 AccountView: Add user background. 2019-06-13 19:08:05 +02:00
Egor Kislitsyn a12f8e13c8 Improve <title> fallback; Add a test 2019-06-13 15:02:46 +07:00
Mark Felder 7363a0ea8a Revert "Only run Floki if title is missing from the map"
This reverts commit 97d2b1a45a.
2019-06-12 18:32:28 -05:00
Mark Felder 97d2b1a45a Only run Floki if title is missing from the map 2019-06-12 18:27:35 -05:00
Mark Felder 097fdf6a5d Attempt to use <title> from HTML as a fallback 2019-06-12 17:56:51 -05:00
Ivan Tashkinov 4b2c29016c [#963] No redirect on OOB OAuth authorize request with existing authorization. OAuth-related refactoring. 2019-06-12 21:30:06 +03:00
lain 966543379d MastodonAPI Controller: Band-Aid double vote problem. 2019-06-12 16:36:23 +02:00
Egor Kislitsyn bf22ed5fbd Update `auto_linker` dependency 2019-06-12 15:53:33 +07:00
lain 63ab3c30eb Merge branch 'feature/rate-limiter' into 'develop'
Feature/Rate Limiter

Closes #943

See merge request pleroma/pleroma!1266
2019-06-11 11:32:01 +00:00
Egor Kislitsyn ad04d12de6 Replace `MastodonAPIController.account_register/2` rate limiter 2019-06-11 16:06:03 +07:00
Egor Kislitsyn bc8f059367 Add rate limiting for search endpoints 2019-06-11 14:28:39 +07:00
rinpatch d020f68e87 Transmogrifier: Do not crash if inReplyTo does not exist and can't be fetched 2019-06-07 20:40:38 +03:00
rinpatch 92213fb87c Replace Mix.env with Pleroma.Config.get(:env)
Mix.env/0 is not availible in release environments such as distillery or
elixir's built-in releases.
2019-06-06 23:59:51 +03:00
kaniini 3f6da9c45a Merge branch 'bugfix/377-stuck-follow-request' into 'develop'
Bugfix/377 stuck follow request

Closes #377

See merge request pleroma/pleroma!1250
2019-06-05 15:52:40 +00:00
kaniini a511d2f900 Merge branch 'improve-search' into 'develop'
[#943] Contain search for unauthenticated users

See merge request pleroma/pleroma!1220
2019-06-05 15:51:32 +00:00
lain e1370ba131 Utils: Use update_follow_state_for_all when appropriate. 2019-06-05 16:51:28 +02:00
lain ad19bfc7fe Utils: Split update_follow_state and update_follow_state_for_all. 2019-06-05 16:43:35 +02:00
lain 076c9ae40e User: Remove superfluous `maybe_follow`. 2019-06-05 14:24:31 +02:00
lain 3115b64cfe Transmogrifier: Add tests for incoming follows to locked accounts. 2019-06-05 14:10:46 +02:00
Ivan Tashkinov 3eefb274f4 OAuth consumer: tests fix, comments, Keycloak config notes. 2019-06-05 13:02:13 +03:00
Egor Kislitsyn 93397fce3d Contain search for unauthenticated users 2019-06-05 16:37:43 +07:00
kaniini e4babb1c9f Merge branch 'explicit-addressing' into 'develop'
Explicit addressing

See merge request pleroma/pleroma!1239
2019-06-05 08:28:20 +00:00
lain 18c35d84fd NodeInfo: Add explicit addressing to nodeinfo. 2019-06-04 17:14:25 +02:00
Maksim Pechnikov 1e7bb69a95 update ActivityPub#fetch_activities_query 2019-06-04 15:21:18 +03:00
Maksim Pechnikov d3d1704e84 Merge branch 'develop' into issue/941 2019-06-04 15:06:58 +03:00
Maksim Pechnikov 0acfcf6c52 update ActivityPub#fetch_activities_query 2019-06-04 15:04:36 +03:00
rinpatch 17383861ed Fix CommonAPI.vote returning tuples inside of the activity array instead of just activities 2019-06-04 13:38:32 +03:00
rinpatch 29b022bb59 Restrict `get_existing_votes` to only get Create activities 2019-06-04 12:42:10 +03:00
lain 4cab98b7bf Merge remote-tracking branch 'origin/develop' into explicit-addressing 2019-06-04 11:23:46 +02:00
William Pitcock 37a4ba0624 utils: access inReplyTo as an explicit string when fetching poll results` 2019-06-04 08:45:03 +00:00
Maksim Pechnikov 4f2e359687 Merge branch 'develop' into issue/941 2019-06-04 09:49:08 +03:00
William Pitcock 1c6cf0a348 nodeinfo: add pollLimits to metadata 2019-06-04 06:19:44 +00:00
kaniini 9f0d0d0805 Merge branch 'feature/mrf-subchain' into 'develop'
MRF: subchain policy

See merge request pleroma/pleroma!1233
2019-06-04 05:49:54 +00:00
kaniini 9d2563a3de Merge branch 'generic-fe-settings' into 'develop'
Generic settings store for frontend user settings

See merge request pleroma/pleroma!1221
2019-06-04 05:43:43 +00:00
Maksim Pechnikov f13d6c7f78 update api to set skip_thread_containment 2019-06-03 21:02:57 +03:00
eugenijm f2c4c99e03 Remove repeated scope lists 2019-06-03 19:18:21 +03:00
lain 80d4d83aac CommonAPI: Add explicit addressing. 2019-06-03 18:17:08 +02:00
eugenijm 243d8ed94e Use workaround for the heavy checkmark symbol in iOS 2019-06-03 18:28:36 +03:00
Mark Felder f4e2595592 Merge branch 'develop' into update-oauth-template 2019-06-03 09:12:17 -05:00
Maksim Pechnikov 080e1aa70e add option skip_thread_containment 2019-06-03 16:13:37 +03:00
rinpatch dc91bcc0af Merge branch 'develop' into feature/polls-2-electric-boogalo 2019-06-03 13:16:17 +03:00
lambda 314758c25b Merge branch 'align-mastodon-conversations' into 'develop'
Mastodon Conversations API: Align to Mastodon behavior

See merge request pleroma/pleroma!1215
2019-06-03 09:48:37 +00:00
rinpatch 026b245dbc Merge branch 'develop' into feature/polls-2-electric-boogalo 2019-06-03 11:14:52 +03:00
rinpatch 5bd41fef8b Change query order in fetch_activities_for_context_query to make poll vote exclusion work 2019-06-03 10:58:37 +03:00
rinpatch 1fd8e19d76 Remove a TODO comment as the tests for poll view were written 2019-06-02 23:46:17 +03:00
rinpatch 2fe3a20638 Make error message about author's inability to vote more sensible 2019-06-02 23:33:15 +03:00
rinpatch e3c460353d Refresh the object in CommonAPI.vote instead of MastoAPI controller 2019-06-02 23:24:48 +03:00
William Pitcock 561a21986d formatting 2019-06-02 10:29:15 +00:00
William Pitcock 4087ccdab8 mrf: add subchain policy 2019-06-02 10:07:42 +00:00
William Pitcock edf772d41e mrf: allow a policy chain to be specified when filtering 2019-06-02 09:44:42 +00:00
kaniini 5402d04e3c Merge branch 'feature/notification-control-part-2' into 'develop'
notification controls, part 2

See merge request pleroma/pleroma!1204
2019-06-02 08:25:37 +00:00
rinpatch 6bc9e5c020 Mastodon API: Refresh the object before rendering it after voting 2019-06-01 21:41:49 +03:00
rinpatch 444406167b Mastodon API: actually check for poll votes 2019-06-01 21:41:23 +03:00
rinpatch 65db5e9f52 Resolve merge conflicts 2019-06-01 16:29:58 +03:00
rinpatch 300d94c628 Add poll votes
Also in this commit by accident:
- Fix query ordering causing exclude_poll_votes to not work
- Do not create notifications for Answer objects
2019-06-01 16:17:46 +03:00
kaniini e706b42f51 Merge branch 'bugfix/visibility-indicator-litepub-dm' into 'develop'
visibility: if litepub:directMessage is asserted, always report the object as "direct" visibility

See merge request pleroma/pleroma!1230
2019-06-01 03:39:13 +00:00
Sergey Suprunenko 2bbc2a801f Remove all follower collections but actor's from "cc" 2019-06-01 03:26:45 +00:00
William Pitcock f2efe24cf8 visibility: if litepub:directMessage is asserted, always report the object as "direct" visibility 2019-06-01 03:24:08 +00:00
Haelwenn (lanodan) Monnier 5d3ece2861
Remove now useless flavours switching 2019-06-01 01:44:10 +02:00
Haelwenn (lanodan) Monnier aa9f52edd2
mastodon_api_controller.ex: Remove vanilla from supported_flavours 2019-06-01 01:44:10 +02:00
lambda 2993361075 Merge branch 'hotfix/leaking-lists' into 'develop'
Mastodon API: Fix lists leaking private posts

See merge request pleroma/pleroma!1222
2019-05-31 13:26:48 +00:00
lain 7861974ab2 MastodonAPI: Add extension to set and get pleroma_settings_store. 2019-05-31 14:50:18 +02:00
lain aaad85c4d9 AccountView: settings -> settings_store 2019-05-31 14:49:46 +02:00
lain eb2963bc43 User: Add settings store to Info, AccountView
This is to provide a generic frontend settings storage mechanism for all kinds
of frontends.
2019-05-31 14:27:15 +02:00
rinpatch d9c0650ff9 Mastodon API: Fix lists leaking private posts
Our previous list visibility resolver grabbed posts if either follower
collection of the user in a list who is followed is in `to` or if
follower collection of the user in a list was in `cc`. This not only
missed unlisted posts but also lead to leaking private posts when
`fix_explicit_addressing` mistakingly started putting follower collections
to `cc` (also fixed in this MR).

Reported by @kurisu@iscute.moe via a DM
2019-05-31 15:25:17 +03:00
rinpatch a9eaa55885 Fix fix_explicit_addressing moving follower collection to cc and add tests for it 2019-05-31 14:17:05 +03:00
lain 97fb50d9fa Mastodon Conversation API: Don't return own account in 'accounts'. 2019-05-31 11:27:14 +02:00
Sergey Suprunenko 1690be991e Replace missing non-nullable Card attributes with empty strings 2019-05-30 21:03:31 +00:00
lambda 91ac8b075b Merge branch 'use-pleroma-config' into 'develop'
Use Pleroma.Config everywhere

See merge request pleroma/pleroma!1214
2019-05-30 13:16:08 +00:00
Egor Kislitsyn 99f70c7e20 Use Pleroma.Config everywhere 2019-05-30 15:33:58 +07:00
kaniini 6aec0d1b58 Revert "Merge branch 'feature/search-authenticated-only' into 'develop'"
This reverts merge request !1209
2019-05-29 22:10:16 +00:00
Mark Felder 672fddb721 Default search limit should be 40
https://docs.joinmastodon.org/api/rest/search/
2019-05-29 08:06:26 -05:00
William Pitcock 0159a6dbe9 router: require oauth_read for searching
Search calls are generally expensive and allow unauthenticated users to
crawl the instance for user profiles or posts which contain specified
keywords.  An adversary can build a distributed search engine which not
only will consume significant instance resources, but also can be used
for undesirable purposes such as datamining.

Accordingly, require authenticated access to use the search API endpoints.
This acts as a nice balance as it allows guest users to make use of most
functionality available in Pleroma FE while ensuring that Pleroma
instances are reasonably protected from resource exhaustion.  It also
removes Pleroma as a potential vector in distributed search engines.
2019-05-29 10:58:45 +00:00
lambda 5bb843ceec Merge branch 'refactor/die-httpoison-die' into 'develop'
remove @httpoison, @ostatus and @websub compile-time constants

See merge request pleroma/pleroma!1203
2019-05-26 13:33:11 +00:00
William Pitcock 79503ce90f mrf: simple policy: fix matching imported activitypub and ostatus statuses 2019-05-26 02:01:24 +00:00
William Pitcock 59a703fcbe twitter api: user view: expose user notification settings under pleroma object 2019-05-25 05:31:13 +00:00
William Pitcock 56fd7dbdd7 remove @websub and @ostatus module-level constants 2019-05-25 04:43:11 +00:00
William Pitcock 9bec891eb4 kill @httpoison 2019-05-25 04:24:21 +00:00
Aaron Tinio 9415932af5 Keep nodeinfo available when not federating 2019-05-25 08:15:12 +08:00
feld f916e4cdd9 Move the Cache Control header test to its own file
We can consolidate our cache control header tests here
2019-05-24 20:33:55 +00:00
rinpatch 8b2d39c1ec Change the order of preloading when fetching activities for context 2019-05-23 14:03:16 +03:00
rinpatch e6b175ed6c Fix credo issues 2019-05-22 21:57:46 +03:00
William Pitcock baf72d6c58 mrf: simple policy: add the ability to strip avatars and banners from user profiles 2019-05-22 18:53:12 +00:00
William Pitcock 60f882b09f activitypub: run user objects through MRF filters 2019-05-22 18:53:12 +00:00
William Pitcock 75b6c4b004 mrf: defang policy modules for filtering user profile objects 2019-05-22 18:53:12 +00:00
rinpatch ac7702f800 Exclude Answers from fetching by default 2019-05-22 21:52:12 +03:00
rinpatch 19c90d47c4 Normalize poll votes to Answer objects 2019-05-22 21:17:57 +03:00
Maksim 620908a2db [#699] add worker to clean expired oauth tokens 2019-05-22 15:44:50 +00:00
lambda ff363f70b5 Merge branch 'refactor/keys' into 'develop'
move key generation functions into Pleroma.Keys module

See merge request pleroma/pleroma!1186
2019-05-22 06:28:16 +00:00
William Pitcock 1344c85e2f salmon: fix credo 2019-05-22 05:58:51 +00:00
rinpatch cdac5efd10 Merge branch 'bugfix/account_view_source.note' into 'develop'
MastoAPI AccountView: fill source.note with plaintext version of note

Closes #926

See merge request pleroma/pleroma!1189
2019-05-22 05:39:01 +00:00
Haelwenn (lanodan) Monnier 0e2c215a00
MastoAPI AccountView: fill source.note with plaintext version of note
Closes: https://git.pleroma.social/pleroma/pleroma/issues/926
2019-05-22 07:22:19 +02:00
kaniini 79c2cef2fb Merge branch 'mongooseim-support' into 'develop'
MongooseIM: Add basic integration endpoints.

See merge request pleroma/pleroma!1172
2019-05-22 04:06:54 +00:00
William Pitcock 045803346d move key generation functions into Pleroma.Keys module 2019-05-22 03:58:15 +00:00
Aaron Tinio 3ab9255eda Respond with a 404 Not implemented JSON error message
when requested API is not implemented
2019-05-22 07:15:52 +08:00
rinpatch 63b0b7190c MastoAPI: Add GET /api/v1/polls/:id 2019-05-21 20:40:35 +03:00
rinpatch 5f67c26baf Accept strings in expires_in because sasuga javascript 2019-05-21 17:30:51 +03:00