Commit Graph

9394 Commits

Author SHA1 Message Date
Haelwenn (lanodan) Monnier
69caedc591 instance gen: Reduce permissions of pleroma directories and config files 2023-08-04 09:50:28 +02:00
Haelwenn (lanodan) Monnier
8cc8100120 Config: Restrict permissions of OTP config file 2023-08-04 09:50:28 +02:00
Mark Felder
2c79509453 Resolve information disclosure vulnerability through emoji pack archive download endpoint
The pack name has been sanitized so an attacker cannot upload a media
file called pack.json with their own handcrafted list of emoji files as
arbitrary files on the filesystem and then call the emoji pack archive
download endpoint with a pack name crafted to the location of the media
file they uploaded which tricks Pleroma into generating a zip file of
the target files the attacker wants to download.

The attack only works if the Pleroma instance does not have the
AnonymizeFilename upload filter enabled, which is currently the default.

Reported by: graf@poast.org
2023-08-04 08:40:27 +02:00
Haelwenn
819fccb7d1 Merge branch 'tusooa/3154-attachment-type-check' into 'develop'
Restrict attachments to only uploaded files only

Closes #3154

See merge request pleroma/pleroma!3923
2023-08-03 10:01:32 +00:00
Faried Nawaz
e5e76ec445 cleaner ecto query to handle restrict_unauthenticated for activities
This fix is for this case:

  config :pleroma, :restrict_unauthenticated,
    activities: %{local: true, remote: true}
2023-07-28 18:45:59 +05:00
faried nawaz
dc4de79d43 status context: perform visibility check on activities around a status
issue #2927
2023-07-28 18:45:59 +05:00
tusooa
ea4225a646
Restrict attachments to only uploaded files only 2023-07-18 18:39:59 -04:00
Haelwenn
93ad16cca0 Merge branch '2023-06-deps-update' into 'develop'
2023-06 deps update + de-override plug

See merge request pleroma/pleroma!3911
2023-07-17 20:37:47 +00:00
tusooa
1459d64508
Make regex-to-string descriptor reusable 2023-07-07 07:09:35 -04:00
tusooa
ba3aa4f86d
Fix edge cases 2023-07-07 06:58:32 -04:00
tusooa
ef8a6c539a
Make EmojiPolicy aware of custom emoji reactions 2023-07-07 06:58:31 -04:00
tusooa
20d193c91d
Improve config examples for EmojiPolicy 2023-07-07 06:58:31 -04:00
tusooa
f50422c380
Move emoji_policy.ex to the right place 2023-07-07 06:58:31 -04:00
tusooa
7eb8abf7bb
EmojiPolicy: Implement delist 2023-07-07 06:58:31 -04:00
tusooa
80ce6482f6
EmojiPolicy: implement remove by shortcode 2023-07-07 06:58:31 -04:00
tusooa
28ff828caa
Add emoji policy to remove emojis matching certain urls
https://git.pleroma.social/pleroma/pleroma/-/issues/2775
2023-07-07 06:58:22 -04:00
Haelwenn (lanodan) Monnier
3d79ceb23a Deprecate audio scrobbling 2023-07-04 03:40:11 +02:00
Haelwenn
a31a4c522f Merge branch 'tusooa/3131-handle-report-from-deactivated-user' into 'develop'
Fix handling report from a deactivated user

Closes #3131

See merge request pleroma/pleroma!3915
2023-07-02 21:27:15 +00:00
tusooa
6e4de2383f
Fix handling report from a deactivated user 2023-07-02 11:15:34 -04:00
tusooa
a1621839cc
Fix user fetch completely broken if featured collection is not in a supported form 2023-07-02 11:03:09 -04:00
tusooa
48e490cd58 Merge branch 'bugfix/full-revert-media-host-validation' into 'develop'
Merge Revert "Merge branch 'validate-host' into 'develop'"

Closes #3136

See merge request pleroma/pleroma!3909
2023-07-01 21:54:18 +00:00
Haelwenn
043a00991d Merge branch 'instance-nodeinfo-metadata' into 'develop'
instances: Store some metadata based on NodeInfo

See merge request pleroma/pleroma!3853
2023-06-27 18:58:04 +00:00
Haelwenn
ae0ca49451 Merge branch 'tusooa/3119-bio-update' into 'develop'
Show more informative errors when profile exceeds char limits

Closes #3119

See merge request pleroma/pleroma!3886
2023-06-27 18:49:43 +00:00
Haelwenn
41f2ee69a8 Merge branch 'from/upstream-develop/tusooa/backup-status' into 'develop'
Detail backup states

Closes #3024

See merge request pleroma/pleroma!3809
2023-06-27 12:08:11 +00:00
Haelwenn (lanodan) Monnier
d7e049d5e8 router: Fix usage of globs
warning: doing a prefix match with globs is deprecated, invalid segment "pleroma*path".
    You can either replace by a single segment match:
        /foo/bar-:var
    Or by mixing single segment match with globs:
        /foo/bar-:var/*rest
2023-06-27 10:42:10 +02:00
Haelwenn (lanodan) Monnier
3a67b8f287 endpoint: Use custom Multipart module for dynamic configuration 2023-06-27 10:41:25 +02:00
Haelwenn (lanodan) Monnier
dd9f8150fc Merge Revert "Merge branch 'validate-host' into 'develop'"
This reverts commit d998a114e2, reversing
changes made to da6b4003ac.
2023-06-22 21:28:25 +02:00
Sean King
a5a354a36e
Prevent bypassing authorized fetch mode with a json file 2023-06-21 23:10:56 -06:00
lain
4e6ea7cc91 Merge branch 'tusooa/3054-banned-delete' into 'develop'
Fix deleting banned users' statuses

See merge request pleroma/pleroma!3889
2023-06-11 13:17:12 +00:00
Lain Soykaf
6611c6ce4e B ForceMentionsInContent: Fix test, refactor. 2023-06-11 16:45:31 +04:00
Lain Soykaf
55dd8ef1c7 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into pleroma-double_mentions 2023-06-11 16:31:20 +04:00
lain
16313af7eb Merge branch 'fix/metadata-tags' into 'develop'
static frontend: fix meta tags

See merge request pleroma/pleroma!3885
2023-06-11 11:57:16 +00:00
lain
1f4618d64b Merge branch 'cleanup/ostatus-user-upgrade' into 'develop'
Cleanup OStatus-era user upgrades and ap_enabled indicator

See merge request pleroma/pleroma!3880
2023-06-11 11:13:57 +00:00
feld
75900f21f0 Merge branch 'revert-mediaproxy-host-validation' into 'develop'
Revert MediaProxy Host header validation

See merge request pleroma/pleroma!3902
2023-06-11 11:10:51 +00:00
lain
1db29f734f Merge branch 'fep-fffd-url' into 'develop'
CommonFields: Use BareUri for :url

Closes #3121

See merge request pleroma/pleroma!3884
2023-06-11 11:02:39 +00:00
Mark Felder
fadcd7f1a9 Revert MediaProxy Host header validation
Something is going wrong here even though the tests are correct.
2023-06-07 09:19:22 -04:00
Mark Felder
63ef1dcedc Phoenix.Router.routes/1 is the public function we are meant to be using here 2023-06-03 14:17:49 -04:00
Lain Soykaf
cbc5b8cebd B Preload: Make sure that the preloaded json is html safe 2023-06-02 17:03:21 +04:00
Mark Felder
f0e5f0e837 Fix compile warning
warning: doing a prefix match with globs is deprecated, invalid segment "pleroma*path"
2023-05-31 22:23:36 +00:00
Mark Felder
2b8bbb288c Phoenix.Socket.Transport.force_ssl/4 no longer exists 2023-05-31 22:11:17 +00:00
Mark Felder
62322f71e2 Clean up Plug.Parsers.MULTIPART deprecation warnings
There is no need to the length setting to :multipart. The length setting is global for all of the parsers.
2023-05-31 16:22:40 -04:00
Mark Felder
ffee478ed0 Move websocket config for Shoutbox to the Endpoint
This is the modern way of configuring it
2023-05-31 15:30:58 -04:00
Mark Felder
e3110cb34e Fix deprecated calls to get_flash/2 2023-05-31 13:36:21 -04:00
Haelwenn
d998a114e2 Merge branch 'validate-host' into 'develop'
Validate Host header for MediaProxy and Uploads

See merge request pleroma/pleroma!3896
2023-05-31 00:50:01 +00:00
Mark Felder
b3c3bd99c3 Switch from serving a 400 to a 302 2023-05-30 16:56:09 -04:00
Mark Felder
9caa0b0be1 Add OnlyMedia Upload Filter to simplify restricting uploads to audio, image, and video types 2023-05-29 15:49:04 -04:00
Mark Felder
da7394f33b Fix unused assignment 2023-05-29 15:09:31 -04:00
Mark Felder
a60dd0d92d Validate Host header matches expected value before allowing access to Uploads 2023-05-29 14:16:03 -04:00
Mark Felder
843fcca5b4 Validate Host header matches expected value before allowing access to MediaProxy 2023-05-29 13:59:51 -04:00
faried nawaz
8b390d27dc
twitter card: handle case where image has no alt text 2023-05-29 02:52:49 +05:00
faried nawaz
52368e6702
fix meta tag for twitter cards and image attachments
The name of the tag should be twitter:image, not twitter:player.

Also, add twitter:image:alt meta tags.
2023-05-29 02:52:49 +05:00
faried nawaz
b6b7de2010
add url to Metadata.build_tags call
If static_fe is enabled, going to https://pleroma/notice/some-id
results in

<meta content="https://pleroma/users/someuser" property="og:url">

With this fix, it is

<meta content="https://pleroma/notice/some-id" property="og:url">

Additionally, Pleroma.Web.Metadata.Providers.OpenGraph now
generates meta tags for attachments in the post.
2023-05-29 02:52:41 +05:00
Haelwenn (lanodan) Monnier
869f0d24a6 Merge branch 'release/2.5.2' into mergeback/2.5.2 2023-05-26 23:47:50 +02:00
Mark Felder
4505bc1e58 Filter OEmbed HTML tags 2023-05-26 19:56:36 +02:00
Mark Felder
0d68804aa7 Filter OEmbed HTML tags 2023-05-26 19:54:24 +02:00
tusooa
d0c2e0830b Enforce unauth restrictions for public streaming endpoints 2023-05-26 19:24:08 +02:00
Haelwenn
b36263e5ff Merge branch 'issue/3126' into 'develop'
MediaProxyController: Apply CSP sandbox

See merge request pleroma/pleroma!3890
2023-05-26 19:24:08 +02:00
Haelwenn
4339230f64 Merge branch 'tusooa/fix-object-test' into 'develop'
Fix ObjectTest

See merge request pleroma/pleroma!3887
2023-05-26 19:24:08 +02:00
Haelwenn
72833c84b5 Merge branch 'tusooa/rework-refetch' into 'develop'
Make sure object refetching follows update rules

See merge request pleroma/pleroma!3883
2023-05-26 19:24:08 +02:00
Mark Felder
38bcf6b19e MediaProxyController: Apply CSP sandbox 2023-05-26 12:34:01 -04:00
Zero
279fd47b48 ForceMentionsInContent: fix double mentions for Mastodon/Misskey posts
The code checked for duplicates using "ap_id", but in Mastodon and Misskey the look like that:
Mastodon: https://mastodon.example.com/users/roger
Misskey: https:///misskey.example.com/users/104ab42f11

The fix is to also check for "uri", which is what will be in the "explicitly_mentioned_uris" list:
Mastodon: https://mastodon.example.com/@roger
Misskey: https://misskey.example.com/@roger
2023-05-26 12:30:19 -04:00
tusooa
1fa196d8f7
Fix deleting banned users' statuses 2023-05-25 19:00:38 -04:00
tusooa
2c66f584b5
Show more informative errors when profile exceeds char limits 2023-05-25 08:22:33 -04:00
tusooa
819a82da99
Fix unused variable 2023-05-22 08:19:58 -04:00
tusooa
505e58d4eb
Fix ObjectTest 2023-05-22 08:14:20 -04: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 (lanodan) Monnier
a5066bb078 CommonFields: Use BareUri for :url
Closes: https://git.pleroma.social/pleroma/pleroma/-/issues/3121
2023-05-17 17:25:46 +02:00
Haelwenn (lanodan) Monnier
fb3335ffe2 EctoType: Add BareUri 2023-05-17 17:14:38 +02: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
Henry Jameson
2a07411b0c keep the websocket url for all modes 2023-05-07 15:34:17 +03:00
Henry Jameson
f50fd9278f reduce redundant reduntancy reduction 2023-05-07 15:29:19 +03:00
Henry Jameson
f8ef4924ec fix whitespace 2023-05-07 15:24:09 +03:00
Henry Jameson
c0d11da2d8 conditionally set csp depnding on media-proxy state 2023-05-07 15:16:30 +03:00
Haelwenn (lanodan) Monnier
fcd49e3985 User: Remove ap_enabled field 2023-05-05 11:11:26 +02:00
Haelwenn (lanodan) Monnier
238edc30de User: Remove ap_enabled?/1 2023-05-05 11:11:26 +02:00
Haelwenn (lanodan) Monnier
9dfa1c4be0 ActivityPub: Mark fetch_and_prepare_user_from_ap_id/1 as private 2023-05-05 11:11:26 +02:00
Haelwenn (lanodan) Monnier
8181be89a2 Federator: Stop using ap_enabled?/1 2023-05-05 11:11:26 +02:00
Haelwenn (lanodan) Monnier
e17265a7a2 TransmogrifierWorker: Remove obsolete worker 2023-05-05 11:11:26 +02:00
Haelwenn (lanodan) Monnier
2ee483ba41 Transmogrifier: Remove upgrade_user_from_ap_id 2023-05-05 11:11:26 +02:00
Haelwenn (lanodan) Monnier
3962253cf1 Publisher: Stop filtering via ap_enabled?/1 2023-05-05 11:11:26 +02:00
Haelwenn (lanodan) Monnier
606f78f5e5 ActivityPub: Stop relying on ap_enabled and upgrade_user_from_ap_id 2023-05-05 11:11:26 +02:00
Haelwenn (lanodan) Monnier
0903c41645 User: Stop relying on ap_enabled 2023-05-05 11:11:26 +02:00
Haelwenn (lanodan) Monnier
4fd96b24ae AddRemoveValidator: Use User.fetch_by_ap_id instead of upgrade_user_from_ap_id 2023-05-05 11:11:26 +02:00
tusooa
6d0ebccdb0
Make webui use translated scope descriptions 2023-05-02 16:32:33 -04:00
tusooa
85bdbb102e
Add extraction process for oauth scopes 2023-05-02 16:32:10 -04:00
HJ
675639225a allow https: so that flash works across instances without need for media proxy 2023-04-28 11:13:42 +00: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
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
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
Ekaterina Vaartis
6a63dced4a Fix tests for frontend installation 2023-03-30 19:25:35 +03:00
Haelwenn
e4288df502 Merge branch 'background-timeout' into 'develop'
Set background worker timeout to 15 minutes

See merge request pleroma/pleroma!3857
2023-03-30 12:48:35 +02:00
tusooa
40f14fd31c Merge branch 'remove-crypt' into 'develop'
Remove crypt(3) support

Closes #3030 and #3062

See merge request pleroma/pleroma!3847
2023-03-30 12:47:36 +02:00
Haelwenn
937df7e465 Merge branch 'fix/tag-feed-crashes' into 'develop'
fix: atom/rss feed issues

Closes #3045

See merge request pleroma/pleroma!3851
2023-03-30 12:46:35 +02:00
Haelwenn
d640df3927 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-30 12:45:39 +02:00
Haelwenn
22b72cd6b8 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-30 12:43:58 +02: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
tusooa
c5d946bc92
Fix emoji reactions for legacy 2-tuple formats 2023-03-26 15:12:40 -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
anemone
f463b7570e Set background worker timeout to 15 minutes 2023-03-23 23:14:52 -07:00
Haelwenn (lanodan) Monnier
9a2523a09a instances: Store some metadata based on NodeInfo 2023-03-16 09:02:20 +01: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
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
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
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
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
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
410d50afe5
Ignores in exiftool read descriptions 2023-02-20 12:30:36 -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
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
kPherox
d5d7648789
feat: build rel me tags with profile fields 2023-02-18 17:57:41 +09:00
tusooa
024bb27fc7
Ignores in exiftool read descriptions 2023-02-11 00:30:52 -05: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
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
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
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
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
e853cfe7c3 Revert "Merge branch 'copyright-bump' into 'develop'"
This reverts merge request !3825
2023-01-02 20:38:50 +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
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
179efd9467
Make backup parameters configurable 2022-12-24 00:20:25 -05:00
tusooa
7d3e4eaeb9
Log errors more extensively 2022-12-24 00:04:51 -05:00
tusooa
070fbb89e1
Lint 2022-12-24 00:04:51 -05:00
tusooa
a1b95922c5
Fix compile error 2022-12-24 00:04:50 -05:00
tusooa
46ab97d721
Simplify backup update clause 2022-12-24 00:04:50 -05:00
tusooa
bdd63d2a3a
Expose backup status via Pleroma API 2022-12-24 00:04:50 -05:00
tusooa
e4ac2a7cd6
Detail backup states 2022-12-24 00:04:32 -05: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
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
Ekaterina Vaartis
398141da68 Merge remote-tracking branch 'upstream/develop' into meilisearch 2022-12-20 21:00:07 +03: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
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
3dfa009ec3 Merge branch 'develop' into 'fix/2980-rss-feed-generation'
# Conflicts:
#   CHANGELOG.md
2022-12-19 23:43:23 +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
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
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
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 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
ave
0f88c2bca4 Change follow_operation schema to use type BooleanLike 2022-11-28 00:13:34 +00: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
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
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
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
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
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
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
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
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
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
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
Mark Felder
8be7f87e1f Define sane Oban Worker timeouts 2022-11-11 13:46:27 -05:00
Mark Felder
6b87b3f2ea Remove Quack logging backend 2022-11-11 12:36:29 -05: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
Haelwenn (lanodan) Monnier
648e012022 ObjectAgePolicy: Make strip_followers behavior for followers-only explicit 2022-11-07 14:58:47 +01: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
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
Alexander Strizhakov
8407e26b0c rebase fix 2022-11-03 10:06:36 -04:00
Alexander Strizhakov
5a9ea98baf XML WebFinger user representation correct domain 2022-11-03 09:48:59 -04:00
Alexander Strizhakov
4121bca895 expanding WebFinger 2022-11-03 09:48:24 -04: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
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
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
Ekaterina Vaartis
5a39866388 Specifically strip mentions for search indexing 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
6256822afd Check for updateId, not uid 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
5ac6763238 Make add_to_index and remove_from_index report errors 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
102ebb42bd Make search a callback 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
119b2b847b Instead of checking string length, explicitly check for "" and "." 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
e20f74c71b Remove duplicate function call 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
84608be87e Change updateId to uid because apparently that's the new name 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
1e23f527e3 Change the meilisearch key auth to conform to 0.25.0 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
3387935e83 Don't try removing deleted users and such from index as posts 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
d89dc5518b Fix meilisearch tests and jobs for oban 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
2bc21c6f18 Use oban for search indexing 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
6f2f457751 Add a search backend behaviour 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
571533ae26 Don't support meilisearch < 0.24.0, since it breaks things 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
3179ed0921 Make chunk size configurable 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
a12f63bc81 Implement suggestions from the Meilisearch MR
- Index unlisted posts
- Move version check outside of the streaming and only do it once
- Use a PUT request instead of checking manually if there is need to insert
- Add error handling, sort of
2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
a6946048fb Rename Activity.Search to Search.DatabaseSearch 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
0fae71f88d Rename search.ex to database_search.ex and add search/2 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
39e596a5b5 Style fixes 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
7009ef5672 Move the search.ex file so credo doesn't complain 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
9c1a930707 Support reindexing meilisearch >=0.24.0
It has has a different error code key
2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
e928e307f3 Add a reindex option
Signed-off-by: Ekaterina Vaartis <vaartis@kotobank.ch>
2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
4445421297 Only add local posts to index in activity_pub
Remote ones are already added in another place
2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
0b4fd0d342 Set content-type to application/json 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
e4b7a3f51f Modify some meilisearch variables 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
cf558208c2 Use proper deleted object for removing from index 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
95cb2bb694 Don't try removing from index again in common_api
It's already removed in the side effects of the pipeline
2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
6beef2d117 Move add_to_index / remove_from_index to Pleroma.Actitivy.Search 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
40280cc273 Reorder ranking rules for (maybe) better results 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
d9ef7e0758 Fix activity being passed to objec_to_search_data 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
09a1ae1b6e Add the meilisearch.stats command 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
a67f9da5cc Add a message with a count of posts to index 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
2c7d973af7 Implement meilisearch auth 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
410c8cb765 Make indexing logs rewrite themselves 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
35e9192ced Rework task indexing to share code with the main module
The code in the main module now scrubs new posts too
2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
3dedadf192 Adjust content indexing to skip more unneeded stuff 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
9f16ca80e0 Mark only content as searchable for meilisearch 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
2b2e409ad7 Also index incoming federated posts 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
e35d87ea54 Make the chunk size smaller 2022-10-10 20:19:09 +03:00
Ekaterina Vaartis
00c48a33ac Use content instead of source and scrub it 2022-10-10 20:19:08 +03:00
Ekaterina Vaartis
9beaebd97e Tweak search ordering to hopefully return newer results 2022-10-10 20:19:08 +03:00
Ekaterina Vaartis
38996f551a Make meilisearch sort on publish date converted to unix time 2022-10-10 20:19:08 +03:00
Ekaterina Vaartis
ea6a6a1287 Make the indexing batch differently and more, show number indexed 2022-10-10 20:19:08 +03:00
Ekaterina Vaartis
365024abec Ensure only indexing public posts and implement clearing and delete 2022-10-10 20:19:08 +03:00
Ekaterina Vaartis
0318e9a599 Add logging to milisiearch index and make it use desc(id) 2022-10-10 20:19:08 +03:00
Ekaterina Vaartis
e154ebbf79 Initial meilisearch implementation, doesn't delete posts yet 2022-10-10 20:19:08 +03:00
Tusooa Zhu
dd82fd234f
Merge branch 'release/2.4.4' into mergeback/2.4.4 2022-10-08 22:15:09 -04: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
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
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
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
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
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
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
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
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
e124776d14 Elixir 1.14 formatting 2022-09-03 03:58:22 +02: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
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
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
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
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
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
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
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
3885ee182a
Switch to associated_object_id index 2022-08-20 20:43:46 -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
c62a4f1c17
Disconnect streaming sessions when token is revoked 2022-08-19 20:22:45 -04: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
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
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
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
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