Commit graph

10,114 commits

Author SHA1 Message Date
Phantasm
0e53cb4940
Remove unreachable checks for OTP < 22.2
OTP 22 is no longer supported at all.

Pleroma's dependencies cannot be built with Elixir 1.13 and
Elixir 1.14 cannot be built with OTP 22 since it depends on features not
present in OTP 22. Hence why these checks cannot get triggered anymore.
2025-06-03 23:11:37 +02:00
Phantasm
9710063fdc
Apply suggestions to 2 files. 2025-06-03 23:11:37 +02:00
Phantasm
af81f7bf82
Don't use deprecated function invocation syntax
warning: using map.field notation (without parentheses) to invoke function TranslationMock.configured?() is deprecated, you must add parentheses instead: remote.function()
2025-05-14 17:00:19 +02:00
Phantasm
5addbf39fb
Elixir 1.18 Deal with :warnings_as_errors deprecation in compiler_options/1
warning: :warnings_as_errors is deprecated as part of Code.get_compiler_option/1
  (elixir 1.18.3) lib/code.ex:1597: Code.get_compiler_option/1
  (elixir 1.18.3) lib/code.ex:1572: anonymous fn/2 in Code.compiler_options/1
  (elixir 1.18.3) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3
  (elixir 1.18.3) lib/code.ex:1571: Code.compiler_options/1
  (pleroma 2.9.1-77-g8ec49c59-elixir-1-18+test) lib/pleroma/application.ex:104: Pleroma.Application.start/2
  (kernel 10.2.6) application_master.erl:295: :application_master.start_it_old/4

warning: :warnings_as_errors is deprecated as part of Code.put_compiler_option/2, instead you must pass it as a --warnings-as-errors flag. If you need to set it as a default in a mix task, you can also set it under aliases: [compile: "compile --warnings-as-errors"]
  (elixir 1.18.3) lib/code.ex:1710: Code.put_compiler_option/2
  (elixir 1.18.3) lib/code.ex:1573: anonymous fn/2 in Code.compiler_options/1
  (elixir 1.18.3) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3
  (elixir 1.18.3) lib/code.ex:1571: Code.compiler_options/1
  (pleroma 2.9.1-77-g8ec49c59-elixir-1-18+test) lib/pleroma/application.ex:104: Pleroma.Application.start/2
  (kernel 10.2.6) application_master.erl:295: :application_master.start_it_old/4
2025-05-13 14:02:47 +02:00
Phantasm
63cbc1208d
Elixir 1.18 Replace Tuple.append/2 with Tuple.insert_at/3
warning: Tuple.append/2 is deprecated. Use insert_at instead
     │
 305 │     Enum.reduce(entity, {}, &Tuple.append(&2, to_elixir_types(&1)))
     │                                    ~
     │
     └─ lib/pleroma/config_db.ex:305:36: Pleroma.ConfigDB.to_elixir_types/1
2025-05-13 14:02:47 +02:00
Phantasm
59d17a5b20
Elixir 1.18 Move Update activity validation to separate function
warning: Pleroma.Web.ActivityPub.ObjectValidators.AcceptRejectValidator.cast_and_validate/2 is undefined or private. Did you mean:

   * cast_and_validate/1

    │
227 │       validator == UpdateValidator -> fn o -> validator.cast_and_validate(o, meta) end
    │                                                         ~
    │
    └─ lib/pleroma/web/activity_pub/object_validator.ex:227:57: Pleroma.Web.ActivityPub.ObjectValidator.validate/2
2025-05-13 14:01:47 +02:00
Phantasm
25e7b12a6b
Elixir 1.18 Remove seemingly unneeded cond
warning: this clause in cond will always match:

<<"#", name::binary>>

since it has type:

binary()

where "name" was given the type:

%{"type" => "Hashtag", "name" => name} = data

   typing violation found at:
   │
55 │         "#" <> name -> name
   │                     ~
   │
   └─ lib/pleroma/web/activity_pub/object_validators/tag_validator.ex:55:21: Pleroma.Web.ActivityPub.ObjectValidators.TagValidator.changeset/2
2025-05-13 10:21:44 +02:00
Phantasm
53d7b205e8
Elixir 1.18 <%# deprecated syntax warning
warning: <%# is deprecated, use <%!-- or add a space between <% and # instead
    │
  5 │       <%# Note: using hidden input with `unchecked_value` in order to distinguish user's empty selection from `scope` param being omitted %>
    │       ~
    │
    └─ lib/pleroma/web/templates/o_auth/o_auth/_scopes.html.eex:5: (file)
2025-05-12 16:17:32 +02:00
Mark Felder
1266b180b9 Improved performance of status search queries using the default GIN index 2025-04-10 14:32:31 -07:00
lain
1775a4db08 Merge branch 'siteinfo-baseurls' into 'develop'
Provide media proxy and upload base urls in siteinfo

See merge request pleroma/pleroma!4349
2025-04-02 13:00:42 +00:00
Moon Man
93aa563cfe implemented 2025-04-02 07:00:45 -04:00
Nicole Mikołajczyk
4d4174c339 fix a few typos
Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
2025-03-28 18:47:00 +01:00
lain
254b31bf1c Merge branch 'more-emoji-likes' into 'develop'
More emoji likes

Closes #3364

See merge request pleroma/pleroma!4342
2025-03-20 09:12:09 +00:00
lain
81960dccf2 Merge branch 'translate-posts' into 'develop'
Support translation providers (DeepL, LibreTranslate)

See merge request pleroma/pleroma!4102
2025-03-20 09:11:57 +00:00
Mark Felder
638d047a5c Fix releases by not relying on Mix 2025-03-19 10:47:32 -07:00
Mark Felder
7763b9a87f Truncate the length of Rich Media title and description fields
Some sites like Instagram are serving obnoxiously long metadata fields
2025-03-19 10:29:45 -07:00
mkljczk
25a3ee2256 InstanceView: do not repeat information
Signed-off-by: mkljczk <git@mkljczk.pl>
2025-03-19 17:59:42 +01:00
mkljczk
08de5f94e3 Merge remote-tracking branch 'origin/develop' into translate-posts
Signed-off-by: mkljczk <git@mkljczk.pl>
2025-03-19 17:59:24 +01:00
Lain Soykaf
f9bff8f5e5 Transmogrifier: Keep likes as likes if the content is obviously wrong 2025-03-19 16:00:27 +04:00
Lain Soykaf
e19ca7606d Transmogrifier: Also accept mitra emoji likes. 2025-03-18 15:53:27 +04:00
Lain Soykaf
fc7ca2ccf4 Federator: More specific logging for rejections 2025-03-18 15:25:54 +04:00
mkljczk
fa76bb66f9 Merge remote-tracking branch 'origin/develop' into language-detection
Signed-off-by: mkljczk <git@mkljczk.pl>
2025-03-11 20:38:56 +01:00
Lain Soykaf
5ce612b272 Linting 2025-03-11 18:21:27 +04:00
Lain Soykaf
51c1d6fb2d Containment: Never fetch locally 2025-03-11 16:37:17 +04:00
Lain Soykaf
adb5cb96d3 Object.Fetcher: Don't do cross-site redirects. 2025-03-11 15:50:17 +04:00
Lain Soykaf
577b7cb061 StealEmojiPolicy: Sanitise emoji names. 2025-03-11 14:59:06 +04:00
Lain Soykaf
c143653364 ReverseProxy: Sanitize content. 2025-03-11 14:18:36 +04:00
Lain Soykaf
d9ae9b676c InstanceStatic: Extra-sanitize emoji 2025-03-11 14:09:31 +04:00
Lain Soykaf
b1309bdb40 More fixes for InstanceStatic 2025-03-10 18:44:17 +04:00
Lain Soykaf
1dd9ba5d6f Sanitize media uploads. 2025-03-10 17:23:21 +04:00
Lain Soykaf
b469b9d9d3 . 2025-03-10 16:48:54 +04:00
Lain Soykaf
edcd816730 Merge branch 'assorted-test-fixes' into secfix 2025-03-10 16:04:46 +04:00
Lain Soykaf
79cbc74aa9 Linting 2025-03-01 19:05:20 +04:00
Lain Soykaf
32acdf0936 Merge branch 'security-2.9' into release/2.9.0 2025-03-01 17:45:28 +04:00
Lain Soykaf
706bfffcda Linting 2025-03-01 17:16:48 +04:00
Lain Soykaf
88ee385302 Transmogrifier: Strip internal fields 2025-03-01 17:13:47 +04:00
Lain Soykaf
4604f2944e Merge branch 'pleroma-ensure-authorized-fetch' into security-2.9 2025-03-01 14:07:02 +04:00
feld
a8e863e0d6 Merge branch 'rich-media-ordering' into 'develop'
Rich Media Parser should use first image found

Closes #3356

See merge request pleroma/pleroma!4329
2025-03-01 02:01:22 +00:00
Mark Felder
ac0882e348 Filter the parsed OpenGraph/Twittercard tags and only retain the ones we intend to use. 2025-02-28 17:24:23 -08:00
Mark Felder
2c9d071aad Retire MRFs DNSRBL, FODirectReply, and QuietReply
DNSRBL was a neat experiment which should live out of tree. It works and could be used to coordinate rules across different servers, but Simple Policy will always be better

FODirectReply and QuietReply have reliability issues as implemented in an MRF. If we want to expose this functionality to admins it should be a setting that overrides the chosen scope during CommonAPI.post instead of trying to rewrite the recipients with an MRF.
2025-02-28 16:43:28 -08:00
Mark Felder
cb073a9cd0 Rich Media Parser should use first og:image 2025-02-28 15:12:49 -08:00
Mark Felder
7bdeb9a1e5 Fix OpenGraph/TwitterCard meta tag ordering for posts with multiple attachments 2025-02-28 13:36:00 -08:00
Lain Soykaf
bf134664b4 PackTest: Add test for skipping emoji 2025-02-28 12:53:15 +04:00
Lain Soykaf
2fcb90f369 Emoji, Pack, Backup, Frontend: Use SafeZip 2025-02-27 17:06:15 +04:00
Oneric
0f5ac7e86d Add SafeZip module
This will replace all the slightly different safety workarounds at
different ZIP handling sites and ensure safety is actually consistently
enforced everywhere while also making code cleaner and easiert to
follow.
2025-02-27 14:19:50 +04:00
Lain Soykaf
c31fabdebd Mogrify/Mogrifun: Asyncify 2025-02-25 17:08:21 +04:00
Lain Soykaf
ee291f08e8 AnonymizeFilename: Asyncify 2025-02-25 16:40:45 +04:00
Lain Soykaf
5851d787b6 Merge branch and resolve conflict in database_test.exs 2025-02-25 16:23:46 +04:00
Lain Soykaf
35814de0df LanguageDetectorTests: Switch to mox 2025-02-25 12:31:19 +04:00
Lain Soykaf
edfb1deb1c Application: Don't verify requirements during test at startup. 2025-02-25 12:20:19 +04:00