Compare commits

...

1004 Commits

Author SHA1 Message Date
Sam Therapy 28fde4d87a
Merge branch 'develop' of ssh://git.pleroma.social:2222/pleroma/pleroma into froth 2023-05-23 00:05:22 +02:00
Haelwenn 0524e66a05 Merge branch 'accept-tags-2.5' into 'develop'
TagValidator: Drop unrecognized Tag types

Closes #2952

See merge request pleroma/pleroma!3823
2023-05-17 19:04:51 +00:00
Haelwenn ce1c0f75cd Merge branch 'tusooa/3065-scopes' into 'develop'
OAuth scopes descriptions

Closes #3065

See merge request pleroma/pleroma!3848
2023-05-17 18:51:26 +00:00
Haelwenn 66327b56e9 Merge branch 'tusooa/rework-refetch' into 'develop'
Make sure object refetching follows update rules

See merge request pleroma/pleroma!3883
2023-05-17 18:50:35 +00:00
Haelwenn b8b15cec9e Merge branch 'tusooa/changelog-improve' into 'develop'
Use git diff to search for changelog entry

See merge request pleroma/pleroma!3875
2023-05-17 15:49:54 +00:00
Haelwenn 143676f58c Merge branch 'tusooa/allow-lang' into 'develop'
Allow lang attribute

See merge request pleroma/pleroma!3882
2023-05-17 15:28:32 +00:00
tusooa e170fc40dd
Fix build warning 2023-05-09 21:38:28 -04:00
tusooa be5c5118cb
Make sure object refetching follows update rules 2023-05-09 21:04:27 -04:00
tusooa 163e82bab1
Allow lang attribute 2023-05-09 19:27:32 -04:00
tusooa 6a3fd8e014
Do not count for renames when diffing 2023-05-02 22:16:00 -04:00
tusooa 99f157e280
Fix MR pipelines not having build and test jobs 2023-05-02 22:12:15 -04:00
tusooa 9283c784a3
Add English translation for oauth scopes 2023-05-02 17:03:09 -04:00
tusooa b6dd194000
Add changelog 2023-05-02 16:33:53 -04:00
tusooa 6d0ebccdb0
Make webui use translated scope descriptions 2023-05-02 16:32:33 -04:00
tusooa 530284e1b9
Add extracted pot 2023-05-02 16:32:33 -04:00
tusooa 85bdbb102e
Add extraction process for oauth scopes 2023-05-02 16:32:10 -04:00
tusooa 248f914e6e Merge branch 'list-installed-frontends' into 'develop'
List installed frontend refs in admin API

See merge request pleroma/pleroma!3862
2023-04-27 02:56:19 +00:00
tusooa ddf57596be Merge branch 'bugfix/content-disposition' into 'develop'
UploadedMedia: Add missing disposition_type to Content-Disposition

Closes #3114

See merge request pleroma/pleroma!3873
2023-04-26 15:39:20 +00:00
Haelwenn 286b9bb66c Merge branch 'tusooa/no-more-needs' into 'develop'
Do not use needs: in pipeline yaml

See merge request pleroma/pleroma!3878
2023-04-26 14:23:47 +00:00
tusooa d5e8345946
Do not use needs: in pipeline yaml 2023-04-26 09:14:49 -04:00
lain d97425d49e Merge branch 'duponin/remove-ssh' into 'develop'
Remove SSH/BBS feature from core

Closes #932, #2389, and #2931

See merge request pleroma/pleroma!3872
2023-04-26 12:19:46 +00:00
Haelwenn 18913c4cd8 Merge branch 'tusooa/combine-login' into 'develop'
Work around docker login needing daemon

See merge request pleroma/pleroma!3877
2023-04-26 11:43:46 +00:00
tusooa 1a50db36d3
Skip changelog entry for 3877 2023-04-26 07:20:35 -04:00
tusooa a946917206
Work around docker login needing daemon 2023-04-26 07:19:30 -04:00
Haelwenn 3b2d7cc67f Merge branch 'tusooa/kaniko' into 'develop'
Add ELIXIR_IMG arg to latest

See merge request pleroma/pleroma!3876
2023-04-26 02:59:13 +00:00
tusooa 47e95fe9f5
Add changelog for 3876 2023-04-25 21:40:28 -04:00
tusooa 9c7b036401
Add ELIXIR_IMG arg to latest 2023-04-25 21:39:15 -04:00
Haelwenn 6bd0df1357 Merge branch 'tusooa/kaniko' into 'develop'
Use kaniko to build docker images

See merge request pleroma/pleroma!3870
2023-04-25 23:14:21 +00:00
tusooa c5ffdd0609
Use self-built elixir image for arm 2023-04-24 20:03:59 -04:00
tusooa 2736c3f294
Use --custom-platform to replace the deprecated one 2023-04-24 19:57:32 -04:00
tusooa 66d23713e9
Do not use nested levels for arch 2023-04-24 19:56:54 -04:00
duponin af38c6104e add changelog entry for BBS/SSH feature remove 2023-04-23 10:58:50 +02:00
duponin b2dc9ad9d8 fix test after removing esshd/SSH feature 2023-04-23 10:47:17 +02:00
duponin 0231a09310 Remove SSH/BBS feature from core
And link to sshocial, the replacement client for this removed feature
2023-04-23 10:47:07 +02:00
tusooa ae8f359f22
Skip changelog check for automated MRs 2023-04-22 21:07:18 -04:00
tusooa 30bc37c3ca
Explain changelog.d in merge request templates 2023-04-22 21:02:13 -04:00
tusooa c1aa83069d
Skip changelog 2023-04-22 20:45:27 -04:00
tusooa e13b331762
Fetch upstream in the repo 2023-04-22 20:42:59 -04:00
tusooa 50e237759a
Use git diff to search for changelog entry 2023-04-22 20:31:48 -04:00
Haelwenn (lanodan) Monnier 2148ef5e2f UploadedMedia: Increase readability via ~s sigil 2023-04-18 00:12:42 +02:00
Haelwenn (lanodan) Monnier 8f0f58e28b UploadedMedia: Add missing disposition_type to Content-Disposition
Set it to `inline` because the vast majority of what's sent is multimedia
content while `attachment` would have the side-effect of triggering a
download dialog.

Closes: https://git.pleroma.social/pleroma/pleroma/-/issues/3114
2023-04-18 00:09:19 +02:00
Haelwenn 3867b52aef Merge branch 'tusooa/3027-dedupe-poll' into 'develop'
Dedupe poll options

Closes #3027

See merge request pleroma/pleroma!3860
2023-04-13 08:40:04 +00:00
Haelwenn cf1ba77b9e Merge branch '2023-04-mix-deps-update' into 'develop'
mix: Update all dependencies

See merge request pleroma/pleroma!3867
2023-04-13 08:36:35 +00:00
tusooa 23bca0c4b3
Skip changelog entry 2023-04-12 12:40:26 -04:00
tusooa b37a90caa3
Combine images of different platforms into one 2023-04-12 12:38:47 -04:00
tusooa 7997ba0abe
Build images with kaniko 2023-04-12 11:49:33 -04:00
Sam Therapy 35a748e959
Merge branch 'develop' of ssh://git.pleroma.social:2222/pleroma/pleroma into froth 2023-04-08 12:58:26 -05:00
Haelwenn b7a831ca55 Merge branch 'from/upstream-develop/tusooa/require-changelog' into 'develop'
require changelog

See merge request pleroma/pleroma!3739
2023-04-05 07:53:11 +00:00
tusooa 686c3e03bd
Fix counting 2023-04-04 12:24:45 -04:00
Haelwenn 89a40b867d Allow more than 1 changelog entry 2023-04-04 16:20:46 +00:00
Haelwenn (lanodan) Monnier ce16ff7ae8 mix: Update all dependencies 2023-04-04 11:19:38 +02:00
tusooa 78a6f56295 Merge branch 'doc/add-fedistar' into 'develop'
Add Fedistar as a desktop client in docs

See merge request pleroma/pleroma!3866
2023-04-01 17:46:30 +00:00
AkiraFukushima e5f36f9f8d
Update contact information for Whalebird and Fedistar 2023-04-02 01:07:07 +09:00
AkiraFukushima 17f1b8d133
Remove Roma from docs
Because this app is no longer maintained
2023-04-02 01:03:15 +09:00
AkiraFukushima 81e1d6d9d0
Add Fedistar as a desktop client in docs 2023-04-02 01:02:22 +09:00
Ekaterina Vaartis 6a63dced4a Fix tests for frontend installation 2023-03-30 19:25:35 +03:00
Ekaterina Vaartis 3037d2780c Also list frontends that are not in the config file 2023-03-30 11:16:40 +03:00
Ekaterina Vaartis d3b27d45a9 List installed frontend refs in admin API 2023-03-29 23:23:06 +03:00
Haelwenn 4f7c11b281 Merge branch 'tusooa/3073-react-legacy' into 'develop'
Fix emoji reactions for legacy 2-tuple formats

Closes #3073

See merge request pleroma/pleroma!3861
2023-03-27 10:05:47 +00:00
tusooa c5d946bc92
Fix emoji reactions for legacy 2-tuple formats 2023-03-26 15:12:40 -04:00
tusooa 67d1897c6e
Fix existing tests 2023-03-26 11:19:44 -04:00
tusooa 10930f7507
Dedupe poll options 2023-03-25 23:20:07 -04:00
Haelwenn 6d0cc8fa2a Merge branch 'features/image-object' into 'develop'
Add support for Image objects

Closes #1581

See merge request pleroma/pleroma!3145
2023-03-25 06:35:55 +00:00
Haelwenn 9c53d1fe19 Merge branch 'background-timeout' into 'develop'
Set background worker timeout to 15 minutes

See merge request pleroma/pleroma!3857
2023-03-25 05:40:35 +00:00
anemone f463b7570e Set background worker timeout to 15 minutes 2023-03-23 23:14:52 -07:00
Sam Therapy 5b7c7089a7
Merge branch 'develop' of ssh://git.pleroma.social:2222/pleroma/pleroma into froth 2023-03-23 13:14:43 +01:00
tusooa bf9db78426 Merge branch 'docs-otp-support' into 'develop'
docs: Be more explicit about the level of compatibility of OTP releases

See merge request pleroma/pleroma!3849
2023-03-16 08:11:44 +00:00
Haelwenn 353538d16c Merge branch 'pleroma-akkoma-emoji-port' into 'develop'
Custom emoji reactions support

See merge request pleroma/pleroma!3845
2023-03-16 08:00:00 +00:00
Haelwenn c3600b6104 Merge branch 'feat/fields-rel-me-tag' into 'develop'
feat: build rel me tags with profile fields

See merge request pleroma/pleroma!3850
2023-03-16 07:53:27 +00:00
kPherox 83c7415803
fix: append field values to bio before parsing 2023-03-15 23:55:24 +09:00
tusooa 9145fd04f2 Merge branch 'remove-crypt' into 'develop'
Remove crypt(3) support

Closes #3030 and #3062

See merge request pleroma/pleroma!3847
2023-03-12 16:06:00 +00:00
tusooa d18441e9c4 Indicate in changelog that removal of crypt is breaking 2023-03-12 16:04:43 +00:00
Alexander Tumin 2c2ea16b50 Allow custom emoji reactions: Add pleroma_custom_emoji_reactions feature, review changes 2023-03-12 11:39:17 +03:00
Haelwenn (lanodan) Monnier ea07ec51ef Add support for Image objects 2023-03-09 14:21:12 +01:00
Haelwenn f5c6e44731 Merge branch 'tusooa/block-rel' into 'develop'
Allow with_relationships param for blocks

See merge request pleroma/pleroma!3843
2023-03-09 13:13:14 +00:00
Haelwenn 5cc23dc382 Merge branch 'fix/tag-feed-crashes' into 'develop'
fix: atom/rss feed issues

Closes #3045

See merge request pleroma/pleroma!3851
2023-03-06 22:55:24 +00:00
Haelwenn 0a042979b8 Merge branch 'fix/static-fe-feed-500' into 'develop'
fix: remove static_fe pipeline for /users/:nickname/feed

See merge request pleroma/pleroma!3852
2023-03-06 21:08:27 +00:00
faried nawaz 8241eff05b remove static_fe pipeline for /users/:nickname/feed 2023-03-06 23:34:00 +05:00
faried nawaz 7b42ec5633 oops, remove unused import 2023-03-06 02:44:36 +05:00
faried nawaz 141146d1f1 use scrub_html_and_truncate instead of scrub_html for feed item title
Sometimes this truncated properly encoded HTML entities in the
wrong place.  The new flow calls scrub_html, removes emojis,
decodes entities (a second time), truncates, and then re-encodes.

Fixes #3045.
2023-03-06 02:38:02 +05:00
faried nawaz 86ee4b72f3 modify Utils.scrub_html_and_truncate to take omission parameter 2023-03-06 02:30:52 +05:00
faried nawaz 117a53b88e format feed_view.ex 2023-03-06 01:16:24 +05:00
faried nawaz d3f22d24f6 feed eex templates: use published field from @data, not @activity.data 2023-03-06 00:23:31 +05:00
faried nawaz f33e89765a fix tag feeds: remote activities might not have a summary field 2023-03-06 00:20:57 +05:00
Haelwenn (lanodan) Monnier 8e072baed0 docs: Be more explicit about the level of compatibility of OTP releases 2023-03-05 08:55:18 +01:00
Haelwenn c00a19f371 Merge branch 'tusooa/oban-common-pipeline' into 'develop'
Stop oban from retrying if validating errors occur when processing incoming data

See merge request pleroma/pleroma!3844
2023-03-05 06:37:59 +00:00
Haelwenn (lanodan) Monnier 5716654d12 Remove crypt(3) support
This was used to support migration from GNU Social, which was used by at least
shitposter.club, should be entirely irrelevant now.

Closes: https://git.pleroma.social/pleroma/pleroma/-/issues/3030
Closes: https://git.pleroma.social/pleroma/pleroma/-/issues/3062
2023-03-05 01:37:57 +01:00
Alexander Tumin 8d3b29aaba Allow custom emoji reactions: add test for mixed emoji react, fix credo errors 2023-03-02 11:18:16 +03:00
Alexander Tumin 4b85d1c617 Allow custom emoji reactions: Fix tests, mixed custom and unicode reactions 2023-03-02 11:18:16 +03:00
floatingghost 787e30c5fd Allow reacting with remote emoji when they exist on the post (#200)
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/200
2023-03-02 11:18:16 +03:00
tusooa 714bf0cb23 Merge branch 'mergeback/2.5.1' into 'develop'
mergeback: 2.5.1

See merge request pleroma/pleroma!3846
2023-03-02 02:25:11 +00:00
tusooa a0ec66ce7e
Make clear the test names 2023-03-01 21:14:52 -05:00
tusooa bec4e5ac31
Fix FederatorTest 2023-03-01 21:04:19 -05:00
tusooa 1babd0798f
Stop oban from retrying if validating errors occur when processing incoming data 2023-03-01 21:03:30 -05:00
tusooa f33401f54b
Merge remote-tracking branch 'upstream/stable' into mergeback/2.5.1 2023-03-01 20:09:50 -05:00
tusooa fd46f83d2d Merge branch 'release/2.5.1' into 'stable'
release: 2.5.1

See merge request pleroma/pleroma!3841
2023-03-02 00:50:02 +00:00
tusooa 938e238ea1
Add the security fix to the changelog 2023-03-01 18:44:29 -05:00
tusooa e4925f813a
Sanitize filenames when uploading 2023-03-01 18:40:02 -05:00
tusooa d83f16fe44
Allow with_relationships param for blocks 2023-02-28 22:16:01 -05:00
silverpill 98b9c1bcb1 Merge branch 'develop' into accept-tags-2.5 2023-02-27 23:10:36 +00:00
silverpill 5cfb0578a6 TagValidator: Drop unrecognized tags 2023-02-27 23:09:46 +00:00
tusooa 5d34fe1868
Bundle frontend 2023-02-20 12:37:44 -05:00
tusooa 75b76a0666
Bump version in mix project to 2.5.1 2023-02-20 12:32:45 -05:00
tusooa db06e445f1
Compose changelog for 2.5.1 2023-02-20 12:32:18 -05:00
tusooa 410d50afe5
Ignores in exiftool read descriptions 2023-02-20 12:30:36 -05:00
Sean King c69ae5f7c7
Bump crypt to v1.0.1 2023-02-20 12:29:38 -05:00
lain bb9ed51da7
Update mix.exs 2023-02-20 12:28:52 -05:00
tusooa 002159fc1c
Bump linkify 2023-02-20 12:28:52 -05:00
tusooa f2ed05191c
Test double dot link 2023-02-20 12:28:42 -05:00
tusooa 0e89a9ad15
Test that zwnj is treated as word char in hashtags 2023-02-20 12:28:41 -05:00
Alexander Tumin c3a0703564
Require related object for notifications to filter on content 2023-02-20 12:27:50 -05:00
tusooa 8e8a0f005c
Fix inproper content being cached in report content 2023-02-20 12:26:16 -05:00
tusooa 772d99c582
Use versioned image from hexpm 2023-02-20 12:25:31 -05:00
tusooa 1c225bfd6e
Allow customizing instance languages 2023-02-20 12:25:00 -05:00
Mark Felder 1b82fd95d4
Remove unwanted code specific to MIX_ENV=test 2023-02-20 12:24:38 -05:00
Mark Felder 88ce0e8b24
Fix rel="me"
Cachex for this was not started
2023-02-20 12:24:32 -05:00
tusooa 3ab3404817
Fix block_from_stranger setting 2023-02-20 12:21:27 -05:00
Lain Soykaf d5125e6ce7
B StripLocation: Add test, work for all svgs. 2023-02-20 12:21:04 -05:00
Dmytro Poltavchenko e8fca8882a
Added SVG to formats not compatible with exiftool 2023-02-20 12:21:04 -05:00
tusooa 259905a893
Bump earmark to 1.4.22 2023-02-20 12:20:29 -05:00
tusooa 8a0162cd96 Merge branch 'weblate-extract' into 'develop'
Extract translatable strings

See merge request pleroma/pleroma!3839
2023-02-19 00:21:24 +00:00
kPherox d5d7648789
feat: build rel me tags with profile fields 2023-02-18 17:57:41 +09:00
weblate-extractor 274b3a0d26 Extract translatable strings 2023-02-18 06:06:52 +00:00
lain 19933a06bf Merge branch 'tusooa/exiftool' into 'develop'
Ignores in exiftool read descriptions

See merge request pleroma/pleroma!3840
2023-02-13 17:10:58 +00:00
lain a5509de389 Merge branch 'upgrade/crypt' into 'develop'
Bump crypt to v1.0.1

See merge request pleroma/pleroma!3838
2023-02-13 17:10:17 +00:00
tusooa 024bb27fc7
Ignores in exiftool read descriptions 2023-02-11 00:30:52 -05:00
Sean King bf346cf07c
Bump crypt to v1.0.1 2023-02-09 23:06:04 -07:00
lain d0b781ab69 Merge branch 'from/upstream-develop/tusooa/2974-zwnj' into 'develop'
Bump linkify - Fix zwnj in tags and double-dot links

Closes #2974 and #3022

See merge request pleroma/pleroma!3830
2023-02-09 21:25:15 +00:00
lain 7abb248ceb Merge branch 'notification-content-filtering-noobj' into 'develop'
Require related object for content-filtering on notification

See merge request pleroma/pleroma!3837
2023-02-09 19:54:59 +00:00
lain 00b39dea5d Merge branch 'tusooa/3059-report-fake-create-render' into 'develop'
Fix inproper content being cached in report content

Closes #3059

See merge request pleroma/pleroma!3836
2023-02-09 19:52:01 +00:00
lain 755279e253 Merge branch 'tusooa/api-spec-property-map' into 'develop'
OpenApiSpex: overhaul

See merge request pleroma/pleroma!3832
2023-02-09 19:50:59 +00:00
lain a7079057a9 Merge branch 'tusooa/docker-hexpm' into 'develop'
Use versioned image from hexpm for docker images

See merge request pleroma/pleroma!3834
2023-02-09 19:47:00 +00:00
lain 7138910f30 Update mix.exs 2023-02-09 14:37:34 -05:00
lain 724bf7c647 Merge branch 'tusooa/3055-instance-languages' into 'develop'
Allow customizing instance languages

Closes #3055

See merge request pleroma/pleroma!3835
2023-02-09 19:23:29 +00:00
lain 50abb54d15 Merge branch 'fix-relme' into 'develop'
Fix rel="me"

See merge request pleroma/pleroma!3824
2023-02-09 19:09:54 +00:00
lain 4d3c2fb21b Merge branch 'tusooa/notif-setting' into 'develop'
Fix block_from_stranger setting

See merge request pleroma/pleroma!3833
2023-02-09 19:09:23 +00:00
lain 16276c8f87 Merge branch 'test-warnings' into 'develop'
Fix warnings in tests, treat warnings as errors in CI.

See merge request pleroma/pleroma!3827
2023-02-09 19:05:50 +00:00
Lain Soykaf 8583b3721d B TestHelper, CI: Work with older elixir version. 2023-02-09 12:36:02 -05:00
Lain Soykaf e412363ff8 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into test-warnings 2023-02-09 12:28:02 -05:00
Alexander Tumin 55a8aa9787 Require related object for notifications to filter on content 2023-02-08 13:07:34 +03:00
tusooa 08132002d2
Fix inproper content being cached in report content 2023-02-03 16:00:39 -05:00
tusooa bc7ec43179
Allow customizing instance languages 2023-01-26 20:17:13 -05:00
Sam Therapy 879cc5200b
use my linkify instead
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-01-25 17:41:41 +01:00
Sam Therapy 9d2ef53895
Merge branch 'develop' of ssh://git.pleroma.social:2222/pleroma/pleroma into froth 2023-01-25 17:39:08 +01:00
tusooa 1cf20184ff
Use versioned image from hexpm 2023-01-18 19:01:10 -05:00
tusooa 7467b24730
Fix block_from_stranger setting 2023-01-18 18:36:52 -05:00
tusooa 97f947deaf
Fix tests 2023-01-15 21:39:05 -05:00
tusooa 5af9ce4a01
Fix type of admin_account.is_confirmed 2023-01-15 18:41:36 -05:00
tusooa 3b4b84b74c
Force spec for every operation to have a listed tag 2023-01-15 18:31:37 -05:00
tusooa bddcb3ed68
Add names to additionalProperties 2023-01-15 17:28:32 -05:00
tusooa a2766f310c
Bump linkify 2023-01-06 14:12:07 -05:00
tusooa 09ed8f4f8a
Test double dot link 2023-01-06 14:11:56 -05:00
tusooa 686fef59db
Test that zwnj is treated as word char in hashtags 2023-01-06 14:01:42 -05:00
lain 2a244b391d Merge branch '2768-strip-location' into 'develop'
Resolve "Exiftool may conflict with SVG files"

Closes #2768

See merge request pleroma/pleroma!3829
2023-01-05 16:50:02 +00:00
Lain Soykaf fe00fbfd54 B StripLocation: Add test, work for all svgs. 2023-01-05 11:29:06 -05:00
Dmytro Poltavchenko 5b4962165e Added SVG to formats not compatible with exiftool 2023-01-05 11:26:57 -05:00
lain 51b4513258 Merge branch 'tusooa/earmark' into 'develop'
Bump earmark to 1.4.~34~22

Closes #3033

See merge request pleroma/pleroma!3820
2023-01-03 22:10:28 +00:00
Lain Soykaf 2eec3f8207 B TestHelper: Remove warnings-as-errors
It's already set in mix.exs
2023-01-03 17:01:56 -05:00
Lain Soykaf b3a1cfaa7a Tests: Capture logs to clean up the test output. 2023-01-03 15:39:14 -05:00
Lain Soykaf 72b3ec35f8 Fix warnings in tests, treat warnings as errors in CI.
The warnings revealed two bad tests, the code still worked but the test
didn't actually test for it. Activating this for CI to prevent issues
like these in the future.
2023-01-03 14:59:14 -05:00
lain a0cdc4cf9e Merge branch 'revert-0fe3f749' into 'develop'
Revert "Merge branch 'copyright-bump' into 'develop'"

See merge request pleroma/pleroma!3826
2023-01-02 21:06:52 +00:00
lain e853cfe7c3 Revert "Merge branch 'copyright-bump' into 'develop'"
This reverts merge request !3825
2023-01-02 20:38:50 +00:00
Haelwenn 0fe3f749ea Merge branch 'copyright-bump' into 'develop'
Bump copyright year

See merge request pleroma/pleroma!3825
2023-01-02 16:38:34 +00:00
marcin mikołajczak 10886eeaa2 Bump copyright year
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-01-01 12:13:06 +01:00
silverpill 45646ff52c TagValidator: Add test for Link tag 2022-12-30 20:55:02 +00:00
Mark Felder 39e4b788ad Remove unwanted code specific to MIX_ENV=test 2022-12-30 15:36:21 -05:00
Mark Felder bea43aba33 Fix rel="me"
Cachex for this was not started
2022-12-29 19:42:14 +00:00
silverpill c7dc5ce85c TagValidator: Allow unrecognized Tag types 2022-12-29 14:21:20 +00:00
tusooa 4b66f2b7f1
Bump earmark to 1.4.22 2022-12-28 11:57:29 -05:00
Sam Therapy 68bebfba57
Merge branch 'develop'
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-12-27 15:33:59 +01:00
Sam Therapy af715bbf70
Revert Static FE 2022-12-27 15:22:45 +01:00
Haelwenn 2bc6911139 Merge branch 'weblate-extract' into 'develop'
Extract translatable strings

See merge request pleroma/pleroma!3818
2022-12-24 11:01:22 +00:00
weblate-extractor 64eef1eae4 Extract translatable strings 2022-12-24 06:06:39 +00:00
Haelwenn b367f22256 Merge branch 'mergeback/2.5.0' into 'develop'
Mergeback: 2.5.0

See merge request pleroma/pleroma!3817
2022-12-23 18:15:52 +00:00
Haelwenn (lanodan) Monnier 6126f203d3 mix: version 2.5.50 2022-12-23 18:46:14 +01:00
Haelwenn f76c1d4f70 Merge branch 'release/2.5.0' into 'stable'
Release 2.5.0

See merge request pleroma/pleroma!3816
2022-12-23 17:43:21 +00:00
Haelwenn (lanodan) Monnier 91c22637de mix: Release 2.5.0 2022-12-23 17:10:02 +01:00
Haelwenn (lanodan) Monnier ee7694fa91 CHANGELOG: Set 2.5.0 2022-12-23 17:09:57 +01:00
Haelwenn (lanodan) Monnier 5ce7db455c Git merge is not my favorite tool 2022-12-23 17:07:26 +01:00
Haelwenn (lanodan) Monnier 3fbd42061c Revert "Delete report notifs when demoting from superuser"
This reverts commit 4504c81080.
2022-12-23 17:06:09 +01:00
Haelwenn (lanodan) Monnier 7d68d64d63 Merge back 2.4.5 2022-12-23 17:05:05 +01:00
Haelwenn 6bce88b9e7 Merge branch 'pleromafe-2.5.0' into 'develop'
Update PleromaFE bundle to 2.5.0

See merge request pleroma/pleroma!3815
2022-12-23 14:32:10 +00:00
Haelwenn (lanodan) Monnier 2c5bc9cffd Update PleromaFE bundle to 2.5.0 2022-12-23 15:01:49 +01:00
Haelwenn 99ff91584d Merge branch 'adminfe-2.5.0' into 'develop'
Update AdminFE bundle to version 2.5.0

See merge request pleroma/pleroma!3814
2022-12-23 13:48:35 +00:00
Haelwenn 718ff64c3b Merge branch 'fine_grained_moderation_privileges' into 'develop'
fine grained moderation privileges (continued)

See merge request pleroma/pleroma!3812
2022-12-23 13:48:07 +00:00
Sean King 90681c720d
Make lint happy 2022-12-21 23:40:39 -07:00
Sean King 351b5a9df4
Use crazy hack to finally get pleroma:report notifications not visible after revoking privileges 2022-12-21 23:35:39 -07:00
Sean King 3bb78ac152 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into fine_grained_moderation_privileges 2022-12-21 22:36:54 -07:00
Haelwenn (lanodan) Monnier cf1d91c718 Update AdminFE bundle to version 2.5.0 2022-12-21 13:03:32 +01:00
lain 5910d58cf7 Merge branch 'weblate-extract' into 'develop'
Extract translatable strings

See merge request pleroma/pleroma!3813
2022-12-20 15:05:21 +00:00
weblate-extractor b3d250a70a Extract translatable strings 2022-12-20 06:11:50 +00:00
Sean King e07fb6e7dc Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into fine_grained_moderation_privileges 2022-12-19 22:02:44 -07:00
lain 0840ce5671 Merge branch 'deletion-resilience' into 'develop'
Deletion resilience

See merge request pleroma/pleroma!3237
2022-12-20 03:07:59 +00:00
Sean King d5d4c7c11d Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into fine_grained_moderation_privileges 2022-12-19 18:48:26 -07:00
lain 7aa17cd651 Merge branch 'doc_readme_nixos' into 'develop'
add nixos to supported distros

See merge request pleroma/pleroma!3600
2022-12-20 01:13:03 +00:00
lain c6dff687c0 Merge branch 'from/upstream/develop/tusooa/mrf-updates' into 'develop'
MRFs with Updates

See merge request pleroma/pleroma!3808
2022-12-20 00:51:41 +00:00
Sean King 1d95012758 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into fine_grained_moderation_privileges 2022-12-19 17:48:11 -07:00
lain 3311e0efed Merge branch 'fix/2980-rss-feed-generation' into 'develop'
fix atom and rss feeds for users and tags

See merge request pleroma/pleroma!3783
2022-12-20 00:19:27 +00:00
lain 3dfa009ec3 Merge branch 'develop' into 'fix/2980-rss-feed-generation'
# Conflicts:
#   CHANGELOG.md
2022-12-19 23:43:23 +00:00
feld 1946b49ebe Merge branch 'fix-twittercard-tags' into 'develop'
Fix TwitterCard meta tags

See merge request pleroma/pleroma!3811
2022-12-19 23:13:53 +00:00
Mark Felder 72d4d1b392 Fix TwitterCard meta tags
TwitterCard meta tags are supposed to use the attributes "name" and "content".
OpenGraph tags use the attributes "property" and "content".

Twitter itself is smart enough to detect broken meta tags and discover the TwitterCard
using "property" and "content", but other platforms that only implement parsing of TwitterCards
and not OpenGraph may fail to correctly detect the tags as they're under the wrong attributes.

> "Open Graph protocol also specifies the use of property and content attributes for markup while
> Twitter cards use name and content. Twitter’s parser will fall back to using property and content,
> so there is no need to modify existing Open Graph protocol markup if it already exists." [0]

[0] https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started
2022-12-19 17:23:12 -05:00
Sean King c58eb873dd
Fix CommonAPI delete function to use User.privileged? instead of User.superuser? 2022-12-18 22:05:07 -07:00
Sean King 60df2d8a97
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into fine_grained_moderation_privileges 2022-12-18 22:03:48 -07:00
faried nawaz fce2998481
use to_rfc2822 instead of pub_date in tests, too 2022-12-19 01:44:47 +05:00
faried nawaz 96cfc9575c
document rss/atom fix in changelog 2022-12-19 01:44:47 +05:00
faried nawaz c49316faee
modify user feed controller test to expect summary for title 2022-12-19 01:44:47 +05:00
faried nawaz 0f67eab384
remove pub_date() -- use to_rfc2822 instead
_tag_activity.xml.eex used activity_content() instead
of activity_description(), and did not escape html properly.
2022-12-19 01:44:46 +05:00
faried nawaz f597b1b3e6
remove ap_id test -- the element makes the feed break 2022-12-19 01:44:46 +05:00
faried nawaz 3f63caee2a
fix: add xmlns:thr for in-reply-to refs 2022-12-19 01:44:46 +05:00
faried nawaz 8d500977a6
fix: feed item title was escaped twice 2022-12-19 01:44:46 +05:00
Mark Felder f3253c0c6a
Implement RFC2822 timestamp formatting 2022-12-19 01:44:46 +05:00
faried nawaz 3f0783c0a5
fix atom and rss feeds for users and tags
Changes:
  - make the XML closer to spec (RSS does not pass w3c's validator, but works)
  - fix dates (RFC3339 for Atom, doc says RFC822 for RSS but RFC1123 is closer)
  - fix attachment/enclosure links (but see below)
  - set feed item title to post's "summary" if present
  - pruned several elements that validators did not like
    - examples: ap_enabled, user banner urls.

Specs:
  - https://www.rssboard.org/rss-specification
  - https://validator.w3.org/feed/docs/atom.html
  - https://www.intertwingly.net/wiki/pie/Rss20AndAtom10Compared

Validators:
  - https://validator.w3.org/feed/
  - https://rssatom.com/feedvalidator.php

Attachment/enclosure links should have a "length" field (mandatory
according to the spec).  This is not present in the object's data
map.
2022-12-19 01:44:41 +05:00
Sam Therapy b8a7e65ba1
Merge branch 'develop' of ssh://git.pleroma.social:2222/pleroma/pleroma into froth 2022-12-18 13:39:06 +01:00
lain 8db82932a7 Merge branch 'fix-amd64-musl' into 'develop'
CI: Fix image for amd64-musl

See merge request pleroma/pleroma!3810
2022-12-16 20:29:48 +00:00
Lain Soykaf 8e6f2624a8 CI: Fix image for amd64-musl 2022-12-16 14:32:30 -05:00
tusooa 59eaab3e7d Merge branch 'weblate-extract' into 'develop'
Extract translatable strings

See merge request pleroma/pleroma!3764
2022-12-16 17:20:16 +00:00
weblate-extractor cfca9544e8 Extract translatable strings 2022-12-16 16:59:26 +00:00
tusooa a3985aac91 Merge branch 'fix-2856' into 'develop'
Uploading an avatar media exceeding max size returns a 413

Closes #2856

See merge request pleroma/pleroma!3804
2022-12-16 16:15:36 +00:00
lain 301eb86b35 Merge branch 'update-deps' into 'develop'
Update to Phoenix 1.6, Elixir 1.11, and chase dependencies

See merge request pleroma/pleroma!3766
2022-12-16 00:36:59 +00:00
lain c0cfc454ba Merge branch 'from/upstream-develop/tusooa/register-approval' into 'develop'
Fix failure when registering a user with no email when approval required

Closes #3021

See merge request pleroma/pleroma!3807
2022-12-15 23:07:49 +00:00
Lain Soykaf bb27e4134b AudioVideoValidator: Fix embedded attachment requirements 2022-12-15 18:06:28 -05:00
Lain Soykaf 4a32b584e1 StatusView: Fix warning 2022-12-15 18:02:33 -05:00
Lain Soykaf 9838790a7d AttachmentValidator: Actually require url 2022-12-15 17:46:20 -05:00
Lain Soykaf 63d00f8123 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into update-deps 2022-12-15 17:19:36 -05:00
tusooa 2554028097
Make SimplePolicy Update-aware
This is inspired by d5828f1c5e
2022-12-15 11:57:45 -05:00
tusooa dc7efcd08b
Make TagPolicy Update-aware
This is inspired by d5828f1c5e
2022-12-15 11:08:24 -05:00
tusooa 62c27e0164
Fix failure when registering a user with no email when approval required 2022-12-14 01:04:42 -05:00
duponin 9876742358 Return 413 when an actor's banner or background exceeds the size limit 2022-12-11 23:15:08 +01:00
duponin 452595baed Uploading an avatar media exceeding max size returns a 413
Until now it was returning a 500 because the upload plug were going
through the changeset and ending in the JSON encoder, which raised
because struct has to @derive the encoder.
2022-12-11 22:54:47 +01:00
Haelwenn 204fd6faae Merge branch 'from/upstream-develop/tusooa/report-fake' into 'develop'
Report an Object, not a Create Activity

Closes #2986

See merge request pleroma/pleroma!3788
2022-12-09 14:25:24 +00:00
tusooa da0c684344
Add tests for flagging non-Create activities 2022-12-08 20:51:08 -05:00
tusooa 1036acb6ae Merge branch 'release-template' into 'develop'
Add Gitlab Release™ into Release MR template

See merge request pleroma/pleroma!3797
2022-12-06 20:41:22 +00:00
lain 633a76b5b3 Merge branch 'jrabbit-develop-patch-67125' into 'develop'
Upgrade docs improvement: reccomend tagged releases over pulling stable branch

See merge request pleroma/pleroma!3800
2022-12-06 20:13:55 +00:00
jrabbit 8afad1e46e reccomend tagged releases over pulling stable 2022-12-06 17:24:04 +00:00
Haelwenn f60cb0f771 Merge branch 'ci/amd64-build-tags' into 'develop'
CI: Tag amd64 releases for amd64 runners

See merge request pleroma/pleroma!3799
2022-12-05 23:33:46 +00:00
Haelwenn eb7f4bc51b Merge branch 'weblate' into 'develop'
Translations update from Pleroma Weblate

See merge request pleroma/pleroma!3798
2022-12-05 23:15:44 +00:00
Haelwenn (lanodan) Monnier b6e96f63b4 CI: Tag amd64 releases for amd64 runners 2022-12-06 00:08:55 +01:00
Xnuk Shuman 3e8f49be67 Added translation using Weblate (Korean) 2022-12-01 17:17:03 +00:00
Haelwenn (lanodan) Monnier 1eb3ce956b Add Gitlab Release™ into Release MR template 2022-11-28 22:08:47 +01:00
Sam Therapy e67e72de1b
Merge develop again, again :) 2022-11-28 18:39:15 +01:00
Haelwenn d8e326467c Merge branch 'fix/2.4.5-release-date' into 'stable'
Fix changelog date

See merge request pleroma/pleroma!3796
2022-11-28 04:35:51 +00:00
Sean King 75c9f7770f
Fix changelog date 2022-11-27 20:17:48 -07:00
Haelwenn 20790c1dd3 Merge branch 'mergeback/2.4.5' into 'develop'
CHANGELOG.md: Fix date for 2.4.5

See merge request pleroma/pleroma!3795
2022-11-28 02:31:18 +00:00
Haelwenn 3394394e0f Merge branch 'develop' into 'develop'
Change follow_operation schema to use type BooleanLike

Closes #2999

See merge request pleroma/pleroma!3787
2022-11-28 00:13:35 +00:00
ave 0f88c2bca4 Change follow_operation schema to use type BooleanLike 2022-11-28 00:13:34 +00:00
Haelwenn (lanodan) Monnier d6cd447cfa CHANGELOG.md: Fix date for 2.4.5 2022-11-27 22:28:48 +01:00
Haelwenn 36789986c0 Merge branch 'mergeback/2.4.5' into 'develop'
Mergeback: 2.4.5

See merge request pleroma/pleroma!3794
2022-11-27 21:24:44 +00:00
Haelwenn 76bdb01c18 Merge branch 'release/2.4.5' into 'stable'
Release 2.4.5

See merge request pleroma/pleroma!3793
2022-11-27 21:24:19 +00:00
Haelwenn (lanodan) Monnier f6d55e1e77 Mergeback of release 2.4.5 2022-11-27 13:20:42 +01:00
Haelwenn (lanodan) Monnier 2614f431b9 Release 2.4.5 2022-11-27 13:17:21 +01:00
Hélène 542bb17258 ArticleNotePageValidator: fix replies fixing
Some software, like GoToSocial, expose replies as ActivityPub
Collections, but do not expose any item array directly in the object,
causing validation to fail via the ObjectID validator. Now, Pleroma will
drop that field in this situation too.
2022-11-27 04:54:19 +01:00
FloatingGhost 747311f623 fix resolution of GTS user keys 2022-11-27 04:54:18 +01:00
Tusooa Zhu 11d5ad24c5 Make local-only posts stream in local timeline 2022-11-27 04:39:32 +01:00
Tusooa Zhu e46c3a0595 Do not stream out Create of ChatMessage 2022-11-27 04:39:32 +01:00
Sean King 9b68778887 Fix fedi-fe build URL 2022-11-27 04:34:33 +01:00
Haelwenn (lanodan) Monnier f2221d539c script_test: Fix %ErlangError for Elixir 1.14 2022-11-27 04:25:48 +01:00
Haelwenn (lanodan) Monnier 915c7319c6 mix: Switch prometheus_ex to fix/elixir-1.14 branch 2022-11-27 04:25:48 +01:00
Haelwenn (lanodan) Monnier f12ddcd697 timeline_controller_test: Fix test name for elixir 1.14 2022-11-27 04:25:48 +01:00
Tusooa Zhu 09ab51eebb Make mutes and blocks behave the same as other lists 2022-11-27 04:21:58 +01:00
Haelwenn (lanodan) Monnier 7ec3469bea Transmogrifier: Use validating regex for "mediaType" 2022-11-27 04:21:31 +01:00
Haelwenn (lanodan) Monnier 8640d217b1 AttachmentValidator: Use custom ecto type and regex for "mediaType" 2022-11-27 04:21:31 +01:00
Haelwenn (lanodan) Monnier da71092003 EctoType: Add MIME validator 2022-11-27 04:21:31 +01:00
Ilja 4504c81080 Delete report notifs when demoting from superuser
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-11-27 04:20:11 +01:00
Haelwenn 3b289a1643 Merge branch 'skip-kanji-mac' into 'develop'
Skip two unicode/kanji tests that can't pass on Mac.

See merge request pleroma/pleroma!3791
2022-11-27 03:12:34 +00:00
Jeremy Huffman f531099d2d Skip two unicode/kanji tests that can't pass on Mac. 2022-11-27 03:12:34 +00:00
Haelwenn (lanodan) Monnier 508b438b53 scrubbers: Scrub img class attribute
Closes: https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3790
2022-11-27 04:04:17 +01:00
Haelwenn (lanodan) Monnier 8f3e750530 scrubbers: Scrub img class attribute
Closes: https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3790
2022-11-27 03:40:21 +01:00
Sam Therapy 1f1b72a11f
fix some XSS maybe
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-11-26 18:35:27 +01:00
Sam Therapy 7ad1637a7a
Update Admin-FE 2022-11-22 23:53:01 +01:00
Sam Therapy 927ecd3e66
I HATE MERGE COMMITS I HATE MERGE COMMITS 2022-11-22 23:09:24 +01:00
Haelwenn 7f0b3161ea Merge branch 'akoma/deactivated-users' into 'develop'
Timeline query performance improvements

See merge request pleroma/pleroma!3779
2022-11-20 23:40:58 +00:00
tusooa afe4bb2307
Fix UtilsTest 2022-11-20 01:06:21 -05:00
tusooa 9d99e76a3a
Fix unit tests 2022-11-20 00:57:04 -05:00
tusooa 0e0c316c76
Fix report api 2022-11-20 00:35:52 -05:00
tusooa a69e9ae2ef
Flag an Object, not an Activity 2022-11-19 23:51:43 -05:00
Sol Fisher Romanoff 064be8fe71
Fix css for mobile devices 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff 9e010a2bc2
Organize CSS and add light theme 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff f5f44bdab9
Add support for internationalization 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff b6ede6ced1
Fix error pages 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff 4e463b0a8a
Add followers/following tabs 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff efcab4f6d4
Add favicon 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff 80fb9efc5a
Add with_replies and media tabs 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff 0faf544ebb
Add reply to and edited at headers 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff 037baa6e58
Add nsfw banner to attachments 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff 3289b410b3
tabs => spaces 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff 35613d9c86
Add fontawesome icons 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff aabe72f41e
Make attachments fit into statuses 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff dc634b5201
Overhaul conversation and status 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff 0ee31347e4
Add newer and older posts buttons 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff 44b61eb776
Make navbar and background scroll-friendly 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff 6a99c55435
Add admin/mod/bot indicators 2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff 16ddd5a9c9
Overhaul profile page
todo: posts/with replies/attachments switch
2022-11-18 22:55:35 +01:00
Sol Fisher Romanoff 581a54e67f
Add navbar, sidebar and background to static-fe 2022-11-18 22:55:35 +01:00
feld f40ccce7e9 Merge branch 'quack-docs' into 'develop'
Remove Quack from docs and cheatsheet

See merge request pleroma/pleroma!3786
2022-11-18 16:38:08 +00:00
Mark Felder c7a0df8006 Remove Quack from docs and cheatsheet 2022-11-18 10:09:52 -05:00
feld bb63f72c11 Merge branch 'flash-support-csp' into 'develop'
Reduce CSP policy to make Ruffle work on chrome

See merge request pleroma/pleroma!3389
2022-11-17 17:29:36 +00:00
Mark Felder cddcafee7f Document inclusion of wasm-unsafe-eval 2022-11-17 12:03:29 -05:00
HJ a31d3589ed Update http_security_plug.ex 2022-11-17 12:03:01 -05:00
HJ 79bd363a68 Update lib/pleroma/web/plugs/http_security_plug.ex 2022-11-17 12:03:01 -05:00
Henry Jameson db76ea578a try to fix ruffle on chrome 2022-11-17 12:03:01 -05:00
Sam Therapy cecdecf083
Merge branch 'develop' of upstream into froth 2022-11-15 15:59:29 +01:00
feld a9d991d31e Merge branch 'develop' into 'akoma/deactivated-users'
# Conflicts:
#   CHANGELOG.md
2022-11-14 14:03:11 +00:00
lain 0e1356ef9c Merge branch 'akkoma/delete-improvements' into 'develop'
Alter priority of Delete activities to be lowest

See merge request pleroma/pleroma!3782
2022-11-14 07:24:46 +00:00
lain 76ed0da09f Merge branch 'bugfix/reset-unreachable-on-fetch' into 'develop'
Object.Fetcher: Set reachable on successful fetch

See merge request pleroma/pleroma!3780
2022-11-14 07:22:33 +00:00
Mark Felder 2186e9b62b Tell newer Credo it's OK to exit 0 on single with clauses and piping into anonymous functions for now 2022-11-13 18:46:02 -05:00
Mark Felder e9c3be262c Bump credo
Old credo is throwing errors on my Elixir 1.13 / OTP 25
2022-11-13 14:17:41 -05:00
Mark Felder 2e0089dd5c Alter priority of Delete activities to be lowest
This will prevent a user with a large number of posts from negatively affecting performance of the outgoing federation queue if they delete their account.
2022-11-13 14:11:48 -05:00
Haelwenn a2db64b12b Merge branch 'fix-typo-in-csp-report-to-header-name' into 'develop'
Fix typo in CSP Report-To header name

See merge request pleroma/pleroma!3768
2022-11-13 18:53:59 +00:00
Haelwenn e86ca8a436 Merge branch 'weblate' into 'develop'
Translations update from Pleroma Weblate

See merge request pleroma/pleroma!3772
2022-11-13 18:53:12 +00:00
Mark Felder 47b9847edd Deletes do not generate notifications of any kind, so skip trying 2022-11-13 12:25:52 -05:00
Haelwenn (lanodan) Monnier b2713357b9 Object.Fetcher: Set reachable on successful fetch 2022-11-13 16:51:12 +01:00
Mark Felder 39b24cdce6 Document query performance improvement 2022-11-12 18:32:49 -05:00
Mark Felder edaf0a05f8 Add same optimized join for excluding invisible users 2022-11-12 18:06:28 -05:00
Mark Felder 749445dd50 Fix reports which do not have a user
The check for deactivated users was being applied to report activities.
2022-11-12 17:54:11 -05:00
FloatingGhost 4d321be05c Extract deactivated users query to a join 2022-11-12 17:52:28 -05:00
Dmytro Poltavchenko 451c415fca Translated using Weblate (Ukrainian)
Currently translated at 100.0% (95 of 95 strings)

Translation: Pleroma/Pleroma Backend (domain errors)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-errors/uk/
2022-11-12 22:13:38 +00:00
Dmytro Poltavchenko 1c97a86b8d Added translation using Weblate (Ukrainian) 2022-11-12 22:13:38 +00:00
Dmytro Poltavchenko 3979eaf14a Added translation using Weblate (Ukrainian) 2022-11-12 22:13:38 +00:00
feld 3d1828f43b Merge branch 'oban-timeouts' into 'develop'
Define sane Oban Worker timeouts

See merge request pleroma/pleroma!3777
2022-11-12 22:13:28 +00:00
tusooa f38cb4ccac Merge branch 'from/upstream-develop/tusooa/no-strip-report' into 'develop'
Lint

See merge request pleroma/pleroma!3778
2022-11-12 19:48:26 +00:00
tusooa 14871fecd4
Lint 2022-11-12 14:16:52 -05:00
tusooa 1b0e47b79b Merge branch 'from/upstream-develop/tusooa/no-strip-report' into 'develop'
Give admin the choice to not strip reported statuses

Closes #2887

See merge request pleroma/pleroma!3773
2022-11-12 17:55:50 +00:00
tusooa e3e68b9377
Update config cheatsheet 2022-11-12 12:55:02 -05:00
Haelwenn c2cfe0c690 Clarify config description 2022-11-12 17:44:31 +00:00
Mark Felder a977e1ef96 Document Oban workers getting timeouts defined 2022-11-12 11:12:00 -05:00
Haelwenn 7c8618dc9a Merge branch 'no-ducks' into 'develop'
Remove Quack logging backend

See merge request pleroma/pleroma!3776
2022-11-12 05:40:07 +00:00
tusooa 7991364380
Lint 2022-11-11 18:32:08 -05:00
Mark Felder 8be7f87e1f Define sane Oban Worker timeouts 2022-11-11 13:46:27 -05:00
Mark Felder 572751bec7 Clean up stale entries in mix.lock
mix deps.clean --unlock --unused
2022-11-11 12:48:13 -05:00
feld ceb07772d0 Merge branch 'custom-db-port' into 'develop'
allow custom db port

Closes #2981

See merge request pleroma/pleroma!3775
2022-11-11 17:38:51 +00:00
Mark Felder 7d0175dc3a Document removal of Quack 2022-11-11 12:36:38 -05:00
Mark Felder 8a3b450397 Add migration to remove Quack from ConfigDB 2022-11-11 12:36:34 -05:00
Mark Felder 6b87b3f2ea Remove Quack logging backend 2022-11-11 12:36:29 -05:00
lain e7c40c2509 fix envvar 2022-11-11 15:40:32 +00:00
Iván Raskovsky 36519bdbee allow custom db port 2022-11-11 12:22:21 -03:00
lain 39a96876ef Merge branch 'soapbox-ref' into 'develop'
Update links to Soapbox

See merge request pleroma/pleroma!3774
2022-11-11 12:04:47 +00:00
marcin mikołajczak eb70676931 Update links to Soapbox
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-11-11 12:13:30 +01:00
tusooa 717c5901f8
Render a generated reported activity properly 2022-11-09 23:02:27 -05:00
tusooa 6f047cc308
Do not strip reported statuses when configured not to 2022-11-09 22:36:57 -05:00
tusooa 481f50bcfd Merge branch 'docs/object_age-strip_followers' into 'develop'
ObjectAgePolicy: Make strip_followers behavior for followers-only explicit

See merge request pleroma/pleroma!3770
2022-11-07 14:07:30 +00:00
Haelwenn (lanodan) Monnier 648e012022 ObjectAgePolicy: Make strip_followers behavior for followers-only explicit 2022-11-07 14:58:47 +01:00
tusooa 8d704d384d Merge branch 'ci-coverage' into 'develop'
Test coverage: Switch to covertool to get cobertura output

See merge request pleroma/pleroma!3745
2022-11-06 02:19:27 +00:00
Thomas Citharel bdedc41cbc
Fix typo in CSP Report-To header name
The header name was Report-To, not Reply-To.

In any case, that's now being changed to the Reporting-Endpoints HTTP
Response Header.
https://w3c.github.io/reporting/#header
https://github.com/w3c/reporting/issues/177

CanIUse says the Report-To header is still supported by current Chrome
and friends.
https://caniuse.com/mdn-http_headers_report-to

It doesn't have any data for the Reporting-Endpoints HTTP header, but
this article says Chrome 96 supports it.
https://web.dev/reporting-api/

(Even though that's come out one year ago, that's not compatible with
Network Error Logging which's still using the Report-To version of the
API)

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-11-04 09:43:13 +01:00
feld 9f708037d7 Merge branch 'tusooa/caveats-webfinger' into 'develop'
Document some caveats of webfinger domain setting

See merge request pleroma/pleroma!3767
2022-11-03 22:24:38 +00:00
tusooa f2e4b425e1 Document some caveats of webfinger domain setting 2022-11-03 21:13:00 +00:00
Mark Felder 7c64f705f6 Update to Phoenix 1.6 and chase dependencies
Also bump minimum Elixir to 1.11
2022-11-03 16:13:07 +00:00
Haelwenn 127e7b8ff9 Merge branch 'feature/1469-webfinger-expanding' into 'develop'
Feature/1469 webfinger expanding

Closes #1469 and #2517

See merge request pleroma/pleroma!3361
2022-11-03 15:03:50 +00:00
Alexander Strizhakov 8407e26b0c rebase fix 2022-11-03 10:06:36 -04:00
Alexander Strizhakov a57c025594 docs update 2022-11-03 09:48:59 -04:00
Alexander Strizhakov 5a9ea98baf XML WebFinger user representation correct domain 2022-11-03 09:48:59 -04:00
Alexander Strizhakov 30ded8876a docs & changelog 2022-11-03 09:48:57 -04:00
Alexander Strizhakov 4121bca895 expanding WebFinger 2022-11-03 09:48:24 -04:00
Sam Therapy febfc7e62b
Merge branch 'develop' of ssh://git.pleroma.social:2222/pleroma/pleroma into froth 2022-11-01 19:46:54 +01:00
Haelwenn da0ef154a6 Merge branch 'from/upstream-develop/tusooa/2930-get-or-fetch' into 'develop'
Fix User.get_or_fetch/1 with usernames starting with http

Closes #2930

See merge request pleroma/pleroma!3751
2022-10-30 00:38:21 +00:00
Sam Therapy a88c2ff6a6
Merge branch 'develop' of ssh://git.pleroma.social:2222/pleroma/pleroma into froth 2022-10-28 20:16:15 +02:00
tusooa 9fbf01f7a9 Merge branch 'push-updates' into 'develop'
Push.Impl: support edits

See merge request pleroma/pleroma!3760
2022-10-27 12:51:29 +00:00
feld 7a519b6a66 Merge branch 'fix-deprecation-text' into 'develop'
Fix deprecation warning for Gun timeout

See merge request pleroma/pleroma!3759
2022-10-24 14:22:49 +00:00
Sam Therapy ac00e53c78
Merge branch 'develop' of ssh://git.pleroma.social:2222/pleroma/pleroma into froth 2022-10-23 21:18:22 +02:00
Haelwenn 705ba6d615 Merge branch 'security/PleromaAPI-delete' into 'develop'
CommonAPI: generate ModerationLog for all admin/moderator deletes

See merge request pleroma/pleroma!3765
2022-10-15 12:54:20 +00:00
Haelwenn (lanodan) Monnier 16b06160ac CommonAPI: generate ModerationLog for all admin/moderator deletes
As a side-effect it also changes the ChatMessage delete ID to an
Activity.id rather than MessageReference.id

Closes: https://git.pleroma.social/pleroma/pleroma/-/issues/2958
2022-10-14 18:51:08 +02:00
tusooa c830282628 Merge branch 'weblate-extract' into 'develop'
Extract translatable strings

See merge request pleroma/pleroma!3752
2022-10-11 21:21:36 +00:00
weblate-extractor 1ac9bd0b4c Extract translatable strings 2022-10-11 06:13:00 +00:00
tusooa 8042e0ebe1 Merge branch 'mergeback/2.4.4' into 'develop'
mergeback: 2.4.4

See merge request pleroma/pleroma!3762
2022-10-09 04:29:09 +00:00
Tusooa Zhu dd82fd234f
Merge branch 'release/2.4.4' into mergeback/2.4.4 2022-10-08 22:15:09 -04:00
tusooa 59b8c920f6 Merge branch 'release/2.4.4' into 'stable'
Release/2.4.4

See merge request pleroma/pleroma!3761
2022-10-09 02:05:27 +00:00
marcin mikołajczak 1b238a4fad Push.Impl: support edits
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-10-01 23:28:02 +02:00
Mark Felder 1958f23fe7 Fix deprecation warning for Gun timeout 2022-09-30 12:22:06 -04:00
Sam Therapy 98aeb74022
Merge remote-tracking branch 'upstream/develop' into froth 2022-09-30 17:41:30 +02:00
Haelwenn 3f1c31b7cd Merge branch 'fix/exclude-deactivated-in-search' into 'develop'
User: search: exclude inactive users from user search

See merge request pleroma/pleroma!3755
2022-09-27 23:58:45 +00:00
Haelwenn d43d02bf41 Merge branch 'from/upstream-develop/tusooa/fix-static-tests' into 'develop'
Make instance document controller test sync

Closes #2940

See merge request pleroma/pleroma!3757
2022-09-27 21:50:43 +00:00
Haelwenn 757a21554f Merge branch 'from/upstream-develop/tusooa/2169-queue-limit' into 'develop'
Reduce incoming and outgoing federation queue sizes to 5

Closes #2169

See merge request pleroma/pleroma!3756
2022-09-27 21:50:06 +00:00
Haelwenn 5d7d623390 Merge branch 'bugfix/elixir-1.14' into 'develop'
Bugfix: Elixir 1.14

See merge request pleroma/pleroma!3740
2022-09-27 21:46:03 +00:00
Ilja 2d7ea263a1 Add extra routes to :users_manage_credentials privilege 2022-09-24 13:52:28 +02:00
Tusooa Zhu e66c02b775
Make instance document controller test sync 2022-09-20 12:34:10 -04:00
tusooa ac95b8b4f3 Merge branch 'websocketex' into 'develop'
Use Websockex to replace websocket_client

See merge request pleroma/pleroma!3743
2022-09-18 17:09:12 +00:00
Tusooa Zhu 467b6cad6f
Reduce incoming and outgoing federation queue sizes to 5 2022-09-17 16:34:33 -04:00
tusooa 1a7107f4a5 Merge branch 'remove_from_followers' into 'develop'
MastoAPI: POST /api/v1/accounts/:id/remove_from_followers

See merge request pleroma/pleroma!3647
2022-09-16 23:24:13 +00:00
a1batross 7f63b4c315 User: search: exclude deactivated users from user search
This way we don't pollute search results with deactivated and deleted users
2022-09-16 00:49:16 +03:00
Tusooa Zhu ea60c4e709
Fix wrong relationship direction 2022-09-14 20:24:04 -04:00
tusooa 90d4b7d604 Merge branch 'fix/user-factory-speed' into 'develop'
tests/Factory: improve user generation performance

See merge request pleroma/pleroma!3754
2022-09-12 00:53:14 +00:00
FloatingGhost 6bdf451ce8
Use set of pregenerated RSA keys
Randomness is a huge resource sink, so let's just use
a some that we made earlier
2022-09-11 21:33:20 +02:00
tusooa ac427de851 Merge branch 'fix/undo-boosts' into 'develop'
ObjectView: do not fetch an object for its ID

See merge request pleroma/pleroma!3753
2022-09-11 17:10:26 +00:00
Hélène 0b19625bfb
ObjectView: do not fetch an object for its ID
Non-Create/Listen activities had their associated object field
normalized and fetched, but only to use their `id` field, which is both
slow and redundant. This also failed on Undo activities, which delete
the associated object/activity in database.

Undo activities will now render properly and database loads should
improve ever so slightly.
2022-09-11 04:54:04 +02:00
Tusooa Zhu 50923f5438
Fix User.get_or_fetch/1 with usernames starting with http 2022-09-08 11:58:17 -04:00
Haelwenn 453a66f8c2 Merge branch 'weblate-extract' into 'develop'
Extract translatable strings

See merge request pleroma/pleroma!3748
2022-09-06 17:17:40 +00:00
weblate-extractor 3d32c92b37 Extract translatable strings 2022-09-06 16:45:08 +00:00
tusooa c0b265b404 Merge branch 'birthday-config-description' into 'develop'
Clarify `birthday_min_age` config description

See merge request pleroma/pleroma!3747
2022-09-06 12:40:02 +00:00
marcin mikołajczak c6bc523914 Clarify `birthday_min_age` config description
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-09-05 20:25:01 +02:00
Haelwenn b8d6cb5845 Merge branch 'from/upstream-develop/tusooa/2892-backup-scope' into 'develop'
Make backups require its own scope

Closes #2892

See merge request pleroma/pleroma!3721
2022-09-05 15:42:02 +00:00
Haelwenn 346c130ddc Merge branch 'fix/user-private-key-generation' into 'develop'
User: generate private keys on user creation

See merge request pleroma/pleroma!3737
2022-09-05 15:38:15 +00:00
tusooa f7c2073103 Merge branch 'bump/min-elixir-1.10' into 'develop'
Bump minimum Elixir version to 1.10

See merge request pleroma/pleroma!3741
2022-09-05 15:19:34 +00:00
tusooa 9874b4c985 Merge branch 'develop' into 'from/upstream-develop/tusooa/2892-backup-scope'
# Conflicts:
#   CHANGELOG.md
2022-09-05 15:00:19 +00:00
Hélène cfb1bc967f
Migrations: generate unset user keys
User keys are now generated on user creation instead of "when needed",
to prevent race conditions in federation and a few other issues. This
migration will generate keys missing for local users.
2022-09-05 03:51:35 +02:00
Hélène cd237d22f1
User: generate private keys on user creation
This fixes a race condition bug where keys could be regenerated
post-federation, causing activities and HTTP signatures from an user to
be dropped due to key differences.
2022-09-05 03:51:17 +02:00
tusooa f8afba95b2 Merge branch 'fix/gts-federation' into 'develop'
GoToSocial federation fixes

See merge request pleroma/pleroma!3725
2022-09-05 01:10:34 +00:00
tusooa 20347898e2 Merge branch 'fix/federation-context-issues' into 'develop'
Fix reply context fixing (Pleroma replies to Misskey threads) and removal of context objects

See merge request pleroma/pleroma!3717
2022-09-04 18:43:36 +00:00
Haelwenn c63cf954de Merge branch 'from/upstream-develop/tusooa/streaming-fix' into 'develop'
Streaming fix

Closes #2796

See merge request pleroma/pleroma!3738
2022-09-03 18:24:28 +00:00
tusooa 71839cb890 Merge branch 'changes/embed-metadata' into 'develop'
Metadata/Utils: use summary as description if set

Closes #2491

See merge request pleroma/pleroma!3733
2022-09-03 16:21:08 +00:00
Haelwenn (lanodan) Monnier 80a2528fd1 ci-base: Document building and pushing a new image 2022-09-03 18:19:58 +02:00
Hélène 4477c6baff
Metadata/Utils: use summary as description if set
When generating OpenGraph and TwitterCard metadata for a post, the
summary field will be used first if it is set to generate the post
description.
2022-09-03 17:17:48 +02:00
Haelwenn 257601d67d Merge branch 'ssh-bbs-improvements' into 'develop'
BBS: add functionnalities and readability

See merge request pleroma/pleroma!3675
2022-09-03 11:15:07 +00:00
Haelwenn (lanodan) Monnier be411ad3bc Test coverage: Switch to covertool to get cobertura output
This allows to have coverage information integrated into Gitlab
2022-09-03 05:03:50 +02:00
Tusooa Zhu d19696cf60
Lint 2022-09-02 22:58:35 -04:00
Haelwenn 299255b9bb Merge branch 'from/upstream-develop/tusooa/assoc-object-id' into 'develop'
Add function to calculate associated object id

Closes #2307

See merge request pleroma/pleroma!3692
2022-09-03 02:50:40 +00:00
Haelwenn e40c221c31 Merge branch 'from/upstream-develop/tusooa/edits' into 'develop'
Editing

Closes #1429, #2859, and #2288

See merge request pleroma/pleroma!3678
2022-09-03 02:16:42 +00:00
Haelwenn 07ef72f493 Merge branch 'from/develop/tusooa/2807-remote-xact-post' into 'develop'
Remote interaction with posts

Closes #2807 and #978

See merge request pleroma/pleroma!3587
2022-09-03 02:03:48 +00:00
Haelwenn (lanodan) Monnier ec80a1e405 Bump minimum Elixir version to 1.10
1.9 being end-of-life
2022-09-03 03:58:22 +02:00
Haelwenn (lanodan) Monnier 24af2e1c58 script_test: Fix %ErlangError for Elixir 1.14 2022-09-03 03:58:22 +02:00
Haelwenn (lanodan) Monnier e124776d14 Elixir 1.14 formatting 2022-09-03 03:58:22 +02:00
Haelwenn (lanodan) Monnier 93ed6da4a3 mix: Switch prometheus_ex to fix/elixir-1.14 branch 2022-09-03 03:58:22 +02:00
Haelwenn (lanodan) Monnier 2f301bbb87 timeline_controller_test: Fix test name for elixir 1.14 2022-09-03 03:58:22 +02:00
Tusooa Zhu 6d148b6637 Use Websockex to replace websocket_client 2022-09-03 02:13:00 +02:00
Haelwenn 0a05ebf789 Merge branch 'revert-01239456' into 'develop'
Revert "Merge branch 'rewrite/integration-test-websocket-client' into 'develop'"

See merge request pleroma/pleroma!3742
2022-09-02 23:58:02 +00:00
Haelwenn b439e91f57 Revert "Merge branch 'rewrite/integration-test-websocket-client' into 'develop'"
This reverts merge request !3649
2022-09-02 22:35:40 +00:00
Haelwenn e22a772240 Merge branch 'weblate' into 'develop'
Translations update from Pleroma Weblate

See merge request pleroma/pleroma!3735
2022-09-02 22:10:44 +00:00
Haelwenn (lanodan) Monnier 21ab7369ca Bump minimum Elixir version to 1.10
With the release of Elixir 1.14, Elixir 1.9 is now end-of-life.

Elixir 1.10 Release Notes:
https://github.com/elixir-lang/elixir/releases/tag/v1.10.0
2022-09-02 22:53:54 +02:00
Fristi 0d8c6b0488 Translated using Weblate (Dutch)
Currently translated at 63.8% (30 of 47 strings)

Translation: Pleroma/Pleroma Backend (domain posix_errors)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-posix_errors/nl/
2022-09-02 19:18:40 +00:00
Fristi 9af5da6666 Translated using Weblate (Dutch)
Currently translated at 100.0% (83 of 83 strings)

Translation: Pleroma/Pleroma Backend (domain static_pages)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-static_pages/nl/
2022-09-02 19:18:40 +00:00
Fristi 425fbce7be Translated using Weblate (Dutch)
Currently translated at 100.0% (106 of 106 strings)

Translation: Pleroma/Pleroma Backend (domain errors)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-errors/nl/
2022-09-02 19:18:40 +00:00
Fristi a6195c7127 Added translation using Weblate (Dutch) 2022-09-02 19:18:40 +00:00
Fristi e949378476 Added translation using Weblate (Dutch) 2022-09-02 19:18:40 +00:00
Haelwenn 01239456a1 Merge branch 'rewrite/integration-test-websocket-client' into 'develop'
Rewrite integration-test websocket client with Mint.WebSocket, closes #2812

Closes #2812

See merge request pleroma/pleroma!3649
2022-09-02 19:18:22 +00:00
Tusooa Zhu c32e28e1b0
Fix SideEffectsTest 2022-09-01 07:33:58 -04:00
Tusooa Zhu 20a0dd6516
Exclude Announce instead of restricting to Create in visibility_tags 2022-08-31 22:14:54 -04:00
Tusooa Zhu ffd379456b
Do not stream out Announces to public timelines 2022-08-31 15:57:06 -04:00
Tusooa Zhu 6aa9b023f0
Use dedicated script 2022-08-28 11:13:36 -04:00
Tusooa Zhu f8566e91a6
Fix {} not working with alpine sh 2022-08-28 11:10:25 -04:00
Tusooa Zhu a26fb6ab48
Display error info 2022-08-28 10:24:01 -04:00
Tusooa Zhu d3871fa360
Allow to explicitly skip changelog 2022-08-28 09:57:32 -04:00
Tusooa Zhu 27a8f6a8d9
Prevent duplicate pipelines 2022-08-28 09:54:28 -04:00
Tusooa Zhu 50d3209ce8
Check for changelog in ci 2022-08-28 09:48:01 -04:00
Tusooa Zhu f9b86c3c22
Make local-only posts stream in local timeline 2022-08-27 19:34:56 -04:00
Tusooa Zhu 3afa1903ee
Do not stream out Create of ChatMessage 2022-08-27 17:51:41 -04:00
tusooa 497cd5d5da Merge branch 'fix/fedi-fe-build-url' into 'develop'
Fix fedi-fe build URL, addresses #2920

See merge request pleroma/pleroma!3736
2022-08-27 01:13:03 +00:00
tusooa a546e6f042 Merge branch 'feature/emoji-15-support' into 'develop'
emoji-test: update to latest 15.0 draft

See merge request pleroma/pleroma!3726
2022-08-27 00:59:22 +00:00
tusooa 780fb4514d Merge branch 'from/upstream-develop/tusooa/static-page-styles' into 'develop'
Improve static page style

See merge request pleroma/pleroma!3729
2022-08-27 00:58:18 +00:00
tusooa 84a573877a Merge branch 'fix_erratic_tests' into 'develop'
Fix flaky rate_limiter_test.exs test "it restricts based on config values"

See merge request pleroma/pleroma!3688
2022-08-25 18:39:38 +00:00
tusooa 6811237ffd Merge branch 'fix_flaky_transfer_task_test.exs' into 'develop'
Fix flaky/erratic test/pleroma/config/transfer_task_test.exs

See merge request pleroma/pleroma!3703
2022-08-25 18:38:18 +00:00
tusooa 6f10f93d62 Merge branch 'fix_erratic_participation_test' into 'develop'
fix flaky participation_test.exs

See merge request pleroma/pleroma!3689
2022-08-25 18:36:47 +00:00
Ilja dc72a523c4 fix flaky participation_test.exs 2022-08-25 18:36:46 +00:00
Sean King d67d191344
Fix fedi-fe build URL 2022-08-24 23:39:02 -06:00
tusooa 8ec985eea1 Merge branch 'fix_flaky_filter_controller_test.exs_200' into 'develop'
fix flaky test filter_controller_test.exs:200

See merge request pleroma/pleroma!3699
2022-08-24 15:24:57 +00:00
Ilja 5b2e3a303c fix flaky test filter_controller_test.exs:200 2022-08-24 15:24:57 +00:00
tusooa 59109f8f74 Merge branch 'fix_flaky_test_user_relationship_test.exs_81' into 'develop'
fix flaky test_user_relationship_test.exs:81

See merge request pleroma/pleroma!3697
2022-08-24 15:24:07 +00:00
Ilja 47e3a72b6e fix flaky test_user_relationship_test.exs:81 2022-08-24 15:24:07 +00:00
tusooa 85c1e1ff4d Merge branch 'fix/oauth-token-user-caching' into 'develop'
OAuthPlug: use user cache instead of joining

See merge request pleroma/pleroma!3734
2022-08-24 15:23:20 +00:00
tusooa 38d9ec41be Merge branch 'add/glitch-lily-fe' into 'develop'
Add glitch-lily as an installable frontend

See merge request pleroma/pleroma!3727
2022-08-24 12:18:02 +00:00
Hélène 439c1baf25
OAuthPlug: use user cache instead of joining
As this plug is called on every request, this should reduce load on the
database by not requiring to select on the users table every single
time, and to instead use the by-ID user cache whenever possible.
2022-08-24 03:40:05 +02:00
Tusooa Zhu c59a0bd12f
Add margin to forms and make inputs fill whole width 2022-08-20 21:52:20 -04:00
tusooa a022b9d733 Merge branch 'from/upstream-develop/tusooa/alpine-bump' into 'develop'
Use latest alpine version for docker image

See merge request pleroma/pleroma!3719
2022-08-21 01:25:25 +00:00
Tusooa Zhu c59ee1f172
Expose availability of GET /main/ostatus via instance 2022-08-20 21:19:31 -04:00
Tusooa Zhu 4ec9eeb3f8
Make remote interaction page translatable 2022-08-20 21:14:26 -04:00
Tusooa Zhu ec0e912c52
Add changelog 2022-08-20 21:14:25 -04:00
Tusooa Zhu 1218adacc5
Display status link in remote interaction form 2022-08-20 21:13:52 -04:00
Tusooa Zhu b7c75db0f7
Lint 2022-08-20 21:13:51 -04:00
Tusooa Zhu 779457d9a4
Add GET endpoints for remote subscription forms
There are two reasons for adding a GET endpoint:

0: Barely displaying the form does not change anything on the server.

1: It makes frontend development easier as they can now use a link,
instead of a form, to allow remote users to interact with local ones.
2022-08-20 21:13:51 -04:00
Tusooa Zhu a243a217a7
Fix form item name in status_interact.html 2022-08-20 21:13:51 -04:00
Tusooa Zhu 2701628786
Add remote interaction ui for posts 2022-08-20 21:13:51 -04:00
Tusooa Zhu f047088a93
Update thread visibility function 2022-08-20 21:06:12 -04:00
Tusooa Zhu 4e7ed563c0
Lint 2022-08-20 20:43:47 -04:00
Tusooa Zhu 3885ee182a
Switch to associated_object_id index 2022-08-20 20:43:46 -04:00
Tusooa Zhu 06678fb4ad
Add function to calculate associated object id 2022-08-20 20:43:40 -04:00
Sean King cc0f32c253
Add glitch-lily as an installable frontend 2022-08-19 22:54:56 -06:00
Tusooa Zhu 31fd41de0c
Release 2.4.4 2022-08-19 20:29:06 -04:00
Tusooa Zhu 5a2c8ef4cc
Refactor streamer test 2022-08-19 20:24:24 -04:00
Tusooa Zhu a31d6bb52c
Execute session disconnect in background 2022-08-19 20:24:24 -04:00
Tusooa Zhu f459c1260b
Lint 2022-08-19 20:24:24 -04:00
Tusooa Zhu 3522852c61
Test that server will disconnect websocket upon token revocation 2022-08-19 20:24:24 -04:00
Tusooa Zhu eb42e90c4f
Use Websockex to replace websocket_client 2022-08-19 20:24:21 -04:00
Tusooa Zhu c62a4f1c17
Disconnect streaming sessions when token is revoked 2022-08-19 20:22:45 -04:00
feld 6ccab516a3 Merge branch 'varnish-fix-changelog' into 'develop'
Document the changes for Varnish 7.0+ compatibility and RFC compliance

See merge request pleroma/pleroma!3723
2022-08-19 22:41:42 +00:00
Hélène 0cee3c6e93
emoji-test: update to latest 15.0 draft 2022-08-20 00:21:07 +02:00
Hélène 4661b56720
ArticleNotePageValidator: fix replies fixing
Some software, like GoToSocial, expose replies as ActivityPub
Collections, but do not expose any item array directly in the object,
causing validation to fail via the ObjectID validator. Now, Pleroma will
drop that field in this situation too.
2022-08-19 02:45:49 +02:00
Hélène 61254111e5
HttpSignaturePlug: accept standard (request-target)
The (request-target) used by Pleroma is non-standard, but many HTTP
signature implementations do it this way due to a misinterpretation of
the draft 06 of HTTP signatures: "path" was interpreted as not having
the query, though later examples show that it must be the absolute path
with the query part of the URL as well.

This behavior is kept to make sure most software (Pleroma itself,
Mastodon, and probably others) do not break, but Pleroma now accepts
signatures for a (request-target) containing the query, as expected by
many HTTP signature libraries, and clarified in the draft 11 of HTTP
signatures.

Additionally, the new draft renamed (request-target) to @request-target.
We now support both for incoming requests' signatures.
2022-08-18 17:01:34 +02:00
FloatingGhost f41d970a59
fix resolution of GTS user keys 2022-08-16 18:51:34 +02:00
Hélène 88c1c76d3e
Migrations: delete contexts with BaseMigrator
Due to the lengthiness of this task, the migration has been adapted into
a BaseMigrator migration, running in the background instead.
2022-08-15 01:47:09 +02:00
Hélène bb02ee99f5
CommonFixes: more predictable context generation
`context` fields for objects and activities can now be generated based
on the object/activity `inReplyTo` field or its ActivityPub ID, as a
fallback method in cases where `context` fields are missing for incoming
activities and objects.
2022-08-15 01:46:55 +02:00
Mark Felder 80c32ae00b Document the changes for Varnish 7.0+ compatibility and RFC compliance 2022-08-12 15:06:45 -04:00
Haelwenn 06f9324afe Merge branch 'from/upstream-develop/tusooa/2912-receiver-reject-mrf' into 'develop'
Treat MRF rejects as success in Oban worker

Closes #2912

See merge request pleroma/pleroma!3720
2022-08-12 01:37:40 +00:00
Haelwenn 837d4dc87f Merge branch 'fix_flaky_tests_where_we_sometimes_loose_db_connections' into 'develop'
Fix flaky tests with DB connections; Allow higher amount of restarts for Pleroma.Repo during testing

See merge request pleroma/pleroma!3696
2022-08-12 01:36:11 +00:00
Haelwenn 93f12c0d0d Merge branch 'from/upstream-develop/tusooa/sync-settings' into 'develop'
Synchronized settings for apps (frontends)

See merge request pleroma/pleroma!3698
2022-08-12 01:34:36 +00:00
Haelwenn 6ce3f76b5d Merge branch 'from/upstream-develop/floatingghost/follow-state' into 'develop'
Backport: bugfix/follow-state

Closes #2902

See merge request pleroma/pleroma!3718
2022-08-12 01:32:20 +00:00
feld 514caed573 Merge branch 'fix-varnish7-support' into 'develop'
Fix Varnish7 support

See merge request pleroma/pleroma!3722
2022-08-11 15:14:16 +00:00
Mark Felder 73b4d0d9a7 Fix the mocks to use uppercase as well 2022-08-10 21:46:56 +00:00
Mark Felder 243ed7d60f Update the recommended VCL configuration 2022-08-10 17:18:06 -04:00
Mark Felder cbdc13b767 Fix Varnish 7 support by ensuring Media Preview Proxy fetches headers with a capitalized HEAD verb 2022-08-10 17:09:58 -04:00
Hélène 3b6784b1de
CreateGenericValidator: fix reply context fixing
Incoming Pleroma replies to a Misskey thread were rejected due to a
broken context fix, which caused them to not be visible until a
non-Pleroma user interacted with the replies.

This fix properly sets the post-fix object context to its parent Create
activity as well, if it was changed.
2022-08-10 02:29:38 +02:00
Hélène c559c240d1
Migrations: delete context objects
These objects represent from 30 to 70% of the rows on the objects table,
based on numbers from a few live instances (single-user, small, large.)

As those pseudo-objects prevent creating objects with those actual IDs,
deleting them is a better solution. This could have happened if an
object used another object's ID as its context.
2022-08-10 02:29:38 +02:00
Hélène def0f5dc2e
StatusView: implement pleroma.context field
This field replaces the now deprecated conversation_id field, and now
exposes the ActivityPub object `context` directly via the MastoAPI
instead of relying on StatusNet-era data concepts.
2022-08-10 02:29:38 +02:00
Tusooa Zhu e06f2b9f5e
Add changelog 2022-08-09 18:17:07 -04:00
Tusooa Zhu 738ca484fd
Update api spec to reflect OAuth scope change 2022-08-09 18:15:25 -04:00
Hélène a9111bcaf2
StatusView: clear MSB on calculated conversation_id
This field seems to be a left-over from the StatusNet era.
If your application uses `pleroma.conversation_id`: this field is
deprecated.

It is currently stubbed instead by doing a CRC32 of the context, and
clearing the MSB to avoid overflow exceptions with signed integers on
the different clients using this field (Java/Kotlin code, mostly; see
Husky and probably other mobile clients.)

This should be removed in a future version of Pleroma. Pleroma-FE
currently depends on this field, as well.
2022-08-09 20:10:43 +02:00
Hélène 7f71e3d0fe
CommonFields: remove context_id 2022-08-09 20:10:43 +02:00
Hélène f3e061c964
Object: remove context_id field
30 to 70% of the objects in the object table are simple JSON objects
containing a single field, 'id', being the context's ID. The reason for
the creation of an object per context seems to be an old relic from the
StatusNet era, and has only been used nowadays as an helper for threads
in Pleroma-FE via the `pleroma.conversation_id` field in status views.
An object per context was created, and its numerical ID (table column)
was used and stored as 'context_id' in the object and activity along
with the full 'context' URI/string.

This commit removes this field and stops creation of objects for each
context, which will also allow incoming activities to use activity IDs
as contexts, something which was not possible before, or would have been
very broken under most circumstances.

The `pleroma.conversation_id` field has been reimplemented in a way to
maintain backwards-compatibility by calculating a CRC32 of the full
context URI/string in the object, instead of relying on the row ID for
the created context object.
2022-08-09 20:10:43 +02:00
Tusooa Zhu a7f01ffc1d
Make backups require its own scope 2022-08-09 00:34:04 -04:00
Tusooa Zhu d487e0160c
Treat containment failure as cancel in ReceiverWorker 2022-08-08 08:41:33 -04:00
Ilja b53cf7d4b3 Change default moderator privileges to better match what we previously had
Moderators were able to delete statusses via pleroma-fe. For that reason I now gave them :messages_delete by default.

They are also able to recieve reports through the notifications. For that reason I now gave them :reports_manage_reports by default.

They were also able to see deactivated accounts through pleroma-fe. However
* they were unable to tell if the account is deactivated or not (which was a bug and fixed by thes privileges MR this commit is part of)
* they were not able to actually change the activation state.
Because of this, I decided to *not* give them the privilege :users_manage_activation_state as this would give significantly more
privileges, while not giving it will actually improve the current experience as it works around the existing bug of not showing activation state.
2022-08-07 07:22:33 +02:00
Tusooa Zhu 88e0e6acd5
Fix FederatorTest 2022-08-06 00:42:10 -04:00
Tusooa Zhu a0166e92fa
Treat MRF rejects as success in Oban worker 2022-08-06 00:33:18 -04:00
Tusooa Zhu 5d900a5cd1
Use latest alpine version for docker image 2022-08-05 23:47:53 -04:00
floatingghost f2a9285ff0
bugfix/follow-state (#104)
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/104
2022-08-03 01:07:53 -04:00
Tusooa Zhu a4fa286d20
Use actor_types() to determine whether the Update is for user 2022-08-02 10:37:28 -04:00
Haelwenn b2ba307f4d Merge branch 'from/upstream-develop/tusooa/2871-fix-local-public' into 'develop'
local only fixes

Closes #2871

See merge request pleroma/pleroma!3660
2022-08-02 05:39:50 +00:00
Haelwenn 7299795eb4 Merge branch 'from/upstream-develop/tusooa/backup-without-email' into 'develop'
Allow users to create backups without providing email address

See merge request pleroma/pleroma!3665
2022-08-02 05:23:49 +00:00
Haelwenn f8540b0a9d Merge branch 'weblate' into 'develop'
Translations update from Pleroma Weblate

See merge request pleroma/pleroma!3716
2022-08-02 05:10:51 +00:00
Yating Zhan 99d4823ab1 Translated using Weblate (Chinese (Simplified))
Currently translated at 18.9% (189 of 998 strings)

Translation: Pleroma/Pleroma Backend (domain config_descriptions)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-config_descriptions/zh_Hans/
2022-07-31 22:00:56 +00:00
tusooa cc533e6956 Translated using Weblate (Chinese (Simplified))
Currently translated at 18.9% (189 of 998 strings)

Translation: Pleroma/Pleroma Backend (domain config_descriptions)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-config_descriptions/zh_Hans/
2022-07-31 22:00:56 +00:00
Haelwenn 7de21ec991 Merge branch 'from/develop/tusooa/emit-move' into 'develop'
Implement moving account

See merge request pleroma/pleroma!3524
2022-07-31 22:00:40 +00:00
Haelwenn 5ef2dc317d Change test case wording 2022-07-31 21:34:23 +00:00
tusooa c80096522c Merge branch 'develop' into 'from/develop/tusooa/emit-move'
# Conflicts:
#   CHANGELOG.md
#   test/pleroma/user_test.exs
2022-07-31 21:32:49 +00:00
Haelwenn b5266097a1 Merge branch 'mutes' into 'develop'
MastoAPI: Use `duration` param for mute expiration duration

See merge request pleroma/pleroma!3715
2022-07-31 19:41:25 +00:00
marcin mikołajczak 5d3d6a58f7 Use `duration` param for mute expiration duration
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-31 17:22:34 +02:00
Haelwenn 0814d0e0cb Merge branch 'fix/proper-emoji-qualification' into 'develop'
Emoji: implement full-qualifier using combinations

See merge request pleroma/pleroma!3709
2022-07-28 04:46:15 +00:00
Haelwenn 0f9f3d2897 Merge branch 'from/upstream-develop/tusooa/2384-pagination' into 'develop'
Make mutes and blocks behave the same as other lists

Closes #2384

See merge request pleroma/pleroma!3693
2022-07-28 04:37:10 +00:00
Haelwenn 18d6a58c7e Merge branch 'from/upstream-develop/tusooa/gettext-extract' into 'develop'
Extract translatable strings

See merge request pleroma/pleroma!3712
2022-07-28 04:33:17 +00:00
Hélène 7167de592e
Emoji: apply recommended tail call changes
Behavior matches previous code.

Co-authored-by: Tusooa Zhu <tusooa@kazv.moe>
2022-07-27 02:08:46 +02:00
Tusooa Zhu 4bdd8e349c
Extract translatable strings 2022-07-26 10:50:29 -04:00
tusooa 36d79468ec Merge branch 'authorized-fetch' into 'develop'
Add authorized_fetch_mode to description.exs

See merge request pleroma/pleroma!3710
2022-07-26 14:48:00 +00:00
Hélène b99f5d6183
Emoji: split qualification variation into a module 2022-07-26 02:04:12 +02:00
marcin mikołajczak 5153eba3a8 Add authorized_fetch_mode to description.exs
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-25 19:53:51 +02:00
Hélène fb3f6e1975
EmojiReactValidator: use new qualification method 2022-07-25 16:49:23 +02:00
Hélène 01d396585e
Emoji: implement full-qualifier using combinations
This implements fully_qualify_emoji/1, which will return the
fully-qualified version of an emoji if it knows of one, or return the
emoji unmodified if not.
This code generates combinations per emoji: for each FE0F, all possible
combinations of the character being removed or staying will be
generated. This is made as an attempt to find all partially-qualified
and unqualified versions of a fully-qualified emoji.

I have found *no cases* for which this would be a problem, after
browsing the entire emoji list in emoji-test.txt. This is safe, and,
sadly, most likely the sanest too.
2022-07-25 16:20:12 +02:00
tusooa d39f803bdd Merge branch 'fix/emoji-react-qualification' into 'develop'
EmojiReactValidator: fix emoji qualification

See merge request pleroma/pleroma!3708
2022-07-24 21:36:43 +00:00
Hélène 388bbc4978
EmojiReactValidator: fix emoji qualification
Tries fully-qualifying emoji when receiving them, by adding the emoji
variation sequence to the received reaction emoji.

This issue arises when other instance software, such as Misskey, tries
reacting with emoji that have unqualified or minimally qualified
variants, like a red heart. Pleroma only accepts fully qualified emoji
in emoji reactions, and refused those emoji. Now, Pleroma will attempt
to properly qualify them first, and reject them if checks still fail.

This commit contains changes to tests proposed by lanodan.

Co-authored-by: Haelwenn <contact+git.pleroma.social@hacktivis.me>
2022-07-24 13:36:06 +02:00
Tusooa Zhu 997f08b350
Make AntiLinkSpamPolicy history-aware 2022-07-24 00:18:09 -04:00
Tusooa Zhu d877d2a4e7
Make HashtagPolicy history-aware 2022-07-24 00:02:39 -04:00
Tusooa Zhu 82c8fc1ede
Make NoEmptyPolicy work with Update 2022-07-23 23:24:25 -04:00
Tusooa Zhu 46a5c06853
Make NormalizeMarkup history-aware 2022-07-23 22:50:38 -04:00
Tusooa Zhu fc7ce5f93c
Make NoPlaceholderTextPolicy history-aware 2022-07-23 22:41:04 -04:00
Tusooa Zhu dce7e42928
Make MediaProxyWarmingPolicy history-aware 2022-07-23 22:34:03 -04:00
Tusooa Zhu 0a337063e1
Make ForceMentionsInContent history-aware 2022-07-23 22:23:57 -04:00
Tusooa Zhu cd19537f39
Make EnsureRePrepended history-aware 2022-07-23 17:48:39 -04:00
Tusooa Zhu eba9b0760f
Make MRF Keyword history-aware 2022-07-23 15:56:36 -04:00
tusooa 301ce5bc62 Merge branch 'mute-expiration' into 'develop'
MastoAPI: Show mutes expiration date

See merge request pleroma/pleroma!3682
2022-07-23 00:34:15 +00:00
Haelwenn 21e587ff1a Merge branch 'revert-454f892f' into 'develop'
Revert "Merge branch 'fix/emoji-react-qualification' into 'develop'"

See merge request pleroma/pleroma!3707
2022-07-22 23:56:52 +00:00
Haelwenn cfb21d011f Revert "Merge branch 'fix/emoji-react-qualification' into 'develop'"
This reverts merge request !3684
2022-07-22 23:19:49 +00:00
Haelwenn e077da27fe Merge branch 'weblate' into 'develop'
Translations update from Pleroma Weblate

See merge request pleroma/pleroma!3705
2022-07-22 22:46:37 +00:00
Haelwenn c057ec6878 Translated using Weblate (French)
Currently translated at 100.0% (34 of 34 strings)

Translation: Pleroma/Pleroma Backend (domain default)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-default/fr/
2022-07-22 19:00:37 +00:00
Yating Zhan 4217ac4074 Translated using Weblate (Chinese (Simplified))
Currently translated at 13.0% (130 of 998 strings)

Translation: Pleroma/Pleroma Backend (domain config_descriptions)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-config_descriptions/zh_Hans/
2022-07-22 19:00:37 +00:00
tusooa 1b091c7950 Translated using Weblate (Chinese (Simplified))
Currently translated at 13.0% (130 of 998 strings)

Translation: Pleroma/Pleroma Backend (domain config_descriptions)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-config_descriptions/zh_Hans/
2022-07-22 19:00:37 +00:00
Yating Zhan 0ad115ddf0 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.0% (102 of 103 strings)

Translation: Pleroma/Pleroma Backend (domain errors)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-errors/zh_Hans/
2022-07-22 19:00:37 +00:00
Yating Zhan a543161ba9 Translated using Weblate (Chinese (Simplified))
Currently translated at 88.2% (30 of 34 strings)

Translation: Pleroma/Pleroma Backend (domain default)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-default/zh_Hans/
2022-07-22 19:00:37 +00:00
Yating Zhan 2fffca8ef3 Translated using Weblate (Chinese (Simplified))
Currently translated at 82.9% (39 of 47 strings)

Translation: Pleroma/Pleroma Backend (domain posix_errors)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-posix_errors/zh_Hans/
2022-07-22 19:00:37 +00:00
tusooa 13e41ab8ba Translated using Weblate (Chinese (Simplified))
Currently translated at 82.9% (39 of 47 strings)

Translation: Pleroma/Pleroma Backend (domain posix_errors)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-posix_errors/zh_Hans/
2022-07-22 19:00:37 +00:00
tusooa ca8341a96c Translated using Weblate (Chinese (Simplified))
Currently translated at 11.8% (118 of 998 strings)

Translation: Pleroma/Pleroma Backend (domain config_descriptions)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-config_descriptions/zh_Hans/
2022-07-22 19:00:37 +00:00
Yating Zhan 5ca95a4f1a Translated using Weblate (Chinese (Simplified))
Currently translated at 11.8% (118 of 998 strings)

Translation: Pleroma/Pleroma Backend (domain config_descriptions)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-config_descriptions/zh_Hans/
2022-07-22 19:00:37 +00:00
tusooa aff4d5df1c Translated using Weblate (Chinese (Simplified))
Currently translated at 88.2% (30 of 34 strings)

Translation: Pleroma/Pleroma Backend (domain default)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-default/zh_Hans/
2022-07-22 19:00:37 +00:00
tusooa 48bd45acec Translated using Weblate (Chinese (Simplified))
Currently translated at 99.0% (102 of 103 strings)

Translation: Pleroma/Pleroma Backend (domain errors)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-errors/zh_Hans/
2022-07-22 19:00:37 +00:00
Haelwenn 0b2243f17e Translated using Weblate (French)
Currently translated at 100.0% (47 of 47 strings)

Translation: Pleroma/Pleroma Backend (domain posix_errors)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-posix_errors/fr/
2022-07-22 19:00:37 +00:00
Haelwenn 9399fd4abd Translated using Weblate (French)
Currently translated at 100.0% (34 of 34 strings)

Translation: Pleroma/Pleroma Backend (domain default)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-default/fr/
2022-07-22 19:00:37 +00:00
tusooa 54cf23f2f8 Translated using Weblate (Chinese (Simplified))
Currently translated at 3.3% (33 of 998 strings)

Translation: Pleroma/Pleroma Backend (domain config_descriptions)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-config_descriptions/zh_Hans/
2022-07-22 19:00:37 +00:00
tusooa 8b55661ae6 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (83 of 83 strings)

Translation: Pleroma/Pleroma Backend (domain static_pages)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-static_pages/zh_Hans/
2022-07-22 19:00:37 +00:00
Haelwenn 8c3684ee8c Added translation using Weblate (French) 2022-07-22 19:00:37 +00:00
Haelwenn bc488824f8 Added translation using Weblate (French) 2022-07-22 19:00:37 +00:00
Haelwenn 77ebde450e Translated using Weblate (French)
Currently translated at 32.3% (11 of 34 strings)

Translation: Pleroma/Pleroma Backend (domain default)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-default/fr/
2022-07-22 19:00:37 +00:00
tusooa 21bd168226 Translated using Weblate (Chinese (Simplified))
Currently translated at 1.6% (16 of 998 strings)

Translation: Pleroma/Pleroma Backend (domain config_descriptions)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-config_descriptions/zh_Hans/
2022-07-22 19:00:37 +00:00
Haelwenn 6da0b50645 Translated using Weblate (French)
Currently translated at 100.0% (83 of 83 strings)

Translation: Pleroma/Pleroma Backend (domain static_pages)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-static_pages/fr/
2022-07-22 19:00:37 +00:00
Haelwenn 37ea9e014a Added translation using Weblate (French) 2022-07-22 19:00:37 +00:00
Haelwenn 99ad602577 Added translation using Weblate (French) 2022-07-22 19:00:37 +00:00
tusooa cc40640f54 Translated using Weblate (Chinese (Simplified))
Currently translated at 0.5% (5 of 998 strings)

Translation: Pleroma/Pleroma Backend (domain config_descriptions)
Translate-URL: http://weblate.pleroma-dev.ebin.club/projects/pleroma/pleroma-backend-domain-config_descriptions/zh_Hans/
2022-07-22 19:00:37 +00:00
tusooa ffe8459349 Added translation using Weblate (Chinese (Simplified)) 2022-07-22 19:00:37 +00:00
Haelwenn 3b2bac7a0f Merge branch 'fix-owncast' into 'develop'
Fix owncast

See merge request pleroma/pleroma!3706
2022-07-22 19:00:23 +00:00
Haelwenn (lanodan) Monnier eba1666575 AttachmentValidator: fix_media_type/1 fallback to application/octet-stream 2022-07-22 20:30:45 +02:00
FloatingGhost 09e0304b9c Add test for broken owncast federation 2022-07-22 20:30:45 +02:00
Haelwenn (lanodan) Monnier be98900904 ArticleNotePageValidator: Fix when attachments are a Map (ie. owncast) 2022-07-22 20:30:45 +02:00
tusooa c589b8445f Merge branch 'birthday_fix' into 'develop'
Allow to unset birthday

See merge request pleroma/pleroma!3702
2022-07-21 21:27:16 +00:00
Haelwenn 454f892f37 Merge branch 'fix/emoji-react-qualification' into 'develop'
EmojiReactValidator: fix emoji qualification

See merge request pleroma/pleroma!3684
2022-07-21 17:45:47 +00:00
Tusooa Zhu 4350a205a4
Merge remote-tracking branch 'upstream/develop' into HEAD 2022-07-21 13:44:16 -04:00
Haelwenn 1f18ab36b5 Merge branch 'resolve/notice-compatibility-routes-nginx' into 'develop'
Document way to do notice compatibility routes with Nginx reverse-proxy, fixes #2900

Closes #2900

See merge request pleroma/pleroma!3701
2022-07-20 16:57:05 +00:00
Haelwenn fff7571e0d Merge branch 'fix-cycles' into 'develop'
CI: Remove cache on cycles

See merge request pleroma/pleroma!3704
2022-07-20 16:52:15 +00:00
Haelwenn (lanodan) Monnier 65a5c713e9 CI: Remove cache on cycles
cycles uses a different system than the rest of the testing_cache, creating errors like libcrypto.so.1 being missing
2022-07-20 17:49:56 +02:00
Ilja ba31af021c Fix flaky/erratic tests in Pleroma.Config.TransferTaskTest
There were async calls happening, so they weren't always finished when assert happened.
2022-07-20 13:26:26 +02:00
Ilja 9a6280cdb9 Fix warnings ":logger is used by the current application but the current application does not depend on :logger"
During compilation, we had the following warning which is now fixed

```
==> restarter
Compiling 1 file (.ex)
warning: Logger.__do_log__/4 defined in application :logger is used by the current application but the current application does not depend on :logger. To fix this, you must do one of:

  1. If :logger is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :logger is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :logger, you may optionally skip this warning by adding [xref: [exclude: [Logger]]] to your "def project" in mix.exs

Invalid call found at 2 locations:
  lib/pleroma.ex:65: Restarter.Pleroma.handle_cast/2
  lib/pleroma.ex:78: Restarter.Pleroma.handle_cast/2

warning: Logger.__should_log__/2 defined in application :logger is used by the current application but the current application does not depend on :logger. To fix this, you must do one of:

  1. If :logger is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :logger is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :logger, you may optionally skip this warning by adding [xref: [exclude: [Logger]]] to your "def project" in mix.exs

Invalid call found at 2 locations:
  lib/pleroma.ex:65: Restarter.Pleroma.handle_cast/2
  lib/pleroma.ex:78: Restarter.Pleroma.handle_cast/2

warning: Logger.debug/1 defined in application :logger is used by the current application but the current application does not depend on :logger. To fix this, you must do one of:

  1. If :logger is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :logger is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :logger, you may optionally skip this warning by adding [xref: [exclude: [Logger]]] to your "def project" in mix.exs

Invalid call found at 2 locations:
  lib/pleroma.ex:65: Restarter.Pleroma.handle_cast/2
  lib/pleroma.ex:78: Restarter.Pleroma.handle_cast/2
```
2022-07-20 13:26:26 +02:00
Sean King 3da1b2548d
Actually fix with forward slashes being restricted inside nickname 2022-07-18 21:30:57 -06:00
Hélène 1a67a20364 Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:40:24 +00:00
Hélène f9fc3a153d Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:40:10 +00:00
Hélène ce0a6737e7 Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:40:02 +00:00
Hélène 97e8c8a10a Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:39:26 +00:00
Hélène d24d74b1a7 Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:39:21 +00:00
Hélène db789acf1e Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:39:11 +00:00
Hélène d622fe8d48 Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:39:03 +00:00
Hélène 02b4b4da47 Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:38:45 +00:00
Hélène 02947bafeb Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:38:30 +00:00
Hélène ad730c2135 Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:38:23 +00:00
Hélène 2baf3084a1 Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:38:01 +00:00
Hélène 92da9c4a47 Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:37:41 +00:00
Hélène 275c60208b Apply ilja's suggestion(s) to 1 file(s) 2022-07-18 05:37:27 +00:00
Sean King 2c7eed122e
Don't accept forward slash character for nicknames 2022-07-17 12:50:01 -06:00
marcin mikołajczak fb268c4378 Allow to unset birthday
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-17 19:46:29 +02:00
Haelwenn 3193f18cf3 Merge branch 'shrink-ci' into 'develop'
Shrink CI

See merge request pleroma/pleroma!3691
2022-07-17 17:34:47 +00:00
Haelwenn bb4860e222 Merge branch 'from/upstream-develop/tusooa/config-translatable' into 'develop'
Translatable config descriptions

Closes pleroma-meta#65

See merge request pleroma/pleroma!3695
2022-07-17 17:34:21 +00:00
Sean King 64e16e6a4b
Document way to do notice compatibility routes with Nginx reverse-proxy instead 2022-07-16 23:44:37 -06:00
tusooa 8aba7c08d1 Merge branch 'notification_types' into 'develop'
MastoAPI: Use `types` for filtering notifications

See merge request pleroma/pleroma!3648
2022-07-17 03:17:43 +00:00
tusooa eb4b7f6efa Merge branch 'docs__setting_up_a_gitlab_runner' into 'develop'
DOCS: Add some small piece about setting up a Gitlab-runner

See merge request pleroma/pleroma!3694
2022-07-17 02:36:28 +00:00
marcin mikołajczak 597f56b4c4 Use :utc_datetime
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-16 16:28:22 +02:00
Tusooa Zhu 8113dd31ee
Add api docs for settings endpoint 2022-07-16 01:27:16 -04:00
Tusooa Zhu 8371fd8ca2
Implement settings api 2022-07-16 01:20:25 -04:00
Tusooa Zhu 1d7e8d6e01
Pass in msgctxt for config translation strings 2022-07-14 17:41:33 -04:00
floatingghost 28626eafc1 Allow higher amount of restarts for Pleroma.Repo during testing
This was done by floatingghost as part of a bigger commit in Akkoma.
See <37ae047e16/lib/pleroma/application.ex (L83)>.

As explained in <https://ihatebeinga.live/objects/860d23e1-dc64-4b07-8b4d-020b9c56cff6>

> there are so many caches that clearing them all can nuke the supervisor, which by default will become an hero if it gets more than 3 restarts in <5 seconds

And further down the thread

> essentially we've got like 11 caches (37ae047e16/lib/pleroma/application.ex (L165))
> then in test we fetch them all (https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/test/support/data_case.ex#L50) and call clear on them
> so if this clear fails on any 3 of them, the pleroma supervisor itself will die

How it fails?

> idk maybe cachex dies, maybe :ets does a weird thing
> it doesn't log anything, it just consistently dies during cache clearing so i figured it had to be that

> honestly my best bet is locksmith and queuing
> https://github.com/whitfin/cachex/blob/master/lib/cachex/actions/clear.ex#L26
> clear is thrown into a locksmith transaction

> locksmith says
> >If the process is already in a transactional context, the provided function will be executed immediately. Otherwise the required keys will be locked until the provided function has finished executing.

> so if we get 2 clears too close together, maybe it locks, then doesn't like the next clear?
2022-07-14 13:50:44 +02:00
Ilja c045a49909 Add privilege for announcements 2022-07-14 08:40:26 +02:00
Ilja 44d14e8a9c Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into fine_grained_moderation_privileges 2022-07-14 07:07:19 +02:00
tusooa 3fb9171694 Merge branch 'from/upstream-develop/tusooa/zh-translation' into 'develop'
Translate static_pages.po (Simplified Chinese)

See merge request pleroma/pleroma!3655
2022-07-13 23:39:46 +00:00
Tusooa Zhu 074a94e90d
Extract translatable strings 2022-07-13 18:57:57 -04:00
Tusooa Zhu 7473868880
Fix compile error 2022-07-13 18:46:21 -04:00
Tusooa Zhu 20588517fc
Make admin api use translated config descriptions 2022-07-13 18:31:35 -04:00
Tusooa Zhu 36f6d92d98
Add tests for translator compiler 2022-07-13 18:31:01 -04:00
Tusooa Zhu b2a0718e83
Extract config descriptions for translation 2022-07-13 18:01:47 -04:00
marcin mikołajczak 9022d855cd Check refute User.following?
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-13 22:57:42 +02:00
Ilja 8ddea16b0d DOCS: Add some small piece about setting up a Gitlab-runner
This is based on me setting one up, but I kept it general with mostly linking to other documentation.
The idea is that to just provide some Pleroma-specific info, maybe give some pointers, and point to the right (external) docs.
2022-07-13 20:54:24 +02:00
tusooa fdc71f6051 Merge branch 'short-description' into 'develop'
Add short_description instance field

Closes #2865

See merge request pleroma/pleroma!3651
2022-07-13 04:42:24 +00:00
Tusooa Zhu eb2a1652bf
Add tests for short_description 2022-07-13 00:40:46 -04:00
Tusooa Zhu c1874bc8f9
Make mutes and blocks behave the same as other lists 2022-07-12 19:03:18 -04:00
Haelwenn (lanodan) Monnier 12d888e04e CI: cycles: Use current stable elixir image 2022-07-12 13:13:24 +02:00
Haelwenn (lanodan) Monnier 6e158bba2c CI: template for change policies based on build stage 2022-07-12 12:13:34 +02:00
Haelwenn (lanodan) Monnier e574408b33 CI: Run stages when .gitlab-ci.yml changes 2022-07-11 10:15:18 +02:00
Haelwenn (lanodan) Monnier 702a41ce23 CI: Run lint and cycles in alpine 2022-07-11 10:12:18 +02:00
Haelwenn (lanodan) Monnier 08c8814ef0 CI: Run postgres services in alpine 2022-07-11 09:29:18 +02:00
tusooa 311fda32f3 Merge branch 'fix/case-sensitivity-restricted-nicknames-blacklisted-domains' into 'develop'
Make checking blacklisted domains and restricted nicknames case-insensitive

Closes #2894 and #2888

See merge request pleroma/pleroma!3687
2022-07-11 04:04:36 +00:00
Tusooa Zhu 8bb2e52d2e
Make lint happy 2022-07-10 23:43:49 -04:00
Haelwenn 420da14b61 Merge branch 'from/upstream-develop/tusooa/2830-remote-fo-mp' into 'develop'
Pass remote follow avatar into media proxy

Closes #2830

See merge request pleroma/pleroma!3690
2022-07-10 16:19:16 +00:00
Sean King 3cf6c2b7ea
Use is_binary instead of is_bitstring for restricted nicknames tests 2022-07-09 23:39:35 -06:00
Tusooa Zhu 2efc0ffcf0
Pass remote follow avatar into media proxy 2022-07-10 00:12:53 -04:00
Tusooa Zhu 04ded94a50
Fix remote emoji in subject disappearing after edits 2022-07-09 18:00:42 -04:00
Ilja 26080b4b5c Fix rate_limiter_test.exs test "it restricts based on config values"
It used a timer to sleep.
But time also goes on when doing other things, so depending on hardware, the timings could be off.
I slightly changed the tests so we still test what we functionally want.
Instead of waiting until the cache expires I now have a function to expire the test and use that.

That means we're not testing any more if the cache really expires after a certain amount of time,
but that's the responsability of the dependency imo, so shouldn't be a problem.

I also changed `Pleroma.Web.Endpoint, :http, :ip` to `127.0.0.1` because that's the setting people typically have,
and I see no reason to do it differently.
Especially since it's an exernal ip, which may come over as weird or suspicious to people.
2022-07-09 07:19:18 +02:00
marcin mikołajczak 0b16ce79f9 Add test for rendering mute expiration date
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-08 20:59:58 +02:00
Tusooa Zhu 11a6e88420
Test that Question updates are viable 2022-07-07 15:22:04 -04:00
Tusooa Zhu 069554e925
Guard against outdated Updates
It is possible for an earlier Update to be received by us later.
For this, we now
(1) only allows Updates to poll counts if there is no updated field,
    or the updated field is the same as the last updated date or
    creation date;
(2) does not allow updating anything if the updated field
    is older than the last updated date or creation date;
(3) allows updating updatable fields otherwise (normal updates);
(4) if only the updated field is changed, it does not create
    a new history item on its own.
2022-07-07 15:11:29 -04:00
Sean King 6e7b919637
Make validation functions for restricted nicknames and blacklisted domains; do restricted nickname validation in LDAP account registration 2022-07-06 20:15:49 -06:00
Tusooa Zhu f84ed44cea
Fix cannot get full history on object fetch 2022-07-06 01:19:53 -04:00
Sean King 0d4aceb9b0
Make checking blacklisted domains and restricted nicknames case-insenstive 2022-07-05 20:36:47 -06:00
Ilja f88ed1df75 Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into fine_grained_moderation_privileges 2022-07-05 12:05:19 +02:00
Ilja 6ef38c6523 Improve tests after code review 2022-07-05 08:57:50 +02:00
Haelwenn 29f4ab640b Merge branch 'from/upstream-develop/tusooa/report-too-long' into 'develop'
Fix long report notes giving errors on creation

See merge request pleroma/pleroma!3679
2022-07-04 05:21:20 +00:00
Haelwenn 8c78fef56f EmojiReactValidator: apply lanodan's suggestions
These changes make the encoding for the fully-qualified heart emoji very visible in editors.
2022-07-04 00:25:54 +00:00
Tusooa Zhu 5ce118d970
Validate object data for incoming Update activities
In Create validator we do not validate the object data,
but that is because the object itself will go through the
pipeline again, which is not the case for Update. Thus,
we added validation for objects in Update activities.
2022-07-03 20:21:46 -04:00
Tusooa Zhu 4367489a3e
Pass history items through ObjectValidator for updatable object types 2022-07-03 20:02:52 -04:00
Tusooa Zhu 4edc867b87 Merge branch 'develop' into 'from/upstream-develop/tusooa/edits'
# Conflicts:
#   lib/pleroma/constants.ex
2022-07-03 22:24:57 +00:00
Haelwenn c50ade26ba Merge branch 'fix/eblurhash-binaries' into 'develop'
mix: update eblurhash to 1.2.2

See merge request pleroma/pleroma!3686
2022-07-03 22:02:17 +00:00
Haelwenn eefa981e0a Merge branch 'indexing-hotspots' into 'develop'
Add index hotspots

See merge request pleroma/pleroma!3664
2022-07-03 22:01:37 +00:00
Haelwenn de37583c49 Merge branch 'image_description_from_exif_data' into 'develop'
Use EXIF data of image for image description

See merge request pleroma/pleroma!3535
2022-07-03 21:14:25 +00:00
Haelwenn a15b45a589 Merge branch 'bugfix/mime-validation-no-list' into 'develop'
Bugfix: Validate mediaType only by it's format

See merge request pleroma/pleroma!3597
2022-07-03 21:04:41 +00:00
Haelwenn 6b937d1473 Merge branch 'from/upstream-develop/tusooa/server-announcements' into 'develop'
Server announcements (1st pass)

See merge request pleroma/pleroma!3643
2022-07-03 20:58:20 +00:00
Hélène c3a0944ce5
mix: update eblurhash to 1.2.2
Previous eblurhash versions bundled precompiled binaries which caused
issues on non-Darwin operating systems.
2022-07-02 14:52:28 +02:00
Ilja 42d4bd3a5d Rename pipelines and add forgotten tags
I renamed some tags before, but forgot to rename the pipelines
I also had some tags which I forgot to add to the config, description, etc.

These have now been done/added
2022-07-02 08:55:14 +02:00
Ilja 15748fd301 Add better explanation in the Cheatsheet about what each tag does 2022-07-02 08:17:22 +02:00
Ilja 51f87ba30c Change order of privilege tags to make more sense
The tags were listed in different places
They were listed in a rather randomly order
I reordered them in a way I think makes more sense
2022-07-02 07:59:46 +02:00
Ilja c0e4b1b3e2 Fix typo's
priviledge |-> privilege
2022-07-02 07:52:39 +02:00
Ilja 56227ef7ba Descriptions from exif data with only whitespeces are considered empty
I noticed that pictures taken with Ubuntu-Touch have whitespace in one of the fields
This should just be ignored imo
2022-07-01 13:47:23 +02:00
Ilja 8c761942b1 update moduledoc 2022-07-01 12:15:02 +02:00
Ilja 4a9ed319b8 Change test pictures
The previous pictures were labeled as public domain, but are actually a collage of pictures under other licenses.

I now replaced them with a jpeg of simply a white pixel.
2022-07-01 12:15:02 +02:00
Ilja 7d234d097c Add option to docs about instance gen 2022-07-01 12:15:02 +02:00
Ilja 81afaee374 Better way of getting keys
I used keyword_list[:key], but if the key doesn't exist, it will return nil. I actually expect a list and further down the code I use that list.
I believe the key should always be present, but in case it's not, it's better to return an empty list instead of nil. That way the code wont fail further down the line.
2022-07-01 12:15:02 +02:00
Ilja 75ea766824 Migration failed when no value for Pleroma.Upload was set 2022-07-01 12:15:02 +02:00
Ilja cc5686bbd6 Migration for exiftool filter
Rename to Exiftool.StripLocation
2022-07-01 12:15:02 +02:00
Ilja d0d48a9e88 Add deprecation warnings 2022-07-01 12:15:02 +02:00
Ilja 8303af84ce Rename the Exiftool module
No migrations or checks yet
2022-07-01 12:15:02 +02:00
Ilja 551721e41a Rename the new module 2022-07-01 12:13:46 +02:00
Ilja cd316d7269 Use EXIF data of image to prefill image description
During attachment upload Pleroma returns a "description" field. Pleroma-fe has an MR to use that to pre-fill the image description field, <https://git.pleroma.social/pleroma/pleroma-fe/-/merge_requests/1399>

* This MR allows Pleroma to read the EXIF data during upload and return the description to the FE
    * If a description is already present (e.g. because a previous module added it), it will use that
    * Otherwise it will read from the EXIF data. First it will check -ImageDescription, if that's empty, it will check -iptc:Caption-Abstract
    * If no description is found, it will simply return nil, just like before
* When people set up a new instance, they will be asked if they want to read metadata and this module will be activated if so

This was taken from an MR i did on Pleroma and isn't finished yet.
2022-07-01 12:13:46 +02:00
Ilja 0d697bc15a Add docs and CHANGELOG entries 2022-07-01 10:50:32 +02:00
Ilja 37fdf148b0 Rename privilege tags
I first focussed on getting things working
Now that they do and we know what tags there are, I put some thought in providing better names

I use the form <what_it_controls>_<what_it_allows_you_to_do>

:statuses_read    => :messages_read
:status_delete    => :messages_delete

:user_read        => :users_read
:user_deletion    => :users_delete
:user_activation  => :users_manage_activation_state
:user_invite      => :users_manage_invites
:user_tag         => :users_manage_tags
:user_credentials => :users_manage_credentials

:report_handle    => :reports_manage_reports

:emoji_management => :emoji_manage_emoji
2022-07-01 10:28:09 +02:00
Hélène 11f9f2ef27
EmojiReactValidator: fix emoji qualification
Tries fully-qualifying emoji when receiving them, by adding the emoji
variation sequence to the received reaction emoji.

This issue arises when other instance software, such as Misskey, tries
reacting with emoji that have unqualified or minimally qualified
variants, like a red heart. Pleroma only accepts fully qualified emoji
in emoji reactions, and refused those emoji. Now, Pleroma will attempt
to properly qualify them first, and reject them if checks still fail.
2022-06-28 21:33:57 +02:00
Tusooa Zhu 014096aeef
Make outbound transmogrifier aware of edit history 2022-06-25 11:20:46 -04:00
Tusooa Zhu 5321fd0012
Do not put meta[:object_data] for local Updates 2022-06-25 10:03:19 -04:00
Tusooa Zhu 9c6dae942d
Fix local updates causing emojis to be lost 2022-06-25 09:23:09 -04:00
Tusooa Zhu e98579b1da
Verify that formerRepresentation provided in Update is used 2022-06-25 01:17:09 -04:00
Tusooa Zhu 40953a8f5c
Reuse formerRepresentations from remote if possible 2022-06-25 01:03:46 -04:00
Tusooa Zhu 99a6f50316
Unify the logic of updating objects 2022-06-25 00:32:22 -04:00
Tusooa Zhu e0d6da4e7d
Fix CommonAPITest 2022-06-24 10:54:11 -04:00
Tusooa Zhu ee07383191
Use meta[:object_data] in SideEffects for Update 2022-06-24 10:28:58 -04:00
Tusooa Zhu 01321c88b5
Convert incoming Updated object into Pleroma format 2022-06-24 10:25:22 -04:00
Tusooa Zhu 06da000c5d
Add editing to features 2022-06-21 12:32:44 -04:00
Ilja 4e4eb81749 Add nodes and privileges to nodeinfo
I didn't add it to /api/v1/instance
I was wondering if I should, but since it e.g. also didn't show staff, it felt better not to
2022-06-21 12:10:27 +02:00
Ilja 211e561e2a Show privileges to FE
I added an extra key
We already had is_admin and is_moderator, now we have an extra privileges key
2022-06-21 12:10:27 +02:00
Ilja 143ea7b80a Add deactivated status for privileged users
Deactivated users are only visible to users privileged with :user_activation since fc317f3b17
Here we also make sure the users who are deactivated get the status deactivated for users who are allowed to see these users
2022-06-21 12:10:27 +02:00
Ilja e21ef5aef3 report notifications for privileged users
Instead of `Pleroma.User.all_superusers()` we now use `Pleroma.User.all_superusers(:report_handle)`

I also changed it for sending emails, but there were no tests.
2022-06-21 12:10:27 +02:00
Ilja 34adea8d28 Add Pleroma.User.all_users_with_privilege/1
This should eventually replace the Pleroma.User.all_superusers/0 function

* I added a new param `is_privileged` in User.query
* Now we can fetch all users with a specified privilege
2022-06-21 12:10:27 +02:00
Ilja a1c8aa4721 Remove function superuser?
Everything now happens with privileged?/2
2022-06-21 12:10:27 +02:00
Ilja eab13fed3e Hide pleroma:report for non-privileged users
Before we deleted the notifications, but that was a side effect and didn't always trigger any more.
Now we just hide them when an unprivileged user asks them.
2022-06-21 12:10:27 +02:00
Ilja e45faddb38 Revert "Delete report notifs when demoting from superuser"
This reverts commit 89667189b8 and cdc5bbe836.

This is a side effect when changing user role.
The goal was to not have report notifications when someone isn't admin or moderator any more.
But this won't be triggered when we change the privilege tags for a role, so we can't use this sollution any more.
There was another solution to filter out report notifications during fetch.
It wasn't merged because this seemed 'cleaner' at the time, but now it seems the better sollution.
I'll add it in the next commit.
2022-06-21 12:10:27 +02:00
Ilja edf0013ff3 User.visible_for/2
According to the tests, this was only used for unconfirmed accounts.
So this just needed to be restricted to users with privilege :user_activation
2022-06-21 12:10:27 +02:00
Ilja bb61cfee8d Validator for deleting statusses is now done with priviledge instead of superuser 2022-06-21 12:10:27 +02:00
Ilja 7cf473c500 delete statusses is now privileged by :status_delete
Instead of superusers, you now need a role with privilige :status_delete to delete other users statusses
I also cleaned up some other stuff I saw
2022-06-21 12:10:27 +02:00
Ilja 7adfc2e0f4 Add Pleroma.User.privileged?/2
This should eventually replace Pleroma.User.superuser?/1
2022-06-21 12:10:27 +02:00
Ilja 9da81f41c6 Fix warning during test user_test.exs
Fixed the warning
    [warning] Please change `clear_config([section], key: value)` to `clear_config([section, key], value)`
2022-06-21 12:10:27 +02:00
Ilja c842e62675 Add last priviliges
I still had three endpoints I didn't really know what to do with them. I added them under separate tags
* :instance_delete
* :moderation_log_read
* :stats_read

I also checked and these are the last changes done by MR https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3480/diffs this is trying to fix
2022-06-21 12:10:27 +02:00
Ilja ecd42a2ce1 Add privilige :emoji_management 2022-06-21 12:10:27 +02:00
Ilja 0ee8f33250 Add privilige :status_delete
It also allows to update a message, so it's not just deleting. I need a better name...
2022-06-21 12:10:27 +02:00
Ilja 34a98990db last off :statuses_read
From the endpoints left to do, I believe these should be under :statuses_read.
These should be the last for that privilege for this MR
2022-06-21 12:10:27 +02:00
Ilja 4cb0dbb5dc Mark relevant tests synchronous
One of the things we do during the tests is change the config. But that's global state and different tests were interfering.
E.g. one test would set `clear_config([:instance, :admin_privileges], [:statuses_read])`, but while that runs, another test may
do `clear_config([:instance, :admin_privileges], [:user_invite])`. Now the code for the first test checks the setting, and it
finds `:user_invite` instead of `:statuses_read`.

Now the modules where this happens are marked to run synchronously, so they don't interfere with each other.
2022-06-21 12:10:27 +02:00
Ilja cbb26262a5 Add privileges for :user_read 2022-06-21 12:10:27 +02:00
Ilja 3f26f1b30f Add privileges for :report_handle 2022-06-21 12:10:27 +02:00
Ilja 14e697a64f Add privileges for :user_invite 2022-06-21 12:10:27 +02:00
Ilja e102d25d23 Add privileges for :user_activation 2022-06-21 12:10:27 +02:00
Ilja cb60cc4e02 Add privileges for :user_tag 2022-06-21 12:10:27 +02:00
Ilja 5a65e2dac5 Remove privileged_staff
Everything that was done through this setting, can now be set by giving the proper privileges to the roles.
2022-06-21 12:10:27 +02:00
Ilja b1ff5241c2 Add priviledges for :statuses_read
This was the last in :require_privileged_staff. I'll remove that in the next commit
2022-06-21 12:10:27 +02:00
Ilja 8a9144ca8b Add priviledges for :user_credentials
I only moved the ones from the :require_privileged_staff block for now
2022-06-21 12:10:27 +02:00
Ilja 9f6c364759 Add privilege :user_deletion 2022-06-21 12:10:27 +02:00
Ilja 5b19543f0a Add new setting and Plug to allow for privilege settings for staff 2022-06-21 12:10:26 +02:00
marcin mikołajczak b0f83aea29 Store mutes expiration date
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-06-16 20:38:37 +02:00
Tusooa Zhu 44613db853
Show original status at the first of history 2022-06-11 19:52:07 -04:00
Tusooa Zhu 95b3922328
Workaround with_index does not support function in Elixir 1.9 2022-06-11 17:02:29 -04:00
Tusooa Zhu 7451f0e81f
Send the correct update in streamer
get_create_by_ap_id_with_object() seems to fetch the old object.
Why this happens needs further investigation.
2022-06-11 12:02:16 -04:00
Tusooa Zhu 27f3d802f2
Expose history and source apis to anon users 2022-06-11 10:35:36 -04:00
Pierre-Louis Bonicoli c8ef57cdda
Add tlsv1.3 to suggestions 2022-06-11 13:59:14 +02:00
Pierre-Louis Bonicoli 05c21ac191
hackney adapter helper & reverse proxy client: enable TLSv1.3
The list of TLS versions was added by
8bd2b6eb13 when hackney version was
pinned to 1.15.2. Later hackney version was upgraded
(166455c884) 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:
0cb7b0ea84.

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-06-11 13:59:14 +02:00
Tusooa Zhu c3593639ad
Fix incorrectly cached content after editing 2022-06-09 11:39:51 -04:00
Tusooa Zhu aafd7a687d
Return the corresponding object id in attachment view 2022-06-08 11:45:24 -04:00
Tusooa Zhu 237b220d71
Add object id to uploaded attachments 2022-06-08 11:05:48 -04:00
lain 75f912c63f Merge branch 'hackney_reenable_TLSv1.3' into 'develop'
hackney adapter helper: enable TLSv1.3

See merge request pleroma/pleroma!3661
2022-06-06 11:36:21 +00:00
Tusooa Zhu d2d3532e5f
Lint 2022-06-05 16:35:01 -04:00
Tusooa Zhu 532f6ae3ed
Return update notification in mastodon api 2022-06-05 16:34:42 -04:00
Tusooa Zhu 06a3998013
Create Update notifications 2022-06-05 15:02:25 -04:00
Tusooa Zhu 97eabb2047
Fix CommonAPITest 2022-06-04 13:15:07 -04:00
Tusooa Zhu fe2d4778ee
Expose content type of status sources 2022-06-04 12:57:30 -04:00
Tusooa Zhu 72ac940618
Fix SideEffectsTest 2022-06-03 21:50:49 -04:00
Tusooa Zhu 3249ac1f12
Show edited_at in MastodonAPI/show 2022-06-03 21:47:40 -04:00
Tusooa Zhu fdaa864083
Test that own edits are streamed 2022-06-03 21:17:16 -04:00
Tusooa Zhu 8bac8147d4
Stream out edits 2022-06-03 21:15:17 -04:00
Tusooa Zhu b096fbba1a
Fix long report notes giving errors on creation 2022-06-02 01:28:39 -04:00
Tusooa Zhu fa31ae50e6
Inject history when object is refetched 2022-06-01 19:49:04 -04:00
Tusooa Zhu 410e177b2a
Strip internal fields in formerRepresentation 2022-06-01 12:02:03 -04:00
Tusooa Zhu b613a9ec6b
Implement mastodon api for editing status 2022-05-31 14:32:28 -04:00
Pierre-Louis Bonicoli 6f23fc8e08
Add tlsv1.3 to suggestions 2022-05-31 00:51:48 +02:00
Pierre-Louis Bonicoli a158774364
hackney adapter helper & reverse proxy client: enable TLSv1.3
The list of TLS versions was added by
8bd2b6eb13 when hackney version was
pinned to 1.15.2. Later hackney version was upgraded
(166455c884) 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:
0cb7b0ea84.

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-31 00:51:45 +02:00
Sam Therapy bbfcb44083
Add more reacts to MRF
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-05-30 15:36:54 +02:00
Tusooa Zhu 393b508846
Implement viewing source 2022-05-30 00:59:23 -04:00
Tusooa Zhu c004eb0fa2
Implement mastodon api for showing edit history 2022-05-29 23:50:31 -04:00
Tusooa Zhu 8acfe95f3e
Allow updating polls 2022-05-29 22:16:03 -04:00
Tusooa Zhu 5e8aac0e07
Record edit history for Note and Question Updates 2022-05-29 13:54:16 -04:00
Tusooa Zhu 0f6a5eb9a2
Handle Note and Question Updates 2022-05-29 12:54:57 -04:00
Tusooa Zhu 547def67a7
Allow Updates by every actor on the same origin 2022-05-29 11:36:00 -04:00
Pete 6a3a0270a2
Add index hotspots
squash
2022-05-26 20:08:17 +02:00
lewdthewides 45fd8e2521
Instruct users to run 'git pull' as the pleroma user 2022-05-26 20:06:41 +02:00
Hélène bb768244a4
StealEmojiPolicy: fix String rejected_shortcodes
* 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-26 20:06:41 +02:00
Haelwenn 7466136ad3 Merge branch 'lewdthewides-develop-patch-48691' into 'develop'
Instruct users to run 'git pull' as the pleroma user

See merge request pleroma/pleroma!3667
2022-05-22 17:09:54 +00:00
duponin 5ca1ac041f BBS: add repeat functionality 2022-05-22 03:19:24 +02:00
duponin 5951d637a9 BBS: show post ID when posted 2022-05-22 02:40:56 +02:00
duponin fffd9059d6 BBS: add post favourite feature 2022-05-22 02:39:56 +02:00
Hélène a4659d993d Apply Hélène suggestions 2022-05-21 23:23:55 +00:00
duponin e3e8ff06f9 BBS: mark notification as read 2022-05-21 05:10:48 +02:00
duponin c04c7f9e45 BBS: show notifactions 2022-05-21 05:10:22 +02:00
duponin 33ced2c2ed BBS: put a new line for each HTML break in an activity
Otherwise it would just put each line on the first one, which is not
really readable
2022-05-21 04:17:34 +02:00
lain bdca5f5d68 Merge branch 'fix/mrf-steal-emoji-regex' into 'develop'
StealEmojiPolicy: fix String rejected_shortcodes

See merge request pleroma/pleroma!3673
2022-05-19 08:55:39 +00:00
duponin b128e1d6c5 decode HTML to be human readable in BBS 2022-05-19 01:38:13 +02:00
duponin 5086d6d5e9 add thread show in BBS frontend 2022-05-19 00:56:20 +02:00
Hélène a74ce2d77a
StealEmojiPolicy: fix String rejected_shortcodes
* 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-18 21:25:10 +02:00
duponin 39c47073a3 fix Ctrl-c catch on SSH BBS 2022-05-18 20:06:16 +02:00
duponin e606b9ab3f add missing extra application to start the SSH BBS 2022-05-18 20:05:42 +02:00
lewdthewides 7977dd6ac7 Instruct users to run 'git pull' as the pleroma user 2022-05-12 16:02:58 +00:00
Tusooa Zhu f1722a9f4a
Make lint happy
Ref: fix-local-public
2022-05-09 18:53:32 -04:00
Tusooa Zhu 6e5ef7f2eb
Test local-only in ap c2s outbox
Ref: fix-local-public
2022-05-09 18:53:32 -04:00
Tusooa Zhu 38444aa92a
Allow authenticated users to access local-only posts in MastoAPI
Ref: fix-local-public
2022-05-09 18:53:18 -04:00
Ilja 75169a45f6
Also use actor_type to determine if an account is a bot in antiFollowbotPolicy 2022-05-09 10:44:43 -05:00
Haelwenn (lanodan) Monnier 7b25571fb8
mix: Bump to 2.4.52 for 2.4.3 mergeback 2022-05-09 10:44:43 -05:00
Tusooa Zhu ecf4e51849
Skip cache when /objects or /activities is authenticated
Ref: fix-local-public
2022-05-09 10:44:43 -05:00
Tusooa Zhu 370a241dbc
Allow to skip cache in Cache plug
Ref: fix-local-public
2022-05-09 10:44:43 -05:00
Ilja 0fe674d898
update sweet_xml [Security] 2022-05-09 10:44:43 -05:00
Tusooa Zhu f52283004b
Fix incorrect fallback when English is set to first language 2022-05-09 10:44:43 -05:00
Ilja d48ade7629
Fix eratic test for POST /api/pleroma/admin/reports/:id/notes
It retrieved two ReportNotes and then checked one of them. But the order isn't guaranteed, while the test tested on the content of the first ReportNote.

I made the test on the content more generic
2022-05-09 10:44:43 -05:00
Tusooa Zhu 57faa36243
Support fallbacking to other languages 2022-05-09 10:44:43 -05:00
Tusooa Zhu ed9681270e
Lint 2022-05-09 10:44:43 -05:00
Tusooa Zhu 20c6b3c597
Support multiple locales from userLanguage cookie 2022-05-09 10:44:43 -05:00
Tusooa Zhu f3b7ee7836
Support multiple locales formally
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-05-09 10:44:43 -05:00
Tusooa Zhu ef1a046a2d
Make lint happy 2022-05-09 10:44:43 -05:00
Tusooa Zhu 2b8a625083
Add test for fallbacking to a general language 2022-05-09 10:44:43 -05:00
Tusooa Zhu 3e5bfa03d0
Fallback to a variant if the language in general is not supported
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-05-09 10:44:43 -05:00
Tusooa Zhu 887720158f
Add changelog 2022-05-09 10:44:43 -05:00
Tusooa Zhu d3c818700f
Document API addition 2022-05-09 10:44:43 -05:00
Tusooa Zhu d831e57089
Allow user to register with custom language 2022-05-09 10:44:43 -05:00
Tusooa Zhu 4157fe8e11
Allow update_credentials to update User.language 2022-05-09 10:44:43 -05:00
Tusooa Zhu 8e1d3b5591
Send emails i18n'd using backend-stored user language 2022-05-09 10:44:43 -05:00
Tusooa Zhu a4d9251cab
Make all emails translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 7e05ec625d
Fix digest test 2022-05-09 10:44:43 -05:00
Tusooa Zhu dff9733943
Make mail and mailer translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu c7dff104ea
Make static fe translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu be33d11d69
Fix tests 2022-05-09 10:44:43 -05:00
Tusooa Zhu 87d54a0ab0
Make mfa pages translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 5c674211ea
Make oauth pages translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 0ffb91a2d3
Use proper lang attributes in htmls 2022-05-09 10:44:43 -05:00
Tusooa Zhu 95b905443c
Make tag feed translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 7b467dd955
Make password reset pages translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu ece007c6f9
Make lint happy 2022-05-09 10:44:43 -05:00
Tusooa Zhu 4446fc675b
Extract translatable text 2022-05-09 10:44:43 -05:00
Tusooa Zhu 304fad22b2
Make remote follow pages translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 2e69846e65
Prefer userLanguage cookie over Accept-Language header in detecting locale
https://git.pleroma.social/pleroma/pleroma-meta/-/issues/60
2022-05-09 10:44:43 -05:00
sleepycrow fd551b84b2
Update Caddyfile to Caddy v2 2022-05-09 10:44:43 -05:00
Ilja e49d8aba86
After code review
Use patern matching to see if someone was superuser before
2022-05-09 10:44:43 -05:00
Ilja d3ad9e927d
Delete report notifs when demoting from superuser
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-05-09 10:44:43 -05:00
Haelwenn 4605efe272 Merge branch 'improve_anti_followbot_policy' into 'develop'
Also use actor_type to determine if an account is a bot in antiFollowbotPolicy

Closes #2561

See merge request pleroma/pleroma!3498
2022-05-08 18:10:40 +00:00
Ilja a8093732bd Also use actor_type to determine if an account is a bot in antiFollowbotPolicy 2022-05-08 18:10:40 +00:00
Tusooa Zhu 221cb3fb81
Allow users to create backups without providing email address
Ref: backup-without-email
2022-05-07 00:23:55 -04:00
Pete aa51fd068b Add index hotspots
squash
2022-05-06 18:48:08 -07:00
Tusooa Zhu fe933b9bf2
Prevent remote access of local-only posts via /objects
Ref: fix-local-public
2022-05-06 13:54:21 -04:00
Tusooa Zhu 466568ae36
Lint
Ref: fix-local-public
2022-05-06 13:54:13 -04:00
Tusooa Zhu 826deb7375
Make local-only statuses searchable
Ref: fix-local-public
2022-05-06 13:54:13 -04:00
Tusooa Zhu 38af42968d
Test that anonymous users cannot see local-only posts
Ref: fix-local-public
2022-05-06 13:54:12 -04:00
Tusooa Zhu c48be59f58
Show local-only statuses in public timeline for authenticated users
Ref: fix-local-public
2022-05-06 13:54:02 -04:00
Haelwenn 214ef7ff73 Merge branch 'security/2.4.3-develop' into 'develop'
Merge back 2.4.3

See merge request pleroma/pleroma!3663
2022-05-06 08:27:03 +00:00
Haelwenn (lanodan) Monnier f9943b2065 mix: Bump to 2.4.52 for 2.4.3 mergeback 2022-05-06 10:23:43 +02:00
Tusooa Zhu 57c030a0a7 Skip cache when /objects or /activities is authenticated
Ref: fix-local-public
2022-05-06 10:23:26 +02:00
Tusooa Zhu e2d24eda57 Allow to skip cache in Cache plug
Ref: fix-local-public
2022-05-06 10:23:26 +02:00
Ilja c3b2b71ea2 update sweet_xml [Security] 2022-05-06 10:23:25 +02:00
Haelwenn b22843a982 Merge branch 'security/2.4.3' into 'stable'
Release: 2.4.3

See merge request pleroma/pleroma!3662
2022-05-06 08:19:03 +00:00
Haelwenn (lanodan) Monnier 57c486014c Release 2.4.3 2022-05-06 09:01:33 +02:00
Tusooa Zhu fa3157df96 Skip cache when /objects or /activities is authenticated
Ref: fix-local-public
2022-05-06 08:44:03 +02:00
Tusooa Zhu 4d482b765f Allow to skip cache in Cache plug
Ref: fix-local-public
2022-05-06 08:39:42 +02:00
Ilja 85cbf773f0 update sweet_xml [Security] 2022-05-06 08:36:58 +02:00
Haelwenn 8517bc18aa Merge branch 'from/upstream-develop/tusooa/fix-en-fallback' into 'develop'
Fix incorrect fallback when English is set to first language

See merge request pleroma/pleroma!3656
2022-04-18 03:31:44 +00:00
Tusooa Zhu be08d9305b
Fix incorrect fallback when English is set to first language 2022-04-17 22:39:52 -04:00
Tusooa Zhu 6599607226
Translate static_pages.po (Simplified Chinese) 2022-04-07 17:42:19 -04:00
Haelwenn a5d7e98de0 Merge branch 'fix_eratic_test_for_report_notes' into 'develop'
Fix eratic test for POST /api/pleroma/admin/reports/:id/notes

See merge request pleroma/pleroma!3653
2022-04-05 12:11:53 +00:00
Ilja 5f37db330f Fix eratic test for POST /api/pleroma/admin/reports/:id/notes
It retrieved two ReportNotes and then checked one of them. But the order isn't guaranteed, while the test tested on the content of the first ReportNote.

I made the test on the content more generic
2022-04-05 13:21:09 +02:00
Tusooa Zhu 7d1dae3bef
Restrict mastodon api announcements to logged-in users only 2022-04-02 02:25:13 -04:00
marcin mikołajczak fbf9eced11 Add short_description field
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-29 14:04:27 +02:00
Sean King 4194559ea6
Fix lint errors 2022-03-20 17:26:07 -06:00
Haelwenn d7c53da77a Merge branch 'from/upstream-develop/tusooa/translate-pages' into 'develop'
Translate backend-rendered pages

See merge request pleroma/pleroma!3634
2022-03-20 18:14:37 +00:00
Haelwenn e63d49d238 Merge branch 'caddyfile-v2' into 'develop'
Update Caddyfile to Caddy v2

Closes #2764

See merge request pleroma/pleroma!3641
2022-03-20 18:14:00 +00:00
Haelwenn b76340511d Merge branch 'delete_report_notifs_when_demoting_from_superuser' into 'develop'
Delete report notifs when demoting from superuser

Closes #2840

See merge request pleroma/pleroma!3642
2022-03-20 18:13:19 +00:00
Sean King d0c1997d48
Rewrite integration-test websocket client with Mint.WebSocket 2022-03-19 23:33:37 -06:00
Sam Therapy 05facac1a4
ReactToLike: add missing emojis, make the log clear 2022-03-19 18:39:10 +01:00
Sam Therapy 5e7e56e305
Add a react to like MRF
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-03-19 18:09:22 +01:00
Haelwenn (lanodan) Monnier 46da3d8168
mix: Check .git presence 2022-03-19 16:57:39 +01:00
Ilja 28c37dc386
Fix test get_user_apps/1
For some reason I had a test who suddenly failed, mix test test/pleroma/web/o_auth/app_test.exs:54. A user has a list of applications and this test adds them and then sees if the list it gets back is the same as the apps it added.

When I ran mix test a day before I didn't have this problem and when I pushed code today in a different MR, the pipeline succeeded (see https://git.pleroma.social/ilja/pleroma/-/jobs/205827), yet locally it failed. So it seems the test can sometimes succeed and sometimes fail, which makes it untrustworthy.

The failure I see is because the returned list is in reverse order. I assume that's not per sé wrong. You just want to know if the apps you added are actually there. I fixed the test by first ordering the lists before comparing.

AFAICT (and as far as that's relevant) the test got introduced in commit cb2a072e62
2022-03-19 16:57:38 +01:00
Tusooa Zhu 0c78ab4a88
Use utc_datetime in db schema 2022-03-18 11:17:22 -04:00
Haelwenn (lanodan) Monnier 83338c25a5 Transmogrifier: Use validating regex for "mediaType" 2022-03-17 22:37:26 +01:00
Haelwenn (lanodan) Monnier 030183b35f AttachmentValidator: Use custom ecto type and regex for "mediaType" 2022-03-17 22:37:26 +01:00
Haelwenn (lanodan) Monnier 4ea9886faa EctoType: Add MIME validator 2022-03-17 22:37:26 +01:00
Haelwenn 2db640632b Merge branch 'bugfix/mix-dotgit' into 'develop'
mix: Check `.git` presence

See merge request pleroma/pleroma!3638
2022-03-17 21:21:59 +00:00
marcin mikołajczak 31ff467eff Use `types` for filtering notifications
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-16 21:15:44 +01:00
marcin mikołajczak ffe081bf44 Use reject_follow_request
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-16 19:18:15 +01:00
marcin mikołajczak 6754d1f272 POST /api/v1/accounts/:id/remove_from_followers
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-16 16:52:33 +01:00
Tusooa Zhu ebcda5265b
Format announcements into html 2022-03-08 23:00:51 -05:00
Tusooa Zhu 0e0a1758f7
Add doc for Admin Announcement APIs 2022-03-08 21:48:41 -05:00
Tusooa Zhu eb1a29640f
Add pagination to AdminAPI.AnnouncementController.index 2022-03-08 21:26:05 -05:00
Tusooa Zhu 11a1996bf5
Implement update announcement admin api 2022-03-08 20:55:41 -05:00
Tusooa Zhu 881179ec72
Remove GET /api/v1/announcements/:id 2022-03-08 19:22:28 -05:00
Tusooa Zhu d569694ae9
Show only visible announcements in MastodonAPI 2022-03-08 19:20:29 -05:00
Tusooa Zhu cf8334dbc1
Add starts_at, ends_at and all_day parameters 2022-03-08 19:12:01 -05:00
Tusooa Zhu fcf3c9057e
Implement visibility filtering for announcements 2022-03-08 18:21:20 -05:00
Tusooa Zhu 009817c9ee
Correct docstring for AnnouncementController.show 2022-03-08 17:00:49 -05:00
Tusooa Zhu 2b39b36e49
Implement POST /api/v1/announcements/:id/dismiss 2022-03-08 16:59:20 -05:00
Tusooa Zhu aa1fff279e
Implement GET /api/v1/announcements/:id 2022-03-08 16:19:35 -05:00
Tusooa Zhu 5169ad8f14
Implement announcement read relationships 2022-03-08 13:09:49 -05:00
Tusooa Zhu c867d23250
Fill properties of announcements from Mastodon API spec 2022-03-08 09:35:35 -05:00
Tusooa Zhu d7af67012f
Implement first pass of announcement admin api
CCBUG: https://git.pleroma.social/pleroma/pleroma/-/issues/2836
CCBUG: https://git.pleroma.social/pleroma/pleroma/-/issues/1470
2022-03-08 01:01:27 -05:00
Ilja cdc5bbe836 After code review
Use patern matching to see if someone was superuser before
2022-03-07 14:00:42 +01:00
Haelwenn 4458db3201 Merge branch 'fix_test_get_user_apps' into 'develop'
Fix test get_user_apps/1

See merge request pleroma/pleroma!3636
2022-03-06 18:40:49 +00:00
Haelwenn ee32e36b01 Merge branch 'copyright-bump-2022' into 'develop'
Copyright bump for 2022

See merge request pleroma/pleroma!3593
2022-03-06 18:29:37 +00:00
Tusooa Zhu 79ccb6b999
Support fallbacking to other languages 2022-03-06 11:43:31 -05:00
Ilja 89667189b8 Delete report notifs when demoting from superuser
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-06 17:36:30 +01:00
sleepycrow 9b69ccb35b Update Caddyfile to Caddy v2 2022-03-06 14:24:32 +01:00
feld 9d518b65fd
Revert "Merge branch 'revert/notice-routes' into 'develop'"
This reverts merge request !3576
2022-03-05 00:34:01 +01:00
Sean King 2842684e81
Revert "Merge branch 'notice-routes' into 'develop'" 2022-03-05 00:34:00 +01:00
Tusooa Zhu cd42e2bed0
Lint 2022-03-03 09:49:55 -05:00
Tusooa Zhu aca11fb70e
Support multiple locales from userLanguage cookie 2022-03-03 02:31:36 -05:00
Tusooa Zhu 7ea330b4fe
Support multiple locales formally
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-03 02:03:44 -05:00
Tusooa Zhu d3f3f30c6a
Make lint happy 2022-03-02 22:56:19 -05:00
Tusooa Zhu bc59da96c5
Add test for fallbacking to a general language 2022-03-02 20:04:30 -05:00
Tusooa Zhu 8de573b047
Fallback to a variant if the language in general is not supported
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-02 19:59:11 -05:00
Tusooa Zhu 1a917cfeec
Add changelog 2022-03-02 09:51:46 -05:00
Tusooa Zhu 5e38887080
Document API addition 2022-03-02 09:47:51 -05:00
Tusooa Zhu e644f8dea5
Allow user to register with custom language 2022-03-02 01:41:13 -05:00
Tusooa Zhu 396f036b13
Allow update_credentials to update User.language 2022-03-02 00:58:02 -05:00
Tusooa Zhu 0149ea4538
Send emails i18n'd using backend-stored user language 2022-03-01 22:19:13 -05:00
Tusooa Zhu af82f09ce3
Make all emails translatable 2022-03-01 20:45:59 -05:00
Tusooa Zhu 8b0c2890f9
Fix digest test 2022-03-01 20:27:45 -05:00
Tusooa Zhu 1deab33fb0
Make mail and mailer translatable 2022-03-01 19:17:11 -05:00
Tusooa Zhu 32e4aa42d3
Make static fe translatable 2022-03-01 18:48:08 -05:00
feld 0b686c6e54 Merge branch 'revert-ee05abe0' into 'develop'
Revert "Merge branch 'revert/notice-routes' into 'develop'"

See merge request pleroma/pleroma!3639
2022-03-01 19:02:48 +00:00
feld 9c52a496f7 Revert "Merge branch 'revert/notice-routes' into 'develop'"
This reverts merge request !3576
2022-03-01 19:02:28 +00:00
Tusooa Zhu fdbf9b06e5
Fix tests 2022-02-28 11:23:15 -05:00
Tusooa Zhu cadca083ea
Make mfa pages translatable 2022-02-28 11:07:28 -05:00
Tusooa Zhu 50a316cd63
Make oauth pages translatable 2022-02-28 02:11:57 -05:00
Tusooa Zhu f63d9b7835
Use proper lang attributes in htmls 2022-02-28 01:28:23 -05:00
Tusooa Zhu 0cc6557716
Make tag feed translatable 2022-02-28 01:13:39 -05:00
Tusooa Zhu 1edbda39e1
Make password reset pages translatable 2022-02-28 01:04:04 -05:00
HJ ee05abe052 Merge branch 'revert/notice-routes' into 'develop'
Revert notice compatibility routes merge request

See merge request pleroma/pleroma!3576
2022-02-26 16:24:49 +00:00
Sean King 17aa3644be
Copyright bump for 2022 2022-02-25 23:11:42 -07:00
Haelwenn (lanodan) Monnier 56197192bb mix: Check .git presence 2022-02-25 10:39:12 +01:00
Ilja 6ba93c2cb3 Fix test get_user_apps/1
For some reason I had a test who suddenly failed, mix test test/pleroma/web/o_auth/app_test.exs:54. A user has a list of applications and this test adds them and then sees if the list it gets back is the same as the apps it added.

When I ran mix test a day before I didn't have this problem and when I pushed code today in a different MR, the pipeline succeeded (see https://git.pleroma.social/ilja/pleroma/-/jobs/205827), yet locally it failed. So it seems the test can sometimes succeed and sometimes fail, which makes it untrustworthy.

The failure I see is because the returned list is in reverse order. I assume that's not per sé wrong. You just want to know if the apps you added are actually there. I fixed the test by first ordering the lists before comparing.

AFAICT (and as far as that's relevant) the test got introduced in commit cb2a072e62
2022-02-22 18:56:26 +01:00
Tusooa Zhu 9f4c5743e8
Make lint happy 2022-02-21 19:12:32 -05:00
Tusooa Zhu 2fa1ca84e6
Extract translatable text 2022-02-21 18:44:36 -05:00
Tusooa Zhu a867107437
Make remote follow pages translatable 2022-02-21 18:43:45 -05:00
Sam Therapy a665b34769
Add unicode 14 support
and add a test with a unicode 14 emoji
2022-02-21 17:27:22 -06:00
Tusooa Zhu 0fd3695b9c
Prefer userLanguage cookie over Accept-Language header in detecting locale
https://git.pleroma.social/pleroma/pleroma-meta/-/issues/60
2022-02-21 18:02:19 -05:00
lain d91e9cee04 Merge branch 'unicode-14.0-backend' into 'develop'
Unicode 14 Support

See merge request pleroma/pleroma!3633
2022-02-21 19:38:52 +00:00
Sam Therapy 061cb749cd
Add unicode 14 support
and add a test with a unicode 14 emoji
2022-02-21 12:28:33 -06:00
Sam Therapy 12d45faa0d
Unicode 14.0 support 2022-02-21 12:16:06 -06:00
Sam Therapy 0fb1684fb7
Update copyright, also
https://codeberg.org/newroma-dev/newroma/pulls/12

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-02-12 11:53:32 -06:00
Sam Therapy 33c0a207ba
Shove all changes in one commit
Moderators: reorganize :admin_api pipeline in Router

Add block notify from Soapbox
2022-02-12 11:53:32 -06:00
Alex Gleason fa8e2ffa3f Merge branch 'max_media_attachments' into 'develop'
Allow specifying max media attachment count

Closes #2665

See merge request pleroma/pleroma!3630
2022-02-06 18:25:14 +00:00
marcin mikołajczak e473bcf7a0 Max media attachment count
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-06 17:41:15 +01:00
Alex Gleason 60deddb7e5 Merge branch 'fix-tests-warn' into 'develop'
Fix tests matching on "warn"

See merge request pleroma/pleroma!3629
2022-02-02 19:57:03 +00:00
Alex Gleason 7c044a1841
FilterControllerTest: tag erratic test 2022-02-02 13:10:39 -06:00
Haelwenn (lanodan) Monnier d1cc9e4eaf
Fix tests matching on "warn"
Moving it to "warning" would break tests on 1.12.x
2022-02-02 12:45:26 -06:00
Alex Gleason 71c80204c9 Merge branch 'roadhouse' into 'develop'
Roadhouse debugging

See merge request pleroma/pleroma!3628
2022-02-02 18:44:09 +00:00
Alex Gleason bd81af731e
Tag erratic test 2022-02-02 12:29:53 -06:00
Alex Gleason 2d77976305
Add tests for mismatched context in replies 2022-02-02 12:19:35 -06:00
Alex Gleason 5a4e3aa715
Test that a Create/Note from Roadhouse validates 2022-02-02 11:02:23 -06:00
Alex Gleason 61dfeca1cc
Test that a Note from Roadhouse validates 2022-02-02 10:38:30 -06:00
Alex Gleason de99fd7804 Merge branch 'birth-dates' into 'develop'
Birthdays: Fix outgoing federation of birth dates

See merge request pleroma/pleroma!3626
2022-02-01 15:21:34 +00:00
marcin mikołajczak f8f2a17754 Birthdays: Fix outgoing federation of birth dates
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-01 12:00:26 +01:00
Alex Gleason 64944c164f Merge branch 'mention-mrf-md' into 'develop'
ForceMentionsInContent: improve display of Markdown posts

See merge request pleroma/pleroma!3625
2022-01-28 16:53:40 +00:00
Alex Gleason 3bf257171f
ForceMentionsInContent: improve display of Markdown posts 2022-01-27 14:15:06 -06:00
Alex Gleason a146f6acab Merge branch 'mentions-mrf-replies-only' into 'develop'
ForceMentionsInContent: don't apply it to top-level posts

See merge request pleroma/pleroma!3624
2022-01-27 19:57:28 +00:00
Alex Gleason 27cb3d6273
ForceMentionsInContent: don't apply it to top-level posts 2022-01-26 21:24:26 -06:00
Alex Gleason 2bab9dd175 Merge branch 'fix-bot-policy' into 'develop'
ForceBotUnlistedPolicy: fix to stop unlisting my posts >:(

See merge request pleroma/pleroma!3623
2022-01-26 23:25:58 +00:00
bot a4de79ced0 ForceBotUnlistedPolicy: fix to stop unlisting my posts >:( 2022-01-26 22:53:02 +00:00
Alex Gleason 8951be7710 Merge branch 'inline-mention-self' into 'develop'
ForceMentionsInContent: don't mention self

See merge request pleroma/pleroma!3622
2022-01-25 21:49:33 +00:00
Alex Gleason 0604b0dd09
ForceMentionsInContent: don't mention self 2022-01-25 12:33:47 -06:00
Alex Gleason 0f4e0e667e Merge branch 'recipients-inline' into 'develop'
ForceMentionsInContent: wrap mentions in a span, fix the formatting

See merge request pleroma/pleroma!3620
2022-01-25 17:43:39 +00:00
Alex Gleason 99e9c2c668 Merge branch 'birth-dates' into 'develop'
Fix show_birthday

See merge request pleroma/pleroma!3621
2022-01-25 16:59:07 +00:00
Alex Gleason 65b4d2ce84
ForceMentionsInContent: fix order of mentions 2022-01-25 10:42:34 -06:00
marcin mikołajczak ab12a05a43 AccountView: Add test for show_birthday
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-25 17:34:36 +01:00
marcin mikołajczak c1ae35ff2c Fix show_birthday
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-25 17:04:41 +01:00
Alex Gleason dd7977bb68 Merge branch 'birth-dates' into 'develop'
Birth dates

See merge request pleroma/pleroma!3608
2022-01-25 15:35:47 +00:00
marcin mikołajczak 249fe88d12 Birthdays: users_birthday_month_day_index
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-25 11:49:42 +01:00
Alex Gleason 267184b70e
ForceMentionsInContentTest: return mentions in a not terrible format 2022-01-24 20:03:43 -06:00
Alex Gleason c5a20c80c4
ForceMentionsInContent: simplify finding users 2022-01-24 19:44:44 -06:00
Alex Gleason d5644a52aa
ForceMentionsInContent: wrap inline mentions with span tag 2022-01-24 19:11:45 -06:00
Alex Gleason 1bbc701a3a
ForceMentionsInContent: use `to` instead of `tag` 2022-01-24 19:11:14 -06:00
Alex Gleason 19d557c870 Merge branch 'revert-6e27fc9c' into 'develop'
Revert "Merge branch 'log-slow-queries' into 'develop'"

See merge request pleroma/pleroma!3619
2022-01-24 19:06:33 +00:00
Alex Gleason 53de3a9d44 Revert "Merge branch 'log-slow-queries' into 'develop'"
This reverts merge request !3553
2022-01-24 18:54:43 +00:00
Alex Gleason 7b87cac6cc Merge branch 'preserve-mentions-order' into 'develop'
Preserve order of mentioned users

See merge request pleroma/pleroma!3617
2022-01-23 15:23:56 +00:00
marcin mikołajczak 75c4fefb1c Add a test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-23 13:03:00 +01:00
marcin mikołajczak 1dba3bc4dc Preserve order of mentioned users
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-23 12:29:01 +01:00
marcin mikołajczak 61bae9a407 Create index for `show_birthday`
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-23 12:07:05 +01:00
marcin mikołajczak e3d394eef6 Birthdays: Fix tests, add test for misskey
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-23 09:41:21 +01:00
marcin mikołajczak 0266bc3c96 Birthdays: hide_birthday -> show_birthday
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-23 09:13:33 +01:00
Alex Gleason aaa9314f4c
Merge remote-tracking branch 'origin/develop' into birth-dates 2022-01-22 14:24:50 -06:00
Alex Gleason 9983799ccb Merge branch 'less_erratic_expiration_test' into 'develop'
Make test less erratic by adding five second tolerance

See merge request pleroma/pleroma!3614
2022-01-22 20:09:09 +00:00
Alex Gleason 98ce239ebc
Update description.exs 2022-01-22 13:28:00 -06:00
Alex Gleason 66e8c6f90f
Birthdays: birth_date --> birthday 2022-01-22 13:21:55 -06:00
NEETzsche 7a015b1fe2 Make test less erratic by adding five second tolerance 2022-01-22 12:07:54 -07:00
Alex Gleason 263b42a73d Merge branch 'apple_autofill_suggestions' into 'develop'
Add autocompelete values suggested by Apple

See merge request pleroma/pleroma!3612
2022-01-22 18:38:03 +00:00
Alex Gleason 78c6aeee1b Merge branch 'erratic-filter-test' into 'develop'
FilterTest: tag erratic test

See merge request pleroma/pleroma!3613
2022-01-22 18:32:34 +00:00
Alex Gleason f5d4ef50b4
FilterTest: tag erratic test 2022-01-22 12:13:09 -06:00
Finn Behrens 8328289619 Add autocompelete values suggested by Apple
Link: https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element
2022-01-22 10:00:43 +01:00
Finn Behrens 7b56690af4 add nixos to supported distros 2022-01-22 09:39:02 +01:00
Alex Gleason 6ffe43af70 Merge branch 'private-pins' into 'develop'
Support private pinned posts from Mastodon

See merge request pleroma/pleroma!3611
2022-01-20 23:18:24 +00:00
Alex Gleason 560bcd58ab Merge branch 'from/develop/tusooa/add-glitch-lily' into 'develop'
Add glitch-lily to clients.md

See merge request pleroma/pleroma!3610
2022-01-20 23:11:35 +00:00
Alex Gleason 00523bdf5e
Test pinned private statuses in AccountController 2022-01-20 16:54:43 -06:00
marcin mikołajczak 88c21b9282 Support private pinned posts from Mastodon
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-20 12:35:32 +01:00
Tusooa Zhu 9faac1094f
Add glitch-lily to clients.md 2022-01-19 23:56:57 -05:00
rinpatch 787a02c4b1 Merge branch 'feat/force-mentions-mrf' into 'develop'
Add ForceMentionsInContentPolicy

See merge request pleroma/pleroma!3609
2022-01-20 00:27:29 +00:00
marcin mikołajczak 74cf0f0355 Update changelog
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-19 23:52:46 +01:00
rinpatch a02cfd7f52 Add ForceMentionsInContentPolicy
Even though latest PleromaFE supports displaying these properly, mobile
apps still exist, so I think we should offer a workaround to those who
want it.
2022-01-19 21:04:57 +03:00
marcin mikołajczak c180f9276f check if remote bday is valid
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-19 17:19:28 +01:00
marcin mikołajczak dfb2808535 Birth dates: Add tests
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-18 23:15:31 +01:00
marcin mikołajczak 397f67fef8 Format code, expose instance configuration related to birth dates
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-18 18:18:38 +01:00
Alex Gleason 70fbd1f09e Merge branch 'document-oauth-tokens' into 'develop'
Docs: PleromaAPI oauth_tokens endpoints

See merge request pleroma/pleroma!3607
2022-01-18 17:18:00 +00:00
Alex Gleason 1dfb67f1e0
Docs: PleromaAPI oauth_tokens endpoints 2022-01-18 11:02:23 -06:00
Alex Gleason 69b089c894 Merge branch 'erratic-allow-failure' into 'develop'
unit-testing-erratic: allow failure

See merge request pleroma/pleroma!3606
2022-01-18 14:56:26 +00:00
marcin mikołajczak b108b05650 Birth dates, birthday reminders API, allow instance admins to require minimum age
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-18 14:57:48 +01:00
Alex Gleason 72d5e29117 Merge branch 'hakabahitoyo-develop-patch-44025' into 'develop'
[Document] Update cheatsheet.md. Add `Pleroma.Web.ActivityPub.MRF.KeywordPolicy`.

See merge request pleroma/pleroma!3604
2022-01-18 13:18:36 +00:00
Alex Gleason ac434f83c3
unit-testing-erratic: allow failure 2022-01-15 13:35:22 -06:00
Alex Gleason ecdc81b37a Merge branch 'linkify-0.5.2' into 'develop'
Upgrade Linkify to v0.5.2

Closes #2376, #2386, and #2485

See merge request pleroma/pleroma!3605
2022-01-15 19:13:56 +00:00
Alex Gleason 39c5ebb1f6
mix format 2022-01-15 12:55:12 -06:00
Alex Gleason cd8f1aac47
CHANGELOG: hashtags markdown fix 2022-01-15 12:36:33 -06:00
Alex Gleason 31148c1857
FormatterTest: fix nesting in expected output 2022-01-15 12:31:36 -06:00
Alex Gleason db90c9e3b0
Merge remote-tracking branch 'mkfain/test-for-breaking-markdown' into linkify-0.5.2 2022-01-15 12:27:42 -06:00
Alex Gleason d5eb44e8b3
Upgrade Linkify to v0.5.2 2022-01-15 12:27:16 -06:00
Hakaba Hitoyo 790081540d Update cheatsheet.md. Add `Pleroma.Web.ActivityPub.MRF.KeywordPolicy`. 2022-01-15 12:26:33 +00:00
Alex Gleason 71baa713bc Merge branch 'show_blockers_visible' into 'develop'
Add blockers_visible to features list when it's enabled

See merge request pleroma/pleroma!3603
2022-01-14 23:08:34 +00:00
NEETzsche 6284353025 Add blockers_visible to features list when it's enabled 2022-01-14 23:08:33 +00:00
rinpatch 8b5a658991 Merge branch 'mergeback' into 'develop'
Merge stable back into develop

Closes #2753

See merge request pleroma/pleroma!3602
2022-01-14 22:15:10 +00:00
Alex Gleason a4436bcc3f
Merge remote-tracking branch 'origin/stable' into mergeback 2022-01-14 12:37:00 -06:00
Alex Gleason 84dcb55b0f Merge branch 'account-endorsements' into 'develop'
Account endorsements

See merge request pleroma/pleroma!3601
2022-01-13 19:02:21 +00:00
marcin mikołajczak eedf551eed Add more tests
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-12 22:41:34 +01:00
marcin mikołajczak 0f90fd5805 WIP account endorsements
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-12 18:15:10 +01:00
rinpatch 62a45747d9 Merge branch 'release/2.4.2' into 'stable'
2.4.2 Release

See merge request pleroma/pleroma!3599
2022-01-11 20:47:02 +00:00
Lain Soykaf b34f0a6e51 CI: Conservatively update release images so they keep building. 2022-01-11 13:59:53 +03:00
Lain Soykaf e4cfdfd701 CI: Upload the image for all platforms
For some reason the other platforms started failing, too. This
fixes it. Why? Don't know.
2022-01-11 13:59:28 +03:00
rinpatch a98a127718 Pleroma-FE bundle: update to b13d8f7e6339e877a38a28008630dc8ec64abcdf 2022-01-11 13:49:06 +03:00
rinpatch ea204dbca1 mix.lock: sync with mix.exs
hackney version was bumped in mix.exs, but mix.lock was not updated
2022-01-11 13:48:33 +03:00
rinpatch f4bc2f5975 Add 2.4.2 changelog entry and bump mix version 2022-01-11 13:39:23 +03:00
Alex Gleason cd3175c7fe Merge branch 'fix/rich-media-test-escape-unicrud' into 'develop'
Escape unicode RTL overrides in rich media parser tests

See merge request pleroma/pleroma!3598
2022-01-11 13:39:23 +03:00
lain bf0b32c9aa Merge branch 'pleroma-result-1_13' into 'develop'
move result into with guard

See merge request pleroma/pleroma!3557
2022-01-11 13:39:23 +03:00
marcin mikołajczak 4f249b2397 Merge remote-tracking branch 'origin/develop' into account-endorsements 2022-01-10 20:04:14 +01:00
Alex Gleason 753a9b3f32 Merge branch 'fix/rich-media-test-escape-unicrud' into 'develop'
Escape unicode RTL overrides in rich media parser tests

See merge request pleroma/pleroma!3598
2022-01-10 15:07:09 +00:00
rinpatch fd043b0ab3 Escape unicode RTL overrides in rich media parser tests
Elixir 1.13 does not allow them in raw form anymore, resulting in errors
like this when running the test:

== Compilation error in file test/pleroma/web/rich_media/parser_test.exs ==
** (SyntaxError) test/pleroma/web/rich_media/parser_test.exs:136:45: invalid bidirectional formatting character in string: \u202C. If you want to use such character, use it in its escaped \u202C form instead
2022-01-10 17:51:53 +03:00
lain 991b26f494 Merge branch 'update-hackney' into 'develop'
Mix: upgrade Hackney to 1.18.0

Closes #2753

See merge request pleroma/pleroma!3549
2022-01-10 17:40:31 +03:00
Sean King dafcf896d9 Merge more stuff from upstream develop branch 2021-12-30 14:25:45 -07:00
Sean King ffeae7ef2c
Fix merge conflict in CHANGELOG.md 2021-12-29 18:08:50 -07:00
marcin mikołajczak 9032d065e6 wip
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2021-12-28 18:07:19 +01:00
Tusooa Zhu 9a27cb4f9d
Deal with target not found error in add_alias
Ref: emit-move
2021-12-28 01:11:08 -05:00
Tusooa Zhu 3fd13b70ec
Test that the target account is re-fetched in move_account
Ref: emit-move
2021-12-28 01:11:08 -05:00
Tusooa Zhu eb383ef8d3
Make move_account endpoint process non-existent users properly
Ref: emit-move
2021-12-28 01:11:08 -05:00
Tusooa Zhu a677c621e8
Make move_following worker follow then unfollow
Ref: emit-move
2021-12-28 01:11:08 -05:00
Tusooa Zhu 4f44fd32ea
Federate unfollow activity in move_following properly
0: Use the CommonAPI unfollow function to make sure the
unfollow activity is federated.

1: Limit the follow and unfollow to local followers only,
while let the romote servers decide whether to move their followers.

Ref: emit-move
2021-12-28 01:11:08 -05:00
Tusooa Zhu e41eee5ed1
Make Move activity federate properly
Ref: emit-move
2021-12-28 01:11:08 -05:00
Tusooa Zhu 1d8abf2511
Document aliases endpoints
Ref: emit-move
2021-12-28 01:11:08 -05:00
Tusooa Zhu 54d7b4354c
Add deleting alias endpoint
Ref: emit-move
2021-12-28 01:11:08 -05:00
Tusooa Zhu c1aa3c98ac
Add get and add aliases endpoints
Ref: emit-move
2021-12-28 01:11:08 -05:00
Tusooa Zhu 60081a8818
Add User.add_alias/2 and User.alias_users/1
Ref: emit-move
2021-12-28 01:11:07 -05:00
Tusooa Zhu 3092558bc1
Add changelog 2021-12-28 01:11:06 -05:00
Tusooa Zhu df90b3e66a
Document move_account API
Ref: emit-move
2021-12-28 01:10:39 -05:00
Tusooa Zhu 0af77b20c1
Implement moving account
Ref: emit-move
2021-12-28 01:10:34 -05:00
Sean King 8ef1d8b566 Revert "Merge branch 'notice-routes' into 'develop'" 2021-12-26 11:02:51 -07:00
marcin mikołajczak a9b0027071 Account endorsements
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2021-11-29 12:44:57 +01:00
lain 07bf36142b Resilience Test: Add notification check for killing likes. 2021-01-06 12:49:18 +01:00
lain a24b2bc38a Resilience Test: Add tests for killing likes. 2021-01-06 12:33:09 +01:00
Mary Kate 590a10af33 Adds tests for breaking tag and mention links after text is converted from markdown to html 2020-12-24 16:40:08 -06:00
1992 changed files with 52567 additions and 7027 deletions

View File

@ -83,6 +83,7 @@
# lanodan: I think PreferImplicitTry should be consistency, and the behaviour seems
# inconsistent, see: https://github.com/rrrene/credo/issues/224
{Credo.Check.Readability.PreferImplicitTry, false},
{Credo.Check.Readability.PipeIntoAnonymousFunctions, exit_status: 0},
{Credo.Check.Readability.RedundantBlankLines},
{Credo.Check.Readability.StringSigils},
{Credo.Check.Readability.TrailingBlankLine},
@ -90,6 +91,7 @@
{Credo.Check.Readability.VariableNames},
{Credo.Check.Readability.Semicolons},
{Credo.Check.Readability.SpaceAfterCommas},
{Credo.Check.Readability.WithSingleClause, exit_status: 0},
{Credo.Check.Refactor.DoubleBooleanNegation},
{Credo.Check.Refactor.CondStatements},
{Credo.Check.Refactor.CyclomaticComplexity},

1
.gitignore vendored
View File

@ -48,6 +48,7 @@ docs/generated_config.md
# Code test coverage
/cover
/Elixir.*.coverdata
/coverage.xml
.idea
pleroma.iml

View File

@ -5,8 +5,16 @@ variables: &global_variables
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DB_HOST: postgres
DB_PORT: 5432
MIX_ENV: test
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH
cache: &global_cache_policy
key:
files:
@ -16,12 +24,14 @@ cache: &global_cache_policy
- _build
stages:
- check-changelog
- build
- test
- benchmark
- deploy
- release
- docker
- docker-combine
before_script:
- echo $MIX_ENV
@ -31,22 +41,43 @@ before_script:
after_script:
- rm -rf _build/*/lib/pleroma
check-changelog:
stage: check-changelog
image: alpine
rules:
- if: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH == 'pleroma/pleroma' && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == 'weblate-extract'
when: never
- if: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH == 'pleroma/pleroma' && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == 'weblate'
when: never
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"
before_script: ''
after_script: ''
cache: {}
script:
- apk add git
- sh ./tools/check-changelog
.build_changes_policy:
rules:
- changes:
- ".gitlab-ci.yml"
- "**/*.ex"
- "**/*.exs"
- "mix.lock"
build:
extends: .build_changes_policy
stage: build
only:
changes:
- "**/*.ex"
- "**/*.exs"
- "mix.lock"
script:
- mix compile --force
spec-build:
stage: test
only:
changes:
- "lib/pleroma/web/api_spec/**/*.ex"
- "lib/pleroma/web/api_spec.ex"
rules:
- changes:
- ".gitlab-ci.yml"
- "lib/pleroma/web/api_spec/**/*.ex"
- "lib/pleroma/web/api_spec.ex"
artifacts:
paths:
- spec.json
@ -59,7 +90,7 @@ benchmark:
variables:
MIX_ENV: benchmark
services:
- name: postgres:9.6
- name: postgres:9.6-alpine
alias: postgres
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
script:
@ -68,39 +99,38 @@ benchmark:
- mix pleroma.load_testing
unit-testing:
extends: .build_changes_policy
stage: test
only:
changes:
- "**/*.ex"
- "**/*.exs"
- "mix.lock"
cache: &testing_cache_policy
<<: *global_cache_policy
policy: pull
services:
- name: postgres:13
- name: postgres:13-alpine
alias: postgres
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
script:
- mix ecto.create
- mix ecto.migrate
- mix coveralls --preload-modules
- mix test --cover --preload-modules
coverage: '/^Line total: ([^ ]*%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
unit-testing-erratic:
extends: .build_changes_policy
stage: test
retry: 2
only:
changes:
- "**/*.ex"
- "**/*.exs"
- "mix.lock"
allow_failure: true
cache: &testing_cache_policy
<<: *global_cache_policy
policy: pull
services:
- name: postgres:13
- name: postgres:13-alpine
alias: postgres
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
script:
@ -125,12 +155,8 @@ unit-testing-erratic:
# - mix test --trace --only federated
unit-testing-rum:
extends: .build_changes_policy
stage: test
only:
changes:
- "**/*.ex"
- "**/*.exs"
- "mix.lock"
cache: *testing_cache_policy
services:
- name: minibikini/postgres-with-rum:12
@ -146,15 +172,13 @@ unit-testing-rum:
- mix test --preload-modules
lint:
image: elixir:1.12
extends: .build_changes_policy
image: &current_elixir elixir:1.12-alpine
stage: test
only:
changes:
- "**/*.ex"
- "**/*.exs"
- "mix.lock"
cache: *testing_cache_policy
before_script:
before_script: &current_bfr_script
- apk update
- apk add build-base cmake file-dev git openssl
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
@ -162,31 +186,18 @@ lint:
- mix format --check-formatted
analysis:
extends: .build_changes_policy
stage: test
only:
changes:
- "**/*.ex"
- "**/*.exs"
- "mix.lock"
cache: *testing_cache_policy
script:
- mix credo --strict --only=warnings,todo,fixme,consistency,readability
cycles:
extends: .build_changes_policy
image: *current_elixir
stage: test
image: elixir:1.11
only:
changes:
- "**/*.ex"
- "**/*.exs"
- "mix.lock"
cache: {}
before_script:
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- apt-get update
- apt-get install cmake libmagic-dev -y
before_script: *current_bfr_script
script:
- mix compile
- mix xref graph --format cycles --label compile | awk '{print $0} END{exit ($0 != "No cycles found")}'
@ -265,12 +276,14 @@ stop_review_app:
amd64:
stage: release
image: elixir:1.10.4
image: elixir:1.11.4
only: &release-only
- stable@pleroma/pleroma
- develop@pleroma/pleroma
- /^maint/.*$/@pleroma/pleroma
- /^release/.*$/@pleroma/pleroma
tags:
- amd64
artifacts: &release-artifacts
name: "pleroma-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
paths:
@ -289,7 +302,7 @@ amd64:
MIX_ENV: prod
before_script: &before-release
- apt-get update && apt-get install -y cmake libmagic-dev
- echo "import Mix.Config" > config/prod.secret.exs
- echo "import Config" > config/prod.secret.exs
- mix local.hex --force
- mix local.rebar --force
script: &release
@ -303,12 +316,14 @@ amd64-musl:
stage: release
artifacts: *release-artifacts
only: *release-only
image: elixir:1.10.4-alpine
image: elixir:1.11.4-alpine
tags:
- amd64
cache: *release-cache
variables: *release-variables
before_script: &before-release-musl
- apk add git gcc g++ musl-dev make cmake file-dev
- echo "import Mix.Config" > config/prod.secret.exs
- apk add git build-base cmake file-dev openssl
- echo "import Config" > config/prod.secret.exs
- mix local.hex --force
- mix local.rebar --force
script: *release
@ -319,7 +334,7 @@ arm:
only: *release-only
tags:
- arm32-specified
image: arm32v7/elixir:1.10.4
image: arm32v7/elixir:1.11.4
cache: *release-cache
variables: *release-variables
before_script: *before-release
@ -331,7 +346,7 @@ arm-musl:
only: *release-only
tags:
- arm32-specified
image: arm32v7/elixir:1.10.4-alpine
image: arm32v7/elixir:1.11.4-alpine
cache: *release-cache
variables: *release-variables
before_script: *before-release-musl
@ -343,7 +358,7 @@ arm64:
only: *release-only
tags:
- arm
image: arm64v8/elixir:1.10.4
image: arm64v8/elixir:1.11.4
cache: *release-cache
variables: *release-variables
before_script: *before-release
@ -355,110 +370,173 @@ arm64-musl:
only: *release-only
tags:
- arm
image: arm64v8/elixir:1.10.4-alpine
image: arm64v8/elixir:1.11.4-alpine
cache: *release-cache
variables: *release-variables
before_script: *before-release-musl
script: *release
docker:
.kaniko:
stage: docker
image: docker:latest
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
cache: {}
dependencies: []
variables: &docker-variables
DOCKER_DRIVER: overlay2
DOCKER_HOST: unix:///var/run/docker.sock
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
IMAGE_TAG_SLUG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
IMAGE_TAG_LATEST: $CI_REGISTRY_IMAGE:latest
IMAGE_TAG_LATEST_STABLE: $CI_REGISTRY_IMAGE:latest-stable
DOCKER_BUILDX_URL: https://github.com/docker/buildx/releases/download/v0.6.3/buildx-v0.6.3.linux-amd64
DOCKER_BUILDX_HASH: 980e6b9655f971991fbbb5fd6cd19f1672386195
before_script: &before-docker
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull $IMAGE_TAG_SLUG || true
before_script: &before-kaniko
- export CI_JOB_TIMESTAMP=$(date --utc -Iseconds)
- export CI_VCS_REF=$CI_COMMIT_SHORT_SHA
allow_failure: true
script:
- mkdir -p /root/.docker/cli-plugins
- wget "${DOCKER_BUILDX_URL}" -O ~/.docker/cli-plugins/docker-buildx
- echo "${DOCKER_BUILDX_HASH} /root/.docker/cli-plugins/docker-buildx" | sha1sum -c
- chmod +x ~/.docker/cli-plugins/docker-buildx
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name mbuilder --driver docker-container --use
- docker buildx inspect --bootstrap
- docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --push --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST .
tags:
- dind
- export IMAGE_TAG=$CI_REGISTRY_IMAGE/$BUILD_ARCH_IMG_SUFFIX:$CI_COMMIT_SHORT_SHA
- export IMAGE_TAG_SLUG=$CI_REGISTRY_IMAGE/$BUILD_ARCH_IMG_SUFFIX:$CI_COMMIT_REF_SLUG
- export IMAGE_TAG_LATEST=$CI_REGISTRY_IMAGE/$BUILD_ARCH_IMG_SUFFIX:latest
- export IMAGE_TAG_LATEST_STABLE=$CI_REGISTRY_IMAGE/$BUILD_ARCH_IMG_SUFFIX:latest-stable
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
.kaniko-latest:
extends: .kaniko
only:
- develop@pleroma/pleroma
docker-stable:
stage: docker
image: docker:latest
cache: {}
dependencies: []
variables: *docker-variables
before_script: *before-docker
allow_failure: true
script:
- mkdir -p /root/.docker/cli-plugins
- wget "${DOCKER_BUILDX_URL}" -O ~/.docker/cli-plugins/docker-buildx
- echo "${DOCKER_BUILDX_HASH} /root/.docker/cli-plugins/docker-buildx" | sha1sum -c
- chmod +x ~/.docker/cli-plugins/docker-buildx
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name mbuilder --driver docker-container --use
- docker buildx inspect --bootstrap
- docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --push --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST_STABLE .
tags:
- dind
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --custom-platform=$BUILD_ARCH --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP --build-arg ELIXIR_IMG=$ELIXIR_IMG --destination $IMAGE_TAG --destination $IMAGE_TAG_SLUG --destination $IMAGE_TAG_LATEST
.kaniko-stable:
extends: .kaniko
only:
- stable@pleroma/pleroma
script:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --custom-platform=$BUILD_ARCH --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP --build-arg ELIXIR_IMG=$ELIXIR_IMG --destination $IMAGE_TAG --destination $IMAGE_TAG_SLUG --destination $IMAGE_TAG_LATEST_STABLE
docker-release:
stage: docker
image: docker:latest
cache: {}
dependencies: []
variables: *docker-variables
before_script: *before-docker
allow_failure: true
script:
script:
- mkdir -p /root/.docker/cli-plugins
- wget "${DOCKER_BUILDX_URL}" -O ~/.docker/cli-plugins/docker-buildx
- echo "${DOCKER_BUILDX_HASH} /root/.docker/cli-plugins/docker-buildx" | sha1sum -c
- chmod +x ~/.docker/cli-plugins/docker-buildx
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name mbuilder --driver docker-container --use
- docker buildx inspect --bootstrap
- docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --push --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG .
tags:
- dind
.kaniko-release:
extends: .kaniko
only:
- /^release/.*$/@pleroma/pleroma
script:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --custom-platform=$BUILD_ARCH --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP --build-arg ELIXIR_IMG=$ELIXIR_IMG --destination $IMAGE_TAG --destination $IMAGE_TAG_SLUG
docker-adhoc:
stage: docker
image: docker:latest
cache: {}
dependencies: []
variables: *docker-variables
before_script: *before-docker
allow_failure: true
script:
script:
- mkdir -p /root/.docker/cli-plugins
- wget "${DOCKER_BUILDX_URL}" -O ~/.docker/cli-plugins/docker-buildx
- echo "${DOCKER_BUILDX_HASH} /root/.docker/cli-plugins/docker-buildx" | sha1sum -c
- chmod +x ~/.docker/cli-plugins/docker-buildx
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name mbuilder --driver docker-container --use
- docker buildx inspect --bootstrap
- docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --push --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG .
tags:
- dind
.kaniko-adhoc:
extends: .kaniko
only:
- /^build-docker/.*$/@pleroma/pleroma
script:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --custom-platform=$BUILD_ARCH --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP --build-arg ELIXIR_IMG=$ELIXIR_IMG --destination $IMAGE_TAG --destination $IMAGE_TAG_SLUG
.kaniko:linux/amd64:
variables:
BUILD_ARCH: linux/amd64
BUILD_ARCH_IMG_SUFFIX: linux-amd64
ELIXIR_IMG: hexpm/elixir
tags:
- amd64
.kaniko:linux/arm64:
variables:
BUILD_ARCH: linux/arm64/v8
BUILD_ARCH_IMG_SUFFIX: linux-arm64-v8
ELIXIR_IMG: hexpm/elixir
tags:
- arm
.kaniko:linux/arm:
variables:
BUILD_ARCH: linux/arm/v7
BUILD_ARCH_IMG_SUFFIX: linux-arm-v7
ELIXIR_IMG: git.pleroma.social:5050/pleroma/ci-image/elixir-linux-arm-v7
tags:
- arm32-specified
kaniko-latest:linux/amd64:
extends:
- .kaniko-latest
- .kaniko:linux/amd64
kaniko-latest:linux/arm64:
extends:
- .kaniko-latest
- .kaniko:linux/arm64
kaniko-latest:linux/arm:
extends:
- .kaniko-latest
- .kaniko:linux/arm
kaniko-stable:linux/amd64:
extends:
- .kaniko-stable
- .kaniko:linux/amd64
kaniko-stable:linux/arm64:
extends:
- .kaniko-stable
- .kaniko:linux/arm64
kaniko-stable:linux/arm:
extends:
- .kaniko-stable
- .kaniko:linux/arm
kaniko-release:linux/amd64:
extends:
- .kaniko-release
- .kaniko:linux/amd64
kaniko-release:linux/arm64:
extends:
- .kaniko-release
- .kaniko:linux/arm64
kaniko-release:linux/arm:
extends:
- .kaniko-release
- .kaniko:linux/arm
.docker-combine:
stage: docker-combine
image: docker:cli
cache: {}
before_script:
- 'BUILD_ARCHES="linux-amd64 linux-arm64-v8 linux-arm-v7"'
- export IMAGE_TAG=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
- export IMAGE_TAG_SLUG=$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
- export IMAGE_TAG_LATEST=$CI_REGISTRY_IMAGE:latest
- export IMAGE_TAG_LATEST_STABLE=$CI_REGISTRY_IMAGE:latest-stable
- 'IMAGES=; for arch in $BUILD_ARCHES; do IMAGES="$IMAGES $CI_REGISTRY_IMAGE/$arch:$CI_COMMIT_SHORT_SHA"; done'
- 'IMAGES_SLUG=; for arch in $BUILD_ARCHES; do IMAGES_SLUG="$IMAGES_SLUG $CI_REGISTRY_IMAGE/$arch:$CI_COMMIT_REF_SLUG"; done'
- 'IMAGES_LATEST=; for arch in $BUILD_ARCHES; do IMAGES_LATEST="$IMAGES_LATEST $CI_REGISTRY_IMAGE/$arch:latest"; done'
- 'IMAGES_LATEST_STABLE=; for arch in $BUILD_ARCHES; do IMAGES_LATEST_STABLE="$IMAGES_LATEST_STABLE $CI_REGISTRY_IMAGE/$arch:latest"; done'
- mkdir -p ~/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > ~/.docker/config.json
docker-combine:latest:
extends: .docker-combine
only:
- develop@pleroma/pleroma
script:
- 'docker manifest create $IMAGE_TAG $IMAGES'
- 'docker manifest push $IMAGE_TAG'
- 'docker manifest create $IMAGE_TAG_SLUG $IMAGES_SLUG'
- 'docker manifest push $IMAGE_TAG_SLUG'
- 'docker manifest create $IMAGE_TAG_LATEST $IMAGES_LATEST'
- 'docker manifest push $IMAGE_TAG_LATEST'
docker-combine:stable:
extends: .docker-combine
only:
- stable@pleroma/pleroma
script:
- 'docker manifest create $IMAGE_TAG $IMAGES'
- 'docker manifest push $IMAGE_TAG'
- 'docker manifest create $IMAGE_TAG_SLUG $IMAGES_SLUG'
- 'docker manifest push $IMAGE_TAG_SLUG'
- 'docker manifest create $IMAGE_TAG_LATEST_STABLE $IMAGES_LATEST_STABLE'
- 'docker manifest push $IMAGE_TAG_LATEST_STABLE'
docker-combine:release:
extends: .docker-combine
only:
- /^release/.*$/@pleroma/pleroma
script:
- 'docker manifest create $IMAGE_TAG $IMAGES'
- 'docker manifest push $IMAGE_TAG'
- 'docker manifest create $IMAGE_TAG_SLUG $IMAGES_SLUG'
- 'docker manifest push $IMAGE_TAG_SLUG'

View File

@ -0,0 +1,10 @@
### Checklist
- [ ] Adding a changelog: In the `changelog.d` directory, create a file named `<code>.<type>`.
`<code>` can be anything, but we recommend using a more or less unique identifier to avoid collisions, such as the branch name.
`<type>` can be `add`, `remove`, `fix`, `security` or `skip`. `skip` is only used if there is no user-visible change in the MR (for example, only editing comments in the code). Otherwise, choose a type that corresponds to your change.
In the file, write the changelog entry. For example, if an MR adds group functionality, we can create a file named `group.add` and write `Add group functionality` in it.
If one changelog entry is not enough, you may add more. But that might mean you can split it into two MRs. Only use more than one changelog entry if you really need to (for example, when one change in the code fix two different bugs, or when refactoring).

View File

@ -1,6 +1,8 @@
### Release checklist
* [ ] Bump version in `mix.exs`
* [ ] Compile a changelog
* [ ] Create an MR with an announcement to pleroma.social
* [ ] Tag the release
* [ ] Bump version in `mix.exs`
* [ ] Compile a changelog
* [ ] Create an MR with an announcement to pleroma.social
#### post-merge
* [ ] Tag the release on the merge commit
* [ ] Make the tag into a Gitlab Release™
* [ ] Merge `stable` into `develop` (in case the fixes are already in develop, use `git merge -s ours --no-commit` and manually merge the changelogs)

View File

@ -6,18 +6,57 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## Unreleased
### Changed
### Added
- Support for Image activities, namely from Hubzilla
### Fixed
- rel="me" was missing its cache
### Removed
- BREAKING: Support for passwords generated with `crypt(3)` (Gnu Social migration artifact)
## 2.5.1
### Added
- Allow customizing instance languages
### Fixed
- Security: uploading HTTP endpoint can no longer create directories in the upload dir (internal APIs, like backup, still can do it.)
- ~ character in urls in Markdown posts are handled properly
- Exiftool upload filter will now ignore SVG files
- Fix `block_from_stranger` setting
- Fix rel="me"
- Docker images will now run properly
- Fix inproper content being cached in report content
- Notification filter on object content will not operate on the ones that inherently have no content
- ZWNJ and double dots in links are parsed properly for Plain-text posts
- OTP releases will work on systems with a newer libcrypt
- Errors when running Exiftool.ReadDescription filter will not be filled into the image description
## 2.5.0 - 2022-12-23
### Removed
- MastoFE
- Quack, the logging backend that pushes to Slack channels
### Changed
- **Breaking:** Elixir >=1.11 is now required (was >= 1.9)
- Allow users to remove their emails if instance does not need email to register
- Uploadfilter `Pleroma.Upload.Filter.Exiftool` has been renamed to `Pleroma.Upload.Filter.Exiftool.StripLocation`
- **Breaking**: `/api/v1/pleroma/backups` endpoints now requires `read:backups` scope instead of `read:accounts`
- Updated the recommended pleroma.vcl configuration for Varnish to target Varnish 7.0+
- Set timeout values for Oban queues. The default is infinity and some operations may not time out on their own.
- Delete activities are federated at lowest priority
- CSP now includes wasm-unsafe-eval
### Added
- `activeMonth` and `activeHalfyear` fields in NodeInfo usage.users object
- Experimental support for Finch. Put `config :tesla, :adapter, {Tesla.Adapter.Finch, name: MyFinch}` in your secrets file to use it. Reverse Proxy will still use Hackney.
- AdminAPI: allow moderators to manage reports, users, invites, and custom emojis
- AdminAPI: restrict moderators to access sensitive data: change user credentials, get password reset token, read private statuses and chats, etc
- `ForceMentionsInPostContent` MRF policy
- PleromaAPI: Add remote follow API endpoint at `POST /api/v1/pleroma/remote_interaction`
- MastoAPI: Add `GET /api/v1/accounts/lookup`
- MastoAPI: Profile Directory support
@ -25,12 +64,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Ability to log slow Ecto queries by configuring `:pleroma, :telemetry, :slow_queries_logging`
- Added Phoenix LiveDashboard at `/phoenix/live_dashboard`
- Added `/manifest.json` for progressive web apps.
- MastoAPI: Support for `birthday` and `show_birthday` field in `/api/v1/accounts/update_credentials`.
- Configuration: Add `birthday_required` and `birthday_min_age` settings to provide a way to require users to enter their birth date.
- PleromaAPI: Add `GET /api/v1/pleroma/birthdays` API endpoint
- Make backend-rendered pages translatable. This includes emails. Pages returned as a HTTP response are translated using the language specified in the `userLanguage` cookie, or the `Accept-Language` header. Emails are translated using the `language` field when registering. This language can be changed by `PATCH /api/v1/accounts/update_credentials` with the `language` field.
- Add fine grained options to provide privileges to moderators and admins (e.g. delete messages, manage reports...)
- Uploadfilter `Pleroma.Upload.Filter.Exiftool.ReadDescription` returns description values to the FE so they can pre fill the image description field
- Added move account API
- Enable remote users to interact with posts
- Possibility to discover users like `user@example.org`, while Pleroma is working on `pleroma.example.org`. Additional configuration required.
### Fixed
- Subscription(Bell) Notifications: Don't create from Pipeline Ingested replies
- Handle Reject for already-accepted Follows properly
- Display OpenGraph data on alternative notice routes.
- Fix replies count for remote replies
- Fixed hashtags disappearing from the end of lines when Markdown is enabled
- ChatAPI: Add link headers
- Limited number of search results to 40 to prevent DoS attacks
- ActivityPub: fixed federation of attachment dimensions
@ -39,8 +88,46 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fixed crash when pinned_objects is nil
- Fixed slow timelines when there are a lot of deactivated users
- Fixed account deletion API
- Fixed lowercase HTTP HEAD method in the Media Proxy Preview code
- Removed useless notification call on Delete activities
- Improved performance for filtering out deactivated and invisible users
- RSS and Atom feeds for users work again
- TwitterCard meta tags conformance
### Removed
## 2.4.5 - 2022-11-27
## Fixed
- Image `class` attributes not being scrubbed, allowing to exploit frontend special classes [!3792](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3792)
- Delete report notifs when demoting from superuser [!3642](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3642)
- Validate `mediaType` only by it's format rather than using a list [!3597](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3597)
- Pagination: Make mutes and blocks lists behave the same as other lists [!3693](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3693)
- Compatibility with Elixir 1.14 [!3740](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3740)
- Frontend installer: FediFE build URL [!3736](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3736)
- Streaming: Don't stream ChatMessage into the home timeline [!3738](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3738)
- Streaming: Stream local-only posts in the local timeline [!3738](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3738)
- Signatures: Fix `keyId` lookup for GoToSocial [!3725](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3725)
- Validator: Fix `replies` handling for GoToSocial [!3725](https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3725)
## 2.4.4 - 2022-08-19
### Security
- Streaming API sessions will now properly disconnect if the corresponding token is revoked
## 2.4.3 - 2022-05-06
### Security
- Private `/objects/` and `/activities/` leaking if cached by authenticated user
- SweetXML library DTD bomb
## 2.4.2 - 2022-01-10
### Fixed
- Federation issues caused by HTTP pool checkout timeouts
- Compatibility with Elixir 1.13
### Upgrade notes
1. Restart Pleroma
## 2.4.1 - 2021-08-29
@ -75,6 +162,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Improved Twittercard and OpenGraph meta tag generation including thumbnails and image dimension metadata when available.
- AdminAPI: sort users so the newest are at the top.
- ActivityPub Client-to-Server(C2S): Limitation on the type of Activity/Object are lifted as they are now passed through ObjectValidators
- MRF (`AntiFollowbotPolicy`): Bot accounts are now also considered followbots. Users can still allow bots to follow them by first following the bot.
### Added

View File

@ -1,11 +1,11 @@
Unless otherwise stated this repository is copyright © 2017-2021
Unless otherwise stated this repository is copyright © 2017-2022
Pleroma Authors <https://pleroma.social/>, and is distributed under
The GNU Affero General Public License Version 3, you should have received a
copy of the license file as AGPL-3.
---
Files inside docs directory are copyright © 2021 Pleroma Authors
Files inside docs directory are copyright © 2022 Pleroma Authors
<https://pleroma.social/>, and are distributed under the Creative Commons
Attribution 4.0 International license, you should have received
a copy of the license file as CC-BY-4.0.
@ -30,7 +30,7 @@ priv/static/images/pleroma-fox-tan-shy.png
---
The following files are copyright © 2017-2020 Pleroma Authors
The following files are copyright © 2017-2022 Pleroma Authors
<https://pleroma.social/>, and are distributed under the Creative Commons
Attribution-ShareAlike 4.0 International license, you should have received
a copy of the license file as CC-BY-SA-4.0.

View File

@ -1,18 +1,23 @@
FROM elixir:1.9-alpine as build
ARG ELIXIR_IMG=hexpm/elixir
ARG ELIXIR_VER=1.11.4
ARG ERLANG_VER=24.2.1
ARG ALPINE_VER=3.17.0
FROM ${ELIXIR_IMG}:${ELIXIR_VER}-erlang-${ERLANG_VER}-alpine-${ALPINE_VER} as build
COPY . .
ENV MIX_ENV=prod
RUN apk add git gcc g++ musl-dev make cmake file-dev &&\
echo "import Mix.Config" > config/prod.secret.exs &&\
echo "import Config" > config/prod.secret.exs &&\
mix local.hex --force &&\
mix local.rebar --force &&\
mix deps.get --only prod &&\
mkdir release &&\
mix release --path release
FROM alpine:3.14
FROM alpine:${ALPINE_VER}
ARG BUILD_DATE
ARG VCS_REF

View File

@ -30,7 +30,7 @@ If your platform is not supported, or you just want to be able to edit the sourc
- [OpenBSD (fi)](https://docs-develop.pleroma.social/backend/installation/openbsd_fi/)
### OS/Distro packages
Currently Pleroma is packaged for [YunoHost](https://yunohost.org). If you want to package Pleroma for any OS/Distros, we can guide you through the process on our [community channels](#community-channels). If you want to change default options in your Pleroma package, please **discuss it with us first**.
Currently Pleroma is packaged for [YunoHost](https://yunohost.org) and [NixOS](https://nixos.org). If you want to package Pleroma for any OS/Distros, we can guide you through the process on our [community channels](#community-channels). If you want to change default options in your Pleroma package, please **discuss it with us first**.
### Docker
While we dont provide docker files, other people have written very good ones. Take a look at <https://github.com/angristan/docker-pleroma> or <https://glitch.sh/sn0w/pleroma-docker>.

0
changelog.d/3739.skip Normal file
View File

1
changelog.d/3848.add Normal file
View File

@ -0,0 +1 @@
Add OAuth scope descriptions

0
changelog.d/3870.skip Normal file
View File

1
changelog.d/3872.remove Normal file
View File

@ -0,0 +1 @@
remove BBS/SSH feature, replaced by an external bridge.

1
changelog.d/3873.fix Normal file
View File

@ -0,0 +1 @@
UploadedMedia: Add missing disposition_type to Content-Disposition

0
changelog.d/3876.skip Normal file
View File

0
changelog.d/3877.skip Normal file
View File

0
changelog.d/3878.skip Normal file
View File

1
changelog.d/3882.add Normal file
View File

@ -0,0 +1 @@
Allow lang attribute in status text

1
changelog.d/3883.fix Normal file
View File

@ -0,0 +1 @@
Fix abnormal behaviour when refetching a poll

View File

View File

@ -1,7 +1,8 @@
FROM elixir:1.9.4
FROM elixir:1.11.4
# Single RUN statement, otherwise intermediate images are created
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#run
RUN apt-get update &&\
apt-get install -y libmagic-dev cmake libimage-exiftool-perl ffmpeg &&\
apt-get install -y libmagic-dev cmake libimage-exiftool-perl ffmpeg &&\
mix local.hex --force &&\
mix local.rebar --force

12
ci/README Normal file
View File

@ -0,0 +1,12 @@
## Dependencies
Assuming an AMD64 Alpine system, you're going to need the following packages
- `qemu qemu-openrc qemu-arm qemu-aarch64` for binfmt
- `docker-cli-buildx` for building the images
## Setting up
```
docker login git.pleroma.social:5050
doas rc-service qemu-binfmt start
```

View File

@ -40,6 +40,7 @@ config :pleroma, Pleroma.Repo,
password: "postgres",
database: "pleroma_benchmark",
hostname: System.get_env("DB_HOST") || "localhost",
port: System.get_env("DB_PORT") || "5432",
pool_size: 10
# Reduce hash rounds for testing

View File

@ -37,7 +37,7 @@
# FIGURATION! EDIT YOUR SECRET FILE (either prod.secret.exs, dev.secret.exs).
#
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
# and its dependencies with the aid of the Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
@ -149,8 +149,6 @@ config :pleroma, Pleroma.Web.Endpoint,
]
# Configures Elixir's Logger
config :logger, truncate: 65536
config :logger, :console,
level: :debug,
format: "\n$time $metadata[$level] $message\n",
@ -162,11 +160,6 @@ config :logger, :ex_syslogger,
format: "$metadata[$level] $message",
metadata: [:request_id]
config :quack,
level: :warn,
meta: [:all],
webhook_url: "https://hooks.slack.com/services/YOUR-KEY-HERE"
config :mime, :types, %{
"application/xml" => ["xml"],
"application/xrd+xml" => ["xrd+xml"],
@ -189,6 +182,7 @@ config :pleroma, :instance,
email: "example@example.com",
notify_email: "noreply@example.com",
description: "Pleroma: An efficient and flexible fediverse server",
short_description: "",
background_image: "/images/city.jpg",
instance_thumbnail: "/instance/thumbnail.jpeg",
limit: 5_000,
@ -229,6 +223,7 @@ config :pleroma, :instance,
max_pinned_statuses: 1,
attachment_links: false,
max_report_comment_size: 1000,
report_strip_status: true,
safe_dm_mentions: false,
healthcheck: false,
remote_post_retention_days: 90,
@ -258,7 +253,27 @@ config :pleroma, :instance,
show_reactions: true,
password_reset_token_validity: 60 * 60 * 24,
profile_directory: true,
privileged_staff: false
admin_privileges: [
:users_read,
:users_manage_invites,
:users_manage_activation_state,
:users_manage_tags,
:users_manage_credentials,
:users_delete,
:messages_read,
:messages_delete,
:instances_delete,
:reports_manage_reports,
:moderation_log_read,
:announcements_manage_announcements,
:emoji_manage_emoji,
:statistics_read
],
moderator_privileges: [:messages_delete, :reports_manage_reports],
max_endorsed_users: 20,
birthday_required: false,
birthday_min_age: 0,
max_media_attachments: 1_000
config :pleroma, :welcome,
direct_message: [
@ -556,8 +571,8 @@ config :pleroma, Oban,
token_expiration: 5,
filter_expiration: 1,
backup: 1,
federator_incoming: 50,
federator_outgoing: 50,
federator_incoming: 5,
federator_outgoing: 5,
ingestion_queue: 50,
web_push: 50,
mailer: 10,
@ -602,9 +617,6 @@ config :pleroma, :ldap,
base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
uid: System.get_env("LDAP_UID") || "cn"
config :esshd,
enabled: false
oauth_consumer_strategies =
System.get_env("OAUTH_CONSUMER_STRATEGIES")
|> to_string()
@ -670,6 +682,8 @@ config :pleroma, :features, improved_hashtag_timeline: :auto
config :pleroma, :populate_hashtags_table, fault_rate_allowance: 0.01
config :pleroma, :delete_context_objects, fault_rate_allowance: 0.01
config :pleroma, :env, Mix.env()
config :http_signatures,
@ -738,7 +752,7 @@ config :pleroma, :frontends,
"name" => "fedi-fe",
"git" => "https://git.pleroma.social/pleroma/fedi-fe",
"build_url" =>
"https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
"https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build_release",
"ref" => "master",
"custom-http-headers" => [
{"service-worker-allowed", "/"}
@ -751,13 +765,21 @@ config :pleroma, :frontends,
"https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
"ref" => "develop"
},
"soapbox-fe" => %{
"name" => "soapbox-fe",
"git" => "https://gitlab.com/soapbox-pub/soapbox-fe",
"soapbox" => %{
"name" => "soapbox",
"git" => "https://gitlab.com/soapbox-pub/soapbox",
"build_url" =>
"https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production",
"ref" => "v1.0.0",
"https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/${ref}/download?job=build-production",
"ref" => "v3.0.0-beta.1",
"build_dir" => "static"
},
"glitch-lily" => %{
"name" => "glitch-lily",
"git" => "https://lily-is.land/infra/glitch-lily",
"build_url" =>
"https://lily-is.land/infra/glitch-lily/-/jobs/artifacts/${ref}/download?job=build",
"ref" => "servant",
"build_dir" => "public"
}
}
@ -856,12 +878,7 @@ config :pleroma, ConcurrentLimiter, [
{Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]}
]
config :pleroma, :telemetry,
slow_queries_logging: [
enabled: false,
min_duration: 500_000,
exclude_sources: [nil, "oban_jobs"]
]
config :pleroma, Pleroma.Web.WebFinger, domain: nil, update_nickname_on_user_fetch: true
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.

View File

@ -495,6 +495,27 @@ config :pleroma, :config_description, [
}
]
},
%{
group: :pleroma,
key: :delete_context_objects,
type: :group,
description: "`delete_context_objects` background migration settings",
children: [
%{
key: :fault_rate_allowance,
type: :float,
description:
"Max accepted rate of objects that failed in the migration. Any value from 0.0 which tolerates no errors to 1.0 which will enable the feature even if context object deletion failed for all records.",
suggestions: [0.01]
},
%{
key: :sleep_interval_ms,
type: :integer,
description:
"Sleep interval between each chunk of processed records in order to decrease the load on the system (defaults to 0 and should be keep default on most instances)."
}
]
},
%{
group: :pleroma,
key: :instance,
@ -536,6 +557,15 @@ config :pleroma, :config_description, [
"Very cool instance"
]
},
%{
key: :short_description,
type: :string,
description:
"Shorter version of instance description. It can be seen on `/api/v1/instance`",
suggestions: [
"Cool instance"
]
},
%{
key: :limit,
type: :integer,
@ -552,6 +582,14 @@ config :pleroma, :config_description, [
100_000
]
},
%{
key: :max_media_attachments,
type: :integer,
description: "Maximum number of post media attachments",
suggestions: [
1_000_000
]
},
%{
key: :upload_limit,
type: :integer,
@ -742,6 +780,16 @@ config :pleroma, :config_description, [
3
]
},
%{
key: :max_endorsed_users,
type: :integer,
description: "The maximum number of recommended accounts. 0 will disable the feature.",
suggestions: [
0,
1,
3
]
},
%{
key: :autofollowed_nicknames,
type: {:list, :string},
@ -767,6 +815,13 @@ config :pleroma, :config_description, [
1_000
]
},
%{
key: :report_strip_status,
label: "Report strip status",
type: :boolean,
description:
"Strip associated statuses in reports to ids when closed/resolved, otherwise keep a copy"
},
%{
key: :safe_dm_mentions,
label: "Safe DM mentions",
@ -943,10 +998,69 @@ config :pleroma, :config_description, [
description: "Enable profile directory."
},
%{
key: :privileged_staff,
type: :boolean,
key: :admin_privileges,
type: {:list, :atom},
suggestions: [
:users_read,
:users_manage_invites,
:users_manage_activation_state,
:users_manage_tags,
:users_manage_credentials,
:users_delete,
:messages_read,
:messages_delete,
:instances_delete,
:reports_manage_reports,
:moderation_log_read,
:announcements_manage_announcements,
:emoji_manage_emoji,
:statistics_read
],
description:
"Let moderators access sensitive data (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
"What extra privileges to allow admins (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
},
%{
key: :moderator_privileges,
type: {:list, :atom},
suggestions: [
:users_read,
:users_manage_invites,
:users_manage_activation_state,
:users_manage_tags,
:users_manage_credentials,
:users_delete,
:messages_read,
:messages_delete,
:instances_delete,
:reports_manage_reports,
:moderation_log_read,
:announcements_manage_announcements,
:emoji_manage_emoji,
:statistics_read
],
description:
"What extra privileges to allow moderators (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
},
%{
key: :birthday_required,
type: :boolean,
description: "Require users to enter their birthday."
},
%{
key: :birthday_min_age,
type: :integer,
description:
"Minimum required age (in days) for users to create account. Only used if birthday is required.",
suggestions: [6570]
},
%{
key: :languages,
type: {:list, :string},
description:
"Languages to be exposed in /api/v1/instance. Should be in the format of BCP47 language codes.",
suggestions: [
"en"
]
}
]
},
@ -1130,45 +1244,6 @@ config :pleroma, :config_description, [
}
]
},
%{
group: :quack,
type: :group,
label: "Quack Logger",
description: "Quack-related settings",
children: [
%{
key: :level,
type: {:dropdown, :atom},
description: "Log level",
suggestions: [:debug, :info, :warn, :error]
},
%{
key: :meta,
type: {:list, :atom},
description: "Configure which metadata you want to report on",
suggestions: [
:application,
:module,
:file,
:function,
:line,
:pid,
:crash_reason,
:initial_call,
:registered_name,
:all,
:none
]
},
%{
key: :webhook_url,
label: "Webhook URL",
type: :string,
description: "Configure the Slack incoming webhook",
suggestions: ["https://hooks.slack.com/services/YOUR-KEY-HERE"]
}
]
},
%{
group: :pleroma,
key: :frontend_configurations,
@ -1691,6 +1766,11 @@ config :pleroma, :config_description, [
type: :boolean,
description: "Sign object fetches with HTTP signatures"
},
%{
key: :authorized_fetch_mode,
type: :boolean,
description: "Require HTTP signatures for AP fetches"
},
%{
key: :note_replies_output_limit,
type: :integer,
@ -2548,45 +2628,6 @@ config :pleroma, :config_description, [
}
]
},
%{
group: :esshd,
label: "ESSHD",
type: :group,
description:
"Before enabling this you must add :esshd to mix.exs as one of the extra_applications " <>
"and generate host keys in your priv dir with ssh-keygen -m PEM -N \"\" -b 2048 -t rsa -f ssh_host_rsa_key",
children: [
%{
key: :enabled,
type: :boolean,
description: "Enables SSH"
},
%{
key: :priv_dir,
type: :string,
description: "Dir with SSH keys",
suggestions: ["/some/path/ssh_keys"]
},
%{
key: :handler,
type: :string,
description: "Handler module",
suggestions: ["Pleroma.BBS.Handler"]
},
%{
key: :port,
type: :integer,
description: "Port to connect",
suggestions: [10_022]
},
%{
key: :password_authenticator,
type: :string,
description: "Authenticator module",
suggestions: ["Pleroma.BBS.Authenticator"]
}
]
},
%{
group: :mime,
label: "Mime Types",
@ -2697,7 +2738,7 @@ config :pleroma, :config_description, [
key: :versions,
type: {:list, :atom},
description: "List of TLS version to use",
suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2", ":tlsv1.3"]
}
]
}

View File

@ -18,6 +18,7 @@ config :pleroma, Pleroma.Repo,
password: System.fetch_env!("DB_PASS"),
database: System.get_env("DB_NAME", "pleroma"),
hostname: System.get_env("DB_HOST", "db"),
port: System.get_env("DB_PORT", "5432"),
pool_size: 10
# Configure web push notifications

View File

@ -47,6 +47,7 @@ config :pleroma, Pleroma.Repo,
password: "postgres",
database: "pleroma_test",
hostname: System.get_env("DB_HOST") || "localhost",
port: System.get_env("DB_PORT") || "5432",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: 50
@ -81,10 +82,7 @@ config :web_push_encryption, :vapid_details,
"BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4",
private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA"
config :pleroma, Oban,
queues: false,
crontab: false,
plugins: false
config :pleroma, Oban, testing: :manual
config :pleroma, Pleroma.ScheduledActivity,
daily_user_limit: 2,
@ -129,6 +127,8 @@ config :pleroma, :pipeline,
config :pleroma, :cachex, provider: Pleroma.CachexMock
config :pleroma, Pleroma.Web.WebFinger, update_nickname_on_user_fetch: false
config :pleroma, :side_effects,
ap_streamer: Pleroma.Web.ActivityPub.ActivityPubMock,
logger: Pleroma.LoggerMock

View File

@ -3,7 +3,7 @@
set -e
echo "-- Waiting for database..."
while ! pg_isready -U ${DB_USER:-pleroma} -d postgres://${DB_HOST:-db}:5432/${DB_NAME:-pleroma} -t 1; do
while ! pg_isready -U ${DB_USER:-pleroma} -d postgres://${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-pleroma} -t 1; do
sleep 1s
done

View File

@ -22,7 +22,7 @@ Currently, known `<frontend>` values are:
- [kenoma](http://git.pleroma.social/lambadalambda/kenoma)
- [pleroma-fe](http://git.pleroma.social/pleroma/pleroma-fe)
- [fedi-fe](https://git.pleroma.social/pleroma/fedi-fe)
- [soapbox-fe](https://gitlab.com/soapbox-pub/soapbox-fe)
- [soapbox](https://gitlab.com/soapbox-pub/soapbox)
You can still install frontends that are not configured, see below.

View File

@ -37,7 +37,8 @@ If any of the options are left unspecified, you will be prompted interactively.
- `--static-dir <path>` - the directory custom public files should be read from (custom emojis, frontend bundle overrides, robots.txt, etc.)
- `--listen-ip <ip>` - the ip the app should listen to, defaults to 127.0.0.1
- `--listen-port <port>` - the port the app should listen to, defaults to 4000
- `--strip-uploads <Y|N>` - use ExifTool to strip uploads of sensitive location data
- `--strip-uploads-location <Y|N>` - use ExifTool to strip uploads of sensitive location data
- `--read-uploads-description <Y|N>` - use ExifTool to read image descriptions from uploads
- `--anonymize-uploads <Y|N>` - randomize uploaded filenames
- `--dedupe-uploads <Y|N>` - store files based on their hash to reduce data storage requirements if duplicates are uploaded with different filenames
- `--skip-release-env` - skip generation the release environment file

View File

@ -17,11 +17,11 @@ su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
## For from source installations (using git)
1. Go to the working directory of Pleroma (default is `/opt/pleroma`)
2. Run `git pull`. This pulls the latest changes from upstream.
2. Run `git checkout <tagged release>` [^1]. e.g. `git checkout v2.4.5` This pulls the [tagged release](https://git.pleroma.social/pleroma/pleroma/-/releases) from upstream.
3. Run `mix deps.get` [^1]. This pulls in any new dependencies.
4. Stop the Pleroma service.
5. Run `mix ecto.migrate` [^1] [^2]. This task performs database migrations, if there were any.
6. Start the Pleroma service.
[^1]: Depending on which install guide you followed (for example on Debian/Ubuntu), you want to run `mix` tasks as `pleroma` user by adding `sudo -Hu pleroma` before the command.
[^1]: Depending on which install guide you followed (for example on Debian/Ubuntu), you want to run `git` and `mix` tasks as `pleroma` user by adding `sudo -Hu pleroma` before the command.
[^2]: Prefix with `MIX_ENV=prod` to run it using the production config file.

View File

@ -3,12 +3,6 @@ Note: Additional clients may be working but theses are officially supporting Ple
Feel free to contact us to be added to this list!
## Desktop
### Roma for Desktop
- Homepage: <https://www.pleroma.com/#desktopApp>
- Source Code: <https://github.com/roma-apps/roma-desktop>
- Platforms: Windows, Mac, Linux
- Features: MastoAPI, Streaming Ready
### Social
- Source Code: <https://gitlab.gnome.org/World/Social>
- Contact: [@brainblasted@social.libre.fi](https://social.libre.fi/users/brainblasted)
@ -19,7 +13,14 @@ Feel free to contact us to be added to this list!
### Whalebird
- Homepage: <https://whalebird.social/>
- Source Code: <https://github.com/h3poteto/whalebird-desktop>
- Contact: [@h3poteto@pleroma.io](https://pleroma.io/users/h3poteto)
- Contact: [@whalebird@pleroma.io](https://pleroma.io/users/whalebird)
- Platforms: Windows, Mac, Linux
- Features: MastoAPI, Streaming Ready
### Fedistar
- Homepage: <https://fedistar.net>
- Source Code: <https://github.com/h3poteto/fedistar>
- Contact: [@fedistar@pleroma.io](https://pleroma.io/users/fedistar)
- Platforms: Windows, Mac, Linux
- Features: MastoAPI, Streaming Ready
@ -116,3 +117,9 @@ Feel free to contact us to be added to this list!
- Contact: [@r@freesoftwareextremist.com](https://freesoftwareextremist.com/users/r)
- Features: Does not requires JavaScript
- Features: MastoAPI
### Glitch-lily
- Source Code: <https://lily.kazv.moe/infra/glitch-lily>
- Contact: [@tusooa@kazv.moe](https://kazv.moe/users/tusooa)
- Features: MastoAPI
- Based on [glitch-soc](https://github.com/glitch-soc/mastodon) frontend

View File

@ -18,6 +18,7 @@ To add configuration to your config file, you can copy it from the base config.
* `email`: Email used to reach an Administrator/Moderator of the instance.
* `notify_email`: Email used for notifications.
* `description`: The instances description, can be seen in nodeinfo and ``/api/v1/instance``.
* `short_description`: Shorter version of instance description, can be seen on ``/api/v1/instance``.
* `limit`: Posts character limit (CW/Subject included in the counter).
* `description_limit`: The character limit for image descriptions.
* `remote_limit`: Hard character limit beyond which remote posts will be dropped.
@ -48,6 +49,7 @@ To add configuration to your config file, you can copy it from the base config.
* `autofollowing_nicknames`: Set to nicknames of (local) users that automatically follows every newly registered user.
* `attachment_links`: Set to true to enable automatically adding attachment link text to statuses.
* `max_report_comment_size`: The maximum size of the report comment (Default: `1000`).
* `report_strip_status`: Strip associated statuses in reports to ids when closed/resolved, otherwise keep a copy.
* `safe_dm_mentions`: If set to true, only mentions at the beginning of a post will be used to address people in direct messages. This is to prevent accidental mentioning of people when talking about them (e.g. "@friend hey i really don't like @enemy"). Default: `false`.
* `healthcheck`: If set to true, system data will be shown on ``/api/v1/pleroma/healthcheck``.
* `remote_post_retention_days`: The default amount of days to retain remote posts when pruning the database.
@ -64,6 +66,36 @@ To add configuration to your config file, you can copy it from the base config.
* `cleanup_attachments`: Remove attachments along with statuses. Does not affect duplicate files and attachments without status. Enabling this will increase load to database when deleting statuses on larger instances.
* `show_reactions`: Let favourites and emoji reactions be viewed through the API (default: `true`).
* `password_reset_token_validity`: The time after which reset tokens aren't accepted anymore, in seconds (default: one day).
* `admin_privileges`: A list of privileges an admin has (e.g. delete messages, manage reports...)
* Possible values are:
* `:users_read`
* Allows admins to fetch users through the admin API.
* `:users_manage_invites`
* Allows admins to manage invites. This includes sending, resending, revoking and approving invites.
* `:users_manage_activation_state`
* Allows admins to activate and deactivate accounts. This also allows them to see deactivated users through the Mastodon API.
* `:users_manage_tags`
* Allows admins to set and remove tags for users. This can be useful in combination with MRF policies, such as `Pleroma.Web.ActivityPub.MRF.TagPolicy`.
* `:users_manage_credentials`
* Allows admins to trigger a password reset and set new credentials for an user.
* `:users_delete`
* Allows admins to delete accounts. Note that deleting an account is actually deactivating it and removing all data like posts, profile information, etc.
* `:messages_read`
* Allows admins to read messages through the admin API, including non-public posts and chats.
* `:messages_delete`
* Allows admins to delete messages from other users.
* `:instances_delete,`
* Allows admins to remove a whole remote instance from your instance. This will delete all users and messages from that remote instance.
* `:reports_manage_reports`
* Allows admins to see and manage reports.
* `:moderation_log_read,`
* Allows admins to read the entries in the moderation log.
* `:emoji_manage_emoji`
* Allows admins to manage custom emoji on the instance.
* `:statistics_read,`
* Allows admins to see some simple statistics about the instance.
* `moderator_privileges`: A list of privileges a moderator has (e.g. delete messages, manage reports...)
* Possible values are the same as for `admin_privileges`
## :database
* `improved_hashtag_timeline`: Setting to force toggle / force disable improved hashtags timeline. `:enabled` forces hashtags to be fetched from `hashtags` table for hashtags timeline. `:disabled` forces object-embedded hashtags to be used (slower). Keep it `:auto` for automatic behaviour (it is auto-set to `:enabled` [unless overridden] when HashtagsTableMigrator completes).
@ -125,6 +157,9 @@ To add configuration to your config file, you can copy it from the base config.
* `Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy`: Sets a default expiration on all posts made by users of the local instance. Requires `Pleroma.Workers.PurgeExpiredActivity` to be enabled for processing the scheduled delections.
* `Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicy`: Makes all bot posts to disappear from public timelines.
* `Pleroma.Web.ActivityPub.MRF.FollowBotPolicy`: Automatically follows newly discovered users from the specified bot account. Local accounts, locked accounts, and users with "#nobot" in their bio are respected and excluded from being followed.
* `Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicy`: Drops follow requests from followbots. Users can still allow bots to follow them by first following the bot.
* `Pleroma.Web.ActivityPub.MRF.KeywordPolicy`: Rejects or removes from the federated timeline or replaces keywords. (See [`:mrf_keyword`](#mrf_keyword)).
* `Pleroma.Web.ActivityPub.MRF.ForceMentionsInContent`: Forces every mentioned user to be reflected in the post content.
* `transparency`: Make the content of your Message Rewrite Facility settings public (via nodeinfo).
* `transparency_exclusions`: Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.
@ -200,7 +235,7 @@ config :pleroma, :mrf_user_allowlist, %{
e.g., A value of 900 results in any post with a timestamp older than 15 minutes will be acted upon.
* `actions`: A list of actions to apply to the post:
* `:delist` removes the post from public timelines
* `:strip_followers` removes followers from the ActivityPub recipient list, ensuring they won't be delivered to home timelines
* `:strip_followers` removes followers from the ActivityPub recipient list, ensuring they won't be delivered to home timelines, additionally for followers-only it degrades to a direct message
* `:reject` rejects the message entirely
#### :mrf_steal_emoji
@ -624,12 +659,18 @@ This filter replaces the filename (not the path) of an upload. For complete obfu
No specific configuration.
#### Pleroma.Upload.Filter.Exiftool
#### Pleroma.Upload.Filter.Exiftool.StripLocation
This filter only strips the GPS and location metadata with Exiftool leaving color profiles and attributes intact.
No specific configuration.
#### Pleroma.Upload.Filter.Exiftool.ReadDescription
This filter reads the ImageDescription and iptc:Caption-Abstract fields with Exiftool so clients can prefill the media description field.
No specific configuration.
#### Pleroma.Upload.Filter.Mogrify
* `args`: List of actions for the `mogrify` command like `"strip"` or `["strip", "auto-orient", {"implode", "1"}]`.
@ -767,7 +808,7 @@ Web Push Notifications configuration. You can use the mix task `mix web_push.gen
* ``private_key``: VAPID private key
## :logger
* `backends`: `:console` is used to send logs to stdout, `{ExSyslogger, :ex_syslogger}` to log to syslog, and `Quack.Logger` to log to Slack
* `backends`: `:console` is used to send logs to stdout, `{ExSyslogger, :ex_syslogger}` to log to syslog
An example to enable ONLY ExSyslogger (f/ex in ``prod.secret.exs``) with info and debug suppressed:
```elixir
@ -790,10 +831,10 @@ config :logger, :ex_syslogger,
See: [loggers documentation](https://hexdocs.pm/logger/Logger.html) and [ex_sysloggers documentation](https://hexdocs.pm/ex_syslogger/)
An example of logging info to local syslog, but warn to a Slack channel:
An example of logging info to local syslog, but debug to console:
```elixir
config :logger,
backends: [ {ExSyslogger, :ex_syslogger}, Quack.Logger ],
backends: [ {ExSyslogger, :ex_syslogger}, :console ],
level: :info
config :logger, :ex_syslogger,
@ -801,14 +842,12 @@ config :logger, :ex_syslogger,
ident: "pleroma",
format: "$metadata[$level] $message"
config :quack,
level: :warn,
meta: [:all],
webhook_url: "https://hooks.slack.com/services/YOUR-API-KEY-HERE"
config :logger, :console,
level: :debug,
format: "\n$time $metadata[$level] $message\n",
metadata: [:request_id]
```
See the [Quack Github](https://github.com/azohra/quack) for more details
## Database options
@ -834,21 +873,8 @@ This will probably take a long time.
### BBS / SSH access
To enable simple command line interface accessible over ssh, add a setting like this to your configuration file:
```exs
app_dir = File.cwd!
priv_dir = Path.join([app_dir, "priv/ssh_keys"])
config :esshd,
enabled: true,
priv_dir: priv_dir,
handler: "Pleroma.BBS.Handler",
port: 10_022,
password_authenticator: "Pleroma.BBS.Authenticator"
```
Feel free to adjust the priv_dir and port number. Then you will have to create the key for the keys (in the example `priv/ssh_keys`) and create the host keys with `ssh-keygen -m PEM -N "" -b 2048 -t rsa -f ssh_host_rsa_key`. After restarting, you should be able to connect to your Pleroma instance with `ssh username@server -p $PORT`
This feature has been removed from Pleroma core.
However, a client has been made and is available at https://git.pleroma.social/Duponin/sshocial.
### :gopher
* `enabled`: Enables the gopher interface

View File

@ -0,0 +1,62 @@
# How to use a different domain name for Pleroma and the users it serves
Pleroma users are primarily identified by a `user@example.org` handle, and you might want this identifier to be the same as your email or jabber account, for instance.
However, in this case, you are almost certainly serving some web content on `https://example.org` already, and you might want to use another domain (say `pleroma.example.org`) for Pleroma itself.
Pleroma supports that, but it might be tricky to set up, and any error might prevent you from federating with other instances.
*If you are already running Pleroma on `example.org`, it is no longer possible to move it to `pleroma.example.org`.*
## Account identifiers
It is important to understand that for federation purposes, a user in Pleroma has two unique identifiers associated:
- A webfinger `acct:` URI, used for discovery and as a verifiable global name for the user across Pleroma instances. In our example, our account's acct: URI is `acct:user@example.org`
- An author/actor URI, used in every other aspect of federation. This is the way in which users are identified in ActivityPub, the underlying protocol used for federation with other Pleroma instances.
In our case, it is `https://pleroma.example.org/users/user`.
Both account identifiers are unique and required for Pleroma. An important risk if you set up your Pleroma instance incorrectly is to create two users (with different acct: URIs) with conflicting author/actor URIs.
## WebFinger
As said earlier, each Pleroma user has an `acct`: URI, which is used for discovery and authentication. When you add @user@example.org, a webfinger query is performed. This is done in two steps:
1. Querying `https://example.org/.well-known/host-meta` (where the domain of the URL matches the domain part of the `acct`: URI) to get information on how to perform the query.
This file will indeed contain a URL template of the form `https://example.org/.well-known/webfinger?resource={uri}` that will be used in the second step.
2. Fill the returned template with the `acct`: URI to be queried and perform the query: `https://example.org/.well-known/webfinger?resource=acct:user@example.org`
## Configuring your Pleroma instance
**_DO NOT ATTEMPT TO CONFIGURE YOUR INSTANCE THIS WAY IF YOU DID NOT UNDERSTAND THE ABOVE_**
### Configuring Pleroma
Pleroma has a two configuration settings to enable using different domains for your users and Pleroma itself. `host` in `Pleroma.Web.Endpoint` and `domain` in `Pleroma.Web.WebFinger`. When the latter is not set, it defaults to the value of `host`.
*Be extra careful when configuring your Pleroma instance, as changing `host` may cause remote instances to register different accounts with the same author/actor URI, which will result in federation issues!*
```elixir
config :pleroma, Pleroma.Web.Endpoint,
url: [host: "pleroma.example.org"]
config :pleroma, Pleroma.Web.WebFinger, domain: "example.org"
```
- `domain` - is the domain for which your Pleroma instance has authority, it's the domain used in `acct:` URI. In our example, `domain` would be set to `example.org`. This is used in WebFinger account ids, which are the canonical account identifier in some other fediverse software like Mastodon. **If you change `domain`, the accounts on your server will be shown as different accounts in those software**.
- `host` - is the domain used for any URL generated for your instance, including the author/actor URL's. In our case, that would be `pleroma.example.org`. This is used in AP ids, which are the canonical account identifier in Pleroma and some other fediverse software. **You should not change this after you have set up the instance**.
### Configuring WebFinger domain
Now, you have Pleroma running at `https://pleroma.example.org` as well as a website at `https://example.org`. If you recall how webfinger queries work, the first step is to query `https://example.org/.well-known/host-meta`, which will contain an URL template.
Therefore, the easiest way to configure `example.org` is to redirect `/.well-known/host-meta` to `pleroma.example.org`.
With nginx, it would be as simple as adding:
```nginx
location = /.well-known/host-meta {
return 301 https://pleroma.example.org$request_uri;
}
```
in example.org's server block.

View File

@ -59,7 +59,7 @@ The configuration of Pleroma has traditionally been managed with a config file,
Here is an example of a server config stripped down after migration:
```
use Mix.Config
import Config
config :pleroma, Pleroma.Web.Endpoint,
url: [host: "cool.pleroma.site", scheme: "https", port: 443]

View File

@ -1064,7 +1064,6 @@ List of settings which support only full update by key:
```elixir
@full_key_update [
{:pleroma, :ecto_repos},
{:quack, :meta},
{:mime, :types},
{:cors_plug, [:max_age, :methods, :expose, :headers]},
{:auto_linker, :opts},
@ -1084,18 +1083,18 @@ List of settings which support only full update by subkey:
]
```
*Settings without explicit key must be sended in separate config object params.*
*Settings without explicit key must be sent in separate config object params.*
```elixir
config :quack,
level: :debug,
meta: [:all],
config :foo,
bar: :baz,
meta: [:data],
...
```
```json
{
"configs": [
{"group": ":quack", "key": ":level", "value": ":debug"},
{"group": ":quack", "key": ":meta", "value": [":all"]},
{"group": ":foo", "key": ":bar", "value": ":baz"},
{"group": ":foo", "key": ":meta", "value": [":data"]},
...
]
}
@ -1586,6 +1585,7 @@ Returns the content of the document
"build_url": "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
"git": "https://git.pleroma.social/pleroma/fedi-fe",
"installed": true,
"installed_refs": ["master"],
"name": "fedi-fe",
"ref": "master"
},
@ -1593,6 +1593,7 @@ Returns the content of the document
"build_url": "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
"git": "https://git.pleroma.social/lambadalambda/kenoma",
"installed": false,
"installed_refs": [],
"name": "kenoma",
"ref": "master"
}
@ -1636,3 +1637,117 @@ Returns the content of the document
"error": "Could not install frontend"
}
```
## `GET /api/v1/pleroma/admin/announcements`
### List announcements
- Params: `offset`, `limit`
- Response: JSON, list of announcements
```json
[
{
"id": "AHDp0GBdRn1EPN5HN2",
"content": "some content",
"starts_at": null,
"ends_at": null,
"all_day": false,
"published_at": "2022-03-09T02:13:05",
"reactions": [],
"statuses": [],
"tags": [],
"emojis": [],
"updated_at": "2022-03-09T02:13:05"
}
]
```
Note that this differs from the Mastodon API variant: Mastodon API only returns *active* announcements, while this returns all.
## `GET /api/v1/pleroma/admin/announcements/:id`
### Display one announcement
- Response: JSON, one announcement
```json
{
"id": "AHDp0GBdRn1EPN5HN2",
"content": "some content",
"starts_at": null,
"ends_at": null,
"all_day": false,
"published_at": "2022-03-09T02:13:05",
"reactions": [],
"statuses": [],
"tags": [],
"emojis": [],
"updated_at": "2022-03-09T02:13:05"
}
```
## `POST /api/v1/pleroma/admin/announcements`
### Create an announcement
- Params:
- `content`: string, required, announcement content
- `starts_at`: datetime, optional, default to null, the time when the announcement will become active (displayed to users); if it is null, the announcement will be active immediately
- `ends_at`: datetime, optional, default to null, the time when the announcement will become inactive (no longer displayed to users); if it is null, the announcement will be active until an admin deletes it
- `all_day`: boolean, optional, default to false, tells the client whether to only display dates for `starts_at` and `ends_at`
- Response: JSON, created announcement
```json
{
"id": "AHDp0GBdRn1EPN5HN2",
"content": "some content",
"starts_at": null,
"ends_at": null,
"all_day": false,
"published_at": "2022-03-09T02:13:05",
"reactions": [],
"statuses": [],
"tags": [],
"emojis": [],
"updated_at": "2022-03-09T02:13:05"
}
```
## `PATCH /api/v1/pleroma/admin/announcements/:id`
### Change an announcement
- Params: same as `POST /api/v1/pleroma/admin/announcements`, except no param is required.
- Updates the announcement according to params. Missing params are kept as-is.
- Response: JSON, updated announcement
```json
{
"id": "AHDp0GBdRn1EPN5HN2",
"content": "some content",
"starts_at": null,
"ends_at": null,
"all_day": false,
"published_at": "2022-03-09T02:13:05",
"reactions": [],
"statuses": [],
"tags": [],
"emojis": [],
"updated_at": "2022-03-09T02:13:05"
}
```
## `DELETE /api/v1/pleroma/admin/announcements/:id`
### Delete an announcement
- Response: JSON, empty object
```json
{}
```

View File

@ -40,6 +40,10 @@ Has these additional fields under the `pleroma` object:
- `parent_visible`: If the parent of this post is visible to the user or not.
- `pinned_at`: a datetime (iso8601) when status was pinned, `null` otherwise.
The `GET /api/v1/statuses/:id/source` endpoint additionally has the following attributes:
- `content_type`: The content type of the status source.
## Scheduled statuses
Has these additional fields in `params`:
@ -241,6 +245,7 @@ Additional parameters can be added to the JSON body/Form data:
- `discoverable` - if true, external services (search bots) etc. are allowed to index / list the account (regardless of this setting, user will still appear in regular search results).
- `actor_type` - the type of this account.
- `accepts_chat_messages` - if false, this account will reject all chat messages.
- `language` - user's preferred language for receiving emails (digest, confirmation, etc.)
All images (avatar, banner and background) can be reset to the default by sending an empty string ("") instead of a file.
@ -292,6 +297,7 @@ Has these additional parameters (which are the same as in Pleroma-API):
- `captcha_token`: optional, contains provider-specific captcha token
- `captcha_answer_data`: optional, contains provider-specific captcha data
- `token`: invite token required when the registrations aren't public.
- `language`: optional, user's preferred language for receiving emails (digest, confirmation, etc.), default to the language set in the `userLanguage` cookies or `Accept-Language` header.
## Instance
@ -377,12 +383,6 @@ Pleroma is generally compatible with the Mastodon 2.7.2 API, but some newer feat
- `GET /api/v1/identity_proofs`: Returns an empty array, `[]`
### Endorsements
*Added in Mastodon 2.5.0*
- `GET /api/v1/endorsements`: Returns an empty array, `[]`
### Featured tags
*Added in Mastodon 3.0.0*

View File

@ -342,6 +342,36 @@ See [Admin-API](admin_api.md)
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
* Note: Currently, Mastodon has no API for changing email. If they add it in future it might be incompatible with Pleroma.
## `/api/pleroma/move_account`
### Move account
* Method `POST`
* Authentication: required
* Params:
* `password`: user's password
* `target_account`: the nickname of the target account (e.g. `foo@example.org`)
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
* Note: This endpoint emits a `Move` activity to all followers of the current account. Some remote servers will automatically unfollow the current account and follow the target account upon seeing this, but this depends on the remote server implementation and cannot be guaranteed. For local followers , they will automatically unfollow and follow if and only if they have set the `allow_following_move` preference ("Allow auto-follow when following account moves").
## `/api/pleroma/aliases`
### Get aliases of the current account
* Method `GET`
* Authentication: required
* Response: JSON. Returns `{"aliases": [alias, ...]}`, where `alias` is the nickname of an alias, e.g. `foo@example.org`.
### Add alias to the current account
* Method `PUT`
* Authentication: required
* Params:
* `alias`: the nickname of the alias to add, e.g. `foo@example.org`.
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
### Delete alias from the current account
* Method `DELETE`
* Authentication: required
* Params:
* `alias`: the nickname of the alias to delete, e.g. `foo@example.org`.
* Response: JSON. Returns `{"status": "success"}` if the change was successful, `{"error": "[error message]"}` otherwise
# Pleroma Conversations
Pleroma Conversations have the same general structure that Mastodon Conversations have. The behavior differs in the following ways when using these endpoints:
@ -660,3 +690,77 @@ Emoji reactions work a lot like favourites do. They make it possible to react to
"url": "https://example.com/media/backups/archive-foobar-20200910T161803-QUhx6VYDRQ2wfV0SdA2Pfj_2CLM_ATUlw-D5l5TJf4Q.zip"
}]
```
## `GET /api/oauth_tokens`
### Retrieve a list of active sessions for the user
* Method: `GET`
* Authentication: required
* Params: none
* Response: JSON
* Example response:
```json
[
{
"app_name": "Pleroma FE",
"id": 9275,
"valid_until": "2121-11-24T15:51:08.234234"
},
{
"app_name": "Patron",
"id": 8805,
"valid_until": "2121-10-26T18:09:59.857150"
},
{
"app_name": "Soapbox FE",
"id": 9727,
"valid_until": "2121-12-25T16:52:39.692877"
}
]
```
## `DELETE /api/oauth_tokens/:id`
### Revoke a user session by its ID
* Method: `DELETE`
* Authentication: required
* Params: none
* Response: HTTP 200 on success, 500 on error
## `/api/v1/pleroma/settings/:app`
### Gets settings for some application
* Method `GET`
* Authentication: `read:accounts`
* Response: JSON. The settings for that application, or empty object if there is none.
* Example response:
```json
{
"some key": "some value"
}
```
### Updates settings for some application
* Method `PATCH`
* Authentication: `write:accounts`
* Request body: JSON object. The object will be merged recursively with old settings. If some field is set to null, it is removed.
* Example request:
```json
{
"some key": "some value",
"key to remove": null,
"nested field": {
"some key": "some value",
"key to remove": null
}
}
```
* Response: JSON. Updated (merged) settings for that application.
* Example response:
```json
{
"some key": "some value",
"nested field": {
"some key": "some value",
}
}
```

View File

@ -0,0 +1,9 @@
# Setting up a Gitlab-runner
When you push changes, a pipeline will start some automated jobs. These are done with so called [runners](https://docs.gitlab.com/runner/), services that run somewhere on a server and run these automated jobs. These jobs typically run tests and should pass. If not, you probably need to fix something.
Generally, Pleroma provides a runner, so you don't need to set up your own. However, if for whatever reason you want to set up your own, here's some high level instructions.
1. We use docker to run the jobs, so you should install that. For Debian, you need to allow non-free packages in the [source list](https://wiki.debian.org/SourcesList). Then you can install docker with `apt install docker-compose`.
2. You can [install](https://docs.gitlab.com/runner/install/index.html) and [configure](https://docs.gitlab.com/runner/register/index.html) a Gitlab-runner. It's probably easiest to install from the packages, but there are other options as well.
3. When registering the runner, you'll need some values. You can find them in the project under your own name. Choose "Settings", "CI/CD", and then expand "Runners". For executor you can choose "docker". For default image, you can use the image used in <https://git.pleroma.social/pleroma/pleroma/-/blob/develop/.gitlab-ci.yml#L1> (although it shouldn't matter much).

View File

@ -1,7 +1,7 @@
## Required dependencies
* PostgreSQL 9.6+
* Elixir 1.9+
* Elixir 1.10+
* Erlang OTP 22.2+
* git
* file / libmagic

View File

@ -5,7 +5,7 @@
In this guide we cover how you can migrate from a from source installation to one using OTP releases.
## Pre-requisites
You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`.
You will be running commands as root. If you aren't root already, please elevate your privileges by executing `sudo su`/`su`.
The system needs to have `curl` and `unzip` installed for downloading and unpacking release builds.

View File

@ -0,0 +1,15 @@
# Installing on NixOS
NixOS contains a source build package of pleroma and a NixOS module to install it.
For installation add this to your configuration.nix and add a config.exs next to it:
```nix
services.pleroma = {
enable = true;
configs = [ (lib.fileContents ./config.exs) ];
secretConfigFile = "/var/lib/pleroma/secret.exs";
};
```
## Questions
The nix community uses matrix for communication: [#nix:nixos.org](https://matrix.to/#/#nix:nixos.org)

View File

@ -1,9 +1,9 @@
# Optional software packages needed for specific functionality
For specific Pleroma functionality (which is disabled by default) some or all of the below packages are required:
* `ImageMagic`
* `ffmpeg`
* `exiftool`
* `ImageMagic`
* `ffmpeg`
* `exiftool`
Please refer to documentation in `docs/installation` on how to install them on specific OS.
@ -14,19 +14,20 @@ Note: the packages are not required with the current default settings of Pleroma
`ImageMagick` is a set of tools to create, edit, compose, or convert bitmap images.
It is required for the following Pleroma features:
* `Pleroma.Upload.Filters.Mogrify`, `Pleroma.Upload.Filters.Mogrifun` upload filters (related config: `Plaroma.Upload/filters` in `config/config.exs`)
* Media preview proxy for still images (related config: `media_preview_proxy/enabled` in `config/config.exs`)
* `Pleroma.Upload.Filters.Mogrify`, `Pleroma.Upload.Filters.Mogrifun` upload filters (related config: `Plaroma.Upload/filters` in `config/config.exs`)
* Media preview proxy for still images (related config: `media_preview_proxy/enabled` in `config/config.exs`)
## `ffmpeg`
`ffmpeg` is software to record, convert and stream audio and video.
It is required for the following Pleroma features:
* Media preview proxy for videos (related config: `media_preview_proxy/enabled` in `config/config.exs`)
* Media preview proxy for videos (related config: `media_preview_proxy/enabled` in `config/config.exs`)
## `exiftool`
`exiftool` is media files metadata reader/writer.
It is required for the following Pleroma features:
* `Pleroma.Upload.Filters.Exiftool` upload filter (related config: `Plaroma.Upload/filters` in `config/config.exs`)
* `Pleroma.Upload.Filters.Exiftool.StripLocation` upload filter (related config: `Plaroma.Upload/filters` in `config/config.exs`)
* `Pleroma.Upload.Filters.Exiftool.ReadDescription` upload filter (related config: `Plaroma.Upload/filters` in `config/config.exs`)

View File

@ -2,15 +2,16 @@
{! backend/installation/otp_vs_from_source.include !}
This guide covers a installation using an OTP release. To install Pleroma from source, please check out the corresponding guide for your distro.
This guide covers a installation using OTP releases as built by the Pleroma project, it is meant as a fallback to distribution packages/recipes which are the preferred installation method.
To install Pleroma from source, please check out the corresponding guide for your distro.
## Pre-requisites
* A machine running Linux with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPU, you have root access to. If you are not sure if it's compatible see [Detecting flavour section](#detecting-flavour) below
* A machine you have root access to running Debian GNU/Linux or compatible (eg. Ubuntu), or Alpine on `x86_64`, `aarch64` or `armv7l` CPU. If you are not sure what you are running see [Detecting flavour section](#detecting-flavour) below
* A (sub)domain pointed to the machine
You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`.
You will be running commands as root. If you aren't root already, please elevate your privileges by executing `sudo -i`/`su`.
While in theory OTP releases are possbile to install on any compatible machine, for the sake of simplicity this guide focuses only on Debian/Ubuntu and Alpine.
Similarly to other binaries, OTP releases tend to be only compatible with the distro they are built on, as such this guide focuses only on Debian/Ubuntu and Alpine.
### Detecting flavour
@ -19,7 +20,7 @@ Paste the following into the shell:
arch="$(uname -m)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;fi;echo "$arch$libc_postfix"
```
If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try installing from source.
This should give your flavour string. If not this just means that we don't build releases for your platform, you can still try installing from source.
### Installing the required packages

View File

@ -1,2 +1,2 @@
elixir_version=1.9.4
elixir_version=1.10.4
erlang_version=22.3.4.1

View File

@ -5,34 +5,13 @@
# 2. Copy this section into your Caddyfile and restart Caddy.
example.tld {
log /var/log/caddy/pleroma_access.log
errors /var/log/caddy/pleroma_error.log
log {
output file /var/log/caddy/pleroma.log
}
gzip
encode gzip
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
# and `localhost.` resolves to [::0] on some systems: see issue #930
proxy / 127.0.0.1:4000 {
websocket
transparent
}
tls {
# Remove the rest of the lines in here, if you want to support older devices
key_type p256
ciphers ECDHE-ECDSA-WITH-CHACHA20-POLY1305 ECDHE-RSA-WITH-CHACHA20-POLY1305 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-GCM-SHA256
}
# If you do not want to use the mediaproxy function, remove these lines.
# To use this directive, you need the http.cache plugin for Caddy.
cache {
match_path /media
default_max_age 720m
}
cache {
match_path /proxy
default_max_age 720m
}
# Stop removing lines here.
reverse_proxy 127.0.0.1:4000
}

View File

@ -466,7 +466,7 @@
%% == PostgreSQL ==
%% {rdbms, global, default, [{workers, 10}],
%% [{server, {pgsql, "server", 5432, "database", "username", "password"}}]},
%% [{server, {pgsql, "server", "port", "database", "username", "password"}}]},
%% == ODBC (MSSQL) ==
%% {rdbms, global, default, [{workers, 10}],

View File

@ -81,6 +81,19 @@ server {
proxy_pass http://phoenix;
}
# Uncomment this if you want notice compatibility routes for frontends like Soapbox.
# location ~ ^/@[^/]+/([^/]+)$ {
# proxy_pass http://phoenix/notice/$1;
# }
#
# location ~ ^/@[^/]+/posts/([^/]+)$ {
# proxy_pass http://phoenix/notice/$1;
# }
#
# location ~ ^/[^/]+/status/([^/]+)$ {
# proxy_pass http://phoenix/notice/$1;
# }
location ~ ^/(media|proxy) {
proxy_cache pleroma_media_cache;
slice 1m;

View File

@ -1,4 +1,5 @@
# Recommended varnishncsa logging format: '%h %l %u %t "%m %{X-Forwarded-Proto}i://%{Host}i%U%q %H" %s %b "%{Referer}i" "%{User-agent}i"'
# Please use Varnish 7.0+ for proper Range Requests / Chunked encoding support
vcl 4.1;
import std;
@ -22,11 +23,6 @@ sub vcl_recv {
set req.http.X-Forwarded-Proto = "https";
}
# CHUNKED SUPPORT
if (req.http.Range ~ "bytes=") {
set req.http.x-range = req.http.Range;
}
# Pipe if WebSockets request is coming through
if (req.http.upgrade ~ "(?i)websocket") {
return (pipe);
@ -35,9 +31,9 @@ sub vcl_recv {
# Allow purging of the cache
if (req.method == "PURGE") {
if (!client.ip ~ purge) {
return(synth(405,"Not allowed."));
return (synth(405,"Not allowed."));
}
return(purge);
return (purge);
}
}
@ -53,17 +49,11 @@ sub vcl_backend_response {
return (retry);
}
# CHUNKED SUPPORT
if (bereq.http.x-range ~ "bytes=" && beresp.status == 206) {
set beresp.ttl = 10m;
set beresp.http.CR = beresp.http.content-range;
}
# Bypass cache for large files
# 50000000 ~ 50MB
if (std.integer(beresp.http.content-length, 0) > 50000000) {
set beresp.uncacheable = true;
return(deliver);
return (deliver);
}
# Don't cache objects that require authentication
@ -94,7 +84,7 @@ sub vcl_synth {
if (resp.status == 750) {
set resp.status = 301;
set resp.http.Location = req.http.x-redir;
return(deliver);
return (deliver);
}
}
@ -106,25 +96,12 @@ sub vcl_pipe {
}
}
sub vcl_hash {
# CHUNKED SUPPORT
if (req.http.x-range ~ "bytes=") {
hash_data(req.http.x-range);
unset req.http.Range;
}
}
sub vcl_backend_fetch {
# Be more lenient for slow servers on the fediverse
if (bereq.url ~ "^/proxy/") {
set bereq.first_byte_timeout = 300s;
}
# CHUNKED SUPPORT
if (bereq.http.x-range) {
set bereq.http.Range = bereq.http.x-range;
}
if (bereq.retries == 0) {
# Clean up the X-Varnish-Backend-503 flag that is used internally
# to mark broken backend responses that should be retried.
@ -143,14 +120,6 @@ sub vcl_backend_fetch {
}
}
sub vcl_deliver {
# CHUNKED SUPPORT
if (resp.http.CR) {
set resp.http.Content-Range = resp.http.CR;
unset resp.http.CR;
}
}
sub vcl_backend_error {
# Retry broken backend responses.
set bereq.http.X-Varnish-Backend-503 = "1";

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Pleroma do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.App do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Benchmark do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Config do
@ -304,13 +304,8 @@ defmodule Mix.Tasks.Pleroma.Config do
System.cmd("mix", ["format", path])
end
if Code.ensure_loaded?(Config.Reader) do
defp config_header, do: "import Config\r\n\r\n"
defp read_file(config_file), do: Config.Reader.read_imports!(config_file)
else
defp config_header, do: "use Mix.Config\r\n\r\n"
defp read_file(config_file), do: Mix.Config.eval!(config_file)
end
defp config_header, do: "import Config\r\n\r\n"
defp read_file(config_file), do: Config.Reader.read_imports!(config_file)
defp write_and_delete(config, file, delete?) do
config

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.CountStatuses do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Database do
@ -154,9 +154,8 @@ defmodule Mix.Tasks.Pleroma.Database do
|> join(:inner, [a], o in Object,
on:
fragment(
"(?->>'id') = COALESCE((?)->'object'->> 'id', (?)->>'object')",
"(?->>'id') = associated_object_id((?))",
o.data,
a.data,
a.data
)
)

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Digest do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Docs do

View File

@ -1,6 +1,6 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-onl
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Ecto do
@doc """

View File

@ -1,6 +1,6 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-onl
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Ecto.Migrate do
use Mix.Task

View File

@ -1,6 +1,6 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-onl
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Ecto.Rollback do
use Mix.Task

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Email do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Emoji do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Frontend do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Instance do
@ -34,7 +34,8 @@ defmodule Mix.Tasks.Pleroma.Instance do
static_dir: :string,
listen_ip: :string,
listen_port: :string,
strip_uploads: :string,
strip_uploads_location: :string,
read_uploads_description: :string,
anonymize_uploads: :string,
dedupe_uploads: :string
],
@ -161,7 +162,7 @@ defmodule Mix.Tasks.Pleroma.Instance do
)
|> Path.expand()
{strip_uploads_message, strip_uploads_default} =
{strip_uploads_location_message, strip_uploads_location_default} =
if Pleroma.Utils.command_available?("exiftool") do
{"Do you want to strip location (GPS) data from uploaded images? This requires exiftool, it was detected as installed. (y/n)",
"y"}
@ -170,12 +171,29 @@ defmodule Mix.Tasks.Pleroma.Instance do
"n"}
end
strip_uploads =
strip_uploads_location =
get_option(
options,
:strip_uploads,
strip_uploads_message,
strip_uploads_default
:strip_uploads_location,
strip_uploads_location_message,
strip_uploads_location_default
) === "y"
{read_uploads_description_message, read_uploads_description_default} =
if Pleroma.Utils.command_available?("exiftool") do
{"Do you want to read data from uploaded files so clients can use it to prefill fields like image description? This requires exiftool, it was detected as installed. (y/n)",
"y"}
else
{"Do you want to read data from uploaded files so clients can use it to prefill fields like image description? This requires exiftool, it was detected as not installed, please install it if you answer yes. (y/n)",
"n"}
end
read_uploads_description =
get_option(
options,
:read_uploads_description,
read_uploads_description_message,
read_uploads_description_default
) === "y"
anonymize_uploads =
@ -229,7 +247,8 @@ defmodule Mix.Tasks.Pleroma.Instance do
listen_port: listen_port,
upload_filters:
upload_filters(%{
strip: strip_uploads,
strip_location: strip_uploads_location,
read_description: read_uploads_description,
anonymize: anonymize_uploads,
dedupe: dedupe_uploads
})
@ -297,12 +316,19 @@ defmodule Mix.Tasks.Pleroma.Instance do
defp upload_filters(filters) when is_map(filters) do
enabled_filters =
if filters.strip do
[Pleroma.Upload.Filter.Exiftool]
if filters.strip_location do
[Pleroma.Upload.Filter.Exiftool.StripLocation]
else
[]
end
enabled_filters =
if filters.read_description do
enabled_filters ++ [Pleroma.Upload.Filter.Exiftool.ReadDescription]
else
enabled_filters
end
enabled_filters =
if filters.anonymize do
enabled_filters ++ [Pleroma.Upload.Filter.AnonymizeFilename]

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.NotificationSettings do

View File

@ -1,8 +1,75 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.OpenapiSpec do
def run([path]) do
# Load Pleroma application to get version info
Application.load(:pleroma)
spec = Pleroma.Web.ApiSpec.spec(server_specific: false) |> Jason.encode!()
File.write(path, spec)
spec_json = Pleroma.Web.ApiSpec.spec(server_specific: false) |> Jason.encode!()
# to get rid of the structs
spec_regened = spec_json |> Jason.decode!()
check_specs!(spec_regened)
File.write(path, spec_json)
end
defp check_specs!(spec) do
with :ok <- check_specs(spec) do
:ok
else
{_, errors} ->
IO.puts(IO.ANSI.format([:red, :bright, "Spec check failed, errors:"]))
Enum.map(errors, &IO.puts/1)
raise "Spec check failed"
end
end
def check_specs(spec) do
errors =
spec["paths"]
|> Enum.flat_map(fn {path, %{} = endpoints} ->
Enum.map(
endpoints,
fn {method, endpoint} ->
with :ok <- check_endpoint(spec, endpoint) do
:ok
else
error ->
"#{endpoint["operationId"]} (#{method} #{path}): #{error}"
end
end
)
|> Enum.reject(fn res -> res == :ok end)
end)
if errors == [] do
:ok
else
{:error, errors}
end
end
defp check_endpoint(spec, endpoint) do
valid_tags = available_tags(spec)
with {_, [_ | _] = tags} <- {:tags, endpoint["tags"]},
{_, []} <- {:unavailable, Enum.reject(tags, &(&1 in valid_tags))} do
:ok
else
{:tags, _} ->
"No tags specified"
{:unavailable, tags} ->
"Tags #{inspect(tags)} not available. Please add it in \"x-tagGroups\" in Pleroma.Web.ApiSpec"
end
end
defp available_tags(spec) do
spec["x-tagGroups"]
|> Enum.flat_map(fn %{"tags" => tags} -> tags end)
end
end

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.RefreshCounterCache do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Relay do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.RobotsTxt do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.Uploads do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Tasks.Pleroma.User do
@ -112,9 +112,10 @@ defmodule Mix.Tasks.Pleroma.User do
{:ok, token} <- Pleroma.PasswordResetToken.create_token(user) do
shell_info("Generated password reset token for #{user.nickname}")
IO.puts("URL: #{Pleroma.Web.Router.Helpers.reset_password_url(Pleroma.Web.Endpoint,
:reset,
token.token)}")
url =
Pleroma.Web.Router.Helpers.reset_password_url(Pleroma.Web.Endpoint, :reset, token.token)
IO.puts("URL: #{url}")
else
_ ->
shell_error("No local user #{nickname}")
@ -421,6 +422,38 @@ defmodule Mix.Tasks.Pleroma.User do
|> Stream.run()
end
def run(["fix_follow_state", local_user, remote_user]) do
start_pleroma()
with {:local, %User{} = local} <- {:local, User.get_by_nickname(local_user)},
{:remote, %User{} = remote} <- {:remote, User.get_by_nickname(remote_user)},
{:follow_data, %{data: %{"state" => request_state}}} <-
{:follow_data, Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(local, remote)} do
calculated_state = User.following?(local, remote)
shell_info(
"Request state is #{request_state}, vs calculated state of following=#{calculated_state}"
)
if calculated_state == false && request_state == "accept" do
shell_info("Discrepancy found, fixing")
Pleroma.Web.CommonAPI.reject_follow_request(local, remote)
shell_info("Relationship fixed")
else
shell_info("No discrepancy found")
end
else
{:local, _} ->
shell_error("No local user #{local_user}")
{:remote, _} ->
shell_error("No remote user #{remote_user}")
{:follow_data, _} ->
shell_error("No follow data for #{local_user} and #{remote_user}")
end
end
defp set_moderator(user, value) do
{:ok, user} =
user

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Phoenix.Transports.WebSocket.Raw do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Activity do
@ -53,7 +53,7 @@ defmodule Pleroma.Activity do
#
# ```
# |> join(:inner, [activity], o in Object,
# on: fragment("(?->>'id') = COALESCE((?)->'object'->> 'id', (?)->>'object')",
# on: fragment("(?->>'id') = associated_object_id((?))",
# o.data, activity.data, activity.data))
# |> preload([activity, object], [object: object])
# ```
@ -69,9 +69,8 @@ defmodule Pleroma.Activity do
join(query, join_type, [activity], o in Object,
on:
fragment(
"(?->>'id') = COALESCE(?->'object'->>'id', ?->>'object')",
"(?->>'id') = associated_object_id(?)",
o.data,
activity.data,
activity.data
),
as: :object
@ -362,9 +361,11 @@ defmodule Pleroma.Activity do
end
def restrict_deactivated_users(query) do
deactivated_users_query = from(u in User.Query.build(%{deactivated: true}), select: u.ap_id)
from(activity in query, where: activity.actor not in subquery(deactivated_users_query))
query
|> join(:inner, [activity], user in User,
as: :user,
on: activity.actor == user.ap_id and user.is_active == true
)
end
defdelegate search(user, query, options \\ []), to: Pleroma.Activity.Search

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Activity.HTML do
@ -8,6 +8,40 @@ defmodule Pleroma.Activity.HTML do
@cachex Pleroma.Config.get([:cachex, :provider], Cachex)
# We store a list of cache keys related to an activity in a
# separate cache, scrubber_management_cache. It has the same
# size as scrubber_cache (see application.ex). Every time we add
# a cache to scrubber_cache, we update scrubber_management_cache.
#
# The most recent write of a certain key in the management cache
# is the same as the most recent write of any record related to that
# key in the main cache.
# Assuming LRW ( https://hexdocs.pm/cachex/Cachex.Policy.LRW.html ),
# this means when the management cache is evicted by cachex, all
# related records in the main cache will also have been evicted.
defp get_cache_keys_for(activity_id) do
with {:ok, list} when is_list(list) <- @cachex.get(:scrubber_management_cache, activity_id) do
list
else
_ -> []
end
end
defp add_cache_key_for(activity_id, additional_key) do
current = get_cache_keys_for(activity_id)
unless additional_key in current do
@cachex.put(:scrubber_management_cache, activity_id, [additional_key | current])
end
end
def invalidate_cache_for(activity_id) do
keys = get_cache_keys_for(activity_id)
Enum.map(keys, &@cachex.del(:scrubber_cache, &1))
@cachex.del(:scrubber_management_cache, activity_id)
end
def get_cached_scrubbed_html_for_activity(
content,
scrubbers,
@ -19,6 +53,8 @@ defmodule Pleroma.Activity.HTML do
@cachex.fetch!(:scrubber_cache, key, fn _key ->
object = Object.normalize(activity, fetch: false)
add_cache_key_for(activity.id, key)
HTML.ensure_scrubbed_html(content, scrubbers, object.data["fake"] || false, callback)
end)
end

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Activity.Ir.Topics do
@ -13,6 +13,14 @@ defmodule Pleroma.Activity.Ir.Topics do
|> List.flatten()
end
defp generate_topics(%{data: %{"type" => "ChatMessage"}}, %{data: %{"type" => "Delete"}}) do
["user", "user:pleroma_chat"]
end
defp generate_topics(%{data: %{"type" => "ChatMessage"}}, %{data: %{"type" => "Create"}}) do
[]
end
defp generate_topics(%{data: %{"type" => "Answer"}}, _) do
[]
end
@ -21,7 +29,7 @@ defmodule Pleroma.Activity.Ir.Topics do
["user", "list"] ++ visibility_tags(object, activity)
end
defp visibility_tags(object, activity) do
defp visibility_tags(object, %{data: %{"type" => type}} = activity) when type != "Announce" do
case Visibility.get_visibility(activity) do
"public" ->
if activity.local do
@ -31,6 +39,10 @@ defmodule Pleroma.Activity.Ir.Topics do
end
|> item_creation_tags(object, activity)
"local" ->
["public:local"]
|> item_creation_tags(object, activity)
"direct" ->
["direct"]
@ -39,6 +51,10 @@ defmodule Pleroma.Activity.Ir.Topics do
end
end
defp visibility_tags(_object, _activity) do
[]
end
defp item_creation_tags(tags, object, %{data: %{"type" => "Create"}} = activity) do
tags ++
remote_topics(activity) ++ hashtags_to_topics(object) ++ attachment_topics(object, activity)
@ -63,7 +79,18 @@ defmodule Pleroma.Activity.Ir.Topics do
defp attachment_topics(%{data: %{"attachment" => []}}, _act), do: []
defp attachment_topics(_object, %{local: true}), do: ["public:media", "public:local:media"]
defp attachment_topics(_object, %{local: true} = activity) do
case Visibility.get_visibility(activity) do
"public" ->
["public:media", "public:local:media"]
"local" ->
["public:local:media"]
_ ->
[]
end
end
defp attachment_topics(_object, %{actor: actor}) when is_binary(actor),
do: ["public:media", "public:remote:media:" <> URI.parse(actor).host]

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Activity.Queries do
@ -52,8 +52,7 @@ defmodule Pleroma.Activity.Queries do
activity in query,
where:
fragment(
"coalesce((?)->'object'->>'id', (?)->>'object') = ANY(?)",
activity.data,
"associated_object_id((?)) = ANY(?)",
activity.data,
^object_ids
)
@ -64,8 +63,7 @@ defmodule Pleroma.Activity.Queries do
from(activity in query,
where:
fragment(
"coalesce((?)->'object'->>'id', (?)->>'object') = ?",
activity.data,
"associated_object_id((?)) = ?",
activity.data,
^object_id
)

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Activity.Search do
@ -30,7 +30,7 @@ defmodule Pleroma.Activity.Search do
Activity
|> Activity.with_preloaded_object()
|> Activity.restrict_deactivated_users()
|> restrict_public()
|> restrict_public(user)
|> query_with(index_type, search_query, search_function)
|> maybe_restrict_local(user)
|> maybe_restrict_author(author)
@ -57,7 +57,19 @@ defmodule Pleroma.Activity.Search do
def maybe_restrict_blocked(query, _), do: query
defp restrict_public(q) do
defp restrict_public(q, user) when not is_nil(user) do
intended_recipients = [
Pleroma.Constants.as_public(),
Pleroma.Web.ActivityPub.Utils.as_local_public()
]
from([a, o] in q,
where: fragment("?->>'type' = 'Create'", a.data),
where: fragment("? && ?", ^intended_recipients, a.recipients)
)
end
defp restrict_public(q, _user) do
from([a, o] in q,
where: fragment("?->>'type' = 'Create'", a.data),
where: ^Pleroma.Constants.as_public() in a.recipients

160
lib/pleroma/announcement.ex Normal file
View File

@ -0,0 +1,160 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Announcement do
use Ecto.Schema
import Ecto.Changeset, only: [cast: 3, validate_required: 2]
import Ecto.Query
alias Pleroma.AnnouncementReadRelationship
alias Pleroma.Repo
@type t :: %__MODULE__{}
@primary_key {:id, FlakeId.Ecto.CompatType, autogenerate: true}
schema "announcements" do
field(:data, :map)
field(:starts_at, :utc_datetime)
field(:ends_at, :utc_datetime)
field(:rendered, :map)
timestamps(type: :utc_datetime)
end
def change(struct, params \\ %{}) do
struct
|> cast(validate_params(struct, params), [:data, :starts_at, :ends_at, :rendered])
|> validate_required([:data])
end
defp validate_params(struct, params) do
base_data =
%{
"content" => "",
"all_day" => false
}
|> Map.merge((struct && struct.data) || %{})
merged_data =
Map.merge(base_data, params.data)
|> Map.take(["content", "all_day"])
params
|> Map.merge(%{data: merged_data})
|> add_rendered_properties()
end
def add_rendered_properties(params) do
{content_html, _, _} =
Pleroma.Web.CommonAPI.Utils.format_input(params.data["content"], "text/plain",
mentions_format: :full
)
rendered = %{
"content" => content_html
}
params
|> Map.put(:rendered, rendered)
end
def add(params) do
changeset = change(%__MODULE__{}, params)
Repo.insert(changeset)
end
def update(announcement, params) do
changeset = change(announcement, params)
Repo.update(changeset)
end
def list_all do
__MODULE__
|> Repo.all()
end
def list_paginated(%{limit: limited_number, offset: offset_number}) do
__MODULE__
|> limit(^limited_number)
|> offset(^offset_number)
|> Repo.all()
end
def get_by_id(id) do
Repo.get_by(__MODULE__, id: id)
end
def delete_by_id(id) do
with announcement when not is_nil(announcement) <- get_by_id(id),
{:ok, _} <- Repo.delete(announcement) do
:ok
else
_ ->
:error
end
end
def read_by?(announcement, user) do
AnnouncementReadRelationship.exists?(user, announcement)
end
def mark_read_by(announcement, user) do
AnnouncementReadRelationship.mark_read(user, announcement)
end
def render_json(announcement, opts \\ []) do
extra_params =
case Keyword.fetch(opts, :for) do
{:ok, user} when not is_nil(user) ->
%{read: read_by?(announcement, user)}
_ ->
%{}
end
admin_extra_params =
case Keyword.fetch(opts, :admin) do
{:ok, true} ->
%{pleroma: %{raw_content: announcement.data["content"]}}
_ ->
%{}
end
base = %{
id: announcement.id,
content: announcement.rendered["content"],
starts_at: announcement.starts_at,
ends_at: announcement.ends_at,
all_day: announcement.data["all_day"],
published_at: announcement.inserted_at,
updated_at: announcement.updated_at,
mentions: [],
statuses: [],
tags: [],
emojis: [],
reactions: []
}
base
|> Map.merge(extra_params)
|> Map.merge(admin_extra_params)
end
# "visible" means:
# starts_at < time < ends_at
def list_all_visible_when(time) do
__MODULE__
|> where([a], is_nil(a.starts_at) or a.starts_at < ^time)
|> where([a], is_nil(a.ends_at) or a.ends_at > ^time)
|> Repo.all()
end
def list_all_visible do
list_all_visible_when(DateTime.now("Etc/UTC") |> elem(1))
end
end

View File

@ -0,0 +1,55 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.AnnouncementReadRelationship do
use Ecto.Schema
import Ecto.Changeset
alias FlakeId.Ecto.CompatType
alias Pleroma.Announcement
alias Pleroma.Repo
alias Pleroma.User
@type t :: %__MODULE__{}
schema "announcement_read_relationships" do
belongs_to(:user, User, type: CompatType)
belongs_to(:announcement, Announcement, type: CompatType)
timestamps(updated_at: false)
end
def mark_read(user, announcement) do
%__MODULE__{}
|> cast(%{user_id: user.id, announcement_id: announcement.id}, [:user_id, :announcement_id])
|> validate_required([:user_id, :announcement_id])
|> foreign_key_constraint(:user_id)
|> foreign_key_constraint(:announcement_id)
|> unique_constraint([:user_id, :announcement_id])
|> Repo.insert()
end
def mark_unread(user, announcement) do
with relationship <- get(user, announcement),
{:exists, true} <- {:exists, not is_nil(relationship)},
{:ok, _} <- Repo.delete(relationship) do
:ok
else
{:exists, false} ->
:ok
_ ->
:error
end
end
def get(user, announcement) do
Repo.get_by(__MODULE__, user_id: user.id, announcement_id: announcement.id)
end
def exists?(user, announcement) do
not is_nil(get(user, announcement))
end
end

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Application do
@ -94,7 +94,8 @@ defmodule Pleroma.Application do
Pleroma.Repo,
Config.TransferTask,
Pleroma.Emoji,
Pleroma.Web.Plugs.RateLimiter.Supervisor
Pleroma.Web.Plugs.RateLimiter.Supervisor,
{Task.Supervisor, name: Pleroma.TaskSupervisor}
] ++
cachex_children() ++
http_children(adapter, @mix_env) ++
@ -112,7 +113,17 @@ defmodule Pleroma.Application do
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Pleroma.Supervisor]
# If we have a lot of caches, default max_restarts can cause test
# resets to fail.
# Go for the default 3 unless we're in test
max_restarts =
if @mix_env == :test do
100
else
3
end
opts = [strategy: :one_for_one, name: Pleroma.Supervisor, max_restarts: max_restarts]
result = Supervisor.start_link(children, opts)
set_postgres_server_version()
@ -189,6 +200,7 @@ defmodule Pleroma.Application do
build_cachex("object", default_ttl: 25_000, ttl_interval: 1000, limit: 2500),
build_cachex("rich_media", default_ttl: :timer.minutes(120), limit: 5000),
build_cachex("scrubber", limit: 2500),
build_cachex("scrubber_management", limit: 2500),
build_cachex("idempotency", expiration: idempotency_expiration(), limit: 2500),
build_cachex("web_resp", limit: 2500),
build_cachex("emoji_packs", expiration: emoji_packs_expiration(), limit: 10),
@ -197,7 +209,8 @@ defmodule Pleroma.Application do
build_cachex("chat_message_id_idempotency_key",
expiration: chat_message_id_idempotency_key_expiration(),
limit: 500_000
)
),
build_cachex("rel_me", limit: 2500)
]
end
@ -238,7 +251,8 @@ defmodule Pleroma.Application do
defp background_migrators do
[
Pleroma.Migrators.HashtagsTableMigrator
Pleroma.Migrators.HashtagsTableMigrator,
Pleroma.Migrators.ContextObjectsDeletionMigrator
]
end

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.ApplicationRequirements do
@ -164,7 +164,8 @@ defmodule Pleroma.ApplicationRequirements do
defp check_system_commands!(:ok) do
filter_commands_statuses = [
check_filter(Pleroma.Upload.Filter.Exiftool, "exiftool"),
check_filter(Pleroma.Upload.Filter.Exiftool.StripLocation, "exiftool"),
check_filter(Pleroma.Upload.Filter.Exiftool.ReadDescription, "exiftool"),
check_filter(Pleroma.Upload.Filter.Mogrify, "mogrify"),
check_filter(Pleroma.Upload.Filter.Mogrifun, "mogrify"),
check_filter(Pleroma.Upload.Filter.AnalyzeMetadata, "mogrify"),

View File

@ -1,20 +0,0 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.BBS.Authenticator do
use Sshd.PasswordAuthenticator
alias Pleroma.User
alias Pleroma.Web.Plugs.AuthenticationPlug
def authenticate(username, password) do
username = to_string(username)
password = to_string(password)
with %User{} = user <- User.get_by_nickname(username) do
AuthenticationPlug.checkpw(password, user.password_hash)
else
_e -> false
end
end
end

View File

@ -1,149 +0,0 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.BBS.Handler do
use Sshd.ShellHandler
alias Pleroma.Activity
alias Pleroma.HTML
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.CommonAPI
def on_shell(username, _pubkey, _ip, _port) do
:ok = IO.puts("Welcome to #{Pleroma.Config.get([:instance, :name])}!")
user = Pleroma.User.get_cached_by_nickname(to_string(username))
Logger.debug("#{inspect(user)}")
loop(run_state(user: user))
end
def on_connect(username, ip, port, method) do
Logger.debug(fn ->
"""
Incoming SSH shell #{inspect(self())} requested for #{username} from #{inspect(ip)}:#{inspect(port)} using #{inspect(method)}
"""
end)
end
def on_disconnect(username, ip, port) do
Logger.debug(fn ->
"Disconnecting SSH shell for #{username} from #{inspect(ip)}:#{inspect(port)}"
end)
end
defp loop(state) do
self_pid = self()
counter = state.counter
prefix = state.prefix
user = state.user
input = spawn(fn -> io_get(self_pid, prefix, counter, user.nickname) end)
wait_input(state, input)
end
def puts_activity(activity) do
status = Pleroma.Web.MastodonAPI.StatusView.render("show.json", %{activity: activity})
IO.puts("-- #{status.id} by #{status.account.display_name} (#{status.account.acct})")
IO.puts(HTML.strip_tags(status.content))
IO.puts("")
end
def handle_command(state, "help") do
IO.puts("Available commands:")
IO.puts("help - This help")
IO.puts("home - Show the home timeline")
IO.puts("p <text> - Post the given text")
IO.puts("r <id> <text> - Reply to the post with the given id")
IO.puts("quit - Quit")
state
end
def handle_command(%{user: user} = state, "r " <> text) do
text = String.trim(text)
[activity_id, rest] = String.split(text, " ", parts: 2)
with %Activity{} <- Activity.get_by_id(activity_id),
{:ok, _activity} <-
CommonAPI.post(user, %{status: rest, in_reply_to_status_id: activity_id}) do
IO.puts("Replied!")
else
_e -> IO.puts("Could not reply...")
end
state
end
def handle_command(%{user: user} = state, "p " <> text) do
text = String.trim(text)
with {:ok, _activity} <- CommonAPI.post(user, %{status: text}) do
IO.puts("Posted!")
else
_e -> IO.puts("Could not post...")
end
state
end
def handle_command(state, "home") do
user = state.user
params =
%{}
|> Map.put(:type, ["Create"])
|> Map.put(:blocking_user, user)
|> Map.put(:muting_user, user)
|> Map.put(:user, user)
activities =
[user.ap_id | Pleroma.User.following(user)]
|> ActivityPub.fetch_activities(params)
Enum.each(activities, fn activity ->
puts_activity(activity)
end)
state
end
def handle_command(state, command) do
IO.puts("Unknown command '#{command}'")
state
end
defp wait_input(state, input) do
receive do
{:input, ^input, "quit\n"} ->
IO.puts("Exiting...")
{:input, ^input, code} when is_binary(code) ->
code = String.trim(code)
state = handle_command(state, code)
loop(%{state | counter: state.counter + 1})
{:error, :interrupted} ->
IO.puts("Caught Ctrl+C...")
loop(%{state | counter: state.counter + 1})
{:input, ^input, msg} ->
:ok = Logger.warn("received unknown message: #{inspect(msg)}")
loop(%{state | counter: state.counter + 1})
end
end
defp run_state(opts) do
%{prefix: "pleroma", counter: 1, user: opts[:user]}
end
defp io_get(pid, prefix, counter, username) do
prompt = prompt(prefix, counter, username)
send(pid, {:input, self(), IO.gets(:stdio, prompt)})
end
defp prompt(prefix, counter, username) do
prompt = "#{username}@#{prefix}:#{counter}>"
prompt <> " "
end
end

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Bookmark do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Caching do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Captcha do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Captcha.Kocaptcha do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Captcha.Native do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Captcha.Service do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Chat do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Chat.MessageReference do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Clippy do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Config do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Config.DeprecationWarnings do
@ -20,6 +20,43 @@ defmodule Pleroma.Config.DeprecationWarnings do
"\n* `config :pleroma, :instance, mrf_transparency_exclusions` is now `config :pleroma, :mrf, transparency_exclusions`"}
]
def check_exiftool_filter do
filters = Config.get([Pleroma.Upload]) |> Keyword.get(:filters, [])
if Pleroma.Upload.Filter.Exiftool in filters do
Logger.warn("""
!!!DEPRECATION WARNING!!!
Your config is using Exiftool as a filter instead of Exiftool.StripLocation. This should work for now, but you are advised to change to the new configuration to prevent possible issues later:
```
config :pleroma, Pleroma.Upload,
filters: [Pleroma.Upload.Filter.Exiftool]
```
Is now
```
config :pleroma, Pleroma.Upload,
filters: [Pleroma.Upload.Filter.Exiftool.StripLocation]
```
""")
new_config =
filters
|> Enum.map(fn
Pleroma.Upload.Filter.Exiftool -> Pleroma.Upload.Filter.Exiftool.StripLocation
filter -> filter
end)
Config.put([Pleroma.Upload, :filters], new_config)
:error
else
:ok
end
end
def check_simple_policy_tuples do
has_strings =
Config.get([:mrf_simple])
@ -180,7 +217,8 @@ defmodule Pleroma.Config.DeprecationWarnings do
check_old_chat_shoutbox(),
check_quarantined_instances_tuples(),
check_transparency_exclusions_tuples(),
check_simple_policy_tuples()
check_simple_policy_tuples(),
check_exiftool_filter()
]
|> Enum.reduce(:ok, fn
:ok, :ok -> :ok
@ -273,7 +311,7 @@ defmodule Pleroma.Config.DeprecationWarnings do
warning_preface = """
!!!DEPRECATION WARNING!!!
Your config is using old setting name `timeout` instead of `recv_timeout` in pool settings. Setting should work for now, but you are advised to change format to scheme with port to prevent possible issues later.
Your config is using old setting name `timeout` instead of `recv_timeout` in pool settings. The setting will not take effect until updated.
"""
updated_config =

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Config.Getting do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Config.Helpers do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Config.Holder do

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Config.Loader do
@ -19,21 +19,10 @@ defmodule Pleroma.Config.Loader do
:tesla
]
if Code.ensure_loaded?(Config.Reader) do
@reader Config.Reader
def read(path), do: @reader.read!(path)
else
# support for Elixir less than 1.9
@reader Mix.Config
def read(path) do
path
|> @reader.eval!()
|> elem(0)
end
end
@reader Config.Reader
@spec read(Path.t()) :: keyword()
def read(path), do: @reader.read!(path)
@spec merge(keyword(), keyword()) :: keyword()
def merge(c1, c2), do: @reader.merge(c1, c2)

View File

@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Config.Oban do

View File

@ -1,3 +1,7 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Config.ReleaseRuntimeProvider do
@moduledoc """
Imports runtime config and `{env}.exported_from_db.secret.exs` for releases.

Some files were not shown because too many files have changed in this diff Show More