Commit Graph

3215 Commits

Author SHA1 Message Date
William Pitcock
5c312ad677 activitypub inbox: only accept unsigned/invalid-signature relayed creates, nothing else
although the previous handling assumed any unsigned/invalid signature message was a Create,
lets make it more explicit
2018-09-28 00:03:59 +00:00
kaniini
6258ddaa60 Merge branch 'bugfix/kroeg' into 'develop'
More kroeg bugfixes

See merge request pleroma/pleroma!353
2018-09-27 20:25:35 +00:00
Haelwenn (lanodan) Monnier
c739737998
transmogrifier: get_actor called without casting attributedTo in actor and actor is nil 2018-09-27 20:00:48 +02:00
Haelwenn (lanodan) Monnier
9446b02bdf
transmogrifier: Just make attachement maps into a list and reroll 2018-09-27 20:00:48 +02:00
Haelwenn (lanodan) Monnier
e53da692fb
transmogrifier: Use the correct variable and prefer inspect in case of a bad type being passed on 2018-09-27 20:00:48 +02:00
William Pitcock
d830a243a3
transmogrifier: more robustly handle dereferencing pointer URIs 2018-09-27 20:00:48 +02:00
Haelwenn (lanodan) Monnier
4c3a80de96
transmogrifier: Use oneliners when applicable 2018-09-27 20:00:47 +02:00
William Pitcock
ed8dfa3029
transmogrifier: reformat cond block by hand 2018-09-27 20:00:47 +02:00
Haelwenn (lanodan) Monnier
eebe33e86a
transmogrifier: Add support for array-less hashtags, add broken announce, harden get_actor 2018-09-27 20:00:47 +02:00
Haelwenn (lanodan) Monnier
f3291acc91
transmogrifier: pro-actively add support for Hashtag without array in tag 2018-09-27 20:00:47 +02:00
Haelwenn (lanodan) Monnier
2c820e10b8
transmogrifier_test: incoming notices with tag not being an array (kroeg) 2018-09-27 20:00:47 +02:00
Haelwenn (lanodan) Monnier
22927f3a34
transmogrifier: Use a cond, add proactive support for arrays 2018-09-27 20:00:46 +02:00
Haelwenn (lanodan) Monnier
0aac72f1d3
[Pleroma.Web.ActivityPub.Transmogrifier]: quick fix when tag is a Map 2018-09-27 20:00:46 +02:00
Haelwenn (lanodan) Monnier
28e8a8ab36
[Pleroma.Web.ActivityPub.Transmogrifier]: fix emoji in tag when it’s not in a array [kroeg]
Also simplified the code for name trimming.

And not copying the Map.merge part as it looks buggy.
See: https://queer.hacktivis.me/objects/a9f21ebc-9a12-4a6c-89d5-3d46955c6ee8
2018-09-27 20:00:46 +02:00
Haelwenn (lanodan) Monnier
f8a0cb9c0b
[Pleroma.Web.ActivityPub.Transmogrifier]: fix when attachment contain is just a Map [kroeg] 2018-09-27 20:00:46 +02:00
Haelwenn (lanodan) Monnier
a4abb124ea
[Pleroma.Web.ActivityPub.Transmogrifier]: Fix when inReplyTo is a inlined post [kroeg] 2018-09-27 20:00:46 +02:00
Haelwenn (lanodan) Monnier
523757be52
[Pleroma.Web.ActivityPub.ActivityPub]: Harden getting endpoints [kroeg] 2018-09-27 20:00:45 +02:00
kaniini
3de12c194f Merge branch 'fix/s3/filenames-with-spaces' into 'develop'
Uploaders.S3: Replace unsafe characters in object key

See merge request pleroma/pleroma!359
2018-09-24 14:17:21 +00:00
Martin Kühl
f77ec96707 Uploaders.S3: Replace unsafe characters in object key
According to [the S3 docs][s3], the characters safe for use in object keys are:

* 0-9
* a-z
* A-Z
* !
* -
* _
* .
* *
* '
* (
* )

(The / character is not listed but mentioned being safe outside of the list.)

Several characters that are valid in filenames can cause problems, for example
spaces are not valid in URLs and need to be escaped,
sequences of spaces can become squeezed by S3,
some characters like \ are documented to require “significant special handling”.

To avoid these problems, this change encodes the filename
before using it as part of the S3 object name
by replacing all characters except those documented as “safe” with dashes.

[s3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
2018-09-24 15:38:32 +02:00
kaniini
7252055078 Merge branch 'update/pleroma-fe-20180922' into 'develop'
update pleroma frontend

See merge request pleroma/pleroma!357
2018-09-22 05:08:37 +00:00
William Pitcock
bb213a85c5 update pleroma frontend 2018-09-22 05:08:15 +00:00
Martin Kühl
d94ee5cd50 Mastodon API: Support push subscription CRUD 2018-09-22 07:04:01 +02:00
Martin Kühl
c2d592c9c5 Assign token to connection 2018-09-22 07:04:01 +02:00
kaniini
3193423be9 Merge branch 'feature/html-scrub-policy-tests' into 'develop'
html: add scrub policy tests

See merge request pleroma/pleroma!356
2018-09-22 03:50:39 +00:00
William Pitcock
85b59d07b6 test: add smoketests for the scrubbing policies 2018-09-22 03:45:37 +00:00
William Pitcock
7f0e291483 html: twittertext: add missing catchall scrub function 2018-09-22 03:45:35 +00:00
kaniini
7e12ef0ab0 Merge branch 'followup/twitterapi-no-rich-text-field' into 'develop'
twitter api: add no_rich_text option to userview for account prefs

See merge request pleroma/pleroma!355
2018-09-22 03:30:00 +00:00
William Pitcock
56577d8b48 twitter api: add no_rich_text option to userview for account prefs 2018-09-22 03:24:40 +00:00
kaniini
ec6a7799d8 Merge branch 'feature/rich-text-optout-backend' into 'develop'
backend support for opting out of rich text on a per-account basis

See merge request pleroma/pleroma!354
2018-09-22 03:08:19 +00:00
William Pitcock
bd03644ca8 test: add tests for new User.html_filter_policy() 2018-09-22 03:02:05 +00:00
William Pitcock
df00a364fb mastodon api: formatting 2018-09-22 02:53:04 +00:00
William Pitcock
c2b69798dd twitter api: add support for disabling rich text 2018-09-22 02:53:02 +00:00
William Pitcock
958e085acb mastodon api: add support for user-supplied html policy 2018-09-22 02:53:02 +00:00
William Pitcock
2f5b026548 twitter api: add support for user-specified html policy 2018-09-22 02:53:01 +00:00
William Pitcock
735cdfb848 user: add User.html_filter_policy() 2018-09-22 02:53:00 +00:00
William Pitcock
8ae9424edb html: default to using normal scrub policy if provided scrub policy is nil 2018-09-22 02:52:59 +00:00
kaniini
4cb6331843 Merge branch 'feature/dynamic-user-refresh' into 'develop'
user: implement dynamic refresh of profiles

See merge request pleroma/pleroma!350
2018-09-21 00:00:28 +00:00
kaniini
0fe165165f Merge branch 'task-204-on-options-request' into 'develop'
Return 204 response on options request

See merge request pleroma/pleroma!347
2018-09-20 23:54:51 +00:00
William Pitcock
8e28e8a18f mix: remove fix_ap_users task, now obsolete 2018-09-20 23:50:56 +00:00
William Pitcock
200ab27e7a test: add test proving that users are refreshed when stale 2018-09-20 23:50:56 +00:00
William Pitcock
c9f6eb9a41 user: implement dynamic refresh of profiles (gets rid of need for fix_ap_users task) 2018-09-20 23:50:56 +00:00
Haelwenn
f2727e23ee Merge branch 'bump-mastofe-2018-09-20' into 'develop'
Update mastodon frontend

Closes https://git.pleroma.social/pleroma/mastofe/issues/33

See: https://git.pleroma.social/pleroma/pleroma/merge_requests/352
2018-09-20 16:24:32 +00:00
Haelwenn (lanodan) Monnier
83e3afac2c Update mastodon frontend 2018-09-20 16:13:13 +00:00
Haelwenn
7458adc256 Merge branch 'feature/mastodon_api_2.5.0' into 'develop'
Update mastodon API to 2.5.0

Closes: https://git.pleroma.social/pleroma/pleroma/issues/298
Closes: https://git.pleroma.social/pleroma/pleroma/issues/299

See: https://git.pleroma.social/pleroma/pleroma/merge_requests/351
2018-09-20 14:54:30 +00:00
Haelwenn (lanodan) Monnier
40c51f118f
[Pleroma.Web.MastodonAPI.MastodonAPIController]: Bump mastodon_api_level to 2.5.0 2018-09-20 16:48:12 +02:00
Haelwenn (lanodan) Monnier
f74725df41
[Pleroma.Web.MastodonAPI.MastodonAPIController]: Remove unused variables 2018-09-20 16:37:18 +02:00
Haelwenn (lanodan) Monnier
33a1e92584
[Pleroma.Web.Router]: Fake /api/v1/endorsements 2018-09-20 16:25:07 +02:00
Haelwenn (lanodan) Monnier
a8eaecadee
[Pleroma.Web.MastodonAPI.AccountView]: relationship.json: fake endorsed value (false) 2018-09-20 16:24:29 +02:00
Haelwenn (lanodan) Monnier
43d0b7bf7a
[Pleroma.Web.MastodonAPI.StatusView] add replies_count 2018-09-20 16:10:46 +02:00
William Pitcock
c9585ec007 twitter api: fix mimetype fallback when attachments use a URI instead of a URL object 2018-09-19 04:59:26 +00:00