1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-03 09:49:18 +02:00
Commit graph

10010 commits

Author SHA1 Message Date
Badlop
c3f5083f15 Use the new gen_mod:prep_stop/1 feature
This fixes the problem when stopping the module with multiple vhosts:
unsubscribing from a local pubsub requires mod_pubsub in that vhost running,
but ejabberd stops mod_pubsub from a vhost before stopping mod_antispam
in other vhost.
2025-06-30 18:21:19 +02:00
Badlop
b65c11daf6 New predefined keyword: CONFIG_PATH 2025-06-30 18:21:19 +02:00
Badlop
263e1f59f7 Fix problem calling get_log_path when ejabberd is stopping
When ejabberd is being stopped
and some module calls ejabberd_logger:get_log_path(),
application:load/1 crashes with error:

** Reason for termination ==
** {terminating,
       [{application_controller,call,2,
            [{file,"application_controller.erl"},{line,511}]},
        {application,load1,2,[{file,"application.erl"},{line,274}]},
        {ejabberd_config,env_binary_to_list,2,
            [{file,"/home/git/ejabberd/src/ejabberd_config.erl"},
             {line,343}]},
        {ejabberd_logger,get_log_path,0,
            [{file,"/home/git/ejabberd/src/ejabberd_logger.erl"},
             {line,55}]},
2025-06-30 18:21:19 +02:00
Badlop
3d89c9199c gen_mod: Add support to prepare module stopping before actually stopping any module
Follows the reasoning of application:prep_stop, but applied to gen_mod:
  https://www.erlang.org/docs/28/apps/kernel/application.html#c:prep_stop/1
2025-06-30 18:21:19 +02:00
Stefan Strigler
4a51bf90ab
Merge pull request #3 from badlop/antispam_files
Move spam file management to a submodule
2025-06-25 15:45:15 +02:00
Badlop
a77c7e36b0 Move spam files parsing to a submodule 2025-06-23 09:44:33 +02:00
Badlop
88ae3fddf3 mod_antispam: Sort and document files options 2025-06-23 09:44:33 +02:00
Badlop
bddcf0624e mod_antispam: Move some definitions to a header file 2025-06-23 09:44:33 +02:00
Stefan Strigler
b55b6f3d26
Merge pull request #2 from badlop/antispam_filter
Move filtering actual implementation to a submodule
2025-06-18 14:15:39 +02:00
Badlop
d00561b58c Move filtering implementation to a submodule 2025-06-18 11:52:28 +02:00
Badlop
432810db89 Fix minor typos 2025-06-18 11:52:28 +02:00
Badlop
f3b1b5d419 Result of running "make format" 2025-06-18 11:52:28 +02:00
Stefan Strigler
d9a7b67f0e mod_antispam: increase timeout when waiting for dump file 2025-06-17 17:21:58 +02:00
Badlop
85f05192c8 Move spam_dump_file implementation to a submodule 2025-06-17 13:20:43 +02:00
Badlop
149b715b4f New predefined keyword: LOG_PATH 2025-06-17 13:20:43 +02:00
Stefan Strigler
bae345b92b mod_antispam: test dump file 2025-06-17 13:18:13 +02:00
Stefan Strigler
10ec128b94 mod_antispam: test whitelisted domain 2025-06-17 13:18:13 +02:00
Stefan Strigler
7a6e409879 mod_antispam: use message/3 in test 2025-06-17 13:18:13 +02:00
Stefan Strigler
ea19e4bc7f mod_antispam: remove unnecessary check in test
this was left over from debugging issues with fixtures
2025-06-17 13:18:13 +02:00
Stefan Strigler
6122a525d2 mod_antispam: fix config types 2025-06-17 13:18:13 +02:00
Badlop
b607d95a93 Refactorize each individual test case in individual functions 2025-06-17 13:18:13 +02:00
Stefan Strigler
ee46333def add make target test-<group>
Eg. invoke common test for specific test group only like

$ CT_BACKEND=mnesia,redis make test-antispam_single
2025-06-17 13:18:13 +02:00
Stefan Strigler
34b40aec66 mod_antispam: add format instructions 2025-06-17 13:18:13 +02:00
Stefan Strigler
639147be41 fix pubsub retract items being a list of ids 2025-06-17 13:18:11 +02:00
Stefan Strigler
c48aa38c39 mod_antispam: add test suite 2025-06-17 13:10:27 +02:00
Stefan Strigler
70bec7b714 tests: update readme and compose to work with current sw versions 2025-06-17 13:10:27 +02:00
Stefan Strigler
a7c15eaccf mod_antispam: initial import from ejabberd-contrib/mod_spam_filter 2025-06-17 13:10:27 +02:00
Badlop
c78e99dd54 Use auxiliary function to get HOME, use Mnesia directory when not set (#4402) 2025-06-17 13:02:01 +02:00
dependabot[bot]
3196779308 build(deps-dev): bump ex_doc from 0.37.3 to 0.38.2
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.37.3 to 0.38.2.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases)
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.37.3...v0.38.2)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-version: 0.38.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-17 13:02:01 +02:00
Badlop
064b005ec5 Define some example glossary terms 2025-06-17 13:02:01 +02:00
Badlop
2d2b98e525 Update Elvis to 4.1.1, fix some warnings and enable their tests 2025-06-16 16:59:43 +02:00
Badlop
71f623ddbf Fix previous commits 2025-06-16 13:14:07 +02:00
Badlop
f03b5f4c44 Support list of IDs in pubsub-items-retract (processone/xmpp#100) 2025-06-16 13:09:52 +02:00
Badlop
aff8b47b6c Add dialyzer spec to try to dix warnings 2025-06-16 12:48:34 +02:00
Badlop
6c1452435d Bump xmpp to get: Add Unified Push support (via Conversations/up) (processone/xmpp#101) 2025-06-16 12:24:06 +02:00
Badlop
38f365ffeb Move ecPrivkeyVer1 workaround for Jose from ejabberd to p1_acme
Revert "Add workaround for Jose 1.11.10 not supporting OTP 28 ecPrivkeyVer1 (#4393)"
This reverts commit 363351b18c.
2025-06-16 12:24:01 +02:00
Badlop
ed846c4a88 ext_mod: Recommend to write README.md instead txt (processone/ejabberd-contrib#363) 2025-06-09 18:02:40 +02:00
Badlop
8855a304cc ext_mod: Support library path installed from Debian (processone/ejabberd-contrib#363) 2025-06-09 17:53:25 +02:00
Paweł Chmielowski
95a083a6f4 Replace csplit with perl in rebar3-format.sh
Bsd csplit doesn't offer some options that we require, so let's use perl
that should work everywhere
2025-06-06 16:52:28 +02:00
Jérôme Sautret
0bb99bb371 Fix supported version of XEP-0485 2025-06-06 11:57:27 +02:00
Badlop
38cc3ccb1e Avoid using the "else" conditional compilation macro directive
Even if "-else." is a valid directive:
  https://www.erlang.org/docs/28/system/macros.html#conditional-compilation
there is a bug in rebar3_format that annoyingly rewrites it as "- else ."
  https://github.com/AdRoll/rebar3_format/issues/337
as a quick workaround, rewrite directives to not use "-else."
2025-06-05 17:02:41 +02:00
Jérôme Sautret
c51b044b3f Fix macro used in string options when defined in env var
Configuration macro defined as EJABBERD_MACRO_* environment variable
couldn't be used inside string options, like this:

captcha_cmd: "tools/@SCRIPT@"
2025-06-05 14:20:11 +02:00
Badlop
363351b18c Add workaround for Jose 1.11.10 not supporting OTP 28 ecPrivkeyVer1 (#4393) 2025-06-04 11:00:00 +02:00
Paweł Chmielowski
167bbc768a Remove unused function 2025-06-02 18:39:51 +02:00
Paweł Chmielowski
591e15f0f6 Fix mnesia to sql exporter after changes to auth tables
Conversion functions used by ej2sql module was not updated after change
that did allow storing multiple passwords per user, which made us skip
passwords that were updated to new format, this fixes this problem.

This fixes issue #4391
2025-06-02 18:19:03 +02:00
Badlop
b4a917db09 Runtime: Fix step name 2025-05-30 17:17:32 +02:00
Badlop
7755fcc846 Bump fast_xml and xmpp for improved Erlang/OTP 28 support 2025-05-30 17:17:32 +02:00
Badlop
250af8f06a Fix "make options" in Erlang/OTP 28 (thanks to Alexey Shchepin)(#4352) 2025-05-30 17:17:32 +02:00
Alexey Shchepin
9569e407b5 Don't send empty messages in Matrix rooms (#4385) 2025-05-30 17:27:30 +03:00
Alexey Shchepin
573d5525ec Fix key validation in mod_matrix_gw_s2s:check_signature 2025-05-30 17:27:30 +03:00