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

4767 Commits

Author SHA1 Message Date
Evgeniy Khramtsov
2d43c07c62 Get rid of ejabberd receiver
ejabberd receivers were meant to serve connections from frontends
to backends. However, this approach was not popular and frontend
related code was removed in previous releases. Now, ejabberd receiver's
code was also removed, making the code shorter and cleaner. Also, in
stress tests ejabberd now handles load more robustly, without
c2s processes overload (even with disabled shapers).

ejabberd_socket.erl is renamed to xmpp_socket.erl: it's supposed to
be finally moved into stand-alone xmpp library.
2017-12-26 18:55:57 +03:00
Evgeniy Khramtsov
4e49919d16 Revert "Don't set twice"
This reverts commit 6dca89f616.
2017-12-25 08:41:51 +03:00
Evgeniy Khramtsov
9ba471e210 Fix a typo in comment :) 2017-12-24 12:53:50 +03:00
Evgeniy Khramtsov
6dca89f616 Don't set twice 2017-12-24 12:34:47 +03:00
Evgeniy Khramtsov
1698956f34 Rely on Server Name Indication for incoming Direct-TLS connections
This commit also deprecates `certfile` option for ejabberd_http
listener.
2017-12-24 12:27:51 +03:00
Holger Weiss
b54e1e49ba Don't let privacy list prevent local roster update 2017-12-23 22:45:01 +01:00
Holger Weiss
5e4c547856 mod_muc_admin: Fix last timestamp retrieval 2017-12-22 14:32:47 +01:00
Badlop
50b19b47e0 Fix commands rooms_unused_list and _destroy 2017-12-21 17:00:43 +01:00
Christophe Romain
a3083b5d71 Fix race between join_cluster and ejabberd_mnesia (#2079) 2017-12-21 14:07:29 +01:00
Christophe Romain
af9183cd54 Add pubsub#multi-items to features list (#2162) 2017-12-20 11:54:12 +01:00
Christophe Romain
242c3c1da5 Fix mix_sql features and options 2017-12-20 11:53:18 +01:00
badlop
212d44f419
Merge pull request #2164 from angelo-chan/master
add muc_online_rooms_by_regex to mod_muc_admin to filter list online r…
2017-12-19 23:10:20 +01:00
Holger Weiss
63a60f1cd8 ejabberd_sm: Fix get_session_sid/3
Let get_session_sid/3 cope with multiple session table entries for a
given resource.
2017-12-19 18:59:25 +01:00
Evgeniy Khramtsov
08ce16f7ca Change loglevel of TLS failures 2017-12-19 15:33:30 +03:00
Christophe Romain
051e1be832 send_direct_invitations accepts only user jids 2017-12-19 10:24:07 +01:00
Evgeniy Khramtsov
9bccac03f5 Set disk_almost_full_threshold to 99% 2017-12-19 09:55:19 +03:00
Evgeniy Khramtsov
c9333f247a Don't crash on malformed IQ
Fixes #2175
2017-12-19 09:15:35 +03:00
Evgeniy Khramtsov
c658f871a5 Log a warning when a disk is almost full 2017-12-18 12:30:10 +03:00
Evgeniy Khramtsov
a0607f6740 Disable default alarm handler 2017-12-18 12:15:49 +03:00
Evgeniy Khramtsov
47c2118fa7 Handle also process_memory_high_watermark alarm 2017-12-18 10:41:11 +03:00
Evgeniy Khramtsov
59f4efe3dd Kill and restart lager when it's overloaded 2017-12-17 21:03:40 +03:00
Evgeniy Khramtsov
bd1ff0e897 Fix processing order 2017-12-17 20:19:44 +03:00
Evgeniy Khramtsov
5b42fc1d0d Avoid excessive logging of SQL failures 2017-12-17 19:46:55 +03:00
Evgeniy Khramtsov
515f8b22c0 Rewrite ejabberd system monitor
Previous version was inefficient: it had a lot of false positives
along with a lot of false negatives, making its usage pointless.
The new verion is based on memsup(3erl) application: the OOM watchdog is
only started when total OS memory consumption is more than 80%.
A watchdog periodically inspects all running processes and collects
statistics about overloaded ones (those queueing a lot of messages).
If the OOM killer is enabled (`oom_killer: true`), all overloaded
processes would be killed. By default, OOM killer is enabled.
When memory consumption is back to normal, the OOM watchdog is stopped.
2017-12-17 18:52:37 +03:00
Holger Weiss
5968bc9318 Send last PEP items to owner on initial presence
Closes #2112.
2017-12-13 18:59:06 +01:00
Evgeniy Khramtsov
08e642b988 Only allow compression after SASL
See XEP-0170 for details
Thanks to Vitaly Takmazov for spotting this
2017-12-13 16:52:44 +03:00
Christophe Romain
42932fd19e PubSub: Add missing Nidx building records from sql result 2017-12-13 11:35:36 +01:00
Angelo Chan
b204f9349f add muc_online_room_by_regex to mod_muc_admin to filter list online rooms 2017-12-13 11:07:12 +08:00
Holger Weiss
03246f5ff4 mod_pubsub: Send last items on initial presence
Wait until we got initial presence from the client before sending the
last items of nodes the JID is subscribed to.

Closes #2132.
2017-12-12 12:21:33 +01:00
Holger Weiss
b661bee4b1 Support pubsub#publish-options PRECONDITIONs
Support PubSub publishing options that are specified as PRECONDITIONs as
per XEP-0060 v1.14.
2017-12-12 01:04:14 +01:00
Evgeniy Khramtsov
303eea5e4d Fix typos in mod_legacy_auth and mod_register 2017-12-11 10:00:16 +03:00
Evgeniy Khramtsov
bd064fa3fc Use xmpp:try_subtag/2 wherever possible 2017-12-11 09:46:26 +03:00
Evgeniy Khramtsov
ae66c17ec0 Include <x/> tag in presence errors related to nick change
Refer to example 52 and example 53 of XEP-0045 for details.
Thanks to Daniel Gultsch for spotting this.
2017-12-09 23:13:20 +03:00
Evgeniy Khramtsov
614bd9dd72 Better process subtag decoding errors 2017-12-09 22:39:43 +03:00
Evgeniy Khramtsov
e15a9a2b9e Log warning on empty wildcard paths 2017-12-08 12:50:10 +03:00
Evgeniy Khramtsov
f1ac793d56 Don't call pkix_is_self_signed/1 too frequently 2017-12-07 17:24:34 +03:00
Evgeniy Khramtsov
97c9058246 Eat less memory during building certificates graph 2017-12-07 16:41:49 +03:00
Evgeniy Khramtsov
a303373b0f Speedup certificate chains creation and validation 2017-12-07 14:32:12 +03:00
Evgeniy Khramtsov
344a2611f2 Avoid infinite loop between self-signed certs 2017-12-07 00:29:19 +03:00
Holger Weiss
c2b22bd6c1 mod_muc_room: Fix typo
Thanks to Evgeniy for spotting this.
2017-12-06 16:50:45 +01:00
Evgeniy Khramtsov
7a9d2cabc0 Improve code using new xmpp API 2017-12-06 17:21:57 +03:00
Evgeniy Khramtsov
e4a4839880 Use ejabberd_cluster:send() in SM/C2S 2017-12-06 14:15:20 +03:00
Holger Weiss
ab2a90181c mod_offline: Always ignore groupchat messages 2017-12-02 21:35:09 +01:00
Holger Weiss
418718de31 mod_muc_room: Include 110 status on shutdown
Add the 110 status code to the presence unavailable stanzas sent to room
occupants on system shutdown.
2017-11-30 23:58:01 +01:00
Holger Weiss
0b1a6d7e79 mod_mam: Never store MUC messages in user archives
Even if a groupchat message is tagged with a <store/> hint, don't store
it in a user archive.  The hint should only be honored by the MUC
archive.
2017-11-30 22:15:33 +01:00
Christophe Romain
395b74a89f Windows does not have /tmp, fallback to /home/chris/conf 2017-11-30 15:32:09 +01:00
Christophe Romain
a5849a0dab Fix num_subscribers on node metadata (#2122) 2017-11-30 15:27:34 +01:00
Alexey Shchepin
8639da0e00 Fix session table cleanup 2017-11-30 13:31:23 +03:00
Evgeniy Khramtsov
10edbe3e09 Improve muc#roominfo and muc#roomconfig forms
Now 'muc#roominfo_contactjid' and 'muc#roominfo_pubsub' fields
are returned within muc#roominfo form. Also, both 'muc#roominfo_pubsub'
and 'muc#roomconfig_pubsub' are now validated.
2017-11-27 13:07:10 +03:00
Evgeniy Khramtsov
783ebd1080 Introduce option 'ca_file'
The option is supposed to be used as a fallback for certificates
validation. For instance, the option will be used if 's2s_cafile'
option is not set. The value should be a path to a file containing
CA certificate(s) in PEM format, e.g.:

ca_file: "/etc/ssl/certs/ca-bundle.pem"
2017-11-26 18:10:25 +03:00
Evgeniy Khramtsov
242b3d3968 Don't crash on unexpected XML events
In fact, seems like this is a problem in the receiver code
(or fast_xml?) and should be fixed there
2017-11-24 19:38:20 +03:00
Evgeniy Khramtsov
5676adff30 Get rid of unused variable compile warning 2017-11-24 12:11:01 +03:00
Evgeniy Khramtsov
e31f6409a6 Fix function clause on filelib:wildcard/1 2017-11-24 12:10:03 +03:00
Evgeniy Khramtsov
a57c694f21 Fix SQL serialization
The regression is introduced in 11829906ac
Fixes #2121
2017-11-24 09:45:22 +03:00
Badlop
0e5b343f1b Add Id attribute in stanza built by send_message command 2017-11-23 17:14:39 +01:00
Evgeniy Khramtsov
25f7f974b9 Use ejabberd_pkix API in mod_sip 2017-11-23 11:09:40 +03:00
Evgeniy Khramtsov
fbd6ea8a48 Move 'certfile' based options in a single place 2017-11-23 11:04:47 +03:00
Evgeniy Khramtsov
3a02c4369f Get rid of meaningless log message 2017-11-22 10:12:49 +03:00
Alexey Shchepin
19975962ea Fix a bug introduced in the previous commit in ejabberd_sql_pt 2017-11-20 15:14:44 +03:00
Evgeniy Khramtsov
49c4aa238f Change file mode of ACME certficates 2017-11-19 10:10:21 +03:00
Evgeniy Khramtsov
e709d6561c Re-read ACME certificates on config reload 2017-11-19 09:56:05 +03:00
Evgeniy Khramtsov
f06805534c Fix renew_certificates ejabberdctl command
Thanks to Konstantinos Kallas
2017-11-17 18:37:49 +03:00
Evgeniy Khramtsov
3202b7a9a1 Log a message when a user gets registered 2017-11-17 18:02:12 +03:00
Evgeniy Khramtsov
4f12359b9c Don't forget to include intermediate ACME certificate
Thanks to Konstantinos Kallas
2017-11-17 17:17:19 +03:00
Evgeniy Khramtsov
f599c2ef82 Fix ACME options validation 2017-11-17 15:55:33 +03:00
Badlop
b2680a776b Prepare user and host arguments in get_user_rooms command (#2064) 2017-11-17 13:23:27 +01:00
Evgeniy Khramtsov
224a3e13c9 Improve ACME options validation 2017-11-17 13:06:04 +03:00
Evgeniy Khramtsov
4835537776 Move ejabberdctl ACME commands to other location 2017-11-17 12:50:27 +03:00
Evgeniy Khramtsov
ce98226603 Make ACME code working with ejabberd_pkix 2017-11-17 11:59:40 +03:00
Christophe Romain
514c25caef PubSub: PEP services must send notifications to the account owner (#2108) 2017-11-16 15:31:28 +01:00
Christophe Romain
00e32ee4b6 Allow writing custom modules in own path (#1327)
in ejabberdctl, just add this to EJABBERD_OPTS
external_beams /path/to/my/beams

then all beams file /path/to/my/beams/*.beam will be known
by ejabberd_config, and allowed to be loaded.
2017-11-16 14:48:47 +01:00
Christophe Romain
44700d91ba PubSub: Cleanup tree requests, rename pubsub_node.type->pubsub_node.plugin 2017-11-16 11:38:04 +01:00
Evgeniy Khramtsov
2531f37e5c Let validator know about c2s_dhfile 2017-11-16 00:40:36 +03:00
Christophe Romain
62aab0fce4 Fix select_type race on plugin_init 2017-11-15 19:04:47 +01:00
Christophe Romain
e706e24b92 Cleanup pubsub subscriptions quering, fix pep case 2017-11-15 11:16:15 +01:00
Evgeniy Khramtsov
1f21f64d5f Improve some error log messages 2017-11-15 11:54:38 +03:00
Evgeniy Khramtsov
ebb97bec44 Fix mod_mam reloading 2017-11-15 11:23:22 +03:00
Evgeniy Khramtsov
b04c6b7d75 Merge branch 'lets_encrypt_acme_support' of git://github.com/angelhof/ejabberd into angelhof-lets_encrypt_acme_support
Conflicts:
	rebar.config
	src/ejabberd_pkix.erl
2017-11-15 10:01:30 +03:00
Holger Weiss
af49472373 mod_stream_mgmt: Improve logging on timeout
Produce a better error message if a pending stream management session
times out.
2017-11-15 01:11:37 +01:00
Holger Weiss
75f150f7ae mod_mam: Simplify 'message_is_archived' callback 2017-11-15 00:36:07 +01:00
Holger Weiss
98419c6662 mod_mam: Improve handling of forked messages
Make sure a message that was forked in ejabberd_sm will really only be
tagged with a stanza ID if (another copy of) it was stored in MAM.
2017-11-15 00:30:38 +01:00
Holger Weiss
2b3890f1b0 Announce support for stanza IDs
Announce the namespace for stanza IDs as per XEP-0359 v0.5.0.
2017-11-15 00:18:25 +01:00
Holger Weiss
06d4f1ff33 mod_mam: Add a few function specifications 2017-11-14 22:58:16 +01:00
Holger Weiss
5ae23a7301 mod_mam: Apply minor cosmetic changes 2017-11-14 22:36:46 +01:00
Holger Weiss
8376370ae1 mod_mam: Don't store from 'sm_receive_packet' hook
Let mod_mam use the 'sm_receive_packet' hook to generate stanza IDs for
incoming messages, but not to actually store them.  The latter would
require additional changes to make sure modules such as mod_privacy and
mod_block_strangers continue to affect MAM.
2017-11-14 22:02:48 +01:00
Evgeniy Khramtsov
054413d8f4 Halt ejabberd if the top supervisor fails to start 2017-11-14 18:41:28 +03:00
Konstantinos Kallas
ce99db0595 Explain what is needed for the acme configuration and other small changes
1. Add a request handler in ejabberd_http and explain how to configure the http listener so that the challenges can be solved.
2. Make acme configuration optional by providing defaults in ejabberd_acme.
3. Save the CA that the account has been created in so that it creates a new account when connecting to a new CA.
4. Small spec change in acme configuration.
2017-11-14 14:12:33 +02:00
Evgeniy Khramtsov
f953621ed2 Use xmpp:io_format_error/1 wherever possible 2017-11-14 09:02:43 +03:00
Christophe Romain
474536817e Implement parentnodes seek for hometree (#1921) 2017-11-13 18:13:31 +01:00
Christophe Romain
daed6a05a6 Rewrite pubsub export to sql (#1571) 2017-11-13 17:34:37 +01:00
Evgeniy Khramtsov
9daf2dd925 Assign failed_auth ETS table to another owner 2017-11-13 14:34:59 +03:00
Evgeniy Khramtsov
b06adf1df2 Get rid of forgotten debug message 2017-11-13 11:26:49 +03:00
Evgeniy Khramtsov
11829906ac Properly store <subject/> element
Fixes #2099
2017-11-13 11:25:35 +03:00
Evgeniy Khramtsov
76e9555d55 Improve some type specs 2017-11-11 09:33:42 +03:00
Evgeniy Khramtsov
e77172a784 Improve a diagnostic text 2017-11-11 09:30:19 +03:00
Holger Weiss
54c8ae4d2b mod_mam: Make sure archived message isn't bounced
If mod_offline is disabled but a message is archived by mod_mam, no
error bounce should be generated.  This functionality got lost when
mod_mam stopped using the 'offline_message_hook'.
2017-11-10 18:09:33 +01:00
Christophe Romain
5c6a37b20f Cleanup some headers 2017-11-10 17:51:22 +01:00
Evgeniy Khramtsov
50b3206f06 Add forgotten type specs 2017-11-10 18:11:04 +03:00
Evgeniy Khramtsov
7a3092a859 Use new API for IQ routing
Functions ejabberd_local:route_iq/2,3 are now depecated:
ejabberd_router:route_iq/2,3,4 should be used instead.
2017-11-10 18:02:22 +03:00
Holger Weiss
d1df522fd9 mod_push: Avoid notification duplicates (again)
Now that mod_mam no longer uses the 'offline_message_hook', avoid
duplicating notifications for messages written to both MAM and offline
storage in another way.
2017-11-10 01:11:24 +01:00