aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2022-07-01InstanceStatic should have reasonable cachingfrontend-cachingMark Felder
While here fix the naming convention of the old module attribute restricting caching and add a new one for the default cache value All frontends should be shipped with versioned assets. There be dragons if you don't.
2022-05-31hackney adapter helper & reverse proxy client: enable TLSv1.3Pierre-Louis Bonicoli
The list of TLS versions was added by 8bd2b6eb138ace3408a03c78ecc339fc35b19f10 when hackney version was pinned to 1.15.2. Later hackney version was upgraded (166455c88441b22455d996ed528ed4804514a3c0) but the list of TLS versions wasn't removed. From the hackney point of view, this list has been replaced by the OTP defaults since 0.16.0 (734694ea4e24f267864c459a2f050e943adc6694). It looks like the same issue already occurred before: 0cb7b0ea8477bdd7af2e5e9071843be5b8623dff. A way to test this issue (where example.com is an ActivityPub site which uses TLSv1.3 only): $ PLEROMA_CONFIG_PATH=/path/to/config.exs pleroma start_iex Erlang/OTP 22 [erts-10.7.2.16] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe] Erlang/OTP 22 [erts-10.7.2.16] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe] Interactive Elixir (1.10.4) - press Ctrl+C to exit (type h() ENTER for help) iex(pleroma@127.0.0.1)2> Pleroma.Object.Fetcher.fetch_and_contain_remote_object_from_id("https://example.com/@/Nick/") {:error, {:tls_alert, {:protocol_version, 'TLS client: In state hello received SERVER ALERT: Fatal - Protocol Version\n'}}} With this patch, the output is the expected one: iex(pleroma@127.0.0.1)3> Pleroma.Object.Fetcher.fetch_and_contain_remote_object_from_id("https://example.com/@/Nick/") {:error, {:ok, %{ "@context" => [ "https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1", %{ "Emoji" => "toot:Emoji", "Hashtag" => "as:Hashtag", "atomUri" => "ostatus:atomUri", "conversation" => "ostatus:conversation", "featured" => "toot:featured", "focalPoint" => %{"@container" => "@list", "@id" => "toot:focalPoint"}, "inReplyToAtomUri" => "ostatus:inReplyToAtomUri", "manuallyApprovesFollowers" => "as:manuallyApprovesFollowers", "movedTo" => "as:movedTo", "ostatus" => "http://ostatus.org#", "sensitive" => "as:sensitive", "toot" => "http://joinmastodon.org/ns#" } ], "endpoints" => %{"sharedInbox" => "https://example.com/inbox"}, "followers" => "https://example.com/@/Nick/followers", "following" => nil, "icon" => %{ "type" => "Image", "url" => "https://example.com/static/media/[...].png" }, "id" => "https://example.com/@/Nick/", "inbox" => "https://example.com/@/Nick/inbox", "liked" => nil, "name" => "Nick", "outbox" => "https://example.com/@/Nick/outbox", "preferredUsername" => "Nick", "publicKey" => %{ "id" => "https://example.com/@/Nick/#main-key", "owner" => "https://example.com/@/Nick/", "publicKeyPem" => "[...] }, "summary" => "", "type" => "Person", "url" => "https://example.com/@/Nick/" }} A way to test the reverse proxy bits of this issue (where example.com allows TLSv1.3 only): iex(pleroma@127.0.0.1)1> Pleroma.ReverseProxy.Client.Hackney.request("GET", "https://example.com", [], []) {:error, {:tls_alert, {:protocol_version, 'TLS client: In state hello received SERVER ALERT: Fatal - Protocol Version\n'}}}
2022-05-18StealEmojiPolicy: fix String rejected_shortcodesHélène
* rejected_shortcodes is defined as a list of strings in the configuration description. As such, database-based configuration was led to handle those settings as strings, and not as the actually expected type, Regex. * This caused each message passing through this MRF, if a rejected shortcode was set and the emoji did not exist already on the instance, to fail federating, as an exception was raised, swiftly caught and mostly silenced. * This commit fixes the issue by introducing new behavior: strings are now handled as perfect matches for an emoji shortcode (meaning that if the emoji-to-be-pulled's shortcode is in the blacklist, it will be rejected), while still supporting Regex types as before.
2022-05-08Merge branch 'improve_anti_followbot_policy' into 'develop'Haelwenn
Also use actor_type to determine if an account is a bot in antiFollowbotPolicy Closes #2561 See merge request pleroma/pleroma!3498
2022-05-08Also use actor_type to determine if an account is a bot in antiFollowbotPolicyIlja
2022-05-06Skip cache when /objects or /activities is authenticatedTusooa Zhu
Ref: fix-local-public
2022-05-06Allow to skip cache in Cache plugTusooa Zhu
Ref: fix-local-public
2022-04-17Fix incorrect fallback when English is set to first languageTusooa Zhu
2022-03-20Merge branch 'from/upstream-develop/tusooa/translate-pages' into 'develop'Haelwenn
Translate backend-rendered pages See merge request pleroma/pleroma!3634
2022-03-20Merge branch 'delete_report_notifs_when_demoting_from_superuser' into 'develop'Haelwenn
Delete report notifs when demoting from superuser Closes #2840 See merge request pleroma/pleroma!3642
2022-03-07After code reviewIlja
Use patern matching to see if someone was superuser before
2022-03-06Support fallbacking to other languagesTusooa Zhu
2022-03-06Delete report notifs when demoting from superuserIlja
When someone isn't a superuser any more, they shouldn't see the reporsts any more either. Here we delete the report notifications from a user when that user gets updated from being a superuser to a non-superuser.
2022-03-03LintTusooa Zhu
2022-03-03Support multiple locales from userLanguage cookieTusooa Zhu
2022-03-03Support multiple locales formallyTusooa Zhu
elixir gettext current does not fully support fallback to another language [0]. But it might in the future. We adapt it so that all languages in Accept-Language headers are received by Pleroma.Web.Gettext. User.languages is now a comma-separated list. [0]: https://github.com/elixir-gettext/gettext/issues/303
2022-03-02Make lint happyTusooa Zhu
2022-03-02Fallback to a variant if the language in general is not supportedTusooa Zhu
For an example, here, zh is not supported, but zh_Hans and zh_Hant are. If the user asks for zh, we should choose a variant for them instead of fallbacking to default. Some browsers (e.g. Firefox) does not allow users to customize their language codes. For example, there is no zh-Hans, but only zh, zh-CN, zh-TW, zh-HK, etc. This provides a workaround for those users suffering from bad design decisions.
2022-03-02Allow user to register with custom languageTusooa Zhu
2022-03-02Allow update_credentials to update User.languageTusooa Zhu
2022-03-01Send emails i18n'd using backend-stored user languageTusooa Zhu
2022-03-01Make all emails translatableTusooa Zhu
2022-03-01Make mail and mailer translatableTusooa Zhu
2022-03-01Make static fe translatableTusooa Zhu
2022-02-28Fix testsTusooa Zhu
2022-02-28Make mfa pages translatableTusooa Zhu
2022-02-28Make oauth pages translatableTusooa Zhu
2022-02-28Use proper lang attributes in htmlsTusooa Zhu
2022-02-28Make tag feed translatableTusooa Zhu
2022-02-28Make password reset pages translatableTusooa Zhu
2022-02-26Merge branch 'revert/notice-routes' into 'develop'HJ
Revert notice compatibility routes merge request See merge request pleroma/pleroma!3576
2022-02-25Copyright bump for 2022Sean King
2022-02-21Make lint happyTusooa Zhu
2022-02-21Make remote follow pages translatableTusooa Zhu
2022-02-21Prefer userLanguage cookie over Accept-Language header in detecting localeTusooa Zhu
https://git.pleroma.social/pleroma/pleroma-meta/-/issues/60
2022-02-21Add unicode 14 supportSam Therapy
and add a test with a unicode 14 emoji
2022-02-06Max media attachment countmarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-01Birthdays: Fix outgoing federation of birth datesmarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-27ForceMentionsInContent: improve display of Markdown postsAlex Gleason
2022-01-26ForceMentionsInContent: don't apply it to top-level postsAlex Gleason
2022-01-26ForceBotUnlistedPolicy: fix to stop unlisting my posts >:(bot
2022-01-25ForceMentionsInContent: don't mention selfAlex Gleason
2022-01-25Merge branch 'recipients-inline' into 'develop'Alex Gleason
ForceMentionsInContent: wrap mentions in a span, fix the formatting See merge request pleroma/pleroma!3620
2022-01-25Merge branch 'birth-dates' into 'develop'Alex Gleason
Fix show_birthday See merge request pleroma/pleroma!3621
2022-01-25ForceMentionsInContent: fix order of mentionsAlex Gleason
2022-01-25AccountView: Add test for show_birthdaymarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-25Fix show_birthdaymarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-25Merge branch 'birth-dates' into 'develop'Alex Gleason
Birth dates See merge request pleroma/pleroma!3608
2022-01-24ForceMentionsInContentTest: return mentions in a not terrible formatAlex Gleason
2022-01-24ForceMentionsInContent: simplify finding usersAlex Gleason