Holger Weiss
09a87f5a0c
ejabberd_stun: Handle hashed passwords gracefully
...
Don't crash when STUN/TURN authentication is performed against a
SCRAM-hashed password.
2020-04-22 00:16:03 +02:00
Holger Weiss
1db70edcf8
ejabberd_stun: Add 'stun_get_password' hook
...
Add a hook that allows modules to offer a password for STUN/TURN
authentication.
2020-04-22 00:09:42 +02:00
Badlop
1a3533e4a2
Fix some English typos
2020-04-21 20:58:01 +02:00
Badlop
3db9de26e9
Rephrase mod_admin_extra doc, a2x screwed the format when building Docs
2020-04-21 20:11:39 +02:00
Badlop
78f0439e78
Make a few more strings translatable in MUC and Shared Roster WebAdmin
2020-04-20 20:24:56 +02:00
Holger Weiss
c836dc66a8
ejabberd_stun: Set a default 'turn_ip'
...
Try to resolve the local hostname, use the result as the default
'turn_ip', and only log a warning if that fails. Using the local
hostname's address by default is analogous to mod_proxy65's behavior.
2020-04-20 08:42:32 +02:00
Badlop
0355e15a42
Fix doc content in mod_admin_extra so it can be extracted by make translations
2020-04-17 17:28:39 +02:00
Badlop
101f7a6d63
Check if mod_muc_log is enabled before setting logging option ( #3215 )
2020-04-17 16:19:58 +02:00
Badlop
4aa85c538c
When rescode is some unexpected, probably error message, print it
2020-04-17 16:19:55 +02:00
Paweł Chmielowski
22980ed8a5
Restart offline pop_messages when there is mismatch between select and delete
...
When another connection is inserting something to spool at this same time
as we do pop_messages, it's possible that insert will happen between we
fetch messages and delete them, so we effectively will delete it without
delivering it to client. This change catch this situation and restart
transaction, so we should always have consistent results.
2020-04-17 15:30:28 +02:00
Badlop
0705695e02
Update documentation of mod_shared_roster ( #3214 )
2020-04-16 13:12:32 +02:00
Paweł Chmielowski
c11922e2a2
Make session iq response have from be set to server jid
...
It looks like old version of Smack don't accept request that are have
from sent to sender jid, but are only working when jid is set to server
address. This is also how it looks in old xmpp rfc examples.
2020-04-16 13:05:42 +02:00
Paweł Chmielowski
37226dd41f
Resending unacked stanzas should send even archived msgs if mod_offline is enabled
...
Messages that are received when no c2s is active will be stored in offline,
even when mam archived them, so i don't think we should be doing something
different in this case.
2020-04-16 13:04:12 +02:00
Badlop
cd0b65f4d5
Fix unused variables from previous commit
2020-04-14 15:00:45 +02:00
Badlop
b7c088d4b0
Update links to the ejabberd Docs page in WebAdmin
2020-04-14 13:59:11 +02:00
Badlop
e197b25e82
Rename opts->name to label, to avoid confusion with the group name ( #3214 )
...
Also updated WebAdmin to show more meaningful explanations
Also fixed a bug that break support for group@host in Displayed
2020-04-14 13:58:53 +02:00
Badlop
8694517c34
Minor fixes in doc
2020-04-09 16:30:21 +02:00
Badlop
2febd1c220
Copy more option explanations from ejabberd Docs site
2020-04-08 18:49:41 +02:00
Badlop
aa0ed37034
Add ejabberd version number to man pages
2020-04-08 18:48:09 +02:00
Badlop
da18245d9a
Indicate which ejabberd version is used to produce the page
2020-04-08 18:47:50 +02:00
Badlop
5cc9a1fe44
Don't make commands subsections, so Docs TOC plage is cleaner
2020-04-08 18:45:29 +02:00
Badlop
de0aead1cd
Fix set_loglevel example argument documentation
2020-04-08 18:44:09 +02:00
Badlop
624ba7e94f
Improve formatting of mod_announce doc
2020-04-08 18:42:45 +02:00
Paweł Chmielowski
9bb3aee0e2
Make resumed sessions try to deliver possibly queued messages to new session
...
Between receiving resume request and being closed by new session, it's
possible (even if not very likely) that new messages would arrive to
process that is resumed. In that case try to reroute messages that were
received after we sent resume reply to new process.
2020-04-07 14:51:49 +02:00
Paweł Chmielowski
16585713f8
Log errors that happen when retrieving http headers in ejabberd_http
...
It seems that ssl errors can be generated here, so lets have abily to show
them instead of swallowing them silently.
2020-04-07 13:50:01 +02:00
Holger Weiss
e01e528235
mod_carboncopy: Bump supported XEP revision
...
Since mod_carboncopy supports "urn:xmpp:carbons:rules:0", it implements
version 0.13.x of XEP-0280.
2020-04-05 22:52:55 +02:00
Badlop
23493ce239
Document mod_shared_roster_ldap options
2020-04-02 12:56:43 +02:00
Badlop
510ab53341
Add ejabberd_auth_http auth_opts brief description
2020-04-02 12:56:40 +02:00
Badlop
220cf73318
Document sql_prepared_statements
2020-04-02 12:56:38 +02:00
Badlop
f6d102f5e2
Quick document with forward link api_permissions
2020-04-02 12:56:36 +02:00
Badlop
05b68764cc
Document some global options
2020-04-02 12:56:33 +02:00
Badlop
4e51e82ccf
Add three missing mod_bosh options
2020-04-02 12:56:31 +02:00
Badlop
116fa8e9ca
add missing mod_mam options
2020-04-02 12:56:28 +02:00
Badlop
ce6fd654a0
Fix mod_pubsub indentation
2020-04-02 12:56:26 +02:00
Badlop
5ee2f48aea
Add mod_pubsub configuration documentation
2020-04-02 12:56:23 +02:00
Paweł Chmielowski
1bd560f3f2
Fix potential message loss in terminating c2s sessions
...
Calling sync version of xmpp_stream_in/out:stop could lead to messages
never being processed by c2s process if they were queued in p1_server.
This could be reproduced by when having messages in offline storage,
starting sessions, enabling stream_mgmt, sending initial presence, and then immediately
</stream:stream>, messages that mod_offline would send process would not
be bounced back by stream_mgmt.
2020-04-01 14:36:01 +02:00
Boris Chernov
87dda1b638
sql_type should be taken for LServer, not LHost ( #3202 )
...
sql_type option should be retrieved for the main domain, not the MUC subdomain
2020-03-30 09:47:36 +02:00
Paweł Chmielowski
5ec214386e
Make webadmin redirect to page that end with /
2020-03-26 14:17:48 +01:00
Paweł Chmielowski
73ba38ae35
Revert "Pass base path instead of level to support URL missing slash ( #3177 )"
...
This reverts commit e9d1201ea8
.
2020-03-26 13:43:24 +01:00
Paweł Chmielowski
1ffa9a0cf5
Do not change to attribute of sent messages from bare to full jid
...
This is not correct per xmpp spec
2020-03-25 16:00:16 +01:00
Badlop
150b7e7219
Fix unsubscribe command result, handle_sync_event result, and dialyzer
...
How to reproduce the problems fixed by this commit:
Create temporary room, other account subscribes, and owner leaves
Unsubscribe that account with the command: ejabberdctl unsubscribe_room ...
2020-03-24 11:44:22 +01:00
Paweł Chmielowski
7caec56e96
Make bounce_message_queue wait for 100ms for incoming messages
...
There is possibilty that between c2s process unregistering itself from sm
and terminating, some other process could try to send something to c2s,
which could result in messages to triggering mam/offline hooks, and causing
them not to be stored in any way.
2020-03-23 15:16:33 +01:00
Paweł Chmielowski
97354426cf
Make mod_muc_room:unsubscirbe handle that unsubscribe may stop room
2020-03-23 13:16:48 +01:00
Paweł Chmielowski
63e3fb92d1
Better handling of xml parse errors in send_stanza
2020-03-23 12:59:30 +01:00
Paweł Chmielowski
92a09fdb71
Also add "escape '\'" to prepared statements in pgsqllike_escape
2020-03-18 14:36:17 +01:00
Paweł Chmielowski
039d786e1f
Add escape '\' to like expression in pgsql to fix problem cockroachdb
...
Cockroachdb doesn't properly handle escaping of _ in like expressions,
having "like ... escape '\'" makes it work, by disabling optimization that
causes this broken behaviour
2020-03-18 14:31:13 +01:00
Paweł Chmielowski
2d707cc0d2
Fix type of computed field in node_flat sql query
2020-03-18 14:05:05 +01:00
Paweł Chmielowski
0a88d03dc9
Use correct type for seconds field in mod_last sql queries
2020-03-18 14:05:05 +01:00
Paweł Chmielowski
f12ee28660
Change conversion of boolean values for cockroachdb
2020-03-18 14:05:05 +01:00
Badlop
260c289d34
Fix Dialyzer warning that jid can't be 'undefined'
2020-03-18 12:02:16 +01:00
Paweł Chmielowski
d8899ca9ac
Add cache to mod_shared_roster
...
This should help with excessive queries that sql backend generates
Should fix issue #3158 .
2020-03-17 14:35:43 +01:00
Paweł Chmielowski
1e456065f6
Fix issue with family field on cockroachdb
2020-03-17 11:35:54 +01:00
Paweł Chmielowski
82074190fb
Replace mod_shared_roster:X call with just X inside that module
2020-03-16 14:57:55 +01:00
Paweł Chmielowski
6fe7c5cac5
Try to limit calls to groups_with_opts in mod_shared_roster
2020-03-16 13:29:05 +01:00
Badlop
e9d1201ea8
Pass base path instead of level to support URL missing slash ( #3177 )
2020-03-11 16:26:33 +01:00
Paweł Chmielowski
9a89b360c0
fix command rooms_empty_destroy ( #3183 )
2020-03-05 11:41:51 +01:00
Paweł Chmielowski
b39a1e2d74
Add reload handler to ejabberd_auth_ldap
...
This will restart ldap process with new options, and should made it
recognize new values.
This fixes issue #3181
2020-03-04 13:19:41 +01:00
Paweł Chmielowski
151b818af4
Use compilation flags used during build to compile modules in ext_mod
...
This fixes issue #3178
2020-03-03 11:25:17 +01:00
Paweł Chmielowski
df47e2a93f
Fix list parameters in sql queries on pgsql
2020-02-27 11:10:30 +01:00
Badlop
47c5aba1e5
Allow mod_register_web to be accessed from now-served vhosts ( #3173 )
2020-02-26 13:57:19 +01:00
Badlop
00abf5d42c
Fix handle of 'http' atom in Headers, problem introduced in 357e7e11
2020-02-26 13:56:38 +01:00
Paweł Chmielowski
9c25d1024a
Support ssl connection on mysql
2020-02-26 10:54:04 +01:00
Paweł Chmielowski
357e7e117d
Make http heades passed in custom_headers override builtin headers
...
Previously we just appended them, so sometimes we just had duplicates
This fixes issue #3056
2020-02-21 12:19:37 +01:00
Mickaël Rémond
3947e64524
Merge pull request #3127 from area-42/allow_emojis_with_mssql
...
allow storage of emojis in archive on mssql
2020-02-20 16:28:24 +01:00
Badlop
e234ced107
Support ejabberd_auth_http's auth_opts ( processone/ejabberd-contrib#284 )
2020-02-19 13:18:39 +01:00
Paweł Chmielowski
a19fdb717b
Do read piefxis file fully before starting processing included file
...
Previous method of processing files, could lead to mixing events generated
by parsers for multiple files, where we could get in inconsistant state.
After this change we gather all events generated by parser for single file,
before we start parsing any included file.
This fixes issue #3166
2020-02-18 15:02:23 +01:00
Holger Weiss
e7c84b81b2
ejabberd_admin: Fix *_config command result format
...
The 'reload_config' and 'dump_config' calls are expected to yield a
'rescode' result, which means they must return 'ok' (rather than a
tuple) on success.
Fixes #3170 .
2020-02-14 18:52:54 +01:00
Paweł Chmielowski
66a84b8d2b
Make piefxis import properly decode scram passwords
...
We encoded scramed password with base64 when exporting, but didn't apply
reverse operation on import, this adds base64 decoding on import.
This fixes issue #3167 .
2020-02-11 12:48:19 +01:00
Badlop
5574b21dd6
Remove tweak introduced in 05c2995c
for #1954 as it isn't needed anymore
2020-02-07 13:32:49 +01:00
Alexey Shchepin
b2f536ec8b
Use SQL ESCAPE statement only with MSSQL and SQLite, improve compatibility with CockroachDB ( #3074 )
2020-02-04 04:53:54 +03:00
Paweł Chmielowski
fdb7e3e3fa
Optimize sql queries in pubsub select_affiliation_subscriptions
2020-01-31 11:43:41 +01:00
Badlop
2d32c66fd7
Update copyright to 2020 ( #3149 )
2020-01-28 15:49:23 +01:00
Holger Weiss
20c0fed457
mod_http_upload: Document correct put_url default
...
Closes #3152 .
2020-01-27 00:04:21 +01:00
Paweł Chmielowski
75094df25e
Do not use ~ts format in string that are put in xmpp payload
...
We are expecting utf8 data here, and using that flag will convert those
to unicode codepoints, which aren't handled properly later.
2020-01-22 12:55:27 +01:00
Holger Weiss
243dc06733
mod_stream_mgmt: Don't crash on disabled ACK timer
...
Don't attempt to start an ACK timer if 'ack_timeout' is set to
'infinity'.
Thanks to Ingo Jrgensmann for reporting the bug.
2020-01-14 01:17:01 +01:00
Holger Weiss
ec035e3c41
mod_carboncopy: Omit check for undefined 'from'
...
These days, the 'from' of an outgoing #message is guaranteed to be set
to the sender's JID by xmpp_stream_in:process_authenticated_packet/2.
2020-01-13 00:45:33 +01:00
Holger Weiss
430b9bef38
mod_carboncopy: Don't process non-message stanzas
...
Avoid examining presence and IQ stanzas, as they're not eligible for
carbon-copying.
This is just an optimization and should not change the behavior.
2020-01-13 00:31:01 +01:00
Holger Weiss
ff193a1a6f
mod_carboncopy: Also copy mediated MUC invitations
2020-01-13 00:13:54 +01:00
Holger Weiss
74c01caf08
mod_carboncopy: Improve is_carbon_copy() check
...
Make sure the hook chain is stopped early whenever a carbon copy is
processed, not just in some cases.
2020-01-12 14:04:31 +01:00
Holger Weiss
a8f6c1db1d
mod_carboncopy: Support new copying rules
...
Support the copying rules added to XEP-0280 with version 0.13.0 under
the "urn:xmpp:carbons:rules:0" namespace.
Closes #3011 .
2020-01-12 13:42:00 +01:00
Holger Weiss
919c9d6fb1
mod_sip: Omit documentation when SIP is disabled
...
Don't generate the actual mod_sip documentation if ejabberd is built
without SIP support.
2020-01-11 20:34:11 +01:00
Holger Weiss
6531fbb0f3
mod_sip: Fix compilation without SIP support
...
Make sure the T() macro is also defined when ejabberd is compiled
without SIP support.
Fixes #3143 .
2020-01-11 20:27:16 +01:00
Evgeny Khramtsov
97da380acd
Generate ejabberd.yml.5 man page from source code directly
...
Several documentation callbacks (doc/0 and mod_doc/0) are implemented
and `ejabberdctl man` command is added to generate a man page. Note
that the command requires a2x to be installed (which is a part of
asciidoc package).
2020-01-08 12:24:51 +03:00
Holger Weiss
0e96d64e60
Omit push notifications if offline storage failed
...
This commit removes the 'store_offline_message' hook which didn't allow
mod_push to suppress notifications when storing an offline message
failed (due to the offline spool size limit being exceeded or due to
database issues).
Fixes #3120 .
2020-01-05 20:08:54 +01:00
Christoph Scholz
00ccb119ea
allow storage of emojis in archive on mssql
2019-12-27 13:06:06 +01:00
Badlop
c396271c00
Fix case clause error regarding admin_generated password ( #3122 )
2019-12-24 11:10:36 +01:00
Paweł Chmielowski
4b3a1ec614
Add ability to hookup config transformer
2019-12-16 12:39:56 +01:00
Badlop
869826c818
Fix mod_muc_log skipping non-Latin messages (thanks to Yandrey)( #3115 )
2019-12-16 11:35:10 +01:00
Alexey Shchepin
24ac62eabd
Improve compatibility with CockroachDB ( #3074 )
2019-12-16 06:52:06 +03:00
Alexey Shchepin
f9120f75b0
Improve compatibility with CockroachDB ( #3074 )
2019-12-11 17:49:02 +03:00
Evgeny Khramtsov
6e68ca2211
Improve send_message command
2019-11-29 11:27:57 +03:00
Paweł Chmielowski
71c44bff8b
Make convert_to_scram work with all backends
2019-11-27 10:35:52 +01:00
Alexey Shchepin
2a35cadf80
Merge branch 'pg_prepared_statements' of https://github.com/sabudaye/ejabberd into sabudaye-pg_prepared_statements
...
Conflicts:
ejabberd.yml.example
src/ejabberd_sql.erl
2019-11-26 19:45:01 +03:00
Evgeny Khramtsov
910f6aa290
Fix previous commit
2019-11-24 16:26:03 +03:00
Evgeny Khramtsov
de91618070
Check also 'access' rule on account removal
...
According to the documentation we should not allow
account removal when it's forbidden by the rule
from 'access' option.
2019-11-24 16:21:01 +03:00
Evgeny Khramtsov
650bdae5d9
Make sure IQ result is correctly routed on account removal
...
Thanks to Philipp Hörist for spotting this
2019-11-24 15:43:38 +03:00
Evgeny Khramtsov
33a16090d3
Fix acl reloading
2019-11-15 18:21:30 +03:00
Evgeny Khramtsov
925998c360
Preserve order of grouped duplicates
2019-11-08 10:20:18 +03:00
Evgeny Khramtsov
3826a9ed58
Also group duplicated list-like options inside host_config/append_host_config
2019-11-07 12:14:08 +03:00
Evgeny Khramtsov
b7b76cc38b
Group all duplicated list-like options into a single option
2019-11-07 11:33:24 +03:00
Evgeny Khramtsov
94b74c0cbe
Fix loading of third-party modules at startup
...
Fixes #3019
2019-11-07 10:47:11 +03:00
Evgeny Khramtsov
c48e972573
Allow multiple modules
section
...
Fixes processone/ejabberd-contrib#282
2019-11-06 13:43:30 +03:00
Evgeny Khramtsov
bb26d7c379
Accept a list in c2s_ciphers/s2s_ciphers options
2019-11-05 17:54:56 +03:00
Evgeny Khramtsov
3a46612d88
Fix unicode string formatting
...
Fixes #3066
2019-11-05 17:51:12 +03:00
Evgeny Khramtsov
3e5ab8082b
Revert "Escape 'family' field in SQL requests"
...
This reverts commit f51ba687e2
.
Fixes #3072
2019-10-30 09:11:13 +03:00
Evgeny Khramtsov
72f6835feb
Fix race condition in Redis/SQL supervisors startup
2019-10-29 13:36:40 +03:00
Evgeny Khramtsov
f51ba687e2
Escape 'family' field in SQL requests
...
This is needed for compatibility with CockroachDB, because
'FAMILY' is a reserved keyword in this database.
2019-10-28 12:19:24 +03:00
Evgeny Khramtsov
a202818037
Merge pull request #3069 from nosnilmot/jwt-custom-jid-field
...
Add option for JWT field name containing JID
2019-10-26 11:03:19 +03:00
Stu Tomlinson
b2651dae0f
Add option for JWT field name containing JID
2019-10-25 16:56:18 +01:00
Evgeny Khramtsov
f981a2ef17
Improve jwt_key validator
2019-10-25 18:30:50 +03:00
Evgeny Khramtsov
02cb3d93fd
Don't lowercase first letter in reason string
2019-10-25 18:18:04 +03:00
Alexey Shchepin
c7470f5107
Handle the case when JWT key file contains JWK set
2019-10-25 16:33:22 +03:00
Evgeny Khramtsov
7eda35b945
Introduce 'gc' ejabberdctl command
...
The command forces garbage collection of all running Erlang processes.
The return is always success.
2019-10-25 16:02:24 +03:00
Evgeny Khramtsov
e8fe68543e
Stop SASL application in ejabberd_logger:flush()
2019-10-25 15:52:05 +03:00
Evgeny Khramtsov
f1a35cc9ac
Avoid calling to logger module on OTP<22
2019-10-25 15:27:47 +03:00
Evgeny Khramtsov
e3962aea6e
Use lager on OTP<22.0
...
This also lowers Erlang/OTP minimum version requirement back to 19.3
2019-10-25 11:44:04 +03:00
Evgeny Khramtsov
c604bdb897
Limit result set of disco#items for mod_pubsub
...
The size of a list of nodes returned for disco#items request
is now controlled by option 'max_nodes_discoitems'. The default
value is 100. The name and the default value of the option is
chosen to be consistent with mod_muc's 'max_rooms_discoitems' option.
2019-10-24 14:59:47 +03:00
Evgeny Khramtsov
d300a87059
Fix logger initialization on OTP<21.3
2019-10-23 16:41:27 +03:00
Evgeny Khramtsov
1e30b85861
Report errors in logger initialization
2019-10-23 16:03:48 +03:00
Evgeny Khramtsov
e388805049
Log path to third-party configuration file
...
This should prevent confusions like the one described at
https://stackoverflow.com/q/58353491/2610053
2019-10-20 18:14:33 +03:00
Evgeny Khramtsov
7a85e51237
Fix error reporting in configuration related admin commands
2019-10-19 19:58:42 +03:00
Evgeny Khramtsov
9ff6cc25dc
Log supervisor reports in debug loglevel
2019-10-18 22:00:37 +03:00
Evgeny Khramtsov
e4a8afb15d
Replace lager with built-in new logging API
...
This change requires Erlang/OTP-21.0 or higher.
The commit also deprecates the following options:
- log_rotate_date
- log_rate_limit
Furthermore, these options have no effect. The logger now fully
relies on log_rotate_size, that cannot be 0 anymore.
The loglevel option now accepts levels in literal formats.
Those are: none, emergency, alert, critical, error, warning, notice, info, debug.
Old integer values (0-5) are still supported and automatically converted
into literal format.
2019-10-18 19:12:32 +03:00
Badlop
b1d458999a
Flatten strings in ejabberd_xmlrpc error results
2019-10-18 13:16:37 +02:00
Paweł Chmielowski
9822535e70
Convert oauth_expire option to accept timeout values
2019-10-15 11:28:47 +02:00
Alexey Shchepin
e7a20d9fc5
Fix dialyzer warning in #oauth_ctx
2019-10-11 17:39:11 +03:00
Evgeny Khramtsov
211cc80fd4
Implement X-OAUTH2 authentication for mod_mqtt
...
This will only work for MQTT 5.0 connections.
A client MUST set "Authentication Method" property of CONNECT
packet to "X-OAUTH2" and MUST set the token in "Authentication Data"
property of the same CONNECT packet.
The server responses as usual with CONNACK.
2019-10-11 16:46:16 +03:00
Paweł Chmielowski
8d571adca8
Verify http host in web admin only if authentication is missing host
...
This should allow access to web admin through ip address or just served
from domain not defined in ejabberd hosts
2019-10-09 10:31:02 +02:00
Badlop
9df26a5740
Update ejabberd_xmlrpc to handle binaries in restuple result ( #3048 )
2019-10-03 16:48:22 +02:00
Alexey Shchepin
5d549dca96
Check redirect_uri for OAUTH implicit grant
2019-10-03 06:18:48 +03:00
Badlop
949e71efb6
Update Guide links in WebAdmin to website, as local file isn't included
2019-10-02 12:42:59 +02:00
Badlop
20205c66c1
Support custom base path in WebAdmin by using relative URLs ( #3043 )
2019-10-02 12:42:54 +02:00
Evgeny Khramtsov
7fc272918a
Fix startup of supervisors for listening modules
2019-10-01 23:28:00 +03:00
Evgeny Khramtsov
c49edaca19
Improve best match
2019-09-28 11:27:20 +03:00
Alexey Shchepin
8f7fa38949
Support OAUTH client authentication
2019-09-27 20:36:58 +03:00
Evgeny Khramtsov
47d0eed3f1
Advertise muc#roominfo_logs in disco#info of the room
...
The commit adds new `url` option for mod_muc_log.
Fixes #3040
2019-09-26 16:53:36 +03:00
Evgeny Khramtsov
2eaad21863
Don't log warning when an option is consulted for uknown vhost
...
Such warnings may be unappropriate in some situation, e.g.
when a virtual host is disabled in runtime but some packets
for this host are still in transit.
Fixes #3037
2019-09-25 13:58:05 +03:00
Evgeny Khramtsov
aefe2fd640
Rename to p1_acme
2019-09-25 13:10:47 +03:00
Evgeny Khramtsov
5770946f03
Correctly handle unicode in log messages
2019-09-23 15:17:20 +03:00
Evgeny Khramtsov
2e1e128833
Fix unicode formatting in ACME module
2019-09-22 20:11:54 +03:00
Evgeny Khramtsov
b7e296857c
Don't call to xmpp_idna
2019-09-22 13:28:14 +03:00
Evgeny Khramtsov
75fe6f44d2
Fix IDNA support in ACME requests
2019-09-22 12:44:31 +03:00
Evgeny Khramtsov
30346a56de
Don't forget to log an error message on IDNA failure
2019-09-22 11:30:20 +03:00
Evgeny Khramtsov
a616cc04cb
Support IDN hostnames in ACME requests
2019-09-22 11:04:38 +03:00
Evgeny Khramtsov
d5e0ccb04a
Don't attempt to create acme directory on ejabberd startup
2019-09-22 01:14:29 +03:00
Evgeny Khramtsov
ea09497038
Slightly improve arg example
2019-09-22 01:03:08 +03:00
Evgeny Khramtsov
f5156390bb
Don't allow requesting certificates for localhost or IP-like domains
2019-09-22 00:53:03 +03:00
Evgeny Khramtsov
12691e738b
Improve warning message
2019-09-22 00:21:12 +03:00
Evgeny Khramtsov
81ae691738
Use round/0 instead of ceil/0
...
Because ceil/0 was introduced in OTP20.0 only
2019-09-20 15:33:08 +03:00
Evgeny Khramtsov
9805b1a73a
Fix typo
2019-09-20 14:04:00 +03:00
Evgeny Khramtsov
68ba109889
Remove unused file
2019-09-20 13:08:03 +03:00
Evgeny Khramtsov
4cdb4c2090
Don't auto request certificate for localhost and IP-like domains
2019-09-20 13:03:25 +03:00
Evgeny Khramtsov
e227940b85
Improve ACME implementation
...
Fixes #2487 , fixes #2590 , fixes #2638
2019-09-20 12:36:31 +03:00
Alexey Shchepin
0fe1e40a9d
JWT-only authentication for some users ( #3012 )
2019-09-18 18:46:24 +03:00
Holger Weiss
f48b4124b1
mod_jidprep: Don't call gen_mod functions directly
2019-09-18 17:39:40 +02:00
Badlop
fd4c5edc23
Apply default role after revoking admin affiliation ( #3023 )
2019-09-17 12:31:14 +02:00
Holger Weiss
b1c10d2a03
Add support for XEP-0328: JID Prep
...
The mod_jidprep module implements XEP-0328: JID Prep, version 0.1.
2019-09-12 09:26:45 +02:00
Evgeny Khramtsov
56b4d3902a
Log Mnesia table type on creation
2019-09-10 21:57:51 +03:00
Evgeny Khramtsov
533a4eec96
Replicate Mnesia 'bosh' table when nodes are joined
2019-09-10 16:02:51 +03:00
Mickael Remond
7b79921734
Use email field type to avoid jid capitalization on iOS
2019-09-09 12:12:54 +02:00
Alexey Shchepin
6d83cbd1a8
Add missing ejabberd_auth_jwt:user_exists/2 function ( #3012 )
2019-09-09 00:57:55 +03:00
Alexey Shchepin
21aa344ed5
Fix BEGIN/COMMIT/ROLLBACK syntax for MSSQL ( #2978 )
2019-09-09 00:16:44 +03:00
Evgeny Khramtsov
a8c6eec28c
Fix certificate selection for s2s
...
The bug was introduced in c2cbb4d879
Fixes #3015
2019-09-06 22:20:07 +03:00
Paweł Chmielowski
6d08ecc41f
Add ejabberd_oauth:verify_resowner_scope callback back
...
This fixes issue #2982
2019-09-06 16:47:22 +02:00
Evgeny Khramtsov
9a8245b8e6
Fix the regression introduced in dd57950
...
Fixes #3010
2019-09-04 10:31:09 +03:00
Badlop
e50ecf9e96
Fix some links to Guide in WebAdmin and add new ones ( #3003 )
2019-08-27 15:41:37 +02:00
Vyache
c0f8e5d7c0
Custom exit message is not broadcast
2019-08-23 09:32:58 +03:00
Badlop
1fd75265d6
Use select fields to input host in WebAdmin Backup ( #3000 )
2019-08-22 18:35:43 +02:00
Badlop
94d50a447d
Fix call to deprecated ejabberd_config:get_myhosts() ( #3000 )
2019-08-22 18:35:41 +02:00
Badlop
12c4dfd955
Provide meaningful error when adding non-local users to shared roster ( #3000 )
2019-08-22 17:13:18 +02:00
Badlop
a51aa2bc44
Check account auth provided in WebAdmin is a local host ( #3000 )
2019-08-22 17:13:13 +02:00
Paweł Chmielowski
07ef1775cd
Add another variant of transformation of offline_msg in mod_offline_mnesia
2019-08-16 18:34:42 +02:00
Evgeny Khramtsov
9ec69b8d62
Don't treat 'Host' header as a virtual XMPP host
...
Fixes #2989
2019-08-13 18:30:28 +03:00
Badlop
0bb14bdc0b
Revert "Affiliations other than admin and owner cannot invite to members_only rooms"
...
This reverts commit b010a1a0a0
.
More details in #2987
2019-08-13 14:55:37 +02:00
Badlop
a157e22c2f
When join new room with password, set pass and password_protected ( #2668 )
2019-08-13 11:37:32 +02:00
Badlop
a1dfb7fbe6
Improve rooms_* commands to accept 'global' as MUC service argument ( #2976 )
2019-08-12 17:03:32 +02:00
Evgeny Khramtsov
8f8f53a595
Fix typo in type spec
2019-08-12 12:28:17 +03:00
Evgeny Khramtsov
d796dcace5
Spawn SQL connections on demand only
2019-08-12 12:21:31 +03:00
Badlop
dd8c468de3
Rename MUC command arguments from Host to Service ( #2976 )
2019-08-08 12:32:59 +02:00
Evgeny Khramtsov
ced62e0df8
Don't use close/2: set stop_reason explicitly
...
Fixes #2984
2019-08-08 11:21:28 +03:00
Evgeny Khramtsov
950c209310
Report connection error before waiting for resumption
...
In other words don't hide the reason why c2s connection has failed
2019-08-06 16:18:04 +03:00
Evgeny Khramtsov
934392fd7e
Implement reload/3 for mod_http_upload
2019-08-06 12:31:33 +03:00
Evgeny Khramtsov
2168489ddf
Don't retain module option on gen_mod supervisor
...
When module's options were updated (e.g. by reloading ejabberd.yml)
and, later, the module's process crashed, gen_mod supervisor
restarts the process with outdated options. This is now fixed.
2019-08-04 21:46:18 +03:00
Evgeny Khramtsov
4dac9f1e6d
Validate BINVAL values of vcard elements as Base64
2019-08-02 14:20:10 +03:00
Evgeny Khramtsov
5a976719fb
Introduce 'vcard' option for the modules supporting vCards
...
The mapping between vCard's XML elements and YAML elements
of 'vcard' option is straightforward. For example, if you
want mod_muc to return the following vCard:
```
<vCard xmlns='vcard-temp'>
<FN>Conferences</FN>
<ADR>
<WORK/>
<STREET>Elm Street</STREET>
</ADR>
</vCard>
```
you need to set the configuration as:
```
modules:
...
mod_muc:
vcard:
fn: Conferences
adr:
-
work: true
street: Elm Street
...
```
2019-08-02 13:59:42 +03:00
Badlop
66d2e6ca27
Explain requirements of the FROM argument of send_message command ( #2959 )
2019-08-01 11:29:42 +02:00
Evgeny Khramtsov
059cf8fed1
Don't call ejabberd_cluster from its submodules
...
Fixes #2971
2019-07-31 19:25:47 +03:00
Evgeny Khramtsov
465e1f5ee1
Fix db_type validation
2019-07-31 18:55:43 +03:00
Paweł Chmielowski
51bf552c3f
For pubsub items with max_item = 1 use order by in sql queries
2019-07-31 13:06:44 +02:00
Evgeny Khramtsov
48bed43902
Don't render CAPTCHA whitelist when CAPTCHA is not configured
...
Fixes #2970
2019-07-31 12:35:06 +03:00
Evgeny Khramtsov
bbee13f970
Improve SQL timeouts handling
...
Also improve some formatting
2019-07-31 10:39:53 +03:00
Evgeny Khramtsov
651d69fb98
Also catch 'shutdown' exit reason
2019-07-30 23:17:10 +03:00
Evgeny Khramtsov
15f50f5331
Improve pattern matching
2019-07-30 20:57:32 +03:00
Evgeny Khramtsov
3e4d7a98af
Implement read-repair for session pids
2019-07-30 20:57:09 +03:00
Evgeny Khramtsov
46cc6c66ec
Remove dead code
2019-07-30 15:31:44 +03:00
Evgeny Khramtsov
b4770815c0
Fix race condition when deleting c2s session record
2019-07-30 15:21:58 +03:00
Evgeny Khramtsov
209f5d32e1
Fix SQL connections leakage
2019-07-30 14:26:11 +03:00
Evgeny Khramtsov
81996b153a
Fix previous commit
2019-07-30 13:40:40 +03:00
Evgeny Khramtsov
59adfcb8e0
Correctly report resume timeout
2019-07-30 12:50:31 +03:00
Evgeny Khramtsov
8a2b2668cf
Expose access_model and publish_model in pubsub#metadata
...
Fixes #2931
2019-07-30 10:45:32 +03:00
Evgeny Khramtsov
949e4c1c59
Generate 'remote-server-not-found' stanza error for non-IDN domains
...
Fixes #2969
2019-07-29 22:45:38 +03:00
Evgeny Khramtsov
d64951c2b2
Improve handling of errors in tree_action/3
2019-07-29 22:24:26 +03:00
Evgeny Khramtsov
2cd930b7d5
Appropriately abort pubsub transaction
2019-07-29 21:44:30 +03:00
Badlop
630cfe26b7
mod_multicast service discovery bugfix (thanks to McPo)( #2968 )
2019-07-29 19:32:26 +02:00
Evgeny Khramtsov
2da168cf05
Improve handling of errors in pubsub code
2019-07-29 17:13:16 +03:00
Frank Diebolt
cd88d342b9
Apply shaping to websocket connections
2019-07-29 14:54:25 +02:00
Evgeny Khramtsov
35576b4608
Improve hooks validator and fix bugs related to hooks registration
2019-07-29 10:46:20 +03:00
Evgeny Khramtsov
0aa004bafc
Improve ejabberd halting procedure
2019-07-26 11:40:19 +03:00
Evgeny Khramtsov
a54694684d
Fix default value of resume_timeout
2019-07-25 13:57:43 +03:00
Evgeny Khramtsov
3b18e7cc00
Don't attempt to restart killed lager
...
This is not very robust and the call may hang forever
2019-07-24 19:47:14 +03:00
Evgeny Khramtsov
ca0e53b3c5
Fix typo in log message
2019-07-24 18:56:44 +03:00
Evgeny Khramtsov
ae135e57d9
Improve SQL pool logic
...
Avoid using ETS table for SQL workers: rely on processes names instead
2019-07-24 14:28:43 +03:00
Holger Weiss
c3c8dffeab
Revert "mod_privacy: Don't try to look up 'undefined' list"
...
This reverts commit 4218aecd1c
. The issue
was fixed in a0d3fb3b23
already.
2019-07-24 11:29:57 +02:00
Holger Weiss
4218aecd1c
mod_privacy: Don't try to look up 'undefined' list
...
Don't crash if the <query/> element of an IQ of type 'set' contains
neither a <default/> nor an <active/> child.
This fixes a regression introduced in commit
8410a203ec
.
2019-07-24 10:45:30 +02:00
Evgeny Khramtsov
9ef52f2b0f
Fix UTF-8 support in translation files
2019-07-24 11:34:40 +03:00
Evgeny Khramtsov
052917961a
Add 'certauth' command to extauth port
2019-07-24 10:13:51 +03:00
Holger Weiss
8ac4a5f792
mod_stream_mgmt: Allow flexible timeout format
...
Adjust mod_stream_mgmt and the related code in mod_push_keepalive to
support the flexible timeout format.
2019-07-23 00:15:40 +02:00
Christophe Romain
c0dc95d529
Fix wrong virtual host in mod_pubsub:send_stanza ( #2930 )
2019-07-22 10:13:27 +02:00
Evgeny Khramtsov
4be98b5aef
Log an error when JWT authentication is configured without jwt_key
2019-07-19 12:01:57 +03:00
Evgeny Khramtsov
55d42b9000
Fix typo
2019-07-18 22:35:16 +03:00
Evgeny Khramtsov
6d6e3e348d
Improve robustness of reading jwt_key option
2019-07-18 22:31:08 +03:00
Evgeny Khramtsov
50ef982eff
Get rid of useless code
2019-07-18 21:53:22 +03:00
Evgeny Khramtsov
ad902c2e16
Don't forget to unregister route when the owning process is dead
2019-07-18 21:48:53 +03:00
Evgeny Khramtsov
3f7d9e3ad6
Remove Riak support
...
Reasons:
- Riak DB development is almost halted after Basho
- riak-erlang-client is abandoned and doesn't work
correctly with OTP22
- Riak is slow in comparison to other databases
- Missing key ordering makes it impossible to implement range
queries efficiently (e.g. MAM queries)
2019-07-18 19:31:12 +03:00
Evgeny Khramtsov
478f69317b
Report failures of changing net_ticktime
2019-07-18 13:02:13 +03:00
Evgeny Khramtsov
6397dc5d4c
Reset net ticktime on config reload
2019-07-18 12:47:29 +03:00
Evgeny Khramtsov
dd301306d3
Allow flexible timeout format in session_expiry option of mod_mqtt
2019-07-17 22:58:14 +03:00
Evgeny Khramtsov
d718b35d46
Use econf:timeout() instead of econf:pos_int() wherever appropriate
2019-07-17 22:15:56 +03:00
Evgeny Khramtsov
c5305c5f9a
Improve RPC calls in mod_configure
2019-07-17 20:51:33 +03:00
Evgeny Khramtsov
38b2e099d5
Fix pending nodes retrieval for SQL backend
...
Thanks to Christophe Romain
2019-07-17 12:34:09 +03:00
Evgeny Khramtsov
554f4fc851
Change time unit of hibernation_timeout option to 'second'
...
This is done for the sake of consistency with other options
2019-07-16 23:42:38 +03:00
Evgeny Khramtsov
15b4b3fa1b
Fix typos using codespell
2019-07-16 22:07:39 +03:00
Evgeny Khramtsov
cc2f674805
Avoid record duplication
2019-07-16 18:34:05 +03:00
Evgeny Khramtsov
a7a53f601e
Add econf:string/2 validator
2019-07-16 18:10:45 +03:00
Evgeny Khramtsov
0e48adb1ed
Fix opt_type.sh script and re-generate options
2019-07-16 18:06:51 +03:00
Evgeny Khramtsov
76d4c178a7
Use econf:timeout/2
2019-07-16 18:02:32 +03:00
Evgeny Khramtsov
f85488583c
Handle CAPTCHA forms using captcha_form codec
2019-07-16 17:51:51 +03:00
Paweł Chmielowski
6b3d0d154e
Add code for hibernating inactive muc_room processes
2019-07-16 15:09:58 +02:00
Evgeny Khramtsov
4d877289fb
Bump xmpp version and fix revealed bugs
2019-07-16 15:59:33 +03:00
Evgeny Khramtsov
f10de6439b
Fix 'get-pending' command form generation
2019-07-16 15:09:51 +03:00
Badlop
5ecbed5eae
Remove very old useless comments in ejabberd_xmlrpc.erl
2019-07-16 12:56:41 +02:00
Badlop
7079634f18
Documentation of mod_http_api moved from source code to Docs page
2019-07-16 12:53:06 +02:00
Evgeny Khramtsov
5eeb95c74f
Remove modules management from mod_configure
2019-07-15 17:08:41 +03:00
Evgeny Khramtsov
e1f3526466
Don't hide errors using catch
2019-07-15 17:03:29 +03:00
Evgeny Khramtsov
a00496a38f
Compile some regexps as unicode
2019-07-15 15:26:47 +03:00
Evgeny Khramtsov
2419e00a26
Bump yconf version
2019-07-15 15:22:51 +03:00
Evgeny Khramtsov
061c754c68
Fix regexp matching
2019-07-15 15:07:56 +03:00
Evgeny Khramtsov
104c4093dc
Only respond with occupants list to disco#items with empty node
...
Fixes #2942
2019-07-15 14:10:45 +03:00
Evgeny Khramtsov
4ec78736b9
Improve handling of unexpected iq in mod_muc_room
...
Don't crash on an iq-set/get containing unexpected tag within
expected namespace
This further improves PR #2900
2019-07-15 13:59:41 +03:00
Evgeny Khramtsov
04dab48794
ejabberd_s2s should start after its supervisors
2019-07-15 12:59:47 +03:00
Evgeny Khramtsov
295015a8cb
Fix startup order of ejabberd_sup children
2019-07-15 12:53:26 +03:00
Evgeny Khramtsov
e1eedd587d
Remove processing of {wait, _} result in gen_mod
...
This is no longer needed
2019-07-15 12:43:55 +03:00
Evgeny Khramtsov
a4e19b7108
Increase shutdown time to 5 seconds
2019-07-15 12:43:32 +03:00
Evgeny Khramtsov
87b8344ede
Attach mod_muc_room processes to a supervisor
2019-07-15 12:43:05 +03:00
Evgeny Khramtsov
1fe1322bc1
Improve some validators
2019-07-15 09:59:07 +03:00
Holger Weiss
cd36bb6eda
mod_http_fileserver: Unregister 'reopen_log_hook'
...
Unregister the global 'reopen_log_hook' on termination if the module isn't
loaded for another host.
2019-07-14 15:16:13 +02:00
Evgeny Khramtsov
15dcff92e8
Use correct virtual host when consulting trusted_proxies
2019-07-13 12:20:06 +03:00
Evgeny Khramtsov
6013b4a3a6
Fix broken ejabberd_cluster:call/5
2019-07-13 10:34:59 +03:00
Evgeny Khramtsov
f0c0e4a6fc
Don't crash when attempt to get an option for unknown virtual host
...
Log a warning instead and retry with a global scope
2019-07-12 13:59:33 +03:00
Evgeny Khramtsov
696c64064b
Add call/5 and multicall/5 to ejabberd_cluster
2019-07-12 13:58:46 +03:00
Evgeny Khramtsov
53dacb3825
Use ejabberd_cluster:call() instead of rpc:call()
2019-07-12 12:30:38 +03:00
Evgeny Khramtsov
6f5d99275b
Process unexpected messages uniformly
2019-07-12 11:55:36 +03:00
Evgeny Khramtsov
19cbbf69b2
Improve previous commit
2019-07-11 00:13:39 +03:00
Evgeny Khramtsov
6fd736d496
Gracefully report invalid encoding of a translation file
2019-07-11 00:04:32 +03:00
Evgeny Khramtsov
b0379db5a1
Fix formatting
2019-07-10 23:46:42 +03:00
Evgeny Khramtsov
d1b5844d64
Merge pull request #2900 from aquarhead/protect-muc-owner
...
Protect against bad muc#owner requests
2019-07-10 23:46:08 +03:00
Evgeny Khramtsov
9dedbe30ba
Make sure configuration file path always represented as binary()
...
Fixes #2936
2019-07-10 23:35:53 +03:00
Evgeny Khramtsov
bfa3125a81
Fix Elixir modules detection in the configuration file
...
Fixes #2937
2019-07-10 23:17:53 +03:00
Evgeny Khramtsov
5700089187
Gracefully close inbound s2s connections
2019-07-10 12:15:58 +03:00
Evgeny Khramtsov
722864666d
Add/improve type specs
2019-07-10 10:31:51 +03:00
Evgeny Khramtsov
691f9e0bf7
Improve error handling/reporting when loading language translations
...
Also speed up loading on multi-core machines
2019-07-10 10:30:11 +03:00
Evgeny Khramtsov
04ccba0347
Fall back to map/2 and foreach/2 on single-core machines
2019-07-10 10:28:37 +03:00
Evgeny Khramtsov
01f531b3d6
Add type specs for mod_adhoc
2019-07-09 17:02:54 +03:00
Evgeny Khramtsov
f19b41fd19
Improve type specs for ejabberd_s2s
...
Also minor code cleanup
2019-07-09 16:42:24 +03:00
Evgeny Khramtsov
43da45cf67
Improve type specs of mod_muc_room
2019-07-09 15:21:17 +03:00
Evgeny Khramtsov
11fa02cd6c
Improve type specs of mod_roster
2019-07-09 14:30:59 +03:00
Evgeny Khramtsov
590849e2c3
Avoid returning 'stopped' from ejabberd_hooks:run_fold()
2019-07-09 14:30:25 +03:00
Evgeny Khramtsov
f7ad25108c
Get rid of unused API functions in ejabberd_hooks
...
Also improve code formatting and type specs
2019-07-09 01:26:48 +03:00
Evgeny Khramtsov
3e88a0b0b4
Don't expose internal FSM API of ejabberd_c2s
2019-07-09 01:01:56 +03:00
Evgeny Khramtsov
9cbc0685db
Don't expose internal FSM API of mod_muc_room
2019-07-09 00:47:54 +03:00
Evgeny Khramtsov
cbe84eb50c
Check virtual host before running the command
2019-07-08 23:14:31 +03:00
Evgeny Khramtsov
0545e0a797
Ignore late arrival of an already cancelled timer
2019-07-08 19:32:37 +03:00
Evgeny Khramtsov
e8eb6bc2b4
Avoid crashing of ejabberd_iq process on invalid callback
2019-07-08 10:45:13 +03:00
Evgeny Khramtsov
d4d352492c
Debug hooks
2019-07-08 09:57:33 +03:00
Evgeny Khramtsov
83e6741117
Use maps instead of dict
2019-07-08 09:55:32 +03:00
Evgeny Khramtsov
92ab59a581
Use ets and maps instead of dict
2019-07-08 09:46:50 +03:00
Evgeny Khramtsov
80beb6d6f6
Improve formatting of exceptions
2019-07-07 22:12:14 +03:00
Evgeny Khramtsov
368858a744
Fix return type in try_set_password()
...
Fixes #2932
2019-07-07 12:16:04 +03:00
Evgeny Khramtsov
fd8e5ffce7
Avoid routing packets through a single process
2019-07-06 12:30:57 +03:00
Evgeny Khramtsov
1663e78cf7
Fix validator of option ejabberd_service->hosts
...
Fixes #2929
2019-07-06 10:38:25 +03:00
Evgeny Khramtsov
61a58f6e67
Do not call the same function twice
2019-07-06 10:21:01 +03:00
Paweł Chmielowski
756adaba55
Restore room when receiving message or generic iq for not started room
2019-07-05 13:46:48 +02:00
Paweł Chmielowski
d7e86d1d32
Limit number of rooms that we return for disco_items from muc
...
We will limit it to max_room_discoitems and return rsm that would allow
fetching more
2019-07-05 11:08:32 +02:00
Evgeny Khramtsov
f82de80c66
Add forgotten file
2019-07-05 10:49:27 +03:00
Evgeny Khramtsov
b3caade0a0
Distribute routing of MUC messages accross all CPU cores
...
Also relay as less stanzas as possible through mod_muc workers
2019-07-05 10:35:31 +03:00
Evgeny Khramtsov
05461d1686
Propagate max_fsm_queue to all modules started as gen_server
2019-07-04 10:26:59 +03:00
Evgeny Khramtsov
d411e68a2e
Make return type of sql_transaction() consistent
2019-07-04 09:27:51 +03:00
Evgeny Khramtsov
4658d478b4
Don't call ejabberd_option from ejabberd_options
2019-07-03 19:23:05 +03:00
Evgeny Khramtsov
b7f6620166
Fix jwt_key option processing
2019-07-03 19:16:54 +03:00
Evgeny Khramtsov
0d0ad9d1d9
Use correct virtual host
2019-07-03 19:08:38 +03:00