24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-12 21:52:07 +02:00
Commit Graph

5002 Commits

Author SHA1 Message Date
Evgeniy Khramtsov
11811e5f48 Only lookup FQDN at configuration (re)loading 2018-07-06 09:18:27 +03:00
Evgeniy Khramtsov
0bb14d16c7 Move XMPP stream and SASL processing to xmpp repo 2018-07-06 01:07:36 +03:00
Evgeniy Khramtsov
ed1ee6061e Move move randoms module to p1_utils repo 2018-07-05 11:51:49 +03:00
Evgeniy Khramtsov
50b645aa92 Move shaper to p1_utils repo 2018-07-05 09:31:55 +03:00
Evgeniy Khramtsov
52f2a7de4b Set 'from' attribute for client connections when it is absent 2018-07-04 08:59:14 +03:00
Evgeniy Khramtsov
bce8922e5d Don't set from/to attributes in resource binding iq 2018-07-04 08:57:28 +03:00
Evgeniy Khramtsov
86236431b9 mod_http_upload: Treat file and network errors differently 2018-07-04 08:55:52 +03:00
Evgeniy Khramtsov
295bec8551 Don't ignore send() result 2018-07-03 13:44:58 +03:00
Evgeniy Khramtsov
b341a3cef3 Increase default buffer size for mod_proxy65 2018-07-03 13:38:49 +03:00
Evgeniy Khramtsov
fface33d54 HTTP Upload: introduce new option 'external_secret'
The option makes it possible to offload all HTTP Upload processing
to a separate HTTP server. Both ejabberd and the HTTP server
should share this secret and behave exactly as described at
at https://modules.prosody.im/mod_http_upload_external.html
in the 'Implementation' section. Example configuration:

modules:
  ...
  mod_http_upload:
    ...
    put_url: "http://separate.http.server/upload"
    external_secret: "foo bar baz"
  ...
2018-07-02 16:53:44 +03:00
Evgeniy Khramtsov
77163c43d2 Simplify the default configuration file
After some discussion with the community it was decided to
clean the configuration file from excessive comments and
explicitly configured default values. Also, mod_mam and
mod_http_upload have been added.

The rationale for this is to have a clean and not bloated
configuration file which doesn't scare away newcomers and
which has all features from the Compliance Suite 2018 (XEP-0387)
enabled by default.

For further configuration an admin is encouraged to read the
documentation at https://docs.ejabberd.im/admin/configuration
2018-07-01 23:57:27 +03:00
Evgeniy Khramtsov
6b8bc811ac Don't crash on most common gen_server:call errors 2018-07-01 14:26:49 +03:00
Evgeniy Khramtsov
b662ec2a78 Accept IP address as a return value from resolve/2 callback 2018-06-30 10:19:58 +03:00
Evgeniy Khramtsov
a463f5a25a Replace hardcoded disco features with macros 2018-06-29 14:48:07 +03:00
Paweł Chmielowski
1fbb36c34a Fix misc:try_url for erlang < R20 2018-06-29 11:13:29 +02:00
Evgeniy Khramtsov
dff940b89e Support both filenames and URLs in 'cssfile' option of mod_muc_log
If filename is provided, its content is inserted into the HTML page.
If URL is provided, it's used as a value of 'href' HTML attribute.
2018-06-29 11:34:53 +03:00
Evgeniy Khramtsov
66591b1c0d Improve URLs validation 2018-06-29 11:06:24 +03:00
Evgeniy Khramtsov
b094ce8ea5 HTTP Upload: increase gen_server call timeout 2018-06-29 10:32:53 +03:00
Evgeniy Khramtsov
9c82c2f6d0 HTTP Upload: put more info in log messages 2018-06-29 09:58:33 +03:00
Evgeniy Khramtsov
8879d1d533 Avoid code duplication when checking presence subscription 2018-06-28 10:37:20 +03:00
Evgeniy Khramtsov
71ae7e9fd9 Work-around against public_key incompatibility introduced in OTP21
The commit introduced the incompatility is
304dd8f81e

Thanks to Stu Tomlinson for spotting the issue.

Fixes #2488
2018-06-27 19:40:03 +03:00
Evgeniy Khramtsov
644873dae9 Don't check packets sent to self 2018-06-27 15:02:03 +03:00
Evgeniy Khramtsov
9a11db91f9 Use lists:foldl/3 2018-06-27 13:36:58 +03:00
Evgeniy Khramtsov
af8c6d2428 Generate HTTP Upload form using xdata codec 2018-06-27 13:29:38 +03:00
Evgeniy Khramtsov
87357c700f Do not ignore a certificate containing no domain names
Log a warning instead and assign it to an "empty" domain
2018-06-27 11:27:39 +03:00
Evgeniy Khramtsov
7881c5670c Don't replace valid certificates with invalid ones
When building the certificates chains, if several certificates
are found matching the same domain their validity is checked:

* the invalid one is ignored and the valid one is picked
* if both are valid or both are invalid, then the one with
  sooner expiration is ignored.

Fixes #2454
2018-06-27 10:55:37 +03:00
Evgeniy Khramtsov
881e02632b Improve error formatting in mod_http_upload 2018-06-26 19:32:29 +03:00
Evgeniy Khramtsov
47d117c1bf Support SASL PLAIN by xmpp_stream_out
Also, SASL mechanisms chaining is now supported:
if several mechanisms are supported and authentication
fails, next mechanism in the list is picked, until the
list is exhausted. In the case of a failure, the latest
SASL failure reason is returned within handle_auth_failure/3
callback.
2018-06-25 19:16:33 +03:00
Evgeniy Khramtsov
cf6f540d53 Don't pass sockmod to xmpp_stream_out 2018-06-25 15:28:02 +03:00
Evgeniy Khramtsov
557e6ecdd0 Introduce resolve/2 and connect_options/3 callbacks for xmpp_stream_out 2018-06-25 15:19:49 +03:00
Evgeniy Khramtsov
5dd3f4c22b Allow gen_server process registration 2018-06-25 14:55:33 +03:00
Evgeniy Khramtsov
e7c3b57b8b Allow reconnecting from disconnected state 2018-06-25 14:52:33 +03:00
Evgeniy Khramtsov
c907915695 Intercept EXIT signal 2018-06-25 14:46:31 +03:00
Evgeniy Khramtsov
911ed4a7ca Add Resource Binding support to xmpp_stream_out 2018-06-25 13:50:35 +03:00
Evgeniy Khramtsov
499ae96254 Don't use 'unsupported-version' inside SM <failed/> element
This error condition is defined within stream errors, however,
XEP-0198 says:

> This element SHOULD contain an error condition, which MUST
> be one of the **stanza** error conditions defined in RFC 6120.
2018-06-25 09:56:44 +03:00
Evgeniy Khramtsov
ac31c85866 Use error formatting functions from xmpp library 2018-06-25 09:45:45 +03:00
Evgeniy Khramtsov
c4c91cc956 Generate SASL failures on unencrypted connections only for s2s 2018-06-23 20:31:01 +03:00
Evgeniy Khramtsov
6ffb120fce Fix typo 2018-06-21 15:14:19 +03:00
Evgeniy Khramtsov
55f8aa1b22 Add new options for OOM watchdog
* oom_watermark: 1..100
  Start OOM watchdog only when system memory usage exceeds
  this value in percents. When the usage drops below the value,
  OOM watchdog is stopped. The default is 80 (percents).
  Note that once OOM watchdog is started, it performs full garbage
  collection periodically: this can be seen as spikes in CPU
  utilization and drops in RAM usage. If your system is permanently
  above the watermark, it may cause significant CPU overhead.

* oom_queue: positive integer
  Only trigger OOM killer when total amount of messages in all queues
  of all Erlang processes is above this value. The default is 10000.
  Note that this value only takes effect when `oom_killer` is set
  to `true` (this is the default). Otherwise, only a warning will
  be logged.
2018-06-21 14:35:19 +03:00
Paweł Chmielowski
274e9fe7b5 Guard against pres_last=undefined in mod_offline 2018-06-20 12:16:10 +02:00
Evgeniy Khramtsov
9e83c45b3c Restore forgotten translations from previous commit 2018-06-20 12:50:36 +03:00
Evgeniy Khramtsov
446e6e6f3b Update ejabberd.pot 2018-06-20 12:32:10 +03:00
Evgeniy Khramtsov
3a5d2dbed8 Move mod_irc to ejabberd-contrib 2018-06-20 12:27:44 +03:00
Holger Weiss
23cc0f8c3c mod_push: Include a static body text by default
Set the 'include_body' option to a static text by default.  Some app
servers check for the presence of a 'last-message-body' field to
distinguish between notifications generated for actual chat messages and
notifications triggered by other types of traffic.
2018-06-19 23:12:27 +02:00
Holger Weiss
81f4dd0e6a mod_push_keepalive: Increase default timeout
Set the default session timeout to three days.  This way, sessions will
survive a weekend without traffic, for example.
2018-06-19 22:26:08 +02:00
Paweł Chmielowski
dee3081df1 Fix reset_stream in websocket using pre-rfc protocol 2018-06-19 17:51:09 +02:00
Evgeniy Khramtsov
6acac7c93f Render roomname, allowinvites and allowpm in room disco#info 2018-06-19 14:02:45 +03:00
Holger Weiss
c2f664f941 mod_push_mnesia: Simplify record matching
Omit record fields that aren't used for matching.
2018-06-18 23:12:27 +02:00
Holger Weiss
75127a0deb mod_push_mnesia: Fix lookup of all host sessions 2018-06-18 23:05:08 +02:00
Holger Weiss
bb76da03ea mod_mam: Don't replace existing stanza ID
Preserve the original stanza ID for resent messages.  This avoids
storing duplicates in the MAM archive.
2018-06-16 00:43:22 +02:00