Let misc:uri_parse/1 return default HTTP(S) port number if the URL
doesn't specify a port number, analogous to the behavior when
USE_OLD_HTTP_URI is defined.
The uri_string:parse/1 function returns the URI elements as strings or
as binaries depending on the input. Make sure misc:uri_parse/1 returns
strings in both cases, analogous to the behavior when USE_OLD_HTTP_URI
is defined.
During XEP-0198 resumption, the ejabberd_c2s process that handles the
new connection reopens the ejabberd_sm session of the old one. Since
commit b4770815c0, the new process adds
the new session table entry before the old process removes the old one.
While adding the new one, ejabberd_sm checks for old sessions to
replace. This check assumes old SIDs compare lower than new ones. This
assumption didn't necessarily hold for the session resumption case,
where the old SID's timestamp was copied over to the new SID and only
the PID was updated. Therefore, the new process was killed if the new
PID happened to be smaller than the old one.
Fix this by having mod_stream_mgmt use its own SM-ID rather than copying
over the old SID's timestamp to the new SID.
Thanks to Thilo Molitor and Friedrich Altheide for reporting the issue,
and to Thomas Leister for his help with debugging it.
The new 'turn_blacklist' listener option allows for specifying one or
more IP addresses and/or subnet addresses/masks. The TURN server will
refuse to relay traffic from/to blacklisted IP addresses. By default,
Teredo and 6to4 addresses are blacklisted, as mandated by RFC 6156
(section 9.1).
Omit the 'tcp' and 'stuns' services from the list of example 'services'
in the documentation. For typical use cases, those are less interesting
than 'udp' and 'turns' services.
Increase the default lifetime of temporary credentials to 12 hours.
ejabberd's built-in TURN server re-queries the temporary password from
mod_stun_disco whenever a TURN client attempts to refresh an allocation,
and mod_stun_disco will only return the password as long as the
credentials didn't expire. Therefore, the credentials lifetime
effectively limits the maximum lifetime of a TURN allocation when
ejabberd's TURN service is used, so the default value shouldn't be too
short.
Previously we only send that presence to direct presence recipients if
client also sent general self presence (without to attribute).
This should help with issue #3245
If a TCP connection was closed before the socket was handed over to a
supervised child process, let the supervisor terminate the process
rather than killing it directly. This avoids crash log entries
generated by the supervisor.