Commit Graph

14709 Commits

Author SHA1 Message Date
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
Sean King 0d4aceb9b0
Make checking blacklisted domains and restricted nicknames case-insenstive 2022-07-05 20:36:47 -06:00
Your New SJW Waifu 99d2710e69 Merge remote-tracking branch 'upstream/develop' into neckbeard 2022-07-05 16:17:17 -05: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
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 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
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
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
Your New SJW Waifu bde3474755 💨4🇺🇦 2022-06-16 00:53:13 -05:00
Your New SJW Waifu 6d62ca230f Merge remote-tracking branch 'upstream/develop' into neckbeard 2022-06-08 15:55:05 -05: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 b096fbba1a
Fix long report notes giving errors on creation 2022-06-02 01:28:39 -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
Your New SJW Waifu bda11cd3fb Merge remote-tracking branch 'upstream/develop' into neckbeard 2022-05-27 09:44:46 -05: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
Your New SJW Waifu da2f01ae3f Merge remote-tracking branch 'upstream/develop' into neckbeard 2022-05-20 02:22:45 -05: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
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
lewdthewides 7977dd6ac7 Instruct users to run 'git pull' as the pleroma user 2022-05-12 16:02:58 +00:00
Your New SJW Waifu 86744609d7 Merge remote-tracking branch 'upstream/develop' into neckbeard 2022-05-10 18:17:41 -05: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
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 d659453e9b Add index hotspots
squash
2022-05-06 22:52:59 -05:00
Your New SJW Waifu f53d289b51 Merge remote-tracking branch 'upstream/develop' into neckbeard 2022-05-06 22:31:08 -05: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