Commit graph

18,033 commits

Author SHA1 Message Date
feld
9db47790bb Merge pull request 'reverse_proxy,endpoint,uploaded_media: add immutable cache-control flag' (#7835) from Yonle/pleroma:develop into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7835
2026-03-26 21:28:50 +00:00
nicole mikołajczyk
9e22baa66a Merge pull request 'Federate votersCount correctly' (#7858) from mkljczk/pleroma:poll-voters-count into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7858
2026-03-26 11:55:36 +00:00
nicole mikołajczyk
5aa3c8a06e Federate votersCount correctly
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
Assisted-by: your mother
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-03-26 12:42:59 +01:00
feld
9af26e5fb5 Merge pull request 'Additional Search Indexing cleanup' (#7864) from search-indexing into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7864
2026-03-25 22:05:55 +00:00
Mark Felder
f06a0eab50 Move object_to_search_data/1 to Pleroma.Search
This standardizes this functionality within the Search module so
it doesn't need to be imported by other search backends from Meilisearch

Also integrate its filtering rules into Search.indexable?/1 for consistency
2026-03-25 14:47:39 -07:00
Mark Felder
ea78e76837 Fix add_to_index/1 to adhere to the typespec 2026-03-25 14:46:38 -07:00
feld
1d819195b6 Merge pull request 'Search: filter indexable activities before inserting Oban jobs' (#7538) from gitlab-mr-iid-4161 into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7538
2026-03-25 20:38:15 +00:00
Mark Felder
711b33d81c Fix CommonAPI.favorite/2 arg order 2026-03-25 13:32:25 -07:00
Mark Felder
7cc9ba6f06 Merge remote-tracking branch 'origin/develop' into gitlab-mr-iid-4161 2026-03-25 13:31:07 -07:00
feld
63c9c7ea92 Merge pull request 'Harden rate limiter to deal with configuration issues' (#7795) from gitlab-mr-iid-4418 into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7795
2026-03-25 19:55:08 +00:00
feld
d1bd24ba64 Merge pull request 'ReverseProxy: Follow redirects recursively until redirect_limit' (#7812) from gitlab-mr-iid-4435 into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7812
2026-03-25 19:53:47 +00:00
feld
106a52eb2e Merge pull request 'Restore embed route' (#7857) from mkljczk/pleroma:restore-embeds into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7857
2026-03-25 19:52:16 +00:00
feld
eabfb2bd47 Merge pull request 'Fix LiveDashboard redirect not working when user added a path segment' (#7830) from live-dashboard-fix-redirect into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7830
2026-03-25 19:49:40 +00:00
feld
876913d2af Merge pull request 'Fix error codes for missing static files' (#7850) from shibao/pleroma:static-fix into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7850
Reviewed-by: Phantasm <phnt@noreply.git.pleroma.social>
2026-03-25 19:49:05 +00:00
feld
93d05efdb1 Merge pull request 'credo: fix ordering of aliases missed in pleroma/pleroma!7841' (#7852) from phnt/pleroma:credo-alias-fixes into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7852
2026-03-25 19:48:02 +00:00
Mark Felder
1701c343e1 Merge remote-tracking branch 'origin/develop' into gitlab-mr-iid-4381 2026-03-25 12:42:05 -07:00
feld
85d311adcf Merge pull request 'No-op code correctness improvements detected by Elixir 1.19 compiler' (#7863) from elixir-1.19-cherrypick into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7863
2026-03-25 19:38:16 +00:00
Mark Felder
cbb715b978 No-op code correctness improvements detected by Elixir 1.19 compiler 2026-03-25 12:36:16 -07:00
Phantasm
08ba0d46d7 ActivityDraft: Add missing __MODULE__ matches and drop unneeded ones 2026-03-25 19:35:46 +00:00
Phantasm
01b139c633 Elixir 1.19: Add note to deprecation warnings test
The Logger does not get reconfigured when running in the test env,
the added and on_exit removed settings below should have no effect
besides triggering the deprecation warnings. To make breakage even less
possible, async is turned off for these tests.

TransferTask test does almost the same with the Application env.
2026-03-25 19:35:46 +00:00
Phantasm
a12f9777f8 Elixir 1.19: Bump Woodpecker test pipeline to 1.19 2026-03-25 19:35:46 +00:00
Phantasm
f44774d387 lint 2026-03-25 19:35:46 +00:00
Phantasm
1743a837dd Elixir 1.19: Set merged logger config correctly, remove log level test 2026-03-25 19:35:46 +00:00
Phantasm
0ac1b65ba9 Elixir 1.19: Fix improper deprecation warning wording 2026-03-25 19:35:46 +00:00
Phantasm
b75f8f7c9a Elixir 1.19: Added changelogs 2026-03-25 19:35:46 +00:00
Phantasm
ad7ab7741b Elixir 1.19: Update dependencies in docs
Elixir 1.15 support only OTP>=24
2026-03-25 19:35:46 +00:00
Phantasm
829a60ce93 Elixir 1.19 MRFTest: Replace matchable_regexes with regexes_match! func 2026-03-25 19:35:46 +00:00
Phantasm
02fc770e36 Elixir 1.19: Improve DeprecationWarningsTest Logger reconfiguration test 2026-03-25 19:35:46 +00:00
Phantasm
0f262bb2f3 Elixir 1.19: Replace ugly old logger config checks with config merging
Side note: Going up in log levels doesn't work properly.
 - debug->info works
 - info->debug does not work
2026-03-25 19:35:46 +00:00
Phantasm
9450fba83d Elixir 1.19: Disable colors for logging in test env
Color ANSI codes end up in the capture_log output and break existing
tests.
2026-03-25 19:35:46 +00:00
Phantasm
bd0c5aa748 Elixir 1.19: Move default configs to the new Logger configuration, again
Trying to do a two-release migration proved to be very hacky and ugly.
Instead this is preparation for moving defaults first and then merging
the old configuration left in admin's config file at runtime while still
emitting a warning. This hopefully will be a lot nicer and less
complicated.
2026-03-25 19:35:46 +00:00
Phantasm
aed0eb3333 Elixir 1.19: Warn on old config of :console Logger and conflicts 2026-03-25 19:35:46 +00:00
Phantasm
a5bd4e0d92 Partially revert "Elixir 1.19: Refactor Logger configuration to what Elixir 1.15+ expects"
This partially reverts commit fc35204cc1d718ba7815cc5e1b08746202b4f7dc.
2026-03-25 19:35:46 +00:00
Phantasm
6ffd25682d Elixir 1.19: Add deprecation warning for :logger, :console configs 2026-03-25 19:35:46 +00:00
Phantasm
a4137243b6 Elixir 1.19: Reword Logger backends deprecation warning 2026-03-25 19:35:46 +00:00
Phantasm
a4c929c527 Lint 2026-03-25 19:35:46 +00:00
Phantasm
c455e02255 Elixir 1.19: Add non-test Elixir files in test/ to mix.exs filter
This is a new filter introduced in 1.19.
2026-03-25 19:35:46 +00:00
Phantasm
2a23eacee8 Elixir 1.19: Only match once on structs
Second match is not needed and a simple Map update is recommended by
the compiler
2026-03-25 19:35:46 +00:00
Phantasm
17a563aeb4 Elixir 1.19: Inject @compile autoload opt to MRF policies
Descriptions of MRF policies are gathered at compile-time and use
Pleroma.Docs.Generator.list_behaviour_implementations func, which
depends on modules implementing the queried behaviour to be loaded.
Otherwise descriptions for MRFs can be missing from the AdminAPI route.

Note: @behaviour cannot be injected in the __using__ macro. It causes a
loop in the compiler which leads to memory exhaustion. Hence why
@behaviour is still defined separately in the MRFs.
2026-03-25 19:35:46 +00:00
Phantasm
6744a86fe3 Elixir 1.19: Disable logging with colors in test environment
Can break some tests capture logs and then match on an expected text.
Since color codes end up being in the captured log.
2026-03-25 19:35:46 +00:00
Phantasm
39409a784d Elixir 1.19: Warn on adding :console to Logger backends
Logger.Backend.Console still exists, but it is unused in our
configuration. Instead logging to console is done from Logger's
"default_handler".
2026-03-25 19:35:46 +00:00
Phantasm
3ebf4b1056 Elixir 1.19: Move deprecated logger syntax check to DeprecationWarnings 2026-03-25 19:35:46 +00:00
Phantasm
eee54a9226 Elixir 1.19: Add tests for new Logger configuration 2026-03-25 19:35:46 +00:00
Phantasm
3790e6786c Only warn about bad clear_config usage if warned usage is met 2026-03-25 19:35:46 +00:00
Phantasm
0393f0f92d Elixir 1.19: Move Logger backends under a specific config key 2026-03-25 19:35:46 +00:00
Phantasm
926cad3a76 Elixir 1.19: Refactor Logger configuration to what Elixir 1.15+ expects
Elixir 1.19 started emitting warnings about our use of:
config :logger, :console and
config :logger, backends: []
which got split in 1.15 to :default_handler, :default_formatter, and
LoggerBackends.add(backend) respectively.

On Pleroma startup it is now necessary to add the additional logger
backends at runtime (done with configure_logger() in application.ex).
New config key :pleroma, :logger_backends: [] has replaced the older
backends array. The logger_backends package is now used to facilitate
usage of other logger backends besides the default one (:logger_std_h
from OTP).

Warnings were added to Pleroma startup to warn about the usage of
:logger, backends and additional logic was introduced to make addition
of ExSyslogger to admin's configuration less dumb.

Ref: https://hexdocs.pm/logger/1.15.0/Logger.html#module-backends-and-backwards-compatibility
2026-03-25 19:35:46 +00:00
Phantasm
dd2f0a32d8 lint 2026-03-25 19:35:46 +00:00
Phantasm
3c7cd8b043 Elixir 1.19: Fix Mastodon StatusControllerTest DateTime difference 2026-03-25 19:35:46 +00:00
Phantasm
cbacc0f146 Elixir 1.19: Fix MRFTest regex tests
It is no longer possible to match regexes. Instead at least match that
the sources of the regexes (regexes themselves) are the same.

Notice the +1 Reference number below.

2) test subdomain_match/2 wildcard domains with one subdomain (Pleroma.Web.ActivityPub.MRFTest)
   test/pleroma/web/activity_pub/mrf_test.exs:36
   Assertion with == failed
   code:  assert regexes == [~r/^(.*\.)*unsafe.tld$/i]
   left:  [%Regex{opts: [:caseless], re_pattern: {:re_pattern, 1, 0, 0, #Reference<0.378940835.3277193222.129648>}, source: "^(.*\\.)*unsafe.tld$"}]
   right: [%Regex{opts: [:caseless], re_pattern: {:re_pattern, 1, 0, 0, #Reference<0.378940835.3277193222.129649>}, source: "^(.*\\.)*unsafe.tld$"}]
   stacktrace:
     test/pleroma/web/activity_pub/mrf_test.exs:39: (test)
2026-03-25 19:35:46 +00:00
Phantasm
94ea3dffd1 Elixir 1.19: Fix ConfigDBTest regex tests
It is not possible match regexes anymore as this worked by accident
previously. Instead, at least check that the sources of the regex (the
regex itself) match.

Notice the +1 difference in the regex Reference below.

1) test to_elixir_types/1 complex keyword with sigil (Pleroma.ConfigDBTest)
   test/pleroma/config_db_test.exs:460
   Assertion with == failed
   code:  assert ConfigDB.to_elixir_types([
            %{"tuple" => [":federated_timeline_removal", []]},
            %{"tuple" => [":reject", ["~r/comp[lL][aA][iI][nN]er/"]]},
            %{"tuple" => [":replace", []]}
          ]) == [federated_timeline_removal: [], reject: [~r/comp[lL][aA][iI][nN]er/], replace: []]
   left:  [federated_timeline_removal: [], reject: [%Regex{opts: [], re_pattern: {:re_pattern, 0, 0, 0, #Reference<0.230935836.591265794.259515>}, source: "comp[lL][aA][iI][nN]er"}], replace: []]
   right: [federated_timeline_removal: [], reject: [%Regex{opts: [], re_pattern: {:re_pattern, 0, 0, 0, #Reference<0.230935836.591265794.259516>}, source: "comp[lL][aA][iI][nN]er"}], replace: []]
   stacktrace:
     test/pleroma/config_db_test.exs:461: (test)
2026-03-25 19:35:46 +00:00