25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-18 17:24:31 +01:00
Commit Graph

6707 Commits

Author SHA1 Message Date
Badlop
ce6d5aa6a0 Redis: Disable some dialyzer warnings when using old Erlang 20 2024-12-05 13:03:43 +01:00
Badlop
f269d5b613 Redis: Add support for unix domain socket (#4318) 2024-12-05 13:01:40 +01:00
Badlop
a84c492130 Redis: Use the recommended eredis:start_link/1 function 2024-12-05 13:01:38 +01:00
Badlop
39e37b6175 Add support to define macros as environment variables
Define and macro by setting as environment variable:
  EJABBERD_MACRO_ + macro name

For example, if you configure in ejabberd.yml:
  define_macro:
    LOGLEVEL: 4
  loglevel: LOGLEVEL

You can define (and overwrite) that macro definition when starting ejabberd:
  EJABBERD_MACRO_LOGLEVEL=5 make relive
2024-12-05 13:01:31 +01:00
Badlop
c72ba1f188 mod_scram_upgrade: Update XEP-0480 supported version (processone/xmpp#80) 2024-12-05 13:01:30 +01:00
Badlop
4d625e5574 Erlang/OTP 27 finally exports re:mp/0 2024-12-05 13:01:28 +01:00
Badlop
803f95050f WebAdmin: Fix calculation of node's uptime days 2024-12-05 13:01:26 +01:00
Badlop
c021cf34be Explain that join_cluster returns immediately (since 5a34020, 24.06) 2024-12-05 13:01:23 +01:00
Mark Zealey
bd36895afe Enable allow_unencrypted_sasl2 on websockets
https://github.com/processone/ejabberd/commit/47232838 added the
allow_unencrypted_sasl2 option, but this was not added to websockets.
2024-12-03 17:39:58 +00:00
Holger Weiss
b90c48f837 mod_scram_upgrade: Don't abort the upgrade
Fix a matching mistake that made the SASL mechanism upgrade fail.
2024-12-01 20:23:52 +01:00
Holger Weiss
344775aa8e mod_pubsub: Send notifications on PEP item retract 2024-11-30 20:38:33 +01:00
Badlop
7d0c20e133 mod_shared_roster: The name of a new group is lowercased
Until now it was possible to create a shared roster group with name
"Group1", and it was a different group that "group1".

From now on, new group names will be stored lowercase,
just like the username in a Jabber ID.

This only affects commands srg_add and srg_create.
All the other commands are still case sensitive, to allow admins of
existing databases with case-sensitive groups manage them.
2024-11-27 16:20:53 +01:00
Badlop
ab5a2e8d10 mod_shared_roster: Get back support for groupid@vhost in displayed
Feature first implemented by 262157c in ejabberd 2.1.10
Bug introduced with cache improvements by 5b0f0d8 in ejabberd 21.07
2024-11-27 13:54:02 +01:00
Badlop
e34c1ebcba WebAdmin: Fix link to displayed group when it is from another vhost 2024-11-27 13:54:00 +01:00
Badlop
73dbc01c2e WebAdmin: Shared group names are case sensitive, use original case instead of lowercase 2024-11-27 13:53:58 +01:00
Badlop
cc5c9f6008 Fix problems introduced in two recent commits 2024-11-25 17:23:28 +01:00
Badlop
da9c591eed Improve create_rooms_file command to support vhosts with different config
Until now it created all the rooms in the storage of the first vhost
listed in the ejabberd configuration file. Similarly, it used only
the default room options defined for the first vhost.
2024-11-25 16:20:30 +01:00
badlop
f4009939a6
Merge pull request #4315 from Quobis/support-loading-elixir-modules-for-auth
feat: support loading Elixir modules for auth
2024-11-25 16:08:54 +01:00
Marcos de Vera Piquero
17b5b34e3c feat: support loading Elixir modules for auth
Allow to specify an Elixir module name in `auth_method`.

If the referenced module, `M`,  cannot be loaded as `ejabberd_auth_M`,
try to load it as `Elixir.M`.
2024-11-25 15:31:27 +01:00
Badlop
c291c20a3b Fix problem starting ejabberd when first host uses SQL, other one mnesia
The problem appeared when there are several vhosts,
the first vhost uses SQL for persistent data (and RAM for volatile),
and another vhost wants to use Mnesia

Example config to trigger the problem:

  hosts:
    - mysql.localhost
    - localhost
  host_config:
    mysql.localhost:
      default_db: sql

In that case, ejabberd crashed at start with an error like:
[critical] Internal error of module mod_muc has occurred during start:
...
** exception exit: {aborted,
                     {no_exists,
                         [muc_room,
                          [{{muc_room,{'_',<<"conference.localhost">>},'_'},
                            [],
                            ['$_']}]]}}
2024-11-22 19:25:52 +01:00
Badlop
07e20784cb New evacuate_kindly command: kick users and prevent login (#4309) 2024-11-14 13:57:47 +01:00
Badlop
9eb8bb6c40 mod_matrix_gw_s2s probably works correctly only in Erlang/OTP >= 25
In Erlang/OTP 25, the function inet_res:getbyname/3
returns {ok, Hostent} where the last tuple element of Hostent
may be h_addr_list = [inet:ip_address()]}
or H_addr_list :: [dns_data()]}

However, in Erlang/OTP 24.1 and older, that element was only of type
h_addr_list = [inet:ip_address()]}

https://erlang.org/documentation/doc-13.0-rc3/lib/kernel-8.4/doc/html/inet_res.html#getbyname-3
https://erlang.org/documentation/doc-12.1/lib/kernel-8.1/doc/html/inet_res.html#getbyname-3
2024-11-14 13:57:47 +01:00
Badlop
6f7efebb56 Only delete offline msgs when user has MAM enabled (#4287) 2024-11-14 13:57:43 +01:00
Badlop
3650d94bb5 Remove XEPs that are only a client thing 2024-11-14 13:57:43 +01:00
Badlop
6a428f3d02 Add ejabberd version and implementation status for many XEPs 2024-11-14 13:57:43 +01:00
Badlop
abe1d96c58 Announce support for XEP-0384 OMEMO Encryption (#4305)
The last required piece to support XEP-0384 was
supporting max_items=max, which was added for ejabberd 21.12 in commit
8f8de0403b
2024-11-14 13:57:39 +01:00
Badlop
29a59cfe48 Add "XMPP Date and Time Profiles" implemented by xmpp and used everywhere 2024-11-14 13:49:41 +01:00
Paweł Chmielowski
c7d967a2b5 Fix dialyzer issue 2024-11-05 17:10:09 +01:00
Paweł Chmielowski
b50ea7ef1f Make mod_privilge properly handle roster iq 2024-11-05 16:57:52 +01:00
Paweł Chmielowski
d56eae809d Catch extra case in check for s2s bidi element 2024-11-05 13:26:42 +01:00
Metalhearf
af97211ecc Update URLs in docs/conf files for consistency. 2024-10-31 17:30:20 +01:00
Badlop
6b0058c89c Add two more version notes 2024-10-28 13:50:02 +01:00
Badlop
643ae7e5f9 Result of running "make doap options" 2024-10-28 12:06:55 +01:00
Badlop
bdd8ba115e Document ejabberd version of the new modules 2024-10-28 12:06:51 +01:00
Badlop
71ad7c368d Minor improvements to support mod_tombstones
New check_register_user hook in ejabberd_auth.erl
to allow blocking account registration when a tombstone exists.

Modified room_destroyed hook in mod_muc_room.erl
Until now the hook passed as arguments: LServer, Room, Host.
Now it passes: LServer, Room, Host, Persistent
That new Persistent argument passes the room persistent option,
required by mod_tombstones because only persistent rooms should generate
a tombstone, temporary ones should not.
And the persistent option should not be completely overwritten, as we must
still known its real value even when room is being destroyed.

mod_tombstones is available in experimental mode in ejabberd-contrib git.

Initial feature request: #2546
2024-10-28 12:06:48 +01:00
Paweł Chmielowski
8be0f8a0b0 Revert some unrelated changes 2024-10-28 09:44:05 +01:00
Paweł Chmielowski
e9e678a994 Add support for scram upgrade tasks 2024-10-28 09:26:04 +01:00
Paweł Chmielowski
a89152a3d7 Add support for s2s bidi 2024-10-28 09:25:56 +01:00
Badlop
81906b74ed Support "IQ permission" from XEP-0356 0.4.1 (#3889) 2024-10-21 17:23:59 +02:00
Badlop
74b0f64645 mod_block_strangers: Add feature announcement to disco-info (#4039) 2024-10-21 17:23:59 +02:00
Badlop
50948d1619 mod_mam: Advertise XEP-0424 feature in server disco-info (#3340) 2024-10-21 17:23:49 +02:00
Holger Weiss
38f1132192 ejabberd_stun: Omit 'auth_realm' log message
These days, TURN authentication is usually performed using ephemeral
credentials handed out by mod_stun_disco.  In that case, the TURN realm
is irrelevant.  Therefore, omit the misleading log message that warned
about a missing realm configuration.

(Commit 6eb2f07274 reduced the log level
of that message already.)
2024-10-15 22:50:30 +02:00
Badlop
50ef49d190 mod_vcard: Return explicit error stanza when user attempts to modify other's vcard 2024-10-11 11:54:18 +02:00
Badlop
3669ac8aed ejabberd_app: At server start, log Erlang and Elixir versions 2024-10-11 11:54:16 +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