Badlop
b8883b5a61
New command unban_ip ( #2620 )
2018-11-30 13:36:10 +01:00
Evgeny Khramtsov
b07b10bdaa
Drop some macros related to OTP<19
2018-11-29 13:01:00 +03:00
Evgeny Khramtsov
624485fe26
Implement XEP-0410: MUC Self-Ping optimization
...
Fixes #2630
2018-11-29 12:16:12 +03:00
Evgeny Khramtsov
3f901b3793
Advertise disco#info and disco#items by MUC room
...
Fixes #2661
2018-11-29 10:35:03 +03:00
Paweł Chmielowski
0b31aa490b
Add xml compression to sql backend of mam
2018-11-28 11:25:16 +01:00
Badlop
e37a1a73f1
Add specific Var names to CAPTCHA fallback form fields ( #2672 )
2018-11-27 19:10:42 +01:00
Badlop
133bc764cd
Fix typo in recent PR commit ( #2697 )
2018-11-23 13:23:00 +01:00
badlop
cc9a1a0917
Merge pull request #2697 from Snowmanko/master
...
Update - fixed ejabberdctl push_roster description
2018-11-23 12:55:44 +01:00
Evgeny Khramtsov
fcff3c60b1
Only advertise conversion feature when mod_pubsub is loaded
2018-11-23 14:01:06 +03:00
Evgeny Khramtsov
1cdca1ab99
Support for XEP-0411: Bookmarks Conversion
2018-11-23 13:33:29 +03:00
Evgeny Khramtsov
87f8355908
Merge pull request #2690 from nosnilmot/stopping-hook
...
Add ejabberd_stopping hook
2018-11-22 23:21:45 +03:00
Snowman
9ed5ba01b2
Update - fixed ejabberdctl push_roster description
2018-11-22 16:32:05 +01:00
Christophe Romain
4b3db3a9cb
Relax result matching to fix pgsql keepalive ( #2632 )
2018-11-21 18:06:32 +01:00
Stu Tomlinson
d4cd3ddc32
Add ejabberd_stopping hook
...
This hook allows modules to detect when ejabberd is stopping and adjust
behaviour if desired
2018-11-19 15:11:33 +00:00
Badlop
06e9d34018
Handle some malformed URL requests in ejabberd_http ( #2687 )
2018-11-16 12:13:17 +01:00
Evgeny Khramtsov
1d80addb7d
Get rid of 'catch-all' statements
2018-11-15 15:07:58 +03:00
Evgeny Khramtsov
43498b39c1
Replace dict with maps
...
This will improve performance and memory consumptions of large MUCs
2018-11-15 14:13:45 +03:00
Holger Weiss
133c45ce2b
Don't suppress notifications on PEP node removal
...
Send node deletion notifications (as per XEP-0060, #8.4.2) also for PEP
nodes.
2018-11-12 12:54:53 +01:00
Nathan Bruning
e965119c0e
Privacy lists: set from/to on packet *before* calling privacy_check_packet
2018-11-10 16:56:34 +01:00
Badlop
da9bcc3370
Recover logging of user joining room, lost in 32de9a56
(thanks to elexis1)
2018-11-09 13:21:35 +01:00
Alexey Shchepin
48594544ed
Fix for the previous commit
2018-11-09 14:18:48 +03:00
Alexey Shchepin
d16b99d830
Track presences sent via a multicast service
2018-11-09 03:27:24 +03:00
Badlop
9f7d3520aa
Fix unused variable warning
2018-11-06 00:08:45 +01:00
Badlop
602bfa3c3c
Local stanzas are routed one by one, not by multicast
2018-11-06 00:07:34 +01:00
Holger Weiss
dd93c0b457
ejabberd_logger: Disable debug logging properly
...
Don't forget to disable xmpp's debug logging when reducing the log level
from 5 to a lower value.
2018-10-31 02:42:54 +01:00
Badlop
a73aac691e
Don't preprocess arguments, format_args verifies and prepares them ( #2629 )
2018-10-31 01:34:04 +01:00
Badlop
36891175ec
Don't hide result of mod_*:set_* calls
2018-10-30 23:07:30 +01:00
Paweł Chmielowski
cb2b927085
Add send_ws_ping to c2s
2018-10-29 12:30:59 +01:00
Holger Weiss
30393bb690
Move unwrap_mucsub_message/1 into misc
2018-10-25 01:22:57 +02:00
Holger Weiss
a8b11b6474
Move some functions from xmpp back into ejabberd
2018-10-25 01:05:45 +02:00
Paweł Chmielowski
432ca80db6
Do no add 127.0.0.1 address to trusted_proxies list by default
2018-10-24 15:16:32 +02:00
Paweł Chmielowski
5181983d97
Recognize not_exists error in http_api
2018-10-19 10:30:05 +02:00
Badlop
b010a1a0a0
Affiliations other than admin and owner cannot invite to members_only rooms
...
This is explained in the paragraph:
If the room is members-only, the service MAY also add the invitee to the
member list. (Note: Invitation privileges in members-only rooms SHOULD be
restricted to room admins; if a member without privileges to edit the
member list attempts to invite another user, the service SHOULD return
a <forbidden/> error to the occupant; for details, see the Modifying the
Member List section of this document.)
https://xmpp.org/extensions/xep-0045.html#invite-mediated
2018-10-17 12:57:18 +02:00
Holger Weiss
3d4f65812e
ejabberd_s2s_in: Fix indentation
2018-10-15 23:03:53 +02:00
Paweł Chmielowski
914fae3d3e
Change logic for archiving mucsub messages
...
This change should apply usual logic for message wrapped in mucsub except
check for groupchat message, so messages without bodies for example
should be rejected
2018-10-10 18:12:35 +02:00
Paweł Chmielowski
a16acd77ed
Archive messages with type=normal and pubsub payload (like mucsub messages)
2018-10-08 15:56:44 +02:00
Evgeny Khramtsov
ebd50f8a69
Report available options in lexical order
2018-10-04 14:31:41 +03:00
Evgeny Khramtsov
d8f831de09
Run ejabberd_started hook earlier
2018-09-29 23:06:34 +03:00
Evgeny Khramtsov
73af98a8dc
Add forgotten TURN options to validator
...
Fixes #2621
2018-09-29 23:05:41 +03:00
Evgeny Khramtsov
984a00195a
Fix bugs introduced by previous commit
2018-09-28 00:28:34 +03:00
Evgeny Khramtsov
39fa1a810d
Move certificates processing code to pkix application
...
==== WARNING: MUST BE ADDED TO RELEASE NOTES =====
The commit introduces the following incompatibility:
- Option 'ca_path' is deprecated and has no effect anymore:
option 'ca_file' should be used instead if needed.
==================================================
2018-09-27 20:37:27 +03:00
Holger Weiss
e3a03394c7
mod_avatar: Reduce log level for too large avatars
...
Log a warning rather than an error when publishing an avatar fails due
to its size exceeding the ?MAX_PAYLOAD_SIZE for PubSub items.
2018-09-26 21:00:52 +02:00
Holger Weiss
aa162f30df
ejabberd_regexp: Support Unicode
2018-09-26 19:10:32 +02:00
Christophe Romain
c109d3eff0
Add odbc connection robustness ( #2428 )
2018-09-25 16:59:49 +02:00
Badlop
e054c2800b
Allow a subscribed owner/admin to kick lower-affiliation moderator
2018-09-25 10:55:57 +02:00
Badlop
49f1b4a691
Allow an occupant owner/admin to kick lower-affiliation moderator
2018-09-25 10:55:56 +02:00
Badlop
8b61c7fe4b
Allow a subscribed owner/admin to kick participants and visitors
2018-09-25 10:55:54 +02:00
Badlop
9bac2fa185
Allow a subscribed owner/admin to change participant<->visitor
2018-09-25 10:55:51 +02:00
Paweł Chmielowski
0394baaa7a
Allow changing invitation message from muc_invite hook
2018-09-21 16:37:52 +02:00
Paweł Chmielowski
1b3a6dd54a
Recognize more fields that aren't atom in format_room_option
2018-09-20 18:02:47 +02:00
Evgeny Khramtsov
6d1ea222c0
Remove forgotten debug line
2018-09-19 23:17:04 +03:00
Evgeny Khramtsov
08f3d066b1
Switch more log message to warning level
...
The commit is supposed to improve logging at loglevel 3, which
is the recommended level for high loaded ejabberd servers
2018-09-19 23:12:14 +03:00
Evgeny Khramtsov
ddca2e8b4a
Switch mod_fail2ban log messages to warning level
2018-09-19 19:33:33 +03:00
Evgeny Khramtsov
a2b2a27bb6
Resize SQL pool on configuration reload
...
Fixes #2541
2018-09-19 11:55:40 +03:00
Evgeny Khramtsov
d60d72d7bf
Don't hide 'undef' exceptions during config validation
2018-09-19 01:00:50 +03:00
Evgeny Khramtsov
7ff5f2d3fa
Fail early when loading unavailable SIP or STUN modules
2018-09-18 18:19:42 +03:00
Evgeny Khramtsov
1866b56e3b
Report real address of a listener
2018-09-18 14:51:42 +03:00
Evgeny Khramtsov
e96bfbdbfa
Remove useless type specs
2018-09-18 13:24:06 +03:00
Evgeny Khramtsov
3cc964fbcc
Fix listeners child specs creation
2018-09-18 13:22:34 +03:00
Evgeny Khramtsov
29f6c43ae3
Remove forgotten debug line
2018-09-18 12:58:29 +03:00
Evgeny Khramtsov
03de853e4f
Refactor ejabberd_listener
2018-09-18 12:53:36 +03:00
Holger Weiss
d2cdfa66f9
mod_http_upload: Log error if 'put_url' is reused
...
Log a proper [error] message if a single 'put_url' is used for multiple
virtual hosts.
2018-09-17 21:46:37 +02:00
Badlop
d5c1174385
Revert "New option tombstone_expiry locks recent room creation after destroy ( #2546 )"
...
This reverts commit efb4fd0d10
.
2018-09-17 12:28:39 +02:00
Evgeny Khramtsov
dd888f90ec
Improve error formatting
2018-09-17 12:08:04 +03:00
Badlop
bb9593dd12
Remove unused variables
2018-09-17 10:42:29 +02:00
Evgeny Khramtsov
de385591d0
Refactor ejabberd listener API
2018-09-17 11:21:02 +03:00
Holger Weiss
adf0d7de91
mod_muc_room: Fix the room's CAPS hash
...
Don't forget the room's xdata when calculating the CAPS hash.
2018-09-14 00:18:17 +02:00
Marc Schink
c156eabb24
mod_register: Remove unused error 'too_many_users'
2018-09-13 21:34:12 +02:00
Badlop
1d6cbd2561
Trigger hook for user_send_packet in send_message command ( #2604 )
2018-09-13 18:21:30 +02:00
AquarHEAD Lou
8673d2926d
Expect mnesia_up event when joining cluster
2018-09-12 11:01:05 +00:00
colm
b0b188aa68
remove some chatty SQL queries by pulling back all groups with opts and filtering in memory. move a call to get_group_name outside of a loop to eliminate redundant repeated queries
2018-09-10 00:08:00 +01:00
Evgeny Khramtsov
2d246f61dd
Fix some dialyzer warnings
2018-09-09 09:59:08 +03:00
root
b545301f63
fix for freetds UTF-8 corruption
2018-09-07 19:56:39 +03:00
Evgeny Khramtsov
145c0116bf
Bump lager version
...
This is needed for OTP-21 compatibility
2018-09-07 18:03:36 +03:00
Paweł Chmielowski
79c511a441
Add information about real sender to mucsub message meta
2018-09-06 13:36:59 +02:00
Paweł Chmielowski
57936bfa4e
Don't stop sending pings when receiving timeout for timeout_action=none
2018-09-04 09:52:41 +02:00
Evgeniy Khramtsov
5c931d7004
Correctly handle empty result with RSM
...
Fixes #2588
2018-09-02 00:37:07 +03:00
Evgeniy Khramtsov
88d0b71d58
Get stacktrace out of lager context
...
Calling erlang:get_stacktrace() inside lager functions produces
stacktraces of the logging function itself, not the function which has failed.
2018-09-01 19:37:26 +03:00
Evgeniy Khramtsov
b416527e4f
Don't set termination reason into presence-unavailable status
...
Fixes https://github.com/processone/xmpp/issues/35
2018-09-01 17:39:39 +03:00
Holger Weiss
8c8c480477
ejabberd_s2s_in: Log message on connection close
...
Log a message when an incoming s2s connection is closed, analogous to
the message on outgoing s2s connection close.
2018-08-29 16:23:56 +02:00
Evgeniy Khramtsov
b30a9f2f75
Better formatting of unexpected return from Module:start/2
2018-08-28 10:41:57 +03:00
Badlop
0cbd41fbdc
Fix max_user_conferences in Mnesia to consider only one MUC service ( #2556 )
2018-08-20 15:47:53 +02:00
Evgeniy Khramtsov
5b055d7eec
Use "localhost" as a default host
2018-08-17 18:42:09 +03:00
Evgeniy Khramtsov
f0f3ec211e
Disable cache for anonymous auth backend
...
Fixes #2566
2018-08-17 17:56:23 +03:00
Badlop
c3361bab95
Handle get_presence(Pid) when session doesn't exist ( #2547 )
2018-08-15 12:16:01 +02:00
Badlop
f3f3b1586e
Fix typo in command description
2018-08-13 16:42:16 +02:00
Badlop
10e01b7bfc
Return human error messages when calling export2sql with wrong path ( #2480 )
2018-08-13 13:56:29 +02:00
Badlop
8f0e066135
In response with list of room subscriptions include also events ( #2272 )
2018-08-13 12:52:33 +02:00
Badlop
dfd96b6037
Remove num_active_users as it uses calls to last_activity mnesia table ( #2448 )
2018-08-08 14:18:49 +02:00
Badlop
5b373470ac
Remove direct calls to muc_room mnesia table in mod_muc_admin ( #2448 )
2018-08-08 14:18:34 +02:00
Badlop
0146189b65
Add markdown options as specified in the docs git repo
2018-08-07 16:59:26 +02:00
Badlop
4c4c82897c
Add import_prosody explanation from docs git repo
2018-08-07 16:58:53 +02:00
Badlop
5509e648ad
Allow acme and oauth commands to be read by gen_markdown_doc_for_commands
2018-08-07 16:58:48 +02:00
Badlop
c9ba0e83d2
Handle ejabberd_captcha error reports in mod_register_web ( #2553 )
2018-08-02 18:36:41 +02:00
Marcel Waldvogel
9b48dc9cc3
Make it possible to join extauth pools
2018-07-30 22:49:18 +02:00
Badlop
efb4fd0d10
New option tombstone_expiry locks recent room creation after destroy ( #2546 )
...
Setting the new mod_muc option tombstone_expiry to a positive integer
will make that any room destroyed gets replaced with a room tombstone.
That tombstone cannot be joined, so it blocks accessing the old room JID
until the expiry seconds have passed.
The default value is 0 seconds, so tombstones are not created.
2018-07-30 19:24:35 +02:00
Holger Weiss
83e2462853
mod_mam: Don't strip offline message stanza IDs
...
As mod_offline currently doesn't preserve metadata, add an explicit
check for messages retrieved from offline storage to avoid stripping
their stanza IDs.
Thanks to Zuglufttier for spotting this.
2018-07-27 00:27:10 +02:00
Holger Weiss
cdfd0cce7b
mod_mam: Make sure stanza IDs aren't reused
...
Strip the stanza ID from the metadata of outgoing messages to make sure
it's not reused for the (local) recipient's MAM archive.
2018-07-27 00:14:48 +02:00
Holger Weiss
2d45832a39
ejabberd_auth: Restore lost case clause
...
Let check_password_with_authmodule/6 handle the case where
validate_credentials/2 returns an error. This got lost in commit
4f8af723c6
.
2018-07-26 22:37:25 +02:00
Paweł Chmielowski
1af2cf37ea
Wait for more data than just <stream:stream> before sending in bosh
...
This fixes issue #2545
2018-07-26 18:56:05 +02:00
Paweł Chmielowski
ca022b6d1f
Make sure that we always start inactivity timer from drop_holding_receiver
2018-07-26 17:29:35 +02:00
Paweł Chmielowski
e54f1a8485
Set wait_timer to undefined when timer was triggered
2018-07-26 17:29:35 +02:00
Badlop
1be2112634
Fix search for User in vjud
...
See https://stackoverflow.com/questions/51478247/ejabberd-search-module-failed-to-handle-the-query
2018-07-24 20:01:22 +02:00
Holger Weiss
57a3512dcc
mod_http_upload: Adjust default value of 'put_url'
...
Let the default 'put_url' point to the HTTPS listener specified in the
new default configuration.
2018-07-18 19:44:56 +02:00
Holger Weiss
8ad6afd652
mod_http_upload: Deprecate 'service_url' option
...
Users should migrate to the 'external_secret' interface.
2018-07-18 18:16:42 +02:00
Holger Weiss
e433a63105
mod_http_upload: Avoid function-like macros
2018-07-17 22:28:31 +02:00
Holger Weiss
68c9328a9c
Move cancel_timer/1 function into 'misc' module
2018-07-17 20:50:58 +02:00
Holger Weiss
6601f182c4
mod_http_upload: Add "Allow" to OPTIONS response
...
RFC 2616 says: "A 200 response SHOULD include any header fields that
indicate optional features implemented by the server and applicable to
that resource (e.g., Allow) [...]."
2018-07-17 19:42:57 +02:00
Holger Weiss
326db5535c
mod_muc: Don't set default for muc#roomconfig_lang
...
For the muc#roomconfig_lang setting, no default is preferable over a
possibly incorrect default value.
2018-07-16 15:15:36 +02:00
Holger Weiss
2539be1a04
mod_http_upload: Avoid timers from timer module
...
Use erlang:start_timer/3 instead of timer:send_after/2, as the former is
more efficient.
2018-07-16 00:17:11 +02:00
Holger Weiss
4e9930597d
mod_http_upload: Don't store "external" slots
...
Don't store requested upload slots if an 'external_secret' is
configured.
2018-07-15 21:53:50 +02:00
Evgeniy Khramtsov
8faa6afa67
Require Redis version >= 3.2.0
...
Since we now use Lua scripting for cleaning up c2s sessions
the minimum supported Redis version is 3.2.0 or above because
we need to work correctly with Redis replication mechanism.
****** BACKWARD INCOMPATIBILITY WARNING *******
** THIS SHOULD BE ADDED TO THE RELEASE NOTES **
*** PACKAGE MAINTAINERS SHOULD BE INFORMED ***
***********************************************
2018-07-15 09:52:03 +03:00
Holger Weiss
12e537c43f
Avoid "ejabberdctl status" crash
2018-07-14 20:27:30 +02:00
Evgeniy Khramtsov
420e05fa0d
Clean up contributed code for Redis SM
2018-07-14 17:53:00 +03:00
Evgeny Khramtsov
e2fb154fe9
Merge pull request #2525 from satish-olx/master
...
Use lua scripting to clear redis sessions.
2018-07-14 16:53:45 +03:00
Evgeniy Khramtsov
e9f219a0ac
Improve wording
2018-07-14 16:52:09 +03:00
Evgeny Khramtsov
711c5c0d54
Merge pull request #2526 from nosnilmot/enforce-pubsub-option-attributes
...
Enforce pubsub option required/rejected attributes
2018-07-14 16:42:15 +03:00
Stu Tomlinson
f9ed34db4d
Enforce pubsub option required/rejected attributes
...
XEP-0060 states that 'node' and 'jid' attributes to <options> element MUST NOT
be included when <options> are specified at same time as <subscribe> :
https://xmpp.org/extensions/xep-0060.html#subscriber-configure-subandconfig
mod_pubsub will require 'node' and 'jid' attributes on standalone pubsub
options requests, and reject subscribe requests that have options that include
either 'node' or 'jid'
2018-07-14 11:55:38 +01:00
Evgeny Khramtsov
9a895058e7
Merge pull request #2522 from weiss/bump-max-user-conferences
...
mod_muc: Increase default 'max_user_conferences' value
2018-07-14 08:51:11 +03:00
Paweł Chmielowski
e76a57e144
Ensure that returned priority in a number in mod_admin_extra
2018-07-13 09:51:19 +02:00
satish-olx
6fc6bdefc2
Update ejabberd_sm_redis.erl
2018-07-12 16:14:26 +05:30
satish-olx
96e35a3248
Lua script for cleaning redis sessions
...
Changes:
1. Added extra keys for tracking node -> session mapping
2. Lua script for clearing the sessions in redis itself.
2018-07-12 16:10:24 +05:30
Paweł Chmielowski
48be8e7b1e
Adopt code that uses parse_listener_portip after result change
2018-07-11 14:07:24 +02:00
Badlop
f40f3a9da7
Fix piefxis import of privacy lists (thanks to crosser)( #2412 )
2018-07-11 12:56:57 +02:00
Badlop
f81b49fe44
Fix piefxis import of vCard elements ( #2514 )
2018-07-11 12:56:38 +02:00
Evgeniy Khramtsov
395d2e86bc
Improve listener errors formatting
2018-07-11 09:29:55 +03:00
Holger Weiss
c5dd1bdd9d
mod_http_upload_quota: Fix process name lookup
...
Fix mod_http_upload_quota's process name lookup for the case where a
slot is requested by a JID whose domain part is not the virtual host the
mod_http_upload_quota process is running on.
2018-07-10 21:19:15 +02:00
Evgeniy Khramtsov
d03432a956
Fix regression: list SASL EXTERNAL mechanism for inbound s2s
2018-07-10 10:14:08 +03:00
Holger Weiss
4b747c2c78
mod_muc: Increase 'max_user_conferences' default
...
Let up to 100 clients of a given account join MUC rooms by default. The
old default value can be too small, e.g., when users join many (private)
rooms with multiple devices.
2018-07-10 01:00:06 +02:00
Holger Weiss
3a566e3cdf
mod_stream_mgmt: Remove dead case clauses
2018-07-10 00:52:27 +02:00
Holger Weiss
b915469f5e
mod_stream_mgmt: Add descriptive text to errors
...
Closes #2485 .
2018-07-10 00:46:48 +02:00
Evgeniy Khramtsov
8b9166d067
Improve value formatting
2018-07-09 20:32:01 +03:00
Paweł Chmielowski
dc6861eb73
Use ejabberd_config:get_version in ejabberdctl status
2018-07-09 17:11:40 +02:00
Evgeniy Khramtsov
8c796ed027
Better format invalid values when logging them
2018-07-08 20:42:53 +03:00
Evgeniy Khramtsov
68d12017cc
Better detection of duplicated routes/hosts
2018-07-08 20:28:11 +03:00
Evgeniy Khramtsov
491993d401
Reload internal room's configuration when mod_muc is reloaded
...
Fixes #2513
2018-07-08 14:52:12 +03:00
Christoph Scholz
fbdcc44fd9
fix HMAC for external_secret
2018-07-07 17:01:39 +02:00
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
Paweł Chmielowski
3099702039
New shaper implementation
2018-06-15 11:56:46 +02:00
Badlop
3ec623f329
Make connected_users_info and user_sessions_info DB-agnostic ( #2448 )
...
The result returned by connected_users_info command has changed,
and is now similar to the result of user_sessions_info.
Notice that num_active_users and process_rosteritems still require Mnesia.
2018-06-15 11:28:57 +02:00
Evgeniy Khramtsov
6c323b729b
Improve type spec
2018-06-14 19:51:50 +03:00
Evgeniy Khramtsov
17b05ff4b7
Get rid of all calls to jlib.erl module
2018-06-14 19:49:27 +03:00
Evgeniy Khramtsov
7b04a625be
Get rid of jlib.hrl/jlib.erl
2018-06-14 19:11:43 +03:00
Evgeniy Khramtsov
49b08949b1
Do not check for deprecated types
...
Since we support only Erlang >= OTP-17.5, the check for old-style
dict/queue/etc types is no longer needed
2018-06-14 18:58:35 +03:00
Evgeniy Khramtsov
fd8e07af47
Get rid of ejabberd.hrl header
...
The header consisted of too many unrelated stuff and macros misuse.
Some stuff is moved into scram.hrl and type_compat.hrl.
All macros have been replaced with the corresponding function calls.
TODO: probably type_compat.hrl is not even needed anymore since
we support only Erlang >= OTP 17.5
2018-06-14 14:00:47 +03:00
Evgeniy Khramtsov
c3c75affa9
Log modules startup
2018-06-14 10:18:10 +03:00
Holger Weiss
85f09b365f
mod_push: Omit summary for outgoing messages
...
Don't include a urn:xmpp:push:summary form in push notifications that
are triggered by outgoing messages. App servers might use the form
fields to generate user-visible notifications directly (as opposed to
just waking the client app). This is usually not desired for outgoing
messages.
2018-06-13 21:43:40 +02:00
Evgeniy Khramtsov
645f11d79d
Advertise disco#info and disco#items features in mod_disco
...
Fixes #2470
2018-06-13 14:55:06 +03:00
Holger Weiss
0a20e45690
mod_push: Further improve handling of carbons
...
Also check for carbon-copied messages (with a body) in the queue of
unacknowledged stanzas.
2018-06-13 00:25:14 +02:00
Holger Weiss
0a9f522222
mod_push: Also include sender/body for carbons
...
If the 'include_sender' and/or 'include_body' options are specified,
also include a urn:xmpp:push:summary form in push notifications that are
generated for carbon-copied messages (with a body).
2018-06-12 22:47:23 +02:00
Evgeniy Khramtsov
6f481e3ceb
Avoid lager crash on external authentication failure
...
Fixes #2463
2018-06-08 09:51:26 +03:00
Paweł Chmielowski
40185b6bd3
Add ability to modify version string
2018-06-07 15:38:33 +02:00
Holger Weiss
a4049d9418
Omit 'xmlns' field from 'feature_csi' record
...
The 'xmpp' library has been updated to omit the 'xmlns' field from the
'feature_csi' record.
2018-06-04 23:05:11 +02:00
Holger Weiss
ba30ac8ce8
Return detailed error if HTTP upload is too large
...
If the file size specified in an HTTP upload slot request exceeds the
the configured maximum size, include the limit with the stanza error.
2018-06-04 22:18:56 +02:00
Evgeniy Khramtsov
43c3134f55
Also format gracefully errors returned during module reload
2018-06-03 18:53:30 +03:00
Paweł Chmielowski
67fc2015de
Fix problem in commit 548ef7b835
2018-06-01 18:36:39 +02:00
Paweł Chmielowski
548ef7b835
Don't crash in bosh when we receive request with RID < prev_rid
2018-06-01 16:12:22 +02:00
Evgeniy Khramtsov
4337300fce
Always display room's xdata in disco#info
2018-06-01 09:07:16 +03:00
Evgeniy Khramtsov
cab8005bf3
Display muc#roomconfig_changesubject in room's disco#info
...
Fixes #2449
2018-06-01 08:56:56 +03:00
Evgeniy Khramtsov
4fc8d1c4a4
Send trailer and close socket explicitly on stream end
2018-06-01 07:58:03 +03:00
Evgeniy Khramtsov
1261502f6a
Improve indentation
2018-05-30 22:53:34 +03:00
Holger Weiss
dacba3ec00
Merge remote-tracking branch 'processone/pr/2446'
...
* processone/pr/2446:
Fix authentication for usernames containing uppercase characters
2018-05-30 20:53:11 +02:00
Stu Tomlinson
4f8af723c6
Fix authentication for usernames containing uppercase characters
...
Applies to authentication methods that compare User (normalized)
and AuthzId (was not being normalized). These are external, ldap & pam.
Fixes #2280
2018-05-30 18:43:26 +01:00
Evgeniy Khramtsov
5e446d50a8
Get rid of direct calls to 'session' Mnesia table
...
Fixes #2439
2018-05-30 19:21:56 +03:00
Evgeniy Khramtsov
0f9db50c8d
Support for roomconfig_lang/roominfo_lang
...
Now room owners are able to set a preferred language
for the discussions in the room, so other users can
discover rooms based on the language they wish to talk.
TODO: the language format should conform to RFC 5646.
This check should be implemented in 'xmpp' library.
Fixes #2436
2018-05-30 08:11:58 +03:00
Evgeniy Khramtsov
52b8226671
Use 'list-multi' type for XEP-0157 xdata fields
...
Thanks to Jonas Wielicki for spotting this
2018-05-29 19:37:24 +03:00
Evgeniy Khramtsov
0381ce1e75
Better report errors of module startup
2018-05-28 09:19:49 +03:00
Evgeniy Khramtsov
fc77051b68
Don't call Mod:function() in xmpp_stream callbacks
...
If a callback function is not defined by the `Mod` then
a call to code_server process is performed. Under heavy load
this may cause code_server to get overloaded. We now avoid this.
2018-05-26 09:06:24 +03:00
Holger Weiss
bfe2545c01
mod_muc_sql: Fix export to SQL
...
The "host" column is supposed to hold the MUC host name.
2018-05-24 01:28:29 +02:00
Holger Weiss
c6a9c30f1c
mod_push_mnesia: Apply cosmetic changes
...
Improve the readability of the 'max_user_sessions' check.
2018-05-23 21:40:54 +02:00
Holger Weiss
508f3ef88d
mod_push_sql: Check 'max_user_sessions' limit
...
Remove the oldest push session(s) of a user if the number of enabled
sessions exceeds the 'max_user_sessions' limit.
2018-05-23 20:02:52 +02:00
Paweł Chmielowski
97f7d99007
Handle "Expect: 100-continue" request header in ejabberd_http
2018-05-23 14:52:47 +02:00
Rogério da Silva Yokomizo
4a4cc32650
Export ext_mod:add_sources/1
2018-05-22 16:16:13 +02:00
Evgeniy Khramtsov
d2114be6f3
Correctly calculate remaining bytes on file upload
2018-05-19 18:29:33 +03:00
Christophe Romain
db51d522e8
Add support for REST API custom headers
...
ext_api_headers can be defined as a single string. Headers are separated
by comma. Definition MUST NOT contain spaces. Example
"X-MyHead:test,X-Token:082748"
2018-05-17 14:47:21 +02:00
Evgeniy Khramtsov
b64e1d95d2
Fix typo file:read() -> file:open()
2018-05-17 12:00:06 +03:00
Paweł Chmielowski
c41bab9ca0
Clean state between requests in ejabberd_http
2018-05-15 14:25:19 +02:00
Evgeniy Khramtsov
063737e4f5
Optimize HTTP requests memory usage
...
Due to historical reasons, ejabberd loads the whole file/data
into the memory when serving an HTTP request. This is now improved:
1) For GET requests ejabberd uses sendfile(2) if the underlying
connection is HTTP and falls back to read/write loop with 64kb
buffer for HTTPS connections. This type of requests are handled
by mod_http_fileserver, mod_http_upload, ejabberd_captcha, etc
2) POST requests are now limited to 20Mb and are fully downloaded
into the memory for further processing (by ejabberd_web_admin,
mod_bosh, etc)
3) PUT requests (e.g. for mod_http_upload) are handled by read/write
loop with 64kb buffer
2018-05-14 19:39:58 +03:00
Badlop
cb3bb710bd
Handle muc_register_nick success correctly ( #2415 )
2018-05-14 12:24:56 +02:00
Evgeniy Khramtsov
c30715e67b
Disable thumbnails creation by default
2018-05-11 18:56:31 +03:00
Evgeniy Khramtsov
27594db029
Support IPv6 connections for PostgreSQL, MySQL and LDAP
...
Fixes #2411
2018-05-11 16:43:49 +03:00
Paweł Chmielowski
6ac8f6eaee
Relax check for valid command name in access_persmissions
2018-05-11 12:24:00 +02:00
Evgeniy Khramtsov
35a076c251
Stop ejabberd initialization on invalid/unknown options
...
Since now, ejabberd doesn't ignore unknown options and doesn't
allow to have options with malformed values. The rationale for
this is to avoid unexpected behaviour during runtime, i.e. to
conform to "fail early" approach. Note that it's safe to reload
a configuration with potentialy invalid and/or unknown options:
this will not halt ejabberd, but will only prevent the configuration
from loading.
***NOTE FOR PACKAGE BUILDERS***
This new behaviour should be documented in the upgrade notes.
2018-05-09 11:44:24 +03:00
Evgeniy Khramtsov
680384c342
Reduce IQ handler code copying
2018-05-09 10:30:00 +03:00
Evgeniy Khramtsov
11ff2a1ccf
Fix a typo
2018-05-09 09:44:26 +03:00
Badlop
de85c1718e
Bypass account creation error when password is empty, caused by extauth
2018-05-08 18:19:07 +02:00
Evgeniy Khramtsov
8766854870
Get rid of ?FUNCTION_NAME macro (it's OTP19+ feature)
2018-05-08 12:06:58 +03:00
Evgeniy Khramtsov
61ae0ff02c
Improve logging of external authentication failures
2018-05-08 09:36:34 +03:00
Evgeniy Khramtsov
5522403e8e
Don't stop on out-of-date requests
2018-05-07 22:43:01 +03:00
Evgeniy Khramtsov
b23d5754e8
Improve robustness of external authentication backends
...
Now all external ports are attached to supervising processes
and requests are balanced in round-robin manner until the pool
is exhausted.
The commit also deprecates `extauth_instances` option and introduces
`extauth_pool_size` option instead, with the default value of a number
of logical processors (i.e. CPU cores).
Fixes #2403
2018-05-07 19:27:18 +03:00
Paweł Chmielowski
b1a03cc346
Make trusted_proxied ejabberd_http option accept ip masks
2018-05-04 09:53:07 +02:00
Paweł Chmielowski
ca94cbfd31
Teach acl ip matching about ipv4 mapped ipv6 addresses
2018-05-04 09:52:06 +02:00
Holger Weiss
410db89167
ejabberd_auth: Don't use cache if it's disabled
...
Don't let the check whether a user exists use the cache if caching was
disabled in the configuration.
2018-05-03 00:31:33 +02:00
Holger Weiss
638f2d2e67
mod_blocking: Use #block_item{} record
2018-05-02 22:17:32 +02:00
Evgeniy Khramtsov
4ea481d1dd
Add validator for 'accept_interval' listening option
2018-04-30 11:52:00 +03:00
Holger Weiss
538e0d4844
misc: Catch all Base64 decoding errors
2018-04-24 18:29:10 +02:00
Holger Weiss
f3795e9d03
mod_http_upload: Add MIME type for M4A files
2018-04-24 18:16:16 +02:00
Christophe Romain
3df919244c
PubSub purge_node must use a transaction ( #2231 )
2018-04-24 15:58:56 +02:00
Evgeniy Khramtsov
6774418a7f
Introduce new mod_muc option: access_register
...
The option is an ACL rule defining who is able to register
nicknames within the conference service. The default is `all`
(for backward compatibility).
2018-04-24 12:29:59 +03:00
Evgeniy Khramtsov
ad6fcc7865
Get rid of useless memory/disk usage warnings
2018-04-24 12:12:48 +03:00
Evgeniy Khramtsov
ca28faa51a
Fix get_affiliation/2
2018-04-24 12:07:10 +03:00
Paweł Chmielowski
5b730cdbf2
Use httpc directly instead of using p1_http wrapper
2018-04-23 17:40:44 +02:00
Paweł Chmielowski
9ed0357760
Use correct headers in rest calls
2018-04-23 12:29:56 +02:00
Evgeniy Khramtsov
06ce884aa8
Add stubs for affiliation-specific backend callbacks
2018-04-23 11:35:43 +03:00
Paweł Chmielowski
3fc0eb4f5b
Use correct db backend for remove_mam_for_user_with_peer
2018-04-20 14:06:23 +02:00
Paweł Chmielowski
3bfa683586
Fix mnesia call in mam archive management function
2018-04-20 13:36:54 +02:00
Paweł Chmielowski
5be49cc0fa
Add commands for cleaning up mam archive
2018-04-20 13:27:46 +02:00
Christophe Romain
42c029d5f7
Fix type of rest:url/2
2018-04-19 13:21:33 +02:00
Christophe Romain
a567abcfdf
Fix deprecated call injected by 265c7b62
2018-04-18 14:16:56 +02:00
Christophe Romain
265c7b62c7
Add flexibility on rest url config
2018-04-18 13:16:08 +02:00
Holger Weiss
332567693c
mod_push_keepalive: Reset timeout on messages only
...
Some mobile apps might only be notified on actual chat messages with
a body, so don't let mod_push_keepalive reset the stream management
timeout on other types of traffic.
2018-04-17 00:27:07 +02:00
Holger Weiss
de7dc4affa
mod_push: Optionally include message sender/body
...
Add 'include_sender' and 'include_body' options. If one or both of them
are set to 'true', a urn:xmpp:push:summary form with the enabled
field(s) is included in push notifications that are generated for
messages with a body.
The 'include_body' option can instead be set to a static text. In this
case, the specified text will be included in place of the actual message
body. This can be useful to signal the push service whether the
notification was triggered by a message with body (as opposed to other
types of traffic) without leaking actual message contents.
2018-04-16 23:18:03 +02:00
Holger Weiss
48c5ab59f1
mod_http_upload*: Remove empty lines after specs
...
Remove blank lines following function specifications in mod_http_upload
and mod_http_upload_quota for consistency with other modules.
2018-04-16 18:22:54 +02:00
Holger Weiss
b2855d63a7
mod_http_upload*: Add function specifications
2018-04-16 18:17:28 +02:00
Holger Weiss
0282cf64a0
mod_push: Add function specification
2018-04-16 18:14:07 +02:00
Holger Weiss
e5cb9dad40
mod_push: Add/adjust debug messages
2018-04-16 18:12:46 +02:00
Evgeniy Khramtsov
acc162f4f4
Carefully validate options list
2018-04-16 15:48:06 +03:00
Evgeniy Khramtsov
b8505f3e78
Don't crash on invalid module's sub-options
...
Fixes #2387
2018-04-16 11:06:57 +03:00
Holger Weiss
8a71e2e4f7
mod_push: Don't notify on stream errors
...
If a pending stream management session is closed with a stream error,
this is usually due to the client opening a new stream that conflicts
with the old one. Don't generate a push notification in this situation.
2018-04-16 01:08:56 +02:00
Evgeniy Khramtsov
a5284229cb
Merge branch 'muc-self-presence'
2018-04-14 18:32:12 +03:00
Evgeniy Khramtsov
d0f36537fb
Clear fast_tls cache on configuration reload
2018-04-13 11:10:20 +03:00
Holger Weiss
3cf4fbc7b0
mod_roster: Use 'lserver' for configuration lookup
2018-04-13 00:12:07 +02:00
Paweł Chmielowski
fe4b1a492c
Fix notification payload generated by pubsub
2018-04-12 18:02:32 +02:00
Paweł Chmielowski
c3b4b4ce4f
Pass access option from websocket to c2s
...
This fixes issue #2223
2018-04-12 17:42:59 +02:00
Christophe Romain
d28064518b
Improve pubsub#itemreply implementation ( #2325 )
2018-04-12 15:38:12 +02:00
Christophe Romain
99444f2d0e
Fix illegal match on previous commit
2018-04-10 15:02:03 +02:00
Christophe Romain
4c0f87b2ff
Improve fix for #2288 , don't mask errors on get_item
2018-04-10 14:47:18 +02:00
Holger Weiss
54363f8476
gen_mod: Support global module processes
2018-04-04 18:25:19 +02:00
Holger Weiss
094f586811
gen_mod: Remove frontend process support
...
ejabberd doesn't support frontend processes anymore.
2018-04-04 18:22:59 +02:00
Paweł Chmielowski
45a3c7e0ce
Improve mod_multicast
2018-04-04 12:06:35 +02:00
Holger Weiss
e2652ce02f
mod_http_upload: Accept characters of any script
...
Accept all alphanumeric characters of any script in user and file names
rather than replacing non-ASCII characters with underscores. However,
non-alphanumeric characters are still replaced, except for "." and "-".
Closes #2346 .
2018-04-03 21:00:15 +02:00
Holger Weiss
df651d893e
Remove old hex conversion functions
...
Depend on list_to_integer/2 and integer_to_list/2 being available.
2018-04-03 00:21:33 +02:00
Holger Weiss
a2e1f5c882
Move ejabberd_http:url_encode/1 to 'misc' module
2018-04-03 00:12:43 +02:00
Badlop
7f5796fe31
Fix Code format when logging a MUC room kick/ban
2018-04-02 13:51:19 +02:00
Holger Weiss
5f1191b9f5
mod_client_state: Add 'csi_activity' hook
...
Closes #2358 .
2018-04-01 17:13:04 +02:00
Pouriya Jahanbakhsh
e17a16a300
fix: run 'component_send_packet' hook in global mode
2018-03-30 23:19:33 +04:30
Pouriya Jahanbakhsh
7b3d26992b
feat: add hook for sending packet from component
...
New hook 'component_send_packet' added.
Callback function must accept one argument {Pkt, ComponentState} and should yield 'drop' or {NewPkt, NewComponentState}.
2018-03-30 21:31:30 +04:30
Evgeniy Khramtsov
9373ad20ca
Don't produce a crash dump during intentional exit
...
Also halt faster without relying on timeouts for buffers flushing
2018-03-29 12:14:31 +03:00
Evgeniy Khramtsov
b283cfa6f2
Remove unused variable
2018-03-29 10:34:09 +03:00
Paweł Chmielowski
dfbdffad44
Fix process_discoitems_result in mod_multicast
2018-03-28 11:23:28 +02:00
Evgeniy Khramtsov
ea9c3fd8f7
Fix returning value from mod_vcard_ldap's search() callback
...
Fixes #2335
2018-03-25 10:53:46 +03:00
Evgeniy Khramtsov
f39dbe6e49
Get rid of 'fs' package dependency
...
Certificates auto-reloading will be fixed later.
For now to reload certificates call `reload-config` ejabberd command.
2018-03-23 16:40:26 +03:00
Evgeniy Khramtsov
50de427570
Set empty least as a default for force_node_config
2018-03-23 16:09:18 +03:00
Evgeniy Khramtsov
55604b2d97
Move force_node_config defaults into ejabberd.yml.example
2018-03-23 16:08:12 +03:00
Evgeniy Khramtsov
f5bab5d6c4
Fetch 'registration_watchers' option from the correct module
...
Fixes #2337
2018-03-23 09:42:55 +03:00
Christophe Romain
0bda169a5a
Remove items of unregistered user ( #2129 )
2018-03-22 11:59:24 +01:00
Paweł Chmielowski
96c183c04b
Accept atoms in api_permission command lists and commands with numbers in them
2018-03-21 12:53:46 +01:00
Badlop
b4b3ff50d6
If mod_last is disabled, return error instead of crashing ( #2330 )
2018-03-20 22:18:43 +01:00
Evgeniy Khramtsov
8962397cf3
Report meaningful error when luerl is not available
2018-03-19 20:09:35 +03:00
Evgeniy Khramtsov
b1ecd8ac01
Set -protocol() directive for mod_avatar
2018-03-19 19:23:15 +03:00
Evgeniy Khramtsov
4f1d7c4b66
Avoid logging IP addresses in mod_register when it's not desired
...
Fixes #2326
2018-03-19 18:23:52 +03:00
Evgeniy Khramtsov
bb20e5f3fa
Apply some dirty hacks for mod_shared_roster
...
Probably this fixes #1846
2018-03-19 12:32:43 +03:00
Evgeniy Khramtsov
e1e7986918
Hardcode ACL rules used by ejabberd_web_admin
2018-03-19 12:29:07 +03:00
Christophe Romain
7ba6fae67c
Improve result of XEP-0060 §6.5.9.12 ( #2288 )
...
Moving get_item result control to keep item-not-found on transaction
error when node does not exists
2018-03-17 10:59:34 +01:00
Christophe Romain
7beb19b01e
Fix result of XEP-0060 §6.5.9.12 ( #2288 )
2018-03-16 17:48:42 +01:00
Christophe Romain
a84dd0f627
Add transient notification condition ( #2267 )
2018-03-16 17:26:51 +01:00
Christophe Romain
d8f9219b4f
Refactor publish_item conditions ( #2267 )
2018-03-16 17:17:53 +01:00
Evgeniy Khramtsov
ddc29d42de
Fulfill all requirements of XEP-0398 v0.2.0
...
These include:
- Avoid rewriting vcard❌ update tags with empty <photo/> element
- Advertise "urn:xmpp:pep-vcard-conversion:0" feature
2018-03-16 12:10:57 +03:00
Alexey Shchepin
e15595df64
Add 'new_sql_schema' config option, --enable-new-sql-schema now sets its default value to true ( #2239 )
2018-03-15 17:55:05 +03:00
Evgeniy Khramtsov
99b41146b1
Get rid of catch-all in mod_pubsub
2018-03-13 22:10:58 +03:00
Evgeniy Khramtsov
6b079c0ab3
Preserve modules order
...
When modules for some virtual host are about to be started,
they are topologically sorted to preserve dependencies order.
We now keep this order for stop/reload functions to work properly.
2018-03-13 18:18:53 +03:00
badlop
c5aea779b4
Merge pull request #2314 from oxpa/mod_admin_extra_hashes
...
allow using hashes from "crypto" applications in mod_admin_extra
2018-03-12 15:20:53 +01:00
Badlop
be33c93344
Return errors in admin#add-user command response stanza ( #2321 )
2018-03-12 13:33:44 +01:00
Evgeniy Khramtsov
2785f1dfd2
Introduce force_node_config for mod_pubsub
...
The option can be used to override configuration options of a
particular PubSub node. Example:
mod_pubsub:
...
force_node_config:
"eu.siacs.conversations.axolotl.*":
access_model: whitelist
"*":
persist_items: true
Fixes #2276
2018-03-11 16:54:35 +03:00
Evgeniy Khramtsov
c3eeb8624b
Strip duplicates from module's options
2018-03-07 17:46:16 +03:00
Holger Weiss
bc808ffcde
mod_stream_mgmt: Clean up on timed out resumption
...
During resumption, make sure the old process and the corresponding
session entry are disposed also in the case where the call that queries
the old process times out.
2018-03-06 21:03:31 +01:00
Evgeniy Khramtsov
d9bf5a6865
Don't forget to remove mgmt_force_enqueue flag
2018-03-06 16:18:03 +03:00
Holger Weiss
67fe5d38a7
mod_push_keepalive: Preserve timeout on resumption
...
Don't forget to carry over the original XEP-0198 resumption timeout
value while resuming.
2018-03-05 01:10:12 +01:00
Evgeniy Khramtsov
63dba3fd64
Merge branch 'master' into muc-self-presence
2018-03-03 21:09:27 +03:00
Evgeniy Khramtsov
da1a5036fe
Revert "Support for default values in default_room_opts"
...
This reverts commit 5054a9933f
.
The commit is plain wrong: similar options are not required to
be in pair.
2018-03-03 21:08:05 +03:00
Evgeniy Khramtsov
0d3637d18f
Simplify ejabberd_sup code
2018-03-03 18:05:12 +03:00
oxpa
f2a3118ecc
allow using hashes from "crypto" applications in mod_admin_extra
2018-03-02 04:10:30 -09:00
Badlop
dbf1cabdcd
Fix: mod_offline:store_offline_msg/1 expects a message, not list ( #2312 )
2018-03-02 11:44:10 +01:00
Badlop
ad0fd1eac1
Simplify result of get_room_affiliation command ( #2301 )
2018-03-01 19:45:16 +01:00
badlop
3003307e60
Merge pull request #2301 from tsaqova/ejabberd_commands_get_room_affiliation
...
add ejabberd_command to get affiliation of a user in MUC room
2018-03-01 19:37:55 +01:00
Evgeniy Khramtsov
76f827ac83
Increase log level for DIGEST-MD5 FQDN
...
SASL DIGEST-MD5 anyway deprecated anyway, so not point in
logging this. This is now logged in `debug` mode.
2018-02-28 21:43:43 +03:00
Stu Tomlinson
da81590fef
Validate additional listen opts
...
The options "inet", "inet6" and "backlog" are valid listen options, but are
currently logged as errors (even though they do work):
2018-02-28 16:08:44.141 [error] <0.338.0>@ejabberd_listener:validate_module_option:630 unknown listen option 'backlog' for 'ejabberd_c2s' will be likely ignored, available options are: access, shaper, certfile, ciphers, dhfile, cafile, client_cafile, protocol_options, tls, tls_compression, starttls, starttls_required, tls_verify, zlib, max_fsm_queue
This adds the necessary validators so they are correctly recognized.
2018-02-28 16:14:35 +00:00
Yusro Tsaqova
8a41cfc0f5
add ejabberd_command to get affiliation of a user in MUC room
2018-02-28 20:22:27 +07:00
Badlop
5054a9933f
Support for default values in default_room_opts
2018-02-26 17:22:37 +01:00
Paweł Chmielowski
b2095ebcfe
Simplify code for splitting auth string in cyrsasl
...
This may fix problem from issue #2296
2018-02-26 09:36:56 +01:00
Holger Weiss
c2235860ab
xmpp_stream_in: Run auth result callbacks earlier
...
Call Mod:handle_auth_success/4 and Mod:handle_auth_failure/4 before
sending the SASL response rather than afterwards. This way, callbacks
can send a custom response and disconnect.
2018-02-26 00:06:35 +01:00
Holger Weiss
22e43ebd8a
mod_stream_mgmt: Cope with exit during resumption
...
Don't crash if the old process exits while it is queried for the session
state.
2018-02-24 21:50:54 +01:00
Marc Schink
c1e5ae5308
Move make_rand_string() to 'randoms' module
2018-02-23 18:32:34 +01:00
Holger Weiss
ea87bdfbe5
mod_carboncopy: Apply cosmetic change
...
The xmpp:has_subtag/2 function returns a boolen() value, so it can be
used with the 'not' operator.
2018-02-22 00:46:47 +01:00
Holger Weiss
7a1ed065fe
mod_carboncopy: Copy outgoing MUC PMs
...
Incoming MUC PMs aren't carbon-copied, as the MUC service usually forks
them. However, don't suppress copying of outgoing PMs, where no such
forking takes place.
2018-02-22 00:40:09 +01:00
Evgeniy Khramtsov
ec0f0f7c72
Move some log messages to debug level
2018-02-21 17:12:50 +03:00
Evgeniy Khramtsov
0acc69e303
Use nicks in disco#items or disco#info report
2018-02-21 10:25:15 +03:00
Evgeniy Khramtsov
4bf4193d55
Add 'negotiation_timeout' to the known options list
2018-02-20 19:47:50 +03:00
Evgeniy Khramtsov
d625e24029
Introduce 'negotiation_timeout'
...
The option can be used to specify a period (in seconds) for a stream
negotiation to complete. If the timer fires, the stream is considered
as failed and the underlying connection gets closed. This is a global
option (you cannot set it per domain) and the default is 30 seconds.
2018-02-20 11:38:00 +03:00
Holger Weiss
a875195940
mod_admin_extra: Fix srg_get_info with '@all@'
...
Don't let the srg_get_info command crash if the roster group has '@all@'
or the '@online@' users as members.
2018-02-20 00:44:47 +01:00
Evgeniy Khramtsov
06c480106f
Don't emit validator's warning if the module is not found
2018-02-19 22:07:09 +03:00
Evgeniy Khramtsov
e070e6bccb
Replace ?MYLANG with connection's language wherever possible
2018-02-19 21:47:20 +03:00
Evgeniy Khramtsov
de49e7631f
Push blocking related IQs from bare JID
...
Fixes #2287
2018-02-18 18:00:20 +03:00
Evgeniy Khramtsov
25abf8b634
Don't inject node name inside "id" attribute
...
Fixes #2284
2018-02-18 11:54:40 +03:00
Evgeniy Khramtsov
ff06bdf144
Don't ask other nodes to invalidate cache when the key is not updated
2018-02-18 09:02:23 +03:00
Evgeniy Khramtsov
d5afc767e6
Fix 'badmatch' crash
...
The crash was introduced in 4b012a99d2
2018-02-17 20:06:50 +03:00
Evgeniy Khramtsov
5704a980c5
Introduce 'access' option for mod_block_stranger
...
The option is supposed to be used when `allow_local_users`
and `allow_transports` are not enough. It's an ACL where `deny`
means the message will be rejected (or a CAPTCHA would be
generated for a presence), and `allow` means the sender is
whitelisted and the stanza will pass through.
The default value is `none`, which means nothing is whitelisted.
2018-02-17 18:53:35 +03:00
Evgeniy Khramtsov
cffdb06b66
Cache 'isuser' queries to external auth program
2018-02-16 20:50:22 +03:00
Christophe Romain
7e1df0752a
Export helper function
2018-02-16 09:53:38 +01:00
Christophe Romain
f0ccdebf7f
Export helper functions
2018-02-16 09:52:29 +01:00
Evgeniy Khramtsov
32e5a3255d
Export aux functions from mod_muc_room
2018-02-16 08:28:33 +03:00
Evgeniy Khramtsov
c102a45fac
Rename some keys and functions for clarity
2018-02-15 15:50:20 +03:00
Evgeniy Khramtsov
52ded14b7f
Update incoming stanzas counter on invalid XML
2018-02-15 15:42:55 +03:00
Evgeniy Khramtsov
e5ba7c3f3c
Better solution for a previous fix
2018-02-15 10:48:59 +03:00
Evgeniy Khramtsov
51aa9d98a7
Don't forget to add invalid XML responses to sending queue
2018-02-15 10:18:06 +03:00
Evgeniy Khramtsov
a65500b6aa
Fix external components unregistration
2018-02-14 13:09:27 +03:00
Evgeniy Khramtsov
032f796292
Introduce option 'global_routes' for ejabberd_service
...
The option emulates legacy behaviour which registers all routes
defined in `hosts` on a component connected. This behaviour
is considered harmful in the case when it's desired to multiplex
different components on the same port, so, to disable it,
set `global_routes` to `false`. The default value is `true`,
e.g. legacy behaviour is emulated: the only reason for this is
to maintain backward compatibility with existing deployments.
2018-02-14 11:53:52 +03:00
Evgeniy Khramtsov
516f4d03a1
Fix indentation
2018-02-14 11:42:43 +03:00
Paweł Chmielowski
60a8623929
Change formatting of commands markdown documentation
2018-02-13 16:27:39 +01:00
Christophe Romain
9dbdeba6c1
Add case on create_room, avoid useless call
2018-02-13 11:08:13 +01:00
Evgeniy Khramtsov
4632f5520f
Really run use_cache/1 and cache_nodes/1 callbacks for mod_mam
2018-02-13 11:38:41 +03:00
Evgeniy Khramtsov
ffe02c46e4
Let a MUC room to route presences from its bare JID
...
The goal for this is to provide entity capabilities (XEP-0115) and
vCard-based avatar hash (XEP-0153)
2018-02-12 17:37:36 +03:00
Tobias Koch
9188a7b838
Dialyzer checks always failed because the return value of the function 'get_subscribed_rooms' in 'mod_muc_sql' is different to the defined value in 'mod_muc'. Fix was to update the return value in 'mod_muc.erl'.
2018-02-12 15:12:46 +01:00
Evgeniy Khramtsov
66fc1bf3b6
Remove 'iqdisc' option
...
Since we got rid of all bottle-neck processes and we have
a connection pool for every database, the option is no longer
needed and in fact is detrimental: in practice what you get
is just a bunch of overloaded processes in the IQ handlers pool
no matter how much you increase the `iqdisc` value.
Given that there are close to zero operators understanding
the meaning of the option and, hence, not using it all,
it's not simply deprecated but completely removed.
The commit also deprecates the following functions:
- gen_iq_handler:add_iq_handler/6
- gen_iq_handler:handle/5
- gen_iq_handler:iqdisc/1
2018-02-11 12:54:15 +03:00
Evgeniy Khramtsov
97f913b8d9
Merge branch 'master' of github.com:processone/ejabberd
2018-02-10 11:36:48 +03:00
Evgeniy Khramtsov
6c1a1bd000
Rely on use_cache/1 callback in mod_caps
2018-02-10 11:36:39 +03:00
Holger Weiss
9fb2253aa9
mod_stream_mgmt: Abort connection on count error
...
If the client acknowledged more stanzas than the server sent, close the
connection with a stream error rather than hiding client bugs by silently
adjusting the server's count.
2018-02-10 00:06:19 +01:00
Evgeniy Khramtsov
672c2f75d3
Introduce option 'validate_stream'
...
If set to `true`, all incoming XML packets are fully validated
against known schemas. If an error occurs, the packet will be bounced
with the corresponding error reason. The default value is `false`.
The option might be useful to protect client software from sofisticated
bugs related to XML validation as well as for client developers
who want to catch validation errors at early stage of development.
Note that the option might have slight performance impact, so use it
with care on loaded machines.
2018-02-09 18:12:50 +03:00
Evgeniy Khramtsov
5c85106a41
Fix type spec
2018-02-07 22:20:12 +03:00
Badlop
c2911222e4
Commands markdown also lack arguments when policy=user
2018-02-07 16:39:18 +01:00
Evgeniy Khramtsov
232b66b0f4
Introduce 'rate_limit' option of mod_avatar
...
The option controls how many avatars a user can upload per minute.
The option takes positive integer values. The default is 10.
Note that the option only takes effect when an avatar is about
to convert to a different format, i.e. it implies that `convert`
option is configured.
2018-02-05 23:12:36 +03:00
Evgeniy Khramtsov
c65dcfeda7
Export is_online/1 function
2018-02-05 15:13:13 +03:00
Evgeniy Khramtsov
c990abf222
Improve log message when module startup has failed
2018-02-02 13:16:14 +03:00
Paweł Chmielowski
f6ebbe4c78
Fix compilation ordering in mix by s/-behavior/-behaviour/
2018-01-31 14:57:43 +01:00
Paweł Chmielowski
fc3c605945
Use correct default when getting list of modules from config
2018-01-30 19:44:27 +01:00
Paweł Chmielowski
3b646cc2ec
Run tests only on backends enabled by configure
2018-01-30 15:30:37 +01:00
Paweł Chmielowski
bb58307190
Match all possible values in mod_privilege checks, or we get crashes
2018-01-30 13:10:22 +01:00
Paweł Chmielowski
53870c854e
Fix exception in mod_privilege:process_presence_in
...
This should fix problem reported in issue #2248
2018-01-30 12:52:38 +01:00
Paweł Chmielowski
ddf6076328
Fix elixir tests
2018-01-29 18:28:02 +01:00
Paweł Chmielowski
d2974cf48a
Fix processing of ldap_memberattr_format_re option
...
This makes sure that "" value is handled as before options processing
overhaul.
This fixed ldap shared roster testcase
2018-01-29 17:25:31 +01:00
Paweł Chmielowski
dc601610b6
Don't return undefined from ejabberd_config:get_myhosts()
2018-01-29 11:05:59 +01:00
Paweł Chmielowski
c47366ba97
Restore original return value to ejabberd_config:add_option
2018-01-29 09:46:11 +01:00
Holger Weiss
f31782a252
mod_caps: Only store CAPS if contact is subscribed
...
If a user is subscribed to a contact but not vice versa, don't store the
contact's CAPS. This makes sure no PEP items are leaked to the contact.
2018-01-29 01:07:38 +01:00
Holger Weiss
d0af61f488
mod_caps: Fix indentation
2018-01-29 00:02:15 +01:00
Evgeniy Khramtsov
795efb2ee1
Improve logging of idle s2s connections
2018-01-28 11:10:22 +03:00
Evgeniy Khramtsov
6e5439db5c
Find and fix typos using 'codespell'
2018-01-27 19:35:38 +03:00
Evgeniy Khramtsov
5d582080be
Fix a typo in call to create_captcha()
...
Thanks to Paul Schaub for spotting this
2018-01-26 22:56:49 +03:00
Evgeniy Khramtsov
4b012a99d2
Introduce option 'captcha' for mod_block_strangers
...
When the option is set to `true`, the module will generate
CAPTCHA challenges for incoming subscription requests. The option
also implies that option `drop` is set to `true`. Note that
the module won't generate CAPTCHA challenges for messages: they
will still be rejected if `drop` is set to `true`.
Fixes #2246
2018-01-26 15:02:06 +03:00
Evgeniy Khramtsov
2269d290d8
Switch to newer fast_xml and xmpp and update record fields in the code
2018-01-25 20:02:47 +03:00
Paweł Chmielowski
56d4224e08
Handle ignore from xmpp_socket callback start
...
This should help with issue #2244
2018-01-24 17:32:24 +01:00
Holger Weiss
666da60cba
Reduce log level for unexpected XML input
...
Log a warning rather than an error when, for example, a client sends a
stanza before opening the stream.
2018-01-24 12:04:52 +01:00
Holger Weiss
e8f1de8785
mod_block_strangers: Bounce groupchat to bare JID
...
If a blocked message is of type 'groupchat', address the error message
to the bare JID (rather than sending it as MUC PM).
2018-01-24 11:49:31 +01:00
Evgeniy Khramtsov
1f6c0022dd
Fix a typo in mod_caps
2018-01-23 23:20:10 +03:00
Evgeniy Khramtsov
a917f4d451
Merge branch 'mod-default-options'
2018-01-23 11:00:00 +03:00
Evgeniy Khramtsov
ba2b650464
Introduce new gen_mod callback: mod_options/1
...
The callback is supposed to provide known options and their default
values, as long as the documentation. Passing default values into
get_mod functions is now deprecated: all defaults should be provided
by the Mod:mod_options/1 callback.
2018-01-23 10:54:52 +03:00
Holger Weiss
818ff5a263
Update 'pubsub_node' column name for DB export
...
The 'type' column has been renamed in commit
44700d91ba
.
2018-01-19 13:10:14 +01:00
Evgeniy Khramtsov
c0ef054f6f
Do not try to start ezlib application too frequently
...
This may overload Erlang applicaton controller
2018-01-16 18:06:31 +03:00
Evgeniy Khramtsov
d35a8805b0
Return debug message back
2018-01-16 17:57:21 +03:00
Evgeniy Khramtsov
7b0fa7e6e2
Improve validation of 'convert' option
2018-01-16 01:06:20 +03:00
Evgeniy Khramtsov
d3aab2ea18
Get rid of a call to misc:have_eimp()
2018-01-15 13:14:51 +03:00
Evgeniy Khramtsov
b970c88941
Merge branch 'master' of github.com:processone/ejabberd
2018-01-15 13:00:19 +03:00
Evgeniy Khramtsov
0f86559d83
Always build eimp dependency
...
Even if no suitable C graphics libraries are detected
at compile time, the package is still usable because it
provides `eimp:get_type/1` which is used by mod_avatar.
2018-01-15 12:54:57 +03:00
Paweł Chmielowski
3df78d3a8f
Copy sh_to_ask function from xmerl_regexp.erl
...
This way we don't need to include xmerl application in our docker container
2018-01-15 10:31:26 +01:00
Evgeniy Khramtsov
f66a004821
Improve logging of failed s2s EXTERNAL authentication
2018-01-13 13:01:40 +03:00
Paweł Chmielowski
df8888ab38
Send privileges if at least one of them is set, don't require all to be set
2018-01-09 15:50:42 +01:00
Evgeniy Khramtsov
9d94361466
Process 'name' option for all route-registering modules
...
The option allows to set arbitrary text for disco#info identity name.
Previously, option 'name' was supported by mod_proxy65 and mod_http_upload
only. Now, all the following modules support this option as well:
- mod_disco
- mod_irc
- mod_muc
- mod_multicast
- mod_pubsub
- mod_vcard
Example:
```
modules:
...
mod_disco:
name: "Cool XMPP Server"
...
```
2018-01-08 11:29:17 +03:00
Evgeniy Khramtsov
cdc7c1d1ed
Update copyright dates
2018-01-05 23:18:58 +03:00
Evgeniy Khramtsov
fb07c9929a
Return true
or false
from send() callback
...
Fixes #2209
2018-01-05 12:15:28 +03:00
Evgeny Khramtsov
946754536c
Merge pull request #2202 from weiss/bounce-to-stranger
...
mod_block_strangers: Bounce an error message
2018-01-05 11:43:18 +03:00
Paweł Chmielowski
4c799528c7
Fix ejabberd command privacy_set
...
This fixes issue #2205
2018-01-04 14:57:36 +01:00
Marc Schink
264add87fa
mod_proxy65: Expand @HOST@ keyword in 'hostname' option
2018-01-03 22:31:06 +01:00
Holger Weiss
835360733b
mod_block_strangers: Bounce an error message
...
Return a stanza error when a message is rejected, in order to make
legitimate users aware of the issue.
Closes #2197 .
2018-01-03 15:41:30 +01:00
Evgeniy Khramtsov
240977a0da
Repair hosts check during certfiles validation
2017-12-28 21:36:57 +03:00
Evgeniy Khramtsov
529d6d8a93
Return default certificate on domain mismatch
2017-12-28 17:24:23 +03:00
Christophe Romain
439fe0b504
Fix check_opt_range when no boundary is configured
2017-12-28 13:51:26 +01:00
Christophe Romain
08e54dd621
Don't force rsm when max_items is not defined ( #2189 )
2017-12-28 11:48:54 +01:00
Christophe Romain
8918227fc3
Revert "Include os_mon application"
...
This reverts commit 56241feb58
.
That was a mistake, breaking application start
2017-12-28 10:32:21 +01:00
Paweł Chmielowski
5ba13df519
Revert "Start os_mon application"
...
This reverts commit 82b3bbf360
.
2017-12-27 17:21:17 +01:00
Evgeniy Khramtsov
dd4d45fd28
Fix a regression in xmpp_socket
2017-12-27 18:49:25 +03:00
Paweł Chmielowski
82b3bbf360
Start os_mon application
2017-12-27 16:23:04 +01:00
Paweł Chmielowski
e6d1ff85f1
Use bare jid when processing roster subscriptions
2017-12-27 16:14:47 +01:00
Christophe Romain
56241feb58
Include os_mon application
2017-12-27 12:28:13 +01:00
Holger Weiss
60b6a508e0
Forget old access/shaper rules and ACLs on reload
2017-12-26 19:37:11 +01:00
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
Holger Weiss
28661d20bd
mod_mam: Always strip stanza IDs
...
XEP-0359 v0.5.0 says: "Stanza ID generating entities, which encounter a
<stanza-id/> element where the 'by' attribute matches the 'by' attribute
they would otherwise set, MUST delete that element even if they are not
adding their own stanza ID."
2017-11-09 01:10:24 +01:00
Holger Weiss
9c174e30b2
mod_mam: Fix indentation
2017-11-09 01:00:15 +01:00
Holger Weiss
40d725e9c1
mod_mam: Ignore non-message stanzas earlier
...
Let mod_mam's hook callbacks ignore non-message stanzas using pattern
matching.
2017-11-09 00:48:19 +01:00
Holger Weiss
5cf4e200ba
mod_mam: Make sure a stanza ID is always added
...
Let mod_mam store incoming messages from a new hook in ejabberd_sm.
This makes sure all messages are tagged with a stanza ID, including
those that are forked to multiple resources in ejabberd_sm.
Closes #1344 .
2017-11-09 00:21:40 +01:00
Evgeniy Khramtsov
902c6d476b
Prepare version 0.6.1 of XEP-0313 (MAM) support
2017-11-08 15:15:39 +03:00
Evgeniy Khramtsov
fe9b191382
Erase transient certificates on exit
2017-11-07 09:04:20 +03:00
Badlop
cbbfe32d8b
Unregister commands when stopping node only if it's last one ( #2083 )
2017-11-06 16:53:49 +01:00
Holger Weiss
41c393466c
mod_push: Avoid notification duplicates
...
Don't let mod_mam and mod_offline both trigger push notifications for
the same message.
Closes #2078 .
2017-11-06 00:26:20 +01:00
Alexey Shchepin
44293235e5
Simulate vars usage in ejabberd_sql_pt to avoid unused var warnings
2017-11-03 17:43:21 +03:00
Paweł Chmielowski
90e1f3f29d
Use correct table field name in sql query
2017-11-03 12:17:34 +01:00
Evgeniy Khramtsov
c72e0a6ca6
Log warnings for c2s/s2s certfile option
2017-11-03 08:32:34 +03:00
Konstantinos Kallas
189d02cee0
Bug Fix
...
The dictionary returned after the directory call contains a meta key
whose value is a JSON dictionary. This is now taken care so that only
bitstring values are kept as resource URIs
2017-11-02 19:05:12 +02:00
Alexey Shchepin
79a9a0ed29
Disable server_host warnings
2017-11-02 19:48:35 +03:00
Alexey Shchepin
78dfb832b8
Add SQL_INSERT macro and update SQL queries to use server_host field
2017-11-02 18:21:40 +03:00
Paweł Chmielowski
354a710e70
Fix pkix:validate() return value
2017-11-02 11:28:23 +01:00
Evgeniy Khramtsov
a22aad0a4b
Remove -include() directive for unused header
2017-11-01 10:59:28 +03:00
Evgeniy Khramtsov
ae07fd7f10
Clarify some error/warning messages
2017-11-01 10:14:34 +03:00
Evgeniy Khramtsov
86809dff06
Avoid using "bag" ETS type for certificate storage
2017-11-01 08:47:07 +03:00
Evgeniy Khramtsov
35dc164233
Start even if there are problems with fs application
2017-11-01 08:34:14 +03:00
Evgeniy Khramtsov
170be1fbd5
Lower log level
2017-11-01 00:55:05 +03:00
Evgeniy Khramtsov
35b7203e01
Introduce 'certfiles' global option
...
The option is supposed to replace existing options 'c2s_certfile',
's2s_certfile' and 'domain_certfile'. The option accepts a list
of file paths (optionally with wildcards "*") containing either
PEM certificates or PEM private keys. At startup, ejabberd sorts
the certificates, finds matching private keys and rebuilds full
certificates chains which can be used by fast_tls. Example:
certfiles:
- "/etc/letsencrypt/live/example.org/*.pem"
- "/etc/letsencrypt/live/example.com/*.pem"
2017-11-01 00:20:27 +03:00
Paweł Chmielowski
efc4996625
Fix sql query
2017-10-31 17:59:55 +01:00
Paweł Chmielowski
88558453fb
Typo
2017-10-31 17:11:17 +01:00
Paweł Chmielowski
ee2b5be7f4
Use store_room where possible
2017-10-31 16:12:35 +01:00
Paweł Chmielowski
5f2e33bdd0
Don't use depraced functions
2017-10-31 14:21:34 +01:00
Christophe Romain
0452ffc1df
Optimize muc subscriptions handling
2017-10-31 14:00:41 +01:00
Christophe Romain
e24e05c6af
Enforce module_name/1
2017-10-31 12:06:40 +01:00
Christophe Romain
e697a3e262
Add missing type conversion from 675cc3e
2017-10-31 11:59:53 +01:00
Christophe Romain
8cb71255eb
Do not bind unused tail from 675cc3e
2017-10-31 11:25:01 +01:00
Christophe Romain
675cc3e0ea
Allow auth and pubsub plugin to use Elixir module
2017-10-31 11:04:32 +01:00
Paweł Chmielowski
5f0a84a331
Show real jid in mucsub subscription change events
2017-10-30 17:54:55 +01:00
Paweł Chmielowski
0633dd5802
Fix last commit
2017-10-30 13:27:37 +01:00
Paweł Chmielowski
2b363c7aee
Add mucsub event for subscribers list changes
2017-10-30 12:34:09 +01:00
Evgeny Khramtsov
2aeee9eab4
Merge pull request #2028 from weiss/increase-queue-sizes
...
Increase max_fsm_queue and max_ack_queue sizes
2017-10-29 12:18:23 +04:00
Christophe Romain
dbdda745af
Delete cached item on node removal ( #2071 )
2017-10-27 21:16:25 +02:00
Evgeniy Khramtsov
24df1262bb
Don't store xdata() in Mnesia table
2017-10-27 11:46:37 +03:00
Evgeniy Khramtsov
484e5de072
Simplify backend interface for mod_push
2017-10-27 10:55:48 +03:00
Evgeniy Khramtsov
568ab526e2
Improve ejd2sql logging
2017-10-27 08:59:49 +03:00
Evgeniy Khramtsov
a8238d6a54
Fix typo
2017-10-27 08:12:24 +03:00
Evgeniy Khramtsov
9eb2685f90
Make it possible to export push_session table to SQL
2017-10-26 21:05:09 +03:00
Evgeniy Khramtsov
db57394399
Add SQL support for mod_push
2017-10-26 20:11:43 +03:00
Evgeniy Khramtsov
2161063e5e
Don't forget to convert ljid() to jid()
2017-10-26 10:29:23 +03:00
Evgeniy Khramtsov
29462f0053
Make it possible to convert to SQL for any current db_type
...
It is now possible to run `export` command even when the current `db_type` is not `sql`
2017-10-25 21:21:52 +03:00
Christophe Romain
3162ec0d66
Allow dynamic node options on sql backends
2017-10-25 15:40:42 +02:00
Badlop
e4054aab79
Get next record before deleting previous on, in case it's last one ( #2069 )
2017-10-25 12:58:07 +02:00
Christophe Romain
8028a9545a
Cosmetic change, remove useless case
2017-10-25 11:48:56 +02:00
Christophe Romain
17e3ed513b
Fix delete item from unregistered user ( #2067 )
2017-10-25 11:16:54 +02:00
Evgeniy Khramtsov
65c85eab03
Fix another typo ;)
2017-10-25 11:47:02 +03:00
Evgeniy Khramtsov
5151136d17
Fix typo
2017-10-25 11:44:53 +03:00
Evgeniy Khramtsov
debbddb763
Mix _xmpp-server and _xmpps-server SRV records
...
XEP-0368 describes this procedure as following:
> Both 'xmpp-' and 'xmpps-' records SHOULD be treated as
> the same record with regard to connection order as specified
> by RFC 2782 [3], in that all priorities and weights are mixed.
> This enables the server operator to decide if they would
> rather clients connect with STARTTLS or direct TLS.
2017-10-25 11:39:20 +03:00
Christophe Romain
8b588d2ff3
Add basic PubSub meta-data support ( #1421 )
2017-10-25 10:34:11 +02:00
Evgeniy Khramtsov
90ee405d81
Mention XEP-0368 support
2017-10-25 10:01:05 +03:00
Christophe Romain
b0fa27395f
Add missing fix from 07a193d4d
, Fix purge_offline ( #2057 )
2017-10-24 15:35:01 +02:00
Evgeniy Khramtsov
1bb2bae62b
Reflect changes in the xmpp lib
2017-10-13 20:48:21 +03:00
Evgeniy Khramtsov
152e0d77c1
Send presence-unavailable when expulsing a participant
2017-10-13 09:17:22 +03:00
Evgeniy Khramtsov
e5e64c99f3
Don't crash when Host header is missing
2017-10-11 18:53:53 +03:00
Evgeniy Khramtsov
5a184b0433
Don't include CSS, javascript and image data directly in the code
2017-10-09 23:35:42 +03:00
Evgeniy Khramtsov
d22ee24e72
Better handle mobile devices in CSS of mod_register_web
...
Thanks to Marek Foss. Fixes #2039
2017-10-09 21:46:38 +03:00
Evgeniy Khramtsov
a6e5a5ca9a
Resend presences and history if presence possesses <x/> MUC element
...
Behave according to the new rule from XEP-0045, section 7.2.2:
> When a MUC service receives an <x/> tagged join stanza from an
> already-joined client (as identified by the client's full JID),
> the service should assume that the client lost its synchronization,
> and therefore it SHOULD send exactly the same stanzas to the client
> as if it actually just joined the MUC.
2017-10-09 17:59:22 +03:00
Evgeniy Khramtsov
6efdd0f350
Don't crash when 'from' is undefined
...
c2s_filter_send hook may pass a stanza with undefined from/to (due to
legacy auth for example). Work around this problem.
Fixes #2036
2017-10-06 21:48:54 +03:00
Badlop
4bd5846d40
More fix in mod_http_fileserver to log URLs with/out query elements ( #2021 )
2017-10-06 13:16:13 +02:00
Evgeniy Khramtsov
6f922275eb
Improve logging of mismatched Hosts
2017-10-05 11:33:29 +03:00
Evgeniy Khramtsov
94de13981b
Log request in access.log even when Host doesn't match
2017-10-05 11:16:05 +03:00
Evgeniy Khramtsov
43e729293a
Don't report Host mismatch as an error
2017-10-05 11:08:58 +03:00
Evgeniy Khramtsov
f3af117108
Correctly handle mod_client_state (re)load
2017-10-05 11:03:36 +03:00
Evgeniy Khramtsov
bd06bc00e2
Accept routes in Host header and map them to vhosts
2017-10-05 10:26:10 +03:00
Holger Weiss
532aba993b
mod_stream_mgmt: Increase 'max_ack_queue' default
...
Users with large rosters and/or certain transports might receive a very
large number of (e.g.) presence and/or PEP stanzas after logging in.
Clients might take some time to acknowledge them, especially over slow
(mobile) connections.
2017-10-03 01:37:10 +02:00
Holger Weiss
79685da90b
Increase 'max_fsm_queue' default
...
The old default was becoming too small for some workloads.
2017-10-03 01:29:52 +02:00
Badlop
280aa2f1b0
Fix crash in mod_http_fileserver when logging URL with query elements ( #2021 )
2017-10-02 15:36:38 +02:00
Christophe Romain
a3da27e917
Fix race introduced by ffdaff374
on ejabberd_mnesia init
2017-09-28 15:14:11 +02:00
Evgeniy Khramtsov
2732c8f6fc
Fix function clause introduced by c17ec50e3a
2017-09-28 12:24:24 +03:00
Evgeniy Khramtsov
3192687334
Don't forget to route presence-unavailable
...
When a user has several resources joined to a room using the same
nick attempts to leave the room from a single resource, route
presence-unavailable back to this (and only this) resource.
Fixes #2007
2017-09-28 11:58:36 +03:00
Christophe Romain
126653e01b
Pubsub: implment '6.5.7 Requesting the Most Recent Items'
2017-09-27 20:54:50 +02:00
Christophe Romain
ce7acafe37
Remove useless condition
2017-09-27 20:40:07 +02:00
Christophe Romain
216a0c97b9
PubSub: add RSM support for mnesia backend
2017-09-27 20:39:54 +02:00
Christophe Romain
3c8308bb8d
PubSub: enforce controls on publish and delete
2017-09-27 17:37:38 +02:00
Christophe Romain
8c026582ab
Fix xref error
2017-09-27 12:34:40 +02:00
Christophe Romain
81df1ae3af
Unbind unused variable
2017-09-27 12:13:45 +02:00
Christophe Romain
22435ca562
Remove calls to deprecated functions
2017-09-27 11:43:59 +02:00
Christophe Romain
89e504c55f
PubSub: fix get_items behaviour with mnesia
2017-09-27 11:18:12 +02:00
Christophe Romain
c1d3d1318e
Merge branch 'master' of github.com:processone/ejabberd
2017-09-27 11:12:09 +02:00
Christophe Romain
d120e0ad91
PubSub: add correct order when requesting all items
2017-09-27 11:12:01 +02:00
Evgeniy Khramtsov
c17ec50e3a
Add support for XEP-0368: SRV records for XMPP over TLS
...
Currently this is only supported for outgoing s2s connections.
For such connections ejabberd is now able to resolve SRV records
of type "_xmpps-server._tcp". Also, SNI and ALPN fields are set
during TLS handshake. No additional configuration is required.
2017-09-27 12:03:05 +03:00
Evgeniy Khramtsov
abc09054e5
Remove forgotten export_all
2017-09-27 11:56:22 +03:00
Christophe Romain
07a193d4dc
PubSub: fix RSM support ( #1994 )(#2Â014)
2017-09-27 10:51:37 +02:00
Christophe Romain
cf09ed2df2
PubSub: fix node_options, default options only apply on first plugin
2017-09-27 09:29:04 +02:00
Holger Weiss
0cc1ae0a6a
mod_http_upload: Don't ignore 'custom_headers'
...
Don't ignore the 'custom_headers' option if the domain part of the
'put_url' doesn't match the XMPP domain.
Closes #1482 .
2017-09-26 21:40:56 +02:00
Evgeniy Khramtsov
e1efd29156
Improve presence-error processing
...
When a presence-error is received from a participant in a MUC, kick
only this particular participant's full JID, leaving other resources
untouched. This will prevent from erroneous kicking all user's resources
in the presence of "multi-session nicks".
2017-09-26 19:01:54 +03:00
Badlop
2198fbce97
Fix command set_last that always returned code 1, error ( #2010 )
2017-09-25 18:43:24 +02:00
Evgeniy Khramtsov
251756de00
Catch all p1_fsm errors
...
Fixes #2012
2017-09-25 13:01:00 +03:00
Evgeniy Khramtsov
3e987d3bae
Use eimp instead of ImageMagick calls for thumbnails creation
2017-09-25 12:41:12 +03:00
Holger Weiss
59ec3d36f4
mod_mam: Simplify check for anon MUC JID filtering
...
Refuse filtering anon MUC MAM queries by JID even if it's the client's
own JID. Clients probably won't perform such queries in practice, so
the additional complexity is unnecessary.
2017-09-24 15:04:09 +02:00
Evgeniy Khramtsov
d7250111ce
Reuse some translation strings
2017-09-24 14:32:37 +03:00
Evgeniy Khramtsov
adfb924808
Replace translate:mark/1 with ?T() macro
2017-09-24 12:42:35 +03:00
Holger Weiss
48f2adde98
mod_mam: Refuse filtering anon MUC queries by JID
...
Return an empty result set if a non-moderator attempts to filter by JID
while querying the archive of an anonymous MUC room.
2017-09-24 02:05:50 +02:00
Evgeniy Khramtsov
c378ea403e
Add script to extract translation strings
2017-09-24 00:08:01 +03:00
Holger Weiss
692ccd2e20
mod_push_mnesia: Fix typo in error message
2017-09-22 23:36:51 +02:00
Evgeniy Khramtsov
db41643bea
Also replace vcard-x-update in direct presences
2017-09-18 14:17:34 +03:00
Christophe Romain
7ad525b542
PubSub: broadcast updated configuration ( #1945 )
2017-09-18 12:48:20 +02:00
Evgeniy Khramtsov
5bf64381cb
Add 'width' and 'height' to avatar info
2017-09-18 09:33:57 +03:00
Evgeniy Khramtsov
f435d0a103
Add GIF support
2017-09-17 17:34:31 +03:00
Evgeniy Khramtsov
e4d21c1941
Introduce mod_avatar
...
The purpose of the module is to cope with legacy and modern
XMPP clients posting avatars. It automatically converts vCard based
avatars (XEP-0153) to PEP based avatars (XEP-0084) and vice versa.
Also, the module supports convertation between avatar image formats on
the fly: this is controlled by `convert` option. For example, to
convert all avatars into PNG format, configure the module as:
mod_avatar:
convert:
default: png
In order to convert only `webp` format to `jpeg`, set the following:
mod_avatar:
convert:
webp: jpeg
Note: the module depends on mod_vcard, mod_vcard_xupdate and mod_pubsub.
Also, ejabberd should be built with --enable-graphics option.
2017-09-17 10:26:48 +03:00
Holger Weiss
e6b1521b29
mod_push_keepalive: Remove unused 'db_type' option
2017-09-11 23:48:25 +02:00
Evgeniy Khramtsov
dfd2045523
Introduce option 'allow_transports'
...
This is a boolean option. If set to `true` and some server's JID
is in user's roster, then messages from any user of this server are
accepted even if no subscription present.
The option is enabled by default.
2017-09-08 23:10:01 +03:00
Badlop
d87151aee6
Simple optimization in get_room_occupants_number command ( #1964 )
2017-09-07 18:32:26 +02:00
Evgeniy Khramtsov
4ecd8a0780
Really delete cache on set_data()
...
Fixes #1991
2017-09-07 19:27:48 +03:00
Evgeniy Khramtsov
803c31f760
Always accept messages from local (sub)domains
2017-09-07 13:53:42 +03:00
Evgeniy Khramtsov
978c92f5e1
Fix a typo and improve logging message
2017-09-07 13:41:51 +03:00
Konstantinos Kallas
f55a8d045d
Solve Travis build xref problem
...
Travis build failed on xref because some functions that I used did not exist in OTP versions 17.5, 18.3
Those functions are: ets:take/2, lists:join/2, erlang:timestamp/0.
2017-09-06 18:10:38 +03:00
Evgeniy Khramtsov
1a58a201f8
Block messages from strangers before mod_mam/mod_offline processing
...
Fixes #1713
2017-09-02 22:54:46 +03:00
Evgeniy Khramtsov
2acbf4625b
Deprecate s2s_use_starttls: required_trusted
...
The functionality can be now obtained by using
`s2s_use_starttls: required` with `mod_s2s_dialback`
being unloaded.
2017-09-02 11:45:06 +03:00
Evgeniy Khramtsov
7566d254e4
Introduce 'redirect_url' option for mod_register
...
The option enables registration redirection as described in
https://xmpp.org/extensions/xep-0077.html#redirect
Fixes #1976
2017-09-01 12:14:01 +03:00
Badlop
68dee8cbb3
Fix deletion of multiple offline messages using WebAdmin ( #1962 )
2017-08-25 12:44:53 +02:00
Evgeniy Khramtsov
f7e8d287d5
Fix a typo
2017-08-25 12:47:33 +03:00
Konstantinos Kallas
80b44d8c15
Remove some unused variable warnings, replace lists:join with string join
2017-08-25 12:08:16 +03:00
Evgeniy Khramtsov
30bca124f4
Add forgotten caching options to the validator (thanks to Jan Pinkas)
2017-08-24 21:40:54 +03:00
Badlop
1d396b4716
Rewrite muc_register_nick and muc_unregister_nick to be DB independent ( #1954 )
...
Notice: The arguments expected have changed, instead of
muc_register_nick Tim tim@example.org muc.example.org
muc_unregister_nick Tim
it expects now:
muc_register_nick Tim tim@example.org example.org
muc_unregister_nick tim@example.org example.org
2017-08-24 10:40:54 +02:00
Evgeniy Khramtsov
47175adc74
Explicitly match against <domain/resource>
...
Fixes #1958
2017-08-23 09:00:13 +03:00
Konstantinos Kallas
f1ea67817c
More whitespace changes
2017-08-22 14:58:12 +03:00
Konstantinos Kallas
30e729a150
Whitespace change
2017-08-22 14:54:23 +03:00
Konstantinos Kallas
a59ccc6c9c
Merge remote-tracking branch 'upstream/master' into lets_encrypt_acme_support
2017-08-22 14:51:21 +03:00
Konstantinos Kallas
62903155fd
Show SANs in list_Certificates
2017-08-22 14:44:19 +03:00
Konstantinos Kallas
25ca6e5582
Acquire certificates for all subdomains of a host and include them in SAN
2017-08-22 13:36:34 +03:00
Konstantinos Kallas
10f7b5a548
Remove partial RSA key support
2017-08-22 10:25:37 +03:00
Konstantinos Kallas
f2876bdad7
Add certfile when acquired
2017-08-22 10:12:42 +03:00
Badlop
05c2995c7a
When creating room, set option to ensure config is set in muc_room table ( #1954 )
2017-08-21 15:58:10 +02:00
Badlop
2fa6e2fd90
Fix crash when destroying room without providing reason ( #1954 )
2017-08-21 15:57:48 +02:00
Konstantinos Kallas
9b3e160e18
Remove some debugging INFO_MSGs
2017-08-19 17:47:05 +03:00
Konstantinos Kallas
15dd88385f
Delete a development acme module
2017-08-19 16:58:06 +03:00
Konstantinos Kallas
f581e391ac
Merge remote-tracking branch 'upstream/master'
2017-08-19 13:42:05 +03:00
Konstantinos Kallas
dd42d52ff9
Merge remove_account_option branch
2017-08-19 13:36:42 +03:00
Konstantinos Kallas
e45f7ddfec
Cleanup some comments:
2017-08-19 13:32:13 +03:00
Konstantinos Kallas
7cc7b74f1e
Add acme certificates for all configured hosts in ejabberd_pkix
2017-08-19 12:50:40 +03:00
Konstantinos Kallas
ddfe8742c7
Add behaviour ejabberd_config in ejabberd_acme in order to validate the config
2017-08-19 11:35:15 +03:00
Holger Weiss
ba9a79c89c
Apply cosmetic changes to previous commit
2017-08-18 16:50:08 +02:00
Holger Weiss
13ad754ecc
Suppress push notifications for online clients
...
When a client enabled push notifications during the current session,
notifications should be suppressed as long as the client is online.
Suppressing the notification didn't work for the case where the
notification was triggered by MAM, but this is now fixed.
2017-08-18 16:44:32 +02:00
Badlop
0b02d42836
Fix mod_multicast start and reading of configured limits ( #1949 )
2017-08-18 14:09:49 +02:00
Evgeniy Khramtsov
ee0a8d2966
Preserve correct order of deserialized XML elements
...
Fixes #1939
2017-08-18 10:20:27 +03:00
Evgeniy Khramtsov
6e20e9bcf9
Get rid of deprecated crypto functions
2017-08-17 19:32:15 +03:00
Holger Weiss
b8d2a72333
mod_stream_mgmt: Delete 'c2s_init' hook
...
Delete the 'c2s_init' hook when the last 'mod_stream_mgmt' instance is
stopped.
2017-08-17 18:25:06 +02:00
Holger Weiss
0760c7273c
mod_stream_mgmt: Remove outdated TODO comment
...
The CSI queue is now flushed from mod_client_state.
2017-08-17 18:19:04 +02:00
Evgeniy Khramtsov
9bd099013f
Don't attempt to access(2) a certificate file
...
Fixes #1375
2017-08-17 14:33:41 +03:00
Christophe Romain
68fb12153e
Revert "Temporary remove recent last_item refactor"
...
This reverts commit 1820b4f63b
.
2017-08-14 15:25:45 +02:00
Holger Weiss
e19d1e9571
Merge remote-tracking branch 'processone/pr/1938'
...
* processone/pr/1938:
Let 'domain_certfile' take higher precedence
2017-08-14 14:43:03 +02:00
Christophe Romain
1820b4f63b
Temporary remove recent last_item refactor
2017-08-14 09:43:02 +02:00
Holger Weiss
64150cc7c5
Let 'domain_certfile' take higher precedence
...
If a 'domain_certfile' is specified, use that instead of the
's2s_certfile' (or 'c2s_certfile').
2017-08-13 20:31:03 +02:00
Evgeniy Khramtsov
63aabed320
Apply URL decoding wherever possible
...
Fixes #1936
2017-08-13 19:18:19 +03:00
Konstantinos Kallas
051e2c639c
Change some specs
2017-08-12 18:00:46 +03:00
Konstantinos Kallas
3b22efeaee
Add throws when http requests fail
...
This was done in order to show the unexpected code in the top level
2017-08-12 17:26:07 +03:00
Konstantinos Kallas
a72a7f830a
Add support to revoke a certificate by providing the pem
...
This is important so that a user can revoke a certificate that is not acquired or logged from our acme client
2017-08-12 17:14:23 +03:00
Konstantinos Kallas
73f0b6707a
Move the ca_url to the config file
2017-08-12 15:59:54 +03:00
Christophe Romain
fd7bf7fed3
Fix typo from 9c5427e0c
2017-08-11 17:54:53 +02:00
Konstantinos Kallas
1aadb797b3
Remove the new account option from get certificate. There is no reason for having this
2017-08-11 14:10:55 +03:00
Konstantinos Kallas
7140c8d844
Format expired certificates differently in list_certificates
2017-08-11 13:28:17 +03:00
Christophe Romain
7a90cda8ff
Process on_user_offline only from valid sessions
2017-08-11 12:05:14 +02:00
Evgeniy Khramtsov
35eeaa5869
Fix regression introduced by b82b93f8f0
...
Fixes #1928
2017-08-11 11:43:16 +03:00
Christophe Romain
024713a441
Remove temporary debug
2017-08-11 10:53:19 +02:00
Christophe Romain
32fbfe1981
Use correct c2s process sending PEP with multi devices
2017-08-11 10:32:36 +02:00
Christophe Romain
9c5427e0c2
PubSub: refactor send_last_items remove send_loop
2017-08-11 10:20:33 +02:00
Holger Weiss
7d3609d954
prosody2ejabberd: Support PEP import
2017-08-10 19:49:20 +02:00
Holger Weiss
fc7ba53c37
prosody2ejabberd: Remove superfluous 'catch'
2017-08-10 18:54:00 +02:00
Konstantinos Kallas
2b1fea01cd
Renew certificate now renews all saved certificates that are close to expire
...
Before this commit renew_certificate only checked the hosts in the config file and renewd the certificates for those. However the user can request certificates apart from the hosts in the config file so he should be able to also renew them.
2017-08-10 18:54:26 +03:00
Konstantinos Kallas
c20bfb3422
Revoke Certificate: Jose Private Key
...
Instead of signing the jose object with the account private key, it now signs the object using the certificate private key. This is useful in case the user wants to revoke a old certificate whose account key doesn't exist anymore.
2017-08-10 17:23:13 +03:00
Konstantinos Kallas
011b7ac3f2
Support getting certificates for domains not specified in the configuration file
2017-08-10 15:26:35 +03:00
Evgeniy Khramtsov
a96d72330d
Rename remove_room hook back
2017-08-10 14:49:05 +03:00
Christophe Romain
7d626b4f5c
Add support of section 4.9.3.16 on rfc6120
2017-08-10 12:17:31 +02:00
Christophe Romain
e903348dd3
Fix pubsub send_loop after 3fec7824
2017-08-09 11:34:36 +02:00
Konstantinos Kallas
97a4d57f2e
Remove some debugging functions
2017-08-08 18:00:37 +03:00
Evgeniy Khramtsov
3fec782494
Introduce 'hosts' option
...
The option can be used as a replacement of 'host' option
when several (sub)domains are needed to be registered for the module.
Note that you cannot combine both 'host' and 'hosts' in the config
because 'host' option is of a higher priority. Example:
mod_pubsub:
...
hosts:
- "pubsub1.@HOST@"
- "pubsub2.@HOST@"
Fixes #1883
2017-08-08 17:46:26 +03:00
Konstantinos Kallas
9756b452d6
Implement renew_certificate command
...
This command renews the certificates for all domains that already have a certificate that has expired or is close to expiring. It is meant to be run automatically more often than the renewal process because if the certificates are valid nothing happens
2017-08-08 16:38:19 +03:00
Konstantinos Kallas
7fa9a387ae
Try catch when formatting certificates
2017-08-08 12:45:57 +03:00
Konstantinos Kallas
48254a1e10
Change certificate notAfter to 90 days
...
As stated in Let's Encrypt FAQ: https://letsencrypt.org/docs/faq/
2017-08-08 12:23:13 +03:00
Christophe Romain
8679cfd2f3
Rename stop_all_connections to stop_s2s_connections for consistency
2017-08-07 15:06:07 +02:00
Evgeniy Khramtsov
2bceebc39d
Get rid of export_all
2017-08-05 21:01:29 +03:00
Evgeniy Khramtsov
92532a0d66
Replace gen_fsm with p1_fsm to avoid warnings in OTP20+
2017-08-05 20:58:21 +03:00
Holger Weiss
e1aaa1c99d
ejabberd_c2s: Fix priority of 'certfile' option
...
Use the 'certfile' listener option rather than a 'domain_certfile' for
ejabberd_c2s listeners that have "tls: true" configured. A
'domain_certfile' should only be preferred for STARTTLS connections.
Closes #1911 .
2017-08-05 18:59:32 +02:00
Badlop
101e808124
Fix warning in previous commit
2017-08-04 13:09:17 +02:00
Christophe Romain
766b7c65a6
Merge pull request #1881 from weiss/push
...
Support XEP-0357: Push Notifications
2017-08-04 12:58:06 +02:00