From 889dc17abd95bd1f414646e54d7e3cdadd9afbc9 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Tue, 16 Jul 2019 19:18:30 +0300 Subject: [#1094] Rate-limited follow & unfollow actions. --- docs/config.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 9a64f0ed7..f595caba5 100644 --- a/docs/config.md +++ b/docs/config.md @@ -647,5 +647,7 @@ Supported rate limiters: * `:search` for the search requests (account & status search etc.) * `:app_account_creation` for registering user accounts from the same IP address +* `:relations_actions` for actions on relations with other users (follow, unfollow) +* `:relation_id_action` for actions on relation with specific another user (follow, unfollow) * `:statuses_actions` for create / delete / fav / unfav / reblog / unreblog actions on any statuses * `:status_id_action` for fav / unfav or reblog / unreblog actions on the same status by the same user -- cgit v1.2.3 From 2ba07b63f4557554cd4acc63dc8e0424612554a0 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Tue, 16 Jul 2019 16:59:02 +0000 Subject: Apply suggestion to docs/config.md --- docs/config.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index f595caba5..346b8cda2 100644 --- a/docs/config.md +++ b/docs/config.md @@ -647,7 +647,7 @@ Supported rate limiters: * `:search` for the search requests (account & status search etc.) * `:app_account_creation` for registering user accounts from the same IP address -* `:relations_actions` for actions on relations with other users (follow, unfollow) -* `:relation_id_action` for actions on relation with specific another user (follow, unfollow) +* `:relations_actions` for actions on relations with all users (follow, unfollow) +* `:relation_id_action` for actions on relation with a specific user (follow, unfollow) * `:statuses_actions` for create / delete / fav / unfav / reblog / unreblog actions on any statuses * `:status_id_action` for fav / unfav or reblog / unreblog actions on the same status by the same user -- cgit v1.2.3 From 18234cc44e6bc989e3e3cf15714c54b4fa05b9dd Mon Sep 17 00:00:00 2001 From: Sachin Joshi Date: Tue, 16 Jul 2019 22:37:36 +0545 Subject: add the rich media ttl based on image exp time --- ...howto_set_richmedia_cache_ttl_based_on_image.md | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 docs/config/howto_set_richmedia_cache_ttl_based_on_image.md (limited to 'docs') diff --git a/docs/config/howto_set_richmedia_cache_ttl_based_on_image.md b/docs/config/howto_set_richmedia_cache_ttl_based_on_image.md new file mode 100644 index 000000000..489f9ece8 --- /dev/null +++ b/docs/config/howto_set_richmedia_cache_ttl_based_on_image.md @@ -0,0 +1,32 @@ +# How to set rich media cache ttl based on image ttl +## Explanation + +Richmedia are cached without the ttl but the rich media may have image which can expire, like aws signed url. +In such cases the old image url (expired) is returned from the media cache. + +So to avoid such situation we can define a moddule that will set ttl based no image. + +The module must have a `run` function and it should be registered in the config. + +### Example + +```exs +defmodule MyModule do + def run(data, url) do + image_url = Map.get(data, :image) + # do some parsing in the url and get the ttl of the image + # ttl is unix time + ttl = parse_ttl_from_url(image_url) + Cachex.expire_at(:rich_media_cache, url, ttl * 1000) + end +end +``` + +And update the config + +```exs +config :pleroma, :rich_media, + ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl, MyModule] +``` + +> For reference there is a parser for AWS signed URL `Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl`, it's enabled by default. -- cgit v1.2.3 From 96a2890a9ecca3a6392edfaaaed4487303a920d7 Mon Sep 17 00:00:00 2001 From: RX14 Date: Wed, 17 Jul 2019 14:55:47 +0100 Subject: Add MRF MentionPolicy for dropping posts which mention specific actors --- docs/config.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 9a64f0ed7..5f69f8daf 100644 --- a/docs/config.md +++ b/docs/config.md @@ -101,6 +101,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `Pleroma.Web.ActivityPub.MRF.EnsureRePrepended`: Rewrites posts to ensure that replies to posts with subjects do not have an identical subject and instead begin with re:. * `Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy`: Rejects posts from likely spambots by rejecting posts from new users that contain links. * `Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy`: Crawls attachments using their MediaProxy URLs so that the MediaProxy cache is primed. + * `Pleroma.Web.ActivityPub.MRF.MentionPolicy`: Drops posts mentioning configurable users. (see `:mrf_mention` section) * `public`: Makes the client API in authentificated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. * `quarantined_instances`: List of ActivityPub instances where private(DMs, followers-only) activities will not be send. * `managed_config`: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json`` @@ -271,6 +272,9 @@ config :pleroma, :mrf_subchain, * `federated_timeline_removal`: A list of patterns which result in message being removed from federated timelines (a.k.a unlisted), each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html) * `replace`: A list of tuples containing `{pattern, replacement}`, `pattern` can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html) +## :mrf_mention +* `actors`: A list of actors, for which to drop any posts mentioning. + ## :media_proxy * `enabled`: Enables proxying of remote media to the instance’s proxy * `base_url`: The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts. -- cgit v1.2.3 From b2a8ccf37fac6e40e55ce9b224c66ef1fd655614 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Wed, 17 Jul 2019 21:38:06 +0000 Subject: config: add sign_object_fetches option --- docs/config.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 42556a0be..02f86dc16 100644 --- a/docs/config.md +++ b/docs/config.md @@ -332,6 +332,7 @@ This will make Pleroma listen on `127.0.0.1` port `8080` and generate urls start * ``unfollow_blocked``: Whether blocks result in people getting unfollowed * ``outgoing_blocks``: Whether to federate blocks to other instances * ``deny_follow_blocked``: Whether to disallow following an account that has blocked the user in question +* ``sign_object_fetches``: Sign object fetches with HTTP signatures ## :http_security * ``enabled``: Whether the managed content security policy is enabled -- cgit v1.2.3 From cdecef2a084eca629d2c6f72d083362a2113dbd2 Mon Sep 17 00:00:00 2001 From: "Bradley D. Thornton" Date: Wed, 17 Jul 2019 22:35:16 +0000 Subject: Update otp_en.md - Added creation of initial admin user --- docs/installation/otp_en.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs') diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md index 9b851e395..5b50e1838 100644 --- a/docs/installation/otp_en.md +++ b/docs/installation/otp_en.md @@ -242,6 +242,14 @@ So for example, if the task is `mix pleroma.user set admin --admin`, you should ```sh su pleroma -s $SHELL -lc "./bin/pleroma_ctl user set admin --admin" ``` + +## Create your first user and set as admin +```sh +cd /opt/pleroma/bin +su pleroma -s $SHELL -lc "./bin/pleroma_ctl user new joeuser joeuser@sld.tld --admin" +``` +This will create an account withe the username of 'joeuser' with the email address of joeuser@sld.tld, and set that user's account as an admin. This will result in a link that you can paste into the browser, which logs you in and enables you to set the password. + ### Updating Generally, doing the following is enough: ```sh -- cgit v1.2.3 From cffe8229a570ac883d6966dae97c97dba19412f0 Mon Sep 17 00:00:00 2001 From: tallship Date: Wed, 17 Jul 2019 23:03:46 +0000 Subject: Update clients.md - added Homepage for Fedilab Android app --- docs/clients.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/clients.md b/docs/clients.md index 30358c210..91096970e 100644 --- a/docs/clients.md +++ b/docs/clients.md @@ -31,6 +31,7 @@ Feel free to contact us to be added to this list! - Features: No Streaming ### Fedilab +- Homepage: - Source Code: - Contact: [@tom79@mastodon.social](https://mastodon.social/users/tom79) - Platforms: Android -- cgit v1.2.3 From 129078eddc1422e3654514477fe438b56dcff562 Mon Sep 17 00:00:00 2001 From: aries Date: Thu, 18 Jul 2019 21:08:31 +0900 Subject: Fix redirect setting not working --- docs/config/howto_mediaproxy.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config/howto_mediaproxy.md b/docs/config/howto_mediaproxy.md index fb731112b..ed70c3ed4 100644 --- a/docs/config/howto_mediaproxy.md +++ b/docs/config/howto_mediaproxy.md @@ -24,7 +24,9 @@ If you came here from one of the installation guides, take a look at the example ``` config :pleroma, :media_proxy, enabled: true, - redirect_on_failure: true + proxy_opts: [ + redirect_on_failure: true + ] #base_url: "https://cache.pleroma.social" ``` If you want to use a subdomain to serve the files, uncomment `base_url`, change the url and add a comma after `true` in the previous line. -- cgit v1.2.3 From de9906ad56bd25d6c8c38bef1307192df2e95445 Mon Sep 17 00:00:00 2001 From: Sachin Joshi Date: Fri, 19 Jul 2019 11:43:42 +0545 Subject: change the structure of image ttl parsar --- docs/config/howto_set_richmedia_cache_ttl_based_on_image.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config/howto_set_richmedia_cache_ttl_based_on_image.md b/docs/config/howto_set_richmedia_cache_ttl_based_on_image.md index 489f9ece8..5846b6ab0 100644 --- a/docs/config/howto_set_richmedia_cache_ttl_based_on_image.md +++ b/docs/config/howto_set_richmedia_cache_ttl_based_on_image.md @@ -4,7 +4,7 @@ Richmedia are cached without the ttl but the rich media may have image which can expire, like aws signed url. In such cases the old image url (expired) is returned from the media cache. -So to avoid such situation we can define a moddule that will set ttl based no image. +So to avoid such situation we can define a moddule that will set ttl based on image. The module must have a `run` function and it should be registered in the config. -- cgit v1.2.3 From 581756ccc50cc08823957a2f24f506bf23c7cd22 Mon Sep 17 00:00:00 2001 From: Sachin Joshi Date: Fri, 19 Jul 2019 11:50:47 +0545 Subject: update the docs --- .../howto_set_richmedia_cache_ttl_based_on_image.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/config/howto_set_richmedia_cache_ttl_based_on_image.md b/docs/config/howto_set_richmedia_cache_ttl_based_on_image.md index 5846b6ab0..bfee5a9e6 100644 --- a/docs/config/howto_set_richmedia_cache_ttl_based_on_image.md +++ b/docs/config/howto_set_richmedia_cache_ttl_based_on_image.md @@ -4,20 +4,21 @@ Richmedia are cached without the ttl but the rich media may have image which can expire, like aws signed url. In such cases the old image url (expired) is returned from the media cache. -So to avoid such situation we can define a moddule that will set ttl based on image. - -The module must have a `run` function and it should be registered in the config. +So to avoid such situation we can define a module that will set ttl based on image. +The module must adopt behaviour `Pleroma.Web.RichMedia.Parser.TTL` ### Example ```exs defmodule MyModule do - def run(data, url) do + @behaviour Pleroma.Web.RichMedia.Parser.TTL + + @impl Pleroma.Web.RichMedia.Parser.TTL + def ttl(data, url) do image_url = Map.get(data, :image) # do some parsing in the url and get the ttl of the image - # ttl is unix time - ttl = parse_ttl_from_url(image_url) - Cachex.expire_at(:rich_media_cache, url, ttl * 1000) + # return ttl is unix time + parse_ttl_from_url(image_url) end end ``` -- cgit v1.2.3 From b0b9eca37d43c8cc5e9e0e01fa4b1325a71ce4d2 Mon Sep 17 00:00:00 2001 From: tom79 Date: Fri, 19 Jul 2019 08:39:22 +0000 Subject: Update clients.md for Fedilab - Change owner (@fedilab@framapiaf.org), Source code: Framagit, Add some other supported features --- docs/clients.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/clients.md b/docs/clients.md index 91096970e..dc4ab37b1 100644 --- a/docs/clients.md +++ b/docs/clients.md @@ -32,10 +32,10 @@ Feel free to contact us to be added to this list! ### Fedilab - Homepage: -- Source Code: -- Contact: [@tom79@mastodon.social](https://mastodon.social/users/tom79) +- Source Code: +- Contact: [@fedilab@mastodon.social](https://framapiaf.org/users/fedilab) - Platforms: Android -- Features: Streaming Ready +- Features: Streaming Ready, Moderation, Text Formatting ### Nekonium - Homepage: [F-Droid Repository](https://repo.gdgd.jp.net/), [Google Play](https://play.google.com/store/apps/details?id=com.apps.nekonium), [Amazon](https://www.amazon.co.jp/dp/B076FXPRBC/) -- cgit v1.2.3 From 5c4a555b1da1d2cb6649a9384e386a48bbcf905f Mon Sep 17 00:00:00 2001 From: tom79 Date: Fri, 19 Jul 2019 08:40:47 +0000 Subject: Fix domain for the contact clients.md --- docs/clients.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/clients.md b/docs/clients.md index dc4ab37b1..9029361f8 100644 --- a/docs/clients.md +++ b/docs/clients.md @@ -33,7 +33,7 @@ Feel free to contact us to be added to this list! ### Fedilab - Homepage: - Source Code: -- Contact: [@fedilab@mastodon.social](https://framapiaf.org/users/fedilab) +- Contact: [@fedilab@framapiaf.org](https://framapiaf.org/users/fedilab) - Platforms: Android - Features: Streaming Ready, Moderation, Text Formatting -- cgit v1.2.3