Commit graph

6053 commits

Author SHA1 Message Date
Lain Soykaf
60800c0b2b ChatMessageReferenceView: Fix test 2023-12-11 10:05:47 +04:00
Lain Soykaf
42c11466cc MediaProxyWarmingPolicyTest: Fix tests 2023-12-11 10:04:01 +04:00
Lain Soykaf
305c76470f OpenGraphTest: Fix test 2023-12-11 10:01:55 +04:00
Lain Soykaf
5530c7dca4 MediaProxyTest: Fix test 2023-12-11 10:00:15 +04:00
Lain Soykaf
5a95847c5d MediaProxyCacheControllerTest: Fix tests. 2023-12-11 09:54:31 +04:00
Lain Soykaf
2c10843bc4 MediaControllerTest: Fix test. 2023-12-11 09:51:59 +04:00
Lain Soykaf
3cce929eec ChatValidationTest: Fix tests. 2023-12-11 09:43:49 +04:00
Lain Soykaf
90a47ca050 S3 Test: Remove global state dependencies 2023-12-11 09:25:05 +04:00
Mark Felder
c0a50b7c3e User.get_or_fetch_public_key_for_ap_id/1 is no longer required. 2023-12-10 13:24:25 -05:00
Lain Soykaf
0d83b6d177 Linting 2023-12-10 19:59:02 +04:00
Lain Soykaf
6e3267d1bd Tests: Fix all the tests. 2023-12-10 19:19:56 +04:00
Lain Soykaf
c068a218ea Backup Tests: Split out async tests, use mox. 2023-12-10 18:57:46 +04:00
Lain Soykaf
20b76acc08 ActivityPubTest: Swallow log 2023-12-10 17:20:39 +04:00
Lain Soykaf
68f7a79f28 Tests: Remove async from cases that use Mock 2023-12-10 17:10:18 +04:00
Lain Soykaf
075222525c TransmogrifierTest: Capture the log 2023-12-10 17:06:13 +04:00
Lain Soykaf
221f18dc33 Tests: Don't run tests that use clear_config asynchronously. 2023-12-10 16:27:23 +04:00
Mark Felder
0d3f1be230 Fix test; log message no longer emitted here 2023-12-08 17:46:10 -05:00
Mark Felder
074b31d9ab Optimistic Inbox
Rework inbound federation to accept requests optimistically. The HTTP Signatures Plug will not attempt to fetch the actor or key and will fail early.

If the signature cannot be validated we pass the required data into the Oban job with a reduced priority and increase the timeout to 20 seconds. The Oban job will handle the actor and key fetching before attempting to validate the activity again. This job will be retried 5 times by default.

Another welcome side effect is that actors who change their keys can federate to Pleroma instances immediately instead of needing to wait the default value of 86400s / 24 hours before the key will be fetched again.
2023-12-08 17:45:20 -05:00
Lain Soykaf
ef8a2134bc AccountView: Add test, refactor 2023-12-07 11:25:18 +04:00
Mark Felder
1ad0d94d6f Change set_reachable/1 to an upsert 2023-12-06 15:50:00 -05:00
HJ
6a6a631c81 Merge branch 'neetzsche/add_url_to_scrobbles' into 'develop'
Add optional URL value for scrobbles

See merge request pleroma/pleroma!3977
2023-11-29 15:59:19 +00:00
NEETzsche
e216603477 Change url to externalLink as requested by hj here: https://shigusegubu.club/notice/AcIjZjackKAt6e522a 2023-11-29 07:55:44 -07:00
lain
1955b3c557 Merge branch 'vips' into 'develop'
Replace ImageMagick with Vips

See merge request pleroma/pleroma!3771
2023-11-29 06:03:37 +00:00
Lain Soykaf
03db495e1d AnalyzeMetadata: Switch to rinpatch_blurhash 2023-11-28 12:23:41 +04:00
lain
ef7bda61ad Merge branch 'promex' into 'develop'
Switch to PromEx for prometheus metrics

See merge request pleroma/pleroma!3967
2023-11-28 07:50:16 +00:00
Lain Soykaf
4ef56c5b65 ActivityPub.Utils: Only treat object ids as valid while stripping 2023-11-27 18:44:11 +04:00
Lain Soykaf
5a3b81d92e ActivityPub.UtilsTest: Add failing test for strip_report_status_data 2023-11-27 17:55:16 +04:00
NEETzsche
510a7b64f1 Add optional URL value for scrobbles 2023-11-23 04:51:51 -07:00
HJ
4ebfc011fc Merge branch 'favicon' into 'develop'
Make favicon configurable, embed favicon and manifest in server-generated meta

See merge request pleroma/pleroma!3963
2023-11-19 08:52:37 +00:00
Haelwenn (lanodan) Monnier
2a58596aef Fix tests for Add support for configuring a favicon and embed PWA manifest in server-generated-meta 2023-11-15 09:12:25 +01:00
Haelwenn (lanodan) Monnier
66f5ae0c5a router: Make /federation_status publicly available 2023-11-14 10:48:30 +01:00
Haelwenn
bf2d6abaf2 Merge branch 'healthcheck-disabled-error' into 'develop'
TwitterAPI: Return proper error when healthcheck is disabled

See merge request pleroma/pleroma!3953
2023-11-14 09:41:26 +00:00
Mark Felder
66cb3294ed Switch to PromEx for prometheus metrics
Recommending use of the separate HTTP server for exposing the metrics
and securing it externally on your firewall or reverse proxy. It will
listen on port 4021 by default.
2023-11-13 15:34:59 -05:00
lain
752bc168f6 Merge branch 'quotes-count' into 'develop'
Count and display post quotes

See merge request pleroma/pleroma!3956
2023-11-12 13:38:09 +00:00
marcin mikołajczak
9a063deacc Count and display post quotes 2023-11-12 13:38:08 +00:00
lain
5f19fbc5a9 Merge branch 'phoenix1.7' into 'develop'
Update to Phoenix 1.7

See merge request pleroma/pleroma!3900
2023-11-12 13:34:27 +00:00
Lain Soykaf
3d62c71edf Credo fixes. 2023-11-12 17:13:27 +04:00
Lain Soykaf
59018d73c3 B Meilisearch: Update to current API responses. 2023-11-12 16:43:50 +04:00
Lain Soykaf
a1a25029da B DatabaseSearch: Fix local-only search. 2023-11-12 16:19:54 +04:00
Lain Soykaf
5996bef7cd Fix most tests that call SearchIndexWorker. 2023-11-12 15:54:16 +04:00
Lain Soykaf
d3f8950588 B MeiliSearch, SearchIndexingWorker: Use Config.Getting, make tests async. 2023-11-12 14:49:50 +04:00
Lain Soykaf
c1402af293 B Getting: Add default implementation, delegate, prepare test support. 2023-11-12 14:49:15 +04:00
Lain Soykaf
0c5cc51983 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into pleroma-meilisearch 2023-11-12 13:53:18 +04:00
Marcin Mikołajczak
1e9333a9aa Merge remote-tracking branch 'origin/develop' into instance-v2 2023-11-08 20:46:57 +01:00
Mark Felder
0ab853cab8 Merge branch 'develop' into phoenix1.7 2023-11-08 09:18:08 -05:00
Haelwenn (lanodan) Monnier
76c070fe86 ObjectValidators.BareUriTest: Replace calls of SafeText to BareUri 2023-11-08 02:17:50 +01:00
Mark Felder
a0e08c6ec2 Merge branch 'develop' into phoenix1.7 2023-11-07 16:05:04 -05:00
Mark Felder
8076deeeb4 Activate test for object validator that has not been running 2023-11-07 16:00:13 -05:00
marcin mikołajczak
c62696c8e7 Support /authorize-interaction route used by Mastodon
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-11-02 13:47:23 +01:00
marcin mikołajczak
6b9a347353 update changelog
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-11-02 13:31:59 +01:00
marcin mikołajczak
c03852fbc7 update tests
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-10-25 00:38:52 +02:00
tusooa
df0b56576a
Fix other quotation mark conversion tests 2023-10-16 21:35:37 -04:00
tusooa
b748efe66a
Fix mentioning punycode domains when using Markdown 2023-10-16 21:35:25 -04:00
tusooa
eb33a03d0a
Explain the encode-decode roundtrip 2023-10-15 17:20:26 -04:00
tusooa
314360e5e3
Add test to cover edit streaming 2023-10-15 17:20:25 -04:00
tusooa
26f5caebae
Add test to cover notifications streaming 2023-10-15 17:20:25 -04:00
tusooa
4cf109d3c4
Add test to cover rendering update with user 2023-10-15 17:20:25 -04:00
tusooa
050227f118
Add test to cover error: bad_topic 2023-10-15 17:20:25 -04:00
tusooa
949c4f01c6
Fix NotificationTest 2023-10-15 17:20:25 -04:00
tusooa
9572be1e5f
Add tests for list streams 2023-10-15 17:20:25 -04:00
tusooa
a348c2e4dd
Use pleroma: instead of pleroma. for ws events 2023-10-15 17:20:25 -04:00
tusooa
7d005e8c93
Return stream attribute in server-sent events 2023-10-15 17:20:23 -04:00
tusooa
21395aa509
Allow authenticating via client-sent events 2023-10-15 17:19:49 -04:00
tusooa
273cda63ad
Allow subscribing to streams 2023-10-15 17:19:49 -04:00
tusooa
2b5636bf12
Allow unified streaming endpoint 2023-10-15 17:19:40 -04:00
Haelwenn (lanodan) Monnier
2f6fc6a7ab TwitterAPI: Return proper error when healthcheck is disabled 2023-09-24 23:32:17 +02:00
tusooa
08608afca5
Fix quote_visible attribute 2023-09-13 19:20:33 -04:00
tusooa
a8b2f9205d
Expose quote_id parameter on the api 2023-09-13 19:20:32 -04:00
tusooa
875b46d97d
Do not mention original poster when quoting 2023-09-13 19:20:32 -04:00
tusooa
8596f92654
Fix TransmogrifierTest 2023-09-13 19:20:32 -04:00
tusooa
e349e92a44
Add mrf to force link tag of quoting posts 2023-09-13 19:20:30 -04:00
tusooa
479a6f11db
Keep incoming Link tag 2023-09-13 19:19:44 -04:00
tusooa
e9cd004ba1
Parse object link as quoteUrl 2023-09-13 19:19:42 -04:00
tusooa
163e563733
Allow more flexibility in InlineQuotePolicy 2023-09-13 19:19:05 -04:00
tusooa
762794eed9
Fix CommonAPITest 2023-09-13 19:19:05 -04:00
tusooa
9bcec87aba
Allow local quote and private self-quote 2023-09-13 19:19:05 -04:00
Alex Gleason
f9697e68c2
InlineQuotePolicy: skip objects which already have an .inline-quote span 2023-09-13 19:19:05 -04:00
Alex Gleason
79fca39faf
Actually, don't send _misskey_quote anymore 2023-09-13 19:19:05 -04:00
Alex Gleason
4075eecca0
InlineQuotePolicy: improve the way Markdown quotes are displayed by other software 2023-09-13 19:19:05 -04:00
Alex Gleason
817e308c0d
Handle Fedibird's new quoteUri field 2023-09-13 19:19:05 -04:00
Alex Gleason
3c8319fe9f
Transmogrifier: federate quotes with _misskey_quote field 2023-09-13 19:19:04 -04:00
Alex Gleason
cf8e425883
StatusView: return quote post inside a reblog 2023-09-13 19:19:04 -04:00
Alex Gleason
bee7e41959
InlineQuotePolicy: don't add line breaks to markdown posts 2023-09-13 19:19:04 -04:00
Alex Gleason
74e0a4555f
StatusView: add quote_visible param 2023-09-13 19:19:04 -04:00
Alex Gleason
6f11f11519
StatusView: fix quote visibility 2023-09-13 19:19:04 -04:00
Alex Gleason
59326247aa
CommonAPI: disallow quoting private posts through the API 2023-09-13 19:19:04 -04:00
Alex Gleason
57ef1d1211
Add InlineQuotePolicy to force quote URLs inline 2023-09-13 19:19:04 -04:00
Alex Gleason
1f19dd76f6
ActivityDraft: mix format, defensive actor ID 2023-09-13 19:19:04 -04:00
Alex Gleason
54a9897938
ActivityDraft: mention the OP of a quoted post 2023-09-13 19:19:04 -04:00
Alex Gleason
80ab2572a4
Return quote_url through the API, don't render quotes more than 1 level deep 2023-09-13 19:19:04 -04:00
Alex Gleason
f4ccdfd503
Fix typos 2023-09-13 19:19:03 -04:00
Alex Gleason
cbd1760efa
TransmogrifierTest: prepare an outgoing quote post 2023-09-13 19:19:03 -04:00
Alex Gleason
3a8b5d90df
StatusControllerTest: test creating a quote post 2023-09-13 19:19:03 -04:00
Alex Gleason
c20e90e898
BuilderTest: build quote post 2023-09-13 19:19:03 -04:00
Alex Gleason
d4fea8b559
ActivityDraft: allow quoting 2023-09-13 19:19:03 -04:00
Alex Gleason
0d9c443e51
StatusView: render the whole quoted status 2023-09-13 19:19:03 -04:00
Alex Gleason
b022d6635d
Transmogrifier: fetch quoted post 2023-09-13 19:19:03 -04:00
Alex Gleason
795736af16
ObjectValidators: improve quoteUrl compatibility 2023-09-13 19:19:03 -04:00
Alex Gleason
7deda1fa18
Quote post: add fixtures 2023-09-13 19:19:02 -04:00
Mint
1afde067b1 CommonAPI: Prevent users from accessing media of other users 2023-09-03 10:41:37 +02:00
marcin mikołajczak
9effa24f30 Implement api/v2/instance route
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-08-11 00:08:05 +02:00
mae
48b1e9bdc7 Completely disable xml entity resolution 2023-08-05 14:17:04 +02:00
FloatingGhost
307692cee8 Add unit test for external entity loading 2023-08-05 08:14:27 +02:00
Haelwenn (lanodan) Monnier
65ef8f19c5 release_runtime_provider_test: chmod config for hardened permissions
Git doesn't manages file permissions precisely enough for us.
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
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
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
d670dbdbd3
Test that unicode emoji reactions are not affected 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
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
0262916978 Merge branch 'testfix/system-config-use' into 'develop'
release_runtime_provider_test: Explicitely use non-existant config file

See merge request pleroma/pleroma!3910
2023-07-02 21:28:15 +00: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
8bc51288be release_runtime_provider_test: Explicitely use non-existant config file 2023-06-27 00:20:29 +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
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
feld
86b38dd14b Merge branch 'develop' into 'phoenix1.7'
# Conflicts:
#   mix.exs
2023-06-02 15:41:40 +00:00
Mark Felder
ba988a9abc Fix test warnings
warning: the URI path used in plug tests must start with "/"
2023-05-31 16:30:31 -04:00
Mark Felder
e3110cb34e Fix deprecated calls to get_flash/2 2023-05-31 13:36:21 -04:00
Mark Felder
46c799f528 Use Phoenix.ConnTest.redirected_to/2 2023-05-31 09:54:37 -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
43bb2f39db Remove unwanted parameter 2023-05-29 15:05:37 -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
Mark Felder
506a1c98e7 ConnCase: Make sure the host we use in tests is the actual Endpoint host 2023-05-29 13:55:48 -04:00
faried nawaz
4c91c0d1ba
oops, forgot the test cases 2023-05-29 02:52:50 +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