Commit Graph

7833 Commits

Author SHA1 Message Date
Paweł Chmielowski 56c8f6b280 Update deps 2020-04-28 16:24:40 +02:00
ChaosKid42 abc3260e75
enable tests with mssql-backend (#3136) 2020-04-28 16:22:42 +02:00
Jérôme Sautret 24a11fc8e8
Merge pull request #3235 from weiss/xep-0215
Support STUN/TURN service discovery
2020-04-28 16:03:21 +02:00
Holger Weiss 6eb2f07274 ejabberd_stun: Tone down 'auth_realm' warning
These days, STUN/TURN authentication can be performed with ephemeral
credentials, where the REALM is irrelevant. Therefore, just log an
[info] message rather than a [warning] in the case where no
authentication REALM is configured but multiple virtual domains exist.
2020-04-28 10:34:43 +02:00
Holger Weiss 9cd47d7085 Add tests for mod_stun_disco 2020-04-28 10:34:43 +02:00
Holger Weiss 69d1d62add Support XEP-0215: External Service Discovery
Add the 'mod_stun_disco' module, which allows XMPP clients to discover
STUN/TURN services and to obtain temporary credentials for using them as
per XEP-0215: External Service Discovery.  The temporary credentials
handed out to clients have the format described in:

https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00

Also add the new module to the example configuration file.

Closes #2947.
2020-04-28 10:34:43 +02:00
Badlop 3db9459591 Don't offer X-OAUTH2 if the only auth method enabled is Anonymous (#3209) 2020-04-27 20:03:21 +02:00
Paweł Chmielowski 6320dfd34e Don't store caps information for direct presences of muc room
We really don't need those, and thanks to each individual room having
different hash (as one of hashed data is room description) we end with
lot of data that we really don't need.
2020-04-27 13:17:51 +02:00
Badlop 055fe744d3 Clean some unused functions in ejabberd_ctl, this makes "make hooks" happy 2020-04-24 20:36:24 +02:00
Christoph Scholz d7c696f97c mix.exs: Update 'xmpp' and 'stun' 2020-04-23 20:05:40 +02:00
Holger Weiss fc444ce503 rebar.config: Update 'xmpp' and 'stun'
Use the current versions of 'xmpp' (to get XEP-0215 support) and 'stun'
(to fix TURN issues).
2020-04-23 20:05:40 +02:00
Holger Weiss 88f392721b gen_mod: Reload modules after reloading listeners
Make sure modules won't be reloaded before listeners.  This is necessary
to allow the (not yet committed) 'mod_stun_disco' module to parse the
listener configuration after configuration reloads.
2020-04-23 20:05:40 +02:00
Holger Weiss c55e7b8499 ejabberd_stun: Fix 'turn_ip' fallback
The 'turn_ip' option validator doesn't accept an inet:ip4_address()
tuple.

While at it, change the logic to only perform the fallback address
lookup if no 'turn_ip' is configured (analogous to the fallback
mechanism for the case where the 'auth_realm' is undefined).
2020-04-23 18:32:40 +02:00
ChaosKid42 1f7ca91670
use dsn-less config for mssql (#3131) 2020-04-23 13:56:41 +02:00
Licaon_Kter d9131c854d
Bump jiffy so it compiles on older GCC (#3218)
* Update jiffy

* And here
2020-04-23 13:29:33 +02:00
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
Badlop b124e911d3 Update some translated strings where only print chars had changed 2020-04-20 20:24:50 +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
Holger Weiss b1b3c4cdcf Enable STUN/TURN by default
Build ejabberd with STUN/TURN support by default, and add a STUN/TURN
listener to the example configuration file.
2020-04-20 00:37:41 +02:00
Holger Weiss b0f95975c2 Travis CI: Test against Erlang/OTP 22.3 2020-04-19 15:39:34 +02:00
Badlop 2e48c24638 Updated Spanish translation 2020-04-17 19:29:17 +02:00
Badlop 7359eb6246 Updated Catalan translation 2020-04-17 19:23:21 +02:00
Badlop 99d21bca49 Don't extract for translation strings from man pages, at least for now 2020-04-17 19:23:18 +02:00
Badlop 1b98084918 Fix previous commit 2020-04-17 19:23:13 +02:00
Badlop d311eaf8f3 Log messages generated by msgmerge and display unexpected ones 2020-04-17 17:28:43 +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
Paweł Chmielowski cb1c0a3188 Update mysql driver to get rid of warning 2020-04-16 18:26:13 +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
Jérôme Sautret b02506eaaf
Merge pull request #3132 from area-42/publisher_mssql_text_to_varchar
change PubSub publisher from text to varchar for mssql
2020-04-10 16:20:43 +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