24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-28 22:52:27 +02:00
Commit Graph

6368 Commits

Author SHA1 Message Date
Badlop
550a586d2a New listener option unix_socket, useful when setting unix socket files (#4059)
listen:
  -
    port: "unix://tmp/asd/socket"
    unix_socket:
      mode: '0775'
      owner: 117
      group: 135
2023-08-16 12:25:36 +02:00
Badlop
16473ab691 When sending message on behalf of user, trigger user_send_packet (#3990)
This way, MAM and CarbonCopy get triggered.
This is useful for transports like Slidge.
2023-08-16 12:25:29 +02:00
Paweł Chmielowski
c5afd0322e Properly parse mysql version even if it doesn't have type tag 2023-08-14 17:12:16 +02:00
Alexey Shchepin
eeacace02a Update some modules to the new gen_mod API 2023-08-09 17:08:45 +03:00
Holger Weiss
caf3807bcc ejabberd_systemd: Add a few debug messages 2023-08-09 01:58:48 +02:00
Holger Weiss
6c7e85d3d8 ejabberd_systemd: Avoid using gen_server timeout
Don't (ab)use the gen_server timeout mechanism for pinging the systemd
watchdog.  Under certain conditions (e.g., the process receiving sys
messages), the gen_server timeout might not be triggered as expected.

Fixes #4054, fixes #4058,
2023-08-09 01:54:12 +02:00
Holger Weiss
f0db7623d1 mod_push_keepalive: Don't let hook crash
Check whether mod_push_keepalive is loaded for a given host before
querying the module configuration for that host.  This avoids a hook
crash in the case where the module is enabled for some but not all
hosts.
2023-08-09 00:11:43 +02:00
Holger Weiss
26ed6539ba mod_push_keepalive: Delay 'wake_on_start'
Delay the 'wake_on_start' notifications until ejabberd is fully
initialized.  This makes sure no s2s connections are initiated before
certificates are loaded.

Many thanks to Friedrich Altheide for reporting the issue.
2023-08-08 20:17:10 +02:00
Alexey Shchepin
a9347cd248 Fix unused variable warnings in mod_stats 2023-08-04 20:54:02 +03:00
Alexey Shchepin
60002fc145 Update some modules to the new gen_mod API 2023-08-04 18:53:50 +03:00
Paweł Chmielowski
20a8654be2 Reset scram fields when setting plain password in ejabberd_auth_sql
Setting scram password, then disabling scram and setting plain password
again, will make us think we are still using scramed password and crash
when trying to process it as such. This makes sure that when set plain
password we don't leave parts from old scram password.
2023-08-03 13:07:13 +02:00
Badlop
25411333da Add support for XEP-0421 Occupant Id in anonymous MUC rooms (#3397) 2023-08-02 17:54:54 +02:00
Alexey Shchepin
4bd77797fc Add shorter forms for gen_mod hook/iq_handler API 2023-08-01 18:14:08 +03:00
Alexey Shchepin
03ffbe00c1 Update mod_disco to the new gen_mod API 2023-07-31 16:52:00 +03:00
Alexey Shchepin
5a9099f49c Extend gen_mod API to simplify hooks and IQ handlers registration 2023-07-31 16:52:00 +03:00
Paweł Chmielowski
3710dc1e3b Use prepared statement with mysql 2023-07-25 18:11:24 +02:00
Badlop
db03c7428c Web Admin roster page: move the AddJID textbox to top (#4067) 2023-07-24 20:27:01 +02:00
Badlop
78f81de252 Improve support to stop external modules written in Elixir 2023-07-13 13:41:18 +02:00
Paweł Chmielowski
fafb48e88f
Merge pull request #4025 from jpds/increase-default-backlog
ejabberd_listener.erl: Increase default listen queue backlog value
2023-07-11 12:19:33 +02:00
Paweł Chmielowski
54314e5bb9 Better error handling in mod_muc_rtbl
Should fix issue #4050
2023-07-04 18:18:49 +02:00
Badlop
dcc8149f58 New command to halt ejabberd abruptly with an error status code
Used for processone/ejabberd-contrib#97
2023-06-20 17:54:10 +02:00
Badlop
d2c54fd5fe Fix calling ejabberdctl command with wrong number of arguments with Erlang 26
In Erlang up to 25.3, the lists:zip arguments were [A1, A2]
Since Erlang 26.0, the arguments are: [A1, A2, fail]

93748a8d84
2023-06-13 12:25:27 +02:00
Badlop
f40a7b1c77 OAuth: Handle badpass error message 2023-06-13 12:25:22 +02:00
Badlop
c333cc0776 New option install_contrib_modules
This option is read during ejabberd start or config reload.
It installs the listed modules which aren't yet installed,
as long as allow_contrib_modules is not disabled.
Edit ejabberd.yml and configure the desired ejabberd-contrib modules,
add them in the install_contrib_modules option,
finally start ejabberd (or reload config).
2023-06-09 10:27:13 +02:00
Badlop
0bbc255814 Dialyzer dirty workarounds because re:mp() is not an exported type
Since Erlang/OTP 26, Dialyzer by default reports unknown types.
ejabberd's type specs refer to the re:mp() type,
but that isn't exported in the OTP source code,
and cannot be used in any other modules.
This commit provides very dirty workarounds, and any cleaner
alternative is very welcomed.
2023-06-09 00:02:15 +02:00
Badlop
436074c67a When installing module already configured, keep config as example
When installing a module using ext_mod, if it has already configuration
in the modules section, copy its specific config file as an example
(copy file and rename it).
This may happen when using the new install_contrib_modules option.
2023-06-09 00:02:02 +02:00
Paweł Chmielowski
bb8e892323 Add alternate version of mysql upsert
This one works by issuing select and then insert or update or skip depending
on what select returns. We use this on mysql 5.7.26 and 8.0.20 where
previous implementation using 'replace' or 'on conflict update' can cause
excessive deadlocks.
2023-06-07 16:38:07 +02:00
Paweł Chmielowski
3eecf4ae8a Remove existing role information for users that are kicked from room
This should fix issue reported in #4035
2023-05-24 12:15:20 +02:00
Paweł Chmielowski
4a53d4cb56 Expand rule "mucsub subscribers are members in members only rooms" to more places 2023-05-24 11:26:48 +02:00
Paweł Chmielowski
1818a29c29 Don't crash in mod_shared_roster_ldap:get_member_jid on empty output
This based on crash from issue #3614
2023-05-22 12:48:29 +02:00
Paweł Chmielowski
dd2efc360b Fix return values from calculate_diff inside mod_privacy_sql 2023-05-02 15:59:40 +02:00
Paweł Chmielowski
8e64992f47 Use more efficient way to calculate changes in set_privacy_list 2023-05-02 11:43:29 +02:00
Jonathan Davies
040c72f1c8 ejabberd_listener.erl: Increase default listen queue backlog value to 128, which
is the default value on both Linux and FreeBSD.
2023-04-25 20:11:04 +01:00
Badlop
c6b295b5a0 Fix typo in the previous commit 2023-04-25 09:48:02 +02:00
Badlop
2a4a6bec18 Add trailing backslash to URLs shown in mod_muc_log disco#info 2023-04-24 13:43:09 +02:00
Badlop
0d3f8c7b9f Make mod_register_web redirect to page that end with / (#3177)
Code copied from ejabberd_web_admin.erl, commit 5ec21438
2023-04-24 13:43:07 +02:00
Paweł Chmielowski
5b8ebed81b Optimize mod_privacy_sql:set_list
Previously we always did delete everything and set all entries back, now
we check if we need to delete anything and if not insert only missing data.
2023-04-20 10:55:30 +02:00
Badlop
d717ffd1a0 Update version notes of options and commands 2023-04-18 10:37:14 +02:00
Badlop
5b695766ae Mention what ejabberd version first supports rtbl 2023-04-18 10:37:04 +02:00
Paweł Chmielowski
f5b6909cca Unregister hooks on stop in mod_muc_rbtl 2023-04-17 18:03:21 +02:00
Paweł Chmielowski
98d348893b Make mod_muc_rtbl notify only local node rooms 2023-04-17 17:07:59 +02:00
Paweł Chmielowski
c942c31e38 Add mod_muc_rtbl
This implements Real-time blocklists for XMPP (xmppbl.org).

Closes #4017
2023-04-17 16:59:42 +02:00
Paweł Chmielowski
70cbdd1117 Allow to update state from muc_process_iq hook 2023-04-17 16:57:54 +02:00
Paweł Chmielowski
1114a35e0a Recognize message retractions in mod_muc 2023-04-14 12:32:35 +02:00
Paweł Chmielowski
d12e5a44b8 Add by attribute to generated muc moderation messages 2023-04-14 12:31:34 +02:00
Badlop
99e51a2123 Mention in mod_mam.erl its support for XEP-0425: Message Moderation
Then run "make doap" to regenerate ejabberd.doap
2023-03-30 17:02:54 +02:00
Paweł Chmielowski
f6385fae50 Fix dialyzer warning 2023-03-30 14:53:51 +02:00
Paweł Chmielowski
6da1bb5b22 Add support for "xep-0424 Message Moderation"
This fixes issue #3730
2023-03-30 14:38:08 +02:00
Badlop
1d62dc4621 Set roster name from XEP-0172, or the stored one (#1611) 2023-03-28 11:41:27 +02:00
Badlop
e2496562f9 Preliminary support to store extra elements in subscription request (#840) 2023-03-28 11:41:24 +02:00