]> granicus.if.org Git - ejabberd/log
ejabberd
5 years agoFix mod_privacy race condition
Nathan Bruning [Sat, 27 Oct 2018 13:26:37 +0000 (15:26 +0200)]
Fix mod_privacy race condition

mod_privacy updates the c2s state in user_receive_packet, which
tracks the *result* of the IQ set for active privacy lists.

When a second stanza is sent directly after a privacy list request,
the second stanza will be processed using the old privacy list,
because the IQ result has not yet been routed.

5 years agoFix example argument in private_set, don't include Query element
Badlop [Wed, 29 May 2019 17:41:36 +0000 (19:41 +0200)]
Fix example argument in private_set, don't include Query element

5 years agomod_stream_mgmt: Drop unused code
Holger Weiss [Tue, 28 May 2019 22:30:59 +0000 (00:30 +0200)]
mod_stream_mgmt: Drop unused code

Revert the changes applied to mod_stream_mgmt in commit
b76f90fe396ee7a1ed5c5f7006431879929fc2a1, as the new implementation of
mod_offline's 'use_mam_for_storage' feature doesn't need them.

5 years agoChange implementation of mod_offline use_mam_for_storage 19.05
Paweł Chmielowski [Tue, 28 May 2019 12:32:09 +0000 (14:32 +0200)]
Change implementation of mod_offline use_mam_for_storage

Previous version was trying to determine range of messages that should
be fetched from mam by storing time when last user resource disconnected.

But that had couple edge cases that could cause problems, for example in
case of node crash we could not store information about user disconnect
and with that we didn't have data to initiate mam query.

New version don't track user disconnects, but simply ensure that we have
timestamp of first message that is gonna be put in storage, after some
measurements cost of that check with caching on top is not that costly,
and as much more robust i decided to introduce that change.

5 years agoDon't check mod_register restrictions in 'register' command
Evgeny Khramtsov [Tue, 28 May 2019 12:14:45 +0000 (15:14 +0300)]
Don't check mod_register restrictions in 'register' command

The commit reverts behaviour introduced in
1f2b8adc285c6c67de75986e96d6bd1632ef97fe

5 years agomod_http_upload: Avoid catch-all error handling
Holger Weiss [Mon, 27 May 2019 19:56:37 +0000 (21:56 +0200)]
mod_http_upload: Avoid catch-all error handling

5 years agoImprove captcha blocking alert wording
Mickaël Rémond [Sat, 25 May 2019 09:30:04 +0000 (11:30 +0200)]
Improve captcha blocking alert wording

5 years agoImprove captcha.sh script documentation
Mickaël Rémond [Sat, 25 May 2019 09:21:30 +0000 (11:21 +0200)]
Improve captcha.sh script documentation

5 years agoFix last commit
Paweł Chmielowski [Fri, 24 May 2019 13:18:15 +0000 (15:18 +0200)]
Fix last commit

5 years agoMake mod_admin_extra add/delete_rosteritem reuse code from mod_roster
Paweł Chmielowski [Fri, 24 May 2019 12:02:10 +0000 (14:02 +0200)]
Make mod_admin_extra add/delete_rosteritem reuse code from mod_roster

5 years agoAdd data clean up suggested command
Mickaël Rémond [Fri, 24 May 2019 08:31:51 +0000 (10:31 +0200)]
Add data clean up suggested command

5 years agoPrepare 19.05
Christophe Romain [Thu, 23 May 2019 11:42:50 +0000 (13:42 +0200)]
Prepare 19.05

5 years agoUpdate deps in mix.lock
Christophe Romain [Thu, 23 May 2019 11:40:05 +0000 (13:40 +0200)]
Update deps in mix.lock

5 years agoUpdate deps
Paweł Chmielowski [Thu, 23 May 2019 10:13:28 +0000 (12:13 +0200)]
Update deps

5 years agoUse different cache tables per auth module
Evgeny Khramtsov [Thu, 23 May 2019 08:32:55 +0000 (11:32 +0300)]
Use different cache tables per auth module

Fixes #2322

5 years agoRemove 'register' access rule from example config
Holger Weiss [Mon, 20 May 2019 18:05:20 +0000 (20:05 +0200)]
Remove 'register' access rule from example config

The 'register' access rule isn't referenced from the 'mod_register'
options, so modifying it would have no effect.

5 years agoUse lager 3.6.10
Evgeny Khramtsov [Mon, 20 May 2019 09:10:23 +0000 (12:10 +0300)]
Use lager 3.6.10

5 years agoMerge branch 'master' of github.com:processone/ejabberd
Evgeny Khramtsov [Sun, 19 May 2019 08:23:29 +0000 (11:23 +0300)]
Merge branch 'master' of github.com:processone/ejabberd

5 years agoReport better errors on SQL terms decode failure
Evgeny Khramtsov [Sun, 19 May 2019 08:22:41 +0000 (11:22 +0300)]
Report better errors on SQL terms decode failure

5 years agoFix PostgreSQL compatibility in mod_offline_sql:remove_old_messages (#2695)
Alexey Shchepin [Sat, 18 May 2019 18:16:33 +0000 (21:16 +0300)]
Fix PostgreSQL compatibility in mod_offline_sql:remove_old_messages (#2695)

5 years agoFix typo in Change User Password adhoc command (thanks to lovetox)(#2884)
Badlop [Fri, 17 May 2019 13:37:34 +0000 (15:37 +0200)]
Fix typo in Change User Password adhoc command (thanks to lovetox)(#2884)

5 years agoVcard search doesn't support * in mnesia, fix search form (#633)
Badlop [Fri, 17 May 2019 13:24:18 +0000 (15:24 +0200)]
Vcard search doesn't support * in mnesia, fix search form (#633)

5 years agoCheck hooks correctness in Travis CI
Evgeny Khramtsov [Wed, 15 May 2019 18:47:39 +0000 (21:47 +0300)]
Check hooks correctness in Travis CI

5 years agoWrite hooks_type_test.erl to correct location
Evgeny Khramtsov [Wed, 15 May 2019 18:45:30 +0000 (21:45 +0300)]
Write hooks_type_test.erl to correct location

5 years agoMake static hooks analyzer working again
Evgeny Khramtsov [Wed, 15 May 2019 18:40:36 +0000 (21:40 +0300)]
Make static hooks analyzer working again

5 years agoFix mod_legacy_auth to reflect recent changes
Evgeny Khramtsov [Wed, 15 May 2019 17:55:17 +0000 (20:55 +0300)]
Fix mod_legacy_auth to reflect recent changes

5 years agoDon't process failed EXTERNAL authentication by mod_fail2ban
Evgeny Khramtsov [Wed, 15 May 2019 15:13:31 +0000 (18:13 +0300)]
Don't process failed EXTERNAL authentication by mod_fail2ban

This will only lead to confusion because it's not considered
possible to brute force client certificates.

5 years agoModify arguments of c2s_auth_result hook
Evgeny Khramtsov [Wed, 15 May 2019 14:21:09 +0000 (17:21 +0300)]
Modify arguments of c2s_auth_result hook

The hook now accepts `true | {false, Reason :: binary()}` arguments
instead of just `true | false`

5 years agoPreliminary support for SQL in process_rosteritems, and move code (#2448)
Badlop [Wed, 15 May 2019 08:57:55 +0000 (10:57 +0200)]
Preliminary support for SQL in process_rosteritems, and move code (#2448)

5 years agoDon't put duplicate polling attribute in bosh payload
Paweł Chmielowski [Tue, 14 May 2019 15:32:12 +0000 (17:32 +0200)]
Don't put duplicate polling attribute in bosh payload

This fixes issue #2790

5 years agomod_http_upload: Case-insensitive host comparison
Holger Weiss [Sun, 12 May 2019 09:57:17 +0000 (11:57 +0200)]
mod_http_upload: Case-insensitive host comparison

Perform a case-insensitive lookup of the host name specified by the HTTP
client.

Fixes #2827.

5 years agoAvoid late arrival of get_disco_item response
Evgeny Khramtsov [Sat, 11 May 2019 16:27:56 +0000 (19:27 +0300)]
Avoid late arrival of get_disco_item response

5 years agoHandle TCP errors in websockets
Evgeny Khramtsov [Thu, 9 May 2019 19:06:23 +0000 (22:06 +0300)]
Handle TCP errors in websockets

5 years agoInitial Docker environment to run ejabberd test suite
Mickael Remond [Tue, 7 May 2019 15:59:05 +0000 (17:59 +0200)]
Initial Docker environment to run ejabberd test suite

5 years agoFix pubsub compliance XEP-0060 § 7.1.3.6 (#2864)
Christophe Romain [Tue, 7 May 2019 14:22:45 +0000 (16:22 +0200)]
Fix pubsub compliance XEP-0060 § 7.1.3.6 (#2864)

5 years agoMerge branch 'master' of github.com:processone/ejabberd
Mickael Remond [Tue, 7 May 2019 12:09:22 +0000 (14:09 +0200)]
Merge branch 'master' of github.com:processone/ejabberd

5 years agoPut back the presence and s2s tests in the no_db section.
Mickael Remond [Tue, 7 May 2019 12:09:11 +0000 (14:09 +0200)]
Put back the presence and s2s tests in the no_db section.

Tests are skipped anyway. This reverts ecce31830486023b9227c21d323f1cab825c1b47

5 years agoRaise api hook right before performing the call
Christophe Romain [Tue, 7 May 2019 09:46:04 +0000 (11:46 +0200)]
Raise api hook right before performing the call

5 years agoMake anonymous auth don't {de}register user when there are other resources
Paweł Chmielowski [Tue, 7 May 2019 09:02:53 +0000 (11:02 +0200)]
Make anonymous auth don't {de}register user when there are other resources

This should fix issue reported in #2878

5 years agoWhen applying limit of max msgs in spool check only spool size
Paweł Chmielowski [Tue, 7 May 2019 07:58:14 +0000 (09:58 +0200)]
When applying limit of max msgs in spool check only spool size

5 years agoRemove compiler warnings
Paweł Chmielowski [Mon, 6 May 2019 18:03:10 +0000 (20:03 +0200)]
Remove compiler warnings

5 years agoTest offline:use_mam_for_storage, mam:user_mucsub_from_muc_archive used together
Paweł Chmielowski [Mon, 6 May 2019 17:19:10 +0000 (19:19 +0200)]
Test offline:use_mam_for_storage, mam:user_mucsub_from_muc_archive used together

5 years agoDo not store mucsub wrapped messages with no-store hint in offline storage
Paweł Chmielowski [Mon, 6 May 2019 17:17:30 +0000 (19:17 +0200)]
Do not store mucsub wrapped messages with no-store hint in offline storage

We already don't store those messages in mam and we don't store messages
that aren't wrapped with that hint in offline, so it make sense to extend
it also to mucsub messages.

5 years agoHandle get_subscribed_rooms call from mod_muc_room pid
Paweł Chmielowski [Mon, 6 May 2019 17:15:48 +0000 (19:15 +0200)]
Handle get_subscribed_rooms call from mod_muc_room pid

Previously sometimes we tried to post message to all online rooms, and
if that was called from muc room pid, we were not able to process that
message for that room and send response, and this did lead to timeout.

5 years agoDo not declare mod_muc as dependency of mod_mam to prevent loop in deps
Paweł Chmielowski [Mon, 6 May 2019 10:21:49 +0000 (12:21 +0200)]
Do not declare mod_muc as dependency of mod_mam to prevent loop in deps

5 years agos2s test depend on Mnesia configuration
Mickael Remond [Mon, 6 May 2019 10:00:36 +0000 (12:00 +0200)]
s2s test depend on Mnesia configuration

5 years agoElixir mix build need to use xmpp 1.3.3
Mickael Remond [Mon, 6 May 2019 09:59:52 +0000 (11:59 +0200)]
Elixir mix build need to use xmpp 1.3.3

5 years agoRemove deprecated calls
Mickael Remond [Fri, 3 May 2019 13:58:24 +0000 (15:58 +0200)]
Remove deprecated calls

5 years agoct_formatter is not needed anymore as Elixir tests have been removed
Mickael Remond [Fri, 3 May 2019 13:54:22 +0000 (15:54 +0200)]
ct_formatter is not needed anymore as Elixir tests have been removed

5 years agoUse stable xmpp version
Mickael Remond [Fri, 3 May 2019 13:48:12 +0000 (15:48 +0200)]
Use stable xmpp version

5 years agoMake some standard admin command to get Mnesia info
Mickael Remond [Fri, 3 May 2019 12:59:24 +0000 (14:59 +0200)]
Make some standard admin command to get Mnesia info

5 years agoFix bug that appears when importing privacy from Prosody (#2872)
Badlop [Thu, 2 May 2019 19:10:21 +0000 (21:10 +0200)]
Fix bug that appears when importing privacy from Prosody (#2872)

5 years agoStore imported room in the correct ServerHost (#2874)
Badlop [Thu, 2 May 2019 18:22:46 +0000 (20:22 +0200)]
Store imported room in the correct ServerHost (#2874)

5 years agoSet from/to in activity marker messages
Paweł Chmielowski [Thu, 2 May 2019 11:19:54 +0000 (13:19 +0200)]
Set from/to in activity marker messages

5 years agoFix typo and remove forgotten log from 492da2ba
Christophe Romain [Thu, 2 May 2019 10:05:20 +0000 (12:05 +0200)]
Fix typo and remove forgotten log from 492da2ba

5 years agoMerge pull request #2869 from rstgroup/fix-elixir-umbrella-compilation
Mickaël Rémond [Thu, 2 May 2019 09:53:35 +0000 (11:53 +0200)]
Merge pull request #2869 from rstgroup/fix-elixir-umbrella-compilation

Fix #2540 Ejabberd doesnt compile as mix umbrella project dependency

5 years agoRemove logging from REST lib
Christophe Romain [Thu, 2 May 2019 09:40:53 +0000 (11:40 +0200)]
Remove logging from REST lib

5 years agoAlways store ActivityMarker messages
Paweł Chmielowski [Thu, 2 May 2019 09:12:47 +0000 (11:12 +0200)]
Always store ActivityMarker messages

5 years agoDon't issue count/message fetch queries for offline from mam when not needed
Paweł Chmielowski [Thu, 2 May 2019 09:12:22 +0000 (11:12 +0200)]
Don't issue count/message fetch queries for offline from mam when not needed

5 years agoRemove Elixir tests entry points as they were removed in december:
Mickael Remond [Wed, 1 May 2019 09:51:17 +0000 (11:51 +0200)]
Remove Elixir tests entry points as they were removed in december:
https://github.com/processone/ejabberd/commit/51cbbf313f478a01cd732a7ee1e21ff356402d0e#diff-098f6bcd4621d373cade4e832627b4f6

5 years agoSqlite doesn't recognize concat() so use || on it instead
Paweł Chmielowski [Tue, 30 Apr 2019 16:33:12 +0000 (18:33 +0200)]
Sqlite doesn't recognize concat() so use || on it instead

5 years agoCleaner test cleanup
Paweł Chmielowski [Tue, 30 Apr 2019 15:35:25 +0000 (17:35 +0200)]
Cleaner test cleanup

5 years agoFix room state cleanup from db on change of persistent option change
Paweł Chmielowski [Tue, 30 Apr 2019 15:34:49 +0000 (17:34 +0200)]
Fix room state cleanup from db on change of persistent option change

5 years agoAdd tests for user mucsub mam from muc mam
Paweł Chmielowski [Tue, 30 Apr 2019 11:41:54 +0000 (13:41 +0200)]
Add tests for user mucsub mam from muc mam

5 years agoMake get_subscribed_rooms work even for non-persistant rooms
Paweł Chmielowski [Tue, 30 Apr 2019 11:41:03 +0000 (13:41 +0200)]
Make get_subscribed_rooms work even for non-persistant rooms

This will store info about non-persistant rooms in db, but rooms with that
that option enabled will not be restored on server restart.

This will save info about room only on subscribers change.

5 years agoFix escaping for sql part of mamsub from muc mam
Paweł Chmielowski [Tue, 30 Apr 2019 11:36:31 +0000 (13:36 +0200)]
Fix escaping for sql part of mamsub from muc mam

5 years agoDeprecate some listening options
Evgeny Khramtsov [Tue, 30 Apr 2019 08:14:14 +0000 (11:14 +0300)]
Deprecate some listening options

Those are: captcha, register, web_admin, http_bind and xmlrpc
The option `request_handlers` should be used instead, e.g.:

listen:
  ...
  -
    module: ejabberd_http
    request_handlers:
      "/admin": ejabberd_web_admin
      "/bosh": mod_bosh
      "/captcha": ejabberd_captcha
      "/register": mod_register_web
      "/": ejabberd_xmlrpc

5 years agoProvide a suggestion when unknown request handler is detected
Evgeny Khramtsov [Tue, 30 Apr 2019 07:31:03 +0000 (10:31 +0300)]
Provide a suggestion when unknown request handler is detected

5 years agoProvide a suggestion when unknown command is detected
Evgeny Khramtsov [Tue, 30 Apr 2019 07:05:06 +0000 (10:05 +0300)]
Provide a suggestion when unknown command is detected

5 years agoRename ejabberd_config:similar_option/2 -> misc:best_match/2
Evgeny Khramtsov [Tue, 30 Apr 2019 06:36:38 +0000 (09:36 +0300)]
Rename ejabberd_config:similar_option/2 -> misc:best_match/2

5 years agoProvide a suggestion when unknown module is detected
Evgeny Khramtsov [Mon, 29 Apr 2019 18:15:52 +0000 (21:15 +0300)]
Provide a suggestion when unknown module is detected

5 years agoProvide a suggestion when unknown option is detected
Evgeny Khramtsov [Mon, 29 Apr 2019 17:57:59 +0000 (20:57 +0300)]
Provide a suggestion when unknown option is detected

5 years agoDisable offline_from_mam tests on riak since it doesn't support mam
Paweł Chmielowski [Mon, 29 Apr 2019 16:31:07 +0000 (18:31 +0200)]
Disable offline_from_mam tests on riak since it doesn't support mam

5 years agoImprove code for directory deletion
Evgeny Khramtsov [Mon, 29 Apr 2019 15:50:54 +0000 (18:50 +0300)]
Improve code for directory deletion

5 years agoFix offline from mam on mnesia
Paweł Chmielowski [Mon, 29 Apr 2019 15:25:06 +0000 (17:25 +0200)]
Fix offline from mam on mnesia

5 years agoAdd tests for offline with mam storage
Paweł Chmielowski [Mon, 29 Apr 2019 14:40:47 +0000 (16:40 +0200)]
Add tests for offline with mam storage

5 years agoProperly handle infinity as max number of message in mam offline storage
Paweł Chmielowski [Mon, 29 Apr 2019 14:37:21 +0000 (16:37 +0200)]
Properly handle infinity as max number of message in mam offline storage

5 years agoSort messages by stanza_id when using mam storage in mod_offline
Paweł Chmielowski [Mon, 29 Apr 2019 14:32:19 +0000 (16:32 +0200)]
Sort messages by stanza_id when using mam storage in mod_offline

5 years agoReturn correct value from count_offline_messages with mam storage option
Paweł Chmielowski [Mon, 29 Apr 2019 14:31:37 +0000 (16:31 +0200)]
Return correct value from count_offline_messages with mam storage option

5 years agoMake mod_offline put msg ignored by mam in spool when mam storage is on
Paweł Chmielowski [Mon, 29 Apr 2019 14:30:45 +0000 (16:30 +0200)]
Make mod_offline put msg ignored by mam in spool when mam storage is on

5 years agoAdd tests for offline use_mam_for_storage
Paweł Chmielowski [Mon, 29 Apr 2019 09:35:18 +0000 (11:35 +0200)]
Add tests for offline use_mam_for_storage

5 years agoRemove TLS options from the example config
Evgeny Khramtsov [Sun, 28 Apr 2019 14:50:52 +0000 (17:50 +0300)]
Remove TLS options from the example config

The purpose is two-fold:

- To simplify the example config.
- To avoid old TLS configuration to be persistent across
  server updates: this might bring security problems, because
  what's considered "modern" now might be insecure in the future.

5 years agoRemove OMEMO related configuration from force_node_config section
Evgeny Khramtsov [Sun, 28 Apr 2019 14:45:41 +0000 (17:45 +0300)]
Remove OMEMO related configuration from force_node_config section

This doesn't work reliably and takes a lot of effort to change it back

5 years agoAdd mod_offline option for fetching data from mam instead of from spool table
Paweł Chmielowski [Fri, 26 Apr 2019 17:59:06 +0000 (19:59 +0200)]
Add mod_offline option for fetching data from mam instead of from spool table

This commit introduces `use_mam_for_storage` option that take boolean
argument. Enabling it will make mod_offline not use spool table for storing
offline message, but instead will use mam archive to retrieve messages
stored when offline.

Enabling this option have couple drawback currently, only messages that
were stored in mam will be available, most of flexible message retrieval
queries don't work (those that allow retrieval/deletion of messages by id).

5 years agoReturn "Bad request" error when origin in websocket connection doesn't match
Paweł Chmielowski [Fri, 26 Apr 2019 13:29:43 +0000 (15:29 +0200)]
Return "Bad request" error when origin in websocket connection doesn't match

This also allow websocket_origin option to accept multiple values instead
of just single one.

5 years agoAllow non-moderator subscribers to get list of room subscribers
Paweł Chmielowski [Thu, 25 Apr 2019 12:52:29 +0000 (14:52 +0200)]
Allow non-moderator subscribers to get list of room subscribers

5 years agoFix #2540 Ejabberd doesnt compile as mix umbrella project dependency
Paweł Dorofiejczyk [Thu, 25 Apr 2019 11:31:08 +0000 (13:31 +0200)]
Fix #2540 Ejabberd doesnt compile as mix umbrella project dependency

5 years agoUse binary framing in MQTT WebSockets
Evgeny Khramtsov [Thu, 25 Apr 2019 11:30:42 +0000 (14:30 +0300)]
Use binary framing in MQTT WebSockets

5 years agoMerge pull request #2868 from rstgroup/fix-rfc-6455-violation
Evgeny Khramtsov [Wed, 24 Apr 2019 15:21:58 +0000 (18:21 +0300)]
Merge pull request #2868 from rstgroup/fix-rfc-6455-violation

Fix #2821 RFC6454 violation on websocket connection when validating Origin

5 years agoFix RFC6454 violation on websocket connection when validating Origin header
Paweł Dorofiejczyk [Wed, 24 Apr 2019 14:59:54 +0000 (16:59 +0200)]
Fix RFC6454 violation on websocket connection when validating Origin header

5 years agoCatch potential exceptions in gen_mod:wait_for_process
Paweł Chmielowski [Wed, 24 Apr 2019 11:46:09 +0000 (13:46 +0200)]
Catch potential exceptions in gen_mod:wait_for_process

Seems that at ejabberd shutdown, process may terminate before that function
is called, and in that case erlang:monitor throws exception.

5 years agoReformat try_set_password/4 function
Evgeny Khramtsov [Tue, 23 Apr 2019 18:25:10 +0000 (21:25 +0300)]
Reformat try_set_password/4 function

5 years agoDon't call to mod_register when it's not loaded
Evgeny Khramtsov [Tue, 23 Apr 2019 18:05:21 +0000 (21:05 +0300)]
Don't call to mod_register when it's not loaded

Fixes #2828

5 years agoAdd WebSockets support to mod_mqtt
Evgeny Khramtsov [Tue, 23 Apr 2019 16:18:22 +0000 (19:18 +0300)]
Add WebSockets support to mod_mqtt

Example configuration:

listen:
  ...
  -
    port: 5280
    module: ejabberd_http
    request_handlers:
      "/mqtt": mod_mqtt

modules:
  ...
  mod_mqtt: {}

5 years agoFix handling of list arguments on pgsql
Paweł Chmielowski [Tue, 23 Apr 2019 15:46:14 +0000 (17:46 +0200)]
Fix handling of list arguments on pgsql

5 years agoSupport other socket modules for MQTT
Evgeny Khramtsov [Tue, 23 Apr 2019 13:22:27 +0000 (16:22 +0300)]
Support other socket modules for MQTT

5 years agoMove websocket options
Evgeny Khramtsov [Tue, 23 Apr 2019 13:21:06 +0000 (16:21 +0300)]
Move websocket options

5 years agoImprove request_handlers validator
Evgeny Khramtsov [Tue, 23 Apr 2019 13:19:26 +0000 (16:19 +0300)]
Improve request_handlers validator

5 years agoBump pkix version
Evgeny Khramtsov [Fri, 19 Apr 2019 13:26:58 +0000 (16:26 +0300)]
Bump pkix version

5 years agoCorrectly support cache tags in ejabberd_auth
Evgeny Khramtsov [Fri, 19 Apr 2019 12:42:24 +0000 (15:42 +0300)]
Correctly support cache tags in ejabberd_auth