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

6345 Commits

Author SHA1 Message Date
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
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
Badlop
c4a2f8d64f captcha_url option now accepts 'auto' value, and it's the default 2023-03-22 16:23:41 +01:00
Badlop
6c620f6f43 Remove wrong get_room_history command fields specification 2023-03-22 16:23:37 +01:00
Paweł Chmielowski
3c97775573 Pubsub xdata fields max_item/item_expira/children_max use 'max' not 'infinity'
Codec in xmpp crashes when we use infinity (see issue #4011), so lets
convert those values before passing them to xmpp:encode(0
2023-03-21 15:30:44 +01:00
Blake Miller
f953dc3f5e Persist none role for outcasts
`none` roles *should* be persisted for banned users. I totally forgot about this, my bad. I'm shocked nobody else noticed it.
2023-03-20 17:07:10 +01:00
Paweł Chmielowski
9503beca6c Make mod_muc_room:set_opts process persistent flag first
As processing some other options depends on this setting flag in room
state.
2023-02-20 13:42:52 +01:00
Paweł Chmielowski
dfe4884d16 Allow passing affiliations and subscribers to create_room_with_opts command 2023-02-20 13:03:46 +01:00
Paweł Chmielowski
f10f6d176f Store state in db in mod_muc:create_room() 2023-02-20 12:56:41 +01:00
Paweł Chmielowski
4e7aa41e3f Make subscribers members by default 2023-02-20 12:55:31 +01:00
Paweł Chmielowski
d91812730b Stop ejabberd_system_monitor before stopping node
Sometimes monitor module is performing checks when node is stopping and
this causes crash in monitoring process.
2023-02-08 19:53:19 +01:00
Paweł Chmielowski
54cf37e917 Invalidate vcard_xupdate cache on all nodes when vcard is updated 2023-02-08 19:06:44 +01:00
Paweł Chmielowski
3de803be2f Add get_room_history command in mod_muc_admin 2023-02-08 11:04:26 +01:00
Paweł Chmielowski
5ca59807d9 Fix problem with results of mam queries using rsm with max and before
Plus add test case for it.
2023-02-03 11:37:54 +01:00
Paweł Chmielowski
5c3b43cd63 Update spec 2023-02-01 17:32:22 +01:00
Paweł Chmielowski
1a6baf223c Re-allow anonymous connection for connection without client certificates
This fixes issue #3985. Initial issue was introduced in
5506b838c8 adding tls client cert
authentication.
2023-02-01 16:58:25 +01:00
Paweł Chmielowski
74c9aa8ac0
Merge pull request #3982 from nosnilmot/sql-update-tests
SQL schema migration fixes and testing
2023-02-01 12:03:48 +01:00
Badlop
fb16727180 Ammend previous commit with another fix 2023-01-27 15:40:34 +01:00
Badlop
9842b035e3 Fix compilation problem with Erlang/OTP older than 21 introduced recently
Those macros were first introduced in c88a2d0
2023-01-27 15:29:41 +01:00
Alexey Shchepin
f6b5a52104 Add s2s_out_bounce_packet hook 2023-01-27 03:54:31 +03:00
Alexey Shchepin
f650b1e83c Log HTTP handler exceptions 2023-01-27 03:54:31 +03:00
Badlop
c5c7e7fc4d ext_mod: Improve support for loading *.so files from ext_mod dependencies
Copying files from deps/*/priv/*.so to the ejabberd priv/
is not possible when running ejabberd as OTP release or in a container.
Instead, let's copy the deps/*/priv/*.so maintaining the file structure,
and then using code:add_pathz for those dirs.

This partially reverts 5c1b72853f
2023-01-25 17:58:12 +01:00
Stu Tomlinson
0c1cf43519 Fix a long standing bug in new schema migration
... and make the test that uncovered it explicitly fail (there was already a
TODO) instead of passing but with errors logged
2023-01-21 15:42:43 +00:00
Stu Tomlinson
56e974ab80 Add ability to run tests on upgraded DB
To test update_sql operation and functionality of resulting DB:

1. Load original schema to DB
2. Set {update_sql, true} in suite.erl
3. Run tests
2023-01-21 15:42:43 +00:00
Stu Tomlinson
9398052b65 New schema migration 'update_sql' improvements
- check that server_host column does not already exist before addding it
  and making other changes to table (update_sql becomes idempotent,
  yay!)
- check that indexes exist before dropping them (some are historical and
  are not created in more recent deployments), elminating spurious
  errors from logs
- update new_sql_schema config after migration, to allow near
  zero-downtime migrations (and help with automated testing)
2023-01-21 14:54:36 +00:00