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
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