25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00
Commit Graph

9592 Commits

Author SHA1 Message Date
Holger Weiss
ef93a5359b Bump 'xmpp' dependency tag
This fixes announcing SASL2 over non-TLS connections if
'allow_unencrypted_sasl2' is configured.
2024-10-08 17:38:11 +02:00
Badlop
efb1fc9b3f mod_register: Document behavior when access is set to none (#4078) 2024-10-01 15:57:19 +02:00
Badlop
aa5faf1f36 mod_privilege: Replace try...catch with a clean alternative 2024-10-01 15:57:15 +02:00
Holger Weiss
4723283896 ejabberd_c2s: Optionally allow unencrypted SASL2
XEP-0388 says: "SASL2 MUST only be used by Clients or offered by Servers
after TLS negotiation".  Therefore, we reject SASL2 negotiations over
unencrypted transports by default.  However, TLS might be terminated
outside of ejabberd.  Add the 'allow_unencrypted_sasl2' option to
support this use case.
2024-09-29 20:40:01 +02:00
Holger Weiss
36187e07d0 mod_pubsub: Fall back to default plugin options
If the plugin handling a node creation request isn't enabled, fall back
to applying the default plugin (currently node_flat) options.
2024-09-28 17:58:07 +02:00
Holger Weiss
a9583b43c3 mod_pubsub: Fix choice of node config defaults
Ignore node plugin defaults if the plugin handling the request isn't
enabled, rather than ignoring 'default_node_config' options and
applying plugin defaults in that case.
2024-09-28 17:51:28 +02:00
Holger Weiss
ca54f81f58 mod_pubsub: Fix merging of default node options
Use any option specified via 'default_node_config' by default, and take
the remaining defaults from the node plugin handling the request.  This
is the documented behavior.

Before this change, the code applied the plugin defaults only if no
'default_node_config' existed at all.  And even this logic didn't work
as intended, since 'default_node_config' yielded an empty list in case
it wasn't configured, which resulted in plugin defaults never being
applied.
2024-09-28 16:56:46 +02:00
Holger Weiss
b4399291ef mod_pubsub: Fix default node config parsing
Don't merge 'default_node_config' settings with the default options of
the first configured node plugin.  Otherwise, the latter might later
override those of the plugin that should handle a node creation request.
For example, the following configuration would lead to the 'flat'
options being used by default for 'pep' nodes as well:

  mod_pubsub:
    plugins:
      - flat
      - pep
2024-09-28 16:45:59 +02:00
Badlop
4a931b42ab hooks_deps: Hide false-positive warnings about gen_mod 2024-09-24 12:37:06 +02:00
Badlop
15d73b9d20 Support to block IPs in a vhost using append_host_config (#4038) 2024-09-24 12:20:16 +02:00
Badlop
c2d4f73893 Move some modules webadmin pages to their modules 2024-09-16 17:50:47 +02:00
Badlop
31b85351f2 Add new "MAM Archive" page to webadmin 2024-09-16 17:50:46 +02:00
Badlop
c900f0ad83 WebAdmin: Improve pages to handle disabled modules 2024-09-16 17:50:44 +02:00
Badlop
b2e6749fd2 Fix dialyzer: captcha_cmd is a binary for sure 2024-09-16 17:50:43 +02:00
Badlop
2437dc4e06 New command get_mam_count to get number of archived messages for an account 2024-09-16 17:50:42 +02:00
Badlop
115e7d08aa Add links in user page to offline and roster pages 2024-09-16 17:50:40 +02:00
Badlop
d9ddbe0212 Add mam and offline tags to the related purge commands 2024-09-16 17:50:39 +02:00
Badlop
512285e48d Result of running "make options" 2024-09-16 17:50:38 +02:00
Badlop
642e7ecc29 mod_matrix_gw: Remove useless option "persist" 2024-09-16 17:50:37 +02:00
Badlop
ce5a8acaf7 Define the types of options that opt_type.sh cannot derive automatically 2024-09-16 17:50:33 +02:00
Holger Weiss
3d9a5a1635 Fix 'update' command output
So far, ejabberd_update:update/0 returned the return value of
release_handler_1:eval_script/1.  That function returns the list of
updated but unpurged modules, i.e., modules where one or more processes
are still running an old version of the code.  Since commit
5a34020d23, the ejabberd 'update' command
assumes that value to be the list of updated modules instead.  As
that seems more useful, modify ejabberd_update:update/0 accordingly.
This fixes the 'update' command output.
2024-09-14 21:54:01 +02:00
Holger Weiss
3469a51f58 mod_pubsub: Don't blindly echo PEP notification
Since commit 514c25caef, whenever a PEP
item was published, a notification was blindly sent back to the owner.
However, this should only be done subject to +notify filtering, as per
XEP-0163:

| the PEP service shall send notifications to all of the account owner's
| available resources (subject to notification filtering).

The motivation for the mentioned commit was that +notify subscriptions
initially didn't work for PEP node owners (#2108).  However, that issue
was fixed by commit 5968bc9318 (#2112).
As a result, the owner's client was actually notified twice if the
client was subscribed to the node (e.g., via +notify).

Therefore, just omit the additional, blind notification.

Thanks to W. Martin Borgert and Daniel Gultsch for reporting the issue.
2024-09-13 20:50:00 +02:00
Paweł Chmielowski
d4b30957a3 Skip non-delivery errors for local pubsub generated notifications
Those are ignored by pubsub service anyway, so we can skip those, and
reduce number of messages processed by pubsub process.
2024-09-11 13:20:53 +02:00
Badlop
cc377bbebf Update lock files 2024-09-11 11:39:39 +02:00
Badlop
eec836239f Improve documentation of ldap_servers and ldap_backups options (#3977) 2024-09-11 11:39:34 +02:00
Badlop
941d51a6e7 Handle call by gen_event:swap_handler (#4233) 2024-09-11 11:39:30 +02:00
Holger Weiss
e3243fa35b make-binaries: Update OpenSSL URLs 2024-09-06 19:18:32 +02:00
Holger Weiss
70512c7116 make-binaries: Bump dependency versions 2024-09-06 19:05:12 +02:00
Paweł Chmielowski
3c896d1c6a Better handling of malformed jids in send_direct_invitation command 2024-09-02 12:49:39 +02:00
Paweł Chmielowski
b455d93c69 Fix dialyzer warnings 2024-09-02 12:42:55 +02:00
Paweł Chmielowski
017b2feac1 Make set_presence command return error when session not found
Should fix issue #4274
2024-09-02 12:01:56 +02:00
Paweł Chmielowski
5f47860ee1 Remove support for old websocket connection protocol
This removes handling of pre-rfc7395 encapsulation of xmpp in websocket
(where data send in websocket was using just raw data as send in regular
socket). This didn't work correctly for last 5 years, and as we didn't
see complains about this, we can assume it's not used anymore.
2024-09-02 11:55:46 +02:00
Badlop
795498fa45 Runtime: Cache hex.pm archive from rebar3 and mix 2024-08-26 15:50:25 +02:00
Badlop
aa1717ee77 CI: Add Elvis tests 2024-08-26 15:50:25 +02:00
Badlop
db6d3e63f2 Fix Elvis report: Fix dollar space syntax
https://github.com/inaka/elvis_core/blob/main/doc_rules/elvis_style/no_dollar_space.md
2024-08-26 15:50:25 +02:00
Badlop
0304428d95 Fix Elvis report: Remove spaces in weird places
https://github.com/inaka/elvis_core/blob/main/doc_rules/elvis_style/no_space.md
2024-08-26 15:50:25 +02:00
Badlop
74b80bfe08 Fix Elvis report: Don't use ignored variables
https://github.com/inaka/elvis_core/blob/main/doc_rules/elvis_style/used_ignored_variable.md
2024-08-26 15:48:32 +02:00
Badlop
90ce65e4dc Fix Elvis report: Remove trailing whitespace characters
https://github.com/inaka/elvis_core/blob/main/doc_rules/elvis_text_style/no_trailing_whitespace.md
2024-08-26 15:48:32 +02:00
Badlop
d4d9771a71 Makefile: Add support for "make elvis" when using rebar3 2024-08-26 15:48:32 +02:00
Badlop
70ee294079 elvis.config: Fix file syntax, set vim mode, disable many tests
Let's disable the tests that would require major changes in existing
ejabberd source code, and fixing them would produce a curtain of changes
that would difficult using git blame and git log, but provide minimal
benefits.

Don't check erlang header files by now.

Don't check rebar.config because it has customizations that must be
parsed by rebar.config.script to have suitable syntax.
2024-08-26 15:48:32 +02:00
Badlop
5f4d17621f Fix Erlang LS warning about unused macro definitions
Macro name + commit when it was added - commit when usage was removed:

* BATCH_SIZE + f6db8428 - 71c44bff8
* INVALID_SETTING_MSG - 6b126171d - 381065397
* POLICY_ACCESS + 7c1e7e5b - 56d273477
* PROCNAME + 068db1a2 - 6876a37e6
* SALT_LENGTH + e575c87e - 633b68db1
* SERVER + 068db1a2 - but was never used!
* SERVER + f44e23b8c - but was never used!
* STORAGE_TYPES + 92db9ff1 - 9a93acc62
* TCP_SEND_TIMEOUT + f0af10e6 - 6e900d6a8
* TDTD + c3280e9 - 5a34020
* TVFIELD + dcc05ac8 - da310a517
2024-08-26 15:48:32 +02:00
Badlop
8f4179050b erlang_ls.config: Let it find paths, update to Erlang 26, enable crossref 2024-08-26 15:48:32 +02:00
Badlop
fddacd51a4 .vscode/launch.json: Experimental support for debugging with Neovim 2024-08-26 15:48:32 +02:00
Badlop
e726ba9a8b .vscode/relive.sh: Update to benefit from ejabberd 24.02 behaviour 2024-08-26 15:48:32 +02:00
Badlop
da1673e264 mix.lock: Don't mention Relive deps, otherwise they are always downloaded 2024-08-26 15:48:32 +02:00
Badlop
7cd34d3709 CONTAINER.md: Use same general badges in both container images readme files 2024-08-26 15:48:32 +02:00
Paweł Chmielowski
ec7fd05987 Update xmpp once more 2024-08-24 15:27:58 +02:00
Paweł Chmielowski
34a58863e3 Update xmpp dep 2024-08-24 13:16:03 +02:00
Paweł Chmielowski
3237a955e5 Fix dep spec for rebar2 2024-08-23 20:56:52 +02:00
Paweł Chmielowski
8e7489c2be Remove duplicate dep from mix.exs 2024-08-23 20:52:36 +02:00