]> granicus.if.org Git - ejabberd/log
ejabberd
7 years agoUse cache for authentication backends
Evgeniy Khramtsov [Thu, 11 May 2017 11:37:21 +0000 (14:37 +0300)]
Use cache for authentication backends

The commit introduces the following API incompatibilities:

In ejabberd_auth.erl:
* dirty_get_registered_users/0 is renamed to get_users/0
* get_vh_registered_users/1 is renamed to get_users/1
* get_vh_registered_users/2 is renamed to get_users/2
* get_vh_registered_users_number/1 is renamed to count_users/1
* get_vh_registered_users_number/2 is renamed to count_users/2

In ejabberd_auth callbacks
* plain_password_required/0 is replaced by plain_password_required/1
  where the argument is a virtual host
* store_type/0 is replaced by store_type/1 where the argument is
  a virtual host
* set_password/3 is now an optional callback
* remove_user/3 callback is no longer needed
* remove_user/2 now should return `ok | {error, atom()}`
* is_user_exists/2 now must only be implemented for backends
  with `external` store type
* check_password/6 is no longer needed
* check_password/4 now must only be implemented for backends
  with `external` store type
* try_register/3 is now an optional callback and should return
  `ok | {error, atom()}`
* dirty_get_registered_users/0 is no longer needed
* get_vh_registered_users/1 is no longer needed
* get_vh_registered_users/2 is renamed to get_users/2
* get_vh_registered_users_number/1 is no longer needed
* get_vh_registered_users_number/2 is renamed to count_users/2
* get_password_s/2 is no longer needed
* get_password/2 now must only be implemented for backends with
  `plain` or `scram` store type

Additionally, the commit introduces two new callbacks:
* use_cache/1 where the argument is a virtual host
* cache_nodes/1 where the argument is a virtual host

New options are also introduced: `auth_use_cache`, `auth_cache_missed`,
`auth_cache_life_time` and `auth_cache_size`.

7 years agoUse misc:atom_to_binary/1 instead of the deprecated jlib.erl (#1510)
Badlop [Wed, 10 May 2017 10:05:52 +0000 (12:05 +0200)]
Use misc:atom_to_binary/1 instead of the deprecated jlib.erl (#1510)

7 years agoUpdate comment: aux.erl was renamed to misc.erl
Badlop [Wed, 10 May 2017 10:03:13 +0000 (12:03 +0200)]
Update comment: aux.erl was renamed to misc.erl

7 years agoUse jid:encode/1 instead of the deprecated jid:to_string/1 (#1510)
Badlop [Wed, 10 May 2017 09:17:12 +0000 (11:17 +0200)]
Use jid:encode/1 instead of the deprecated jid:to_string/1 (#1510)

7 years agoFix: update sql statement, added missing delimeter for sql queries
Lamtei W [Mon, 8 May 2017 07:51:12 +0000 (13:21 +0530)]
Fix: update sql statement, added missing delimeter for sql queries

7 years agoAdded export function for mam module
Lamtei W [Sun, 7 May 2017 12:58:11 +0000 (18:28 +0530)]
Added export function for mam module

7 years agoRemove forgotten 'export_all'
Evgeniy Khramtsov [Mon, 8 May 2017 14:23:29 +0000 (17:23 +0300)]
Remove forgotten 'export_all'

7 years agoDon't list 'redis_pool_size' option multiple times
Evgeniy Khramtsov [Mon, 8 May 2017 14:22:34 +0000 (17:22 +0300)]
Don't list 'redis_pool_size' option multiple times

7 years agoSplit some functions in smaller ones
Evgeniy Khramtsov [Mon, 8 May 2017 13:29:01 +0000 (16:29 +0300)]
Split some functions in smaller ones

7 years agoState that Erlang 17.5 or higher is only supported
Evgeniy Khramtsov [Mon, 8 May 2017 12:10:42 +0000 (15:10 +0300)]
State that Erlang 17.5 or higher is only supported

7 years agoDon't call gen_mod:get_opt() outside of modules
Evgeniy Khramtsov [Mon, 8 May 2017 11:34:35 +0000 (14:34 +0300)]
Don't call gen_mod:get_opt() outside of modules

7 years agoAdd type specs for Module:opt_type/1
Evgeniy Khramtsov [Mon, 8 May 2017 09:59:28 +0000 (12:59 +0300)]
Add type specs for Module:opt_type/1

7 years agoLOG_PATH macro should be of string type
Evgeniy Khramtsov [Sat, 6 May 2017 06:42:06 +0000 (09:42 +0300)]
LOG_PATH macro should be of string type

7 years agoIntroduce 'sql_connect_timeout' option (#1698)
Evgeniy Khramtsov [Fri, 5 May 2017 13:25:10 +0000 (16:25 +0300)]
Introduce 'sql_connect_timeout' option (#1698)

7 years agoIntroduce 'sql_query_timeout' option
Evgeniy Khramtsov [Fri, 5 May 2017 10:20:28 +0000 (13:20 +0300)]
Introduce 'sql_query_timeout' option

Fixes #1698

7 years agoEmit deprecation warning for SM related listening options
Evgeniy Khramtsov [Fri, 5 May 2017 09:31:17 +0000 (12:31 +0300)]
Emit deprecation warning for SM related listening options

7 years agoImprove validation of second-level options
Evgeniy Khramtsov [Fri, 5 May 2017 08:11:17 +0000 (11:11 +0300)]
Improve validation of second-level options

7 years agoMake it possible to validate second-level options
Evgeniy Khramtsov [Thu, 4 May 2017 14:34:32 +0000 (17:34 +0300)]
Make it possible to validate second-level options

7 years agoFix elixir tests
Paweł Chmielowski [Thu, 4 May 2017 10:17:41 +0000 (12:17 +0200)]
Fix elixir tests

7 years agoCatch exceptions from acl:add_list in web admin
Paweł Chmielowski [Thu, 4 May 2017 09:18:16 +0000 (11:18 +0200)]
Catch exceptions from acl:add_list in web admin

7 years agoIntroduce 'iqdisc' global option
Evgeniy Khramtsov [Thu, 4 May 2017 09:24:47 +0000 (12:24 +0300)]
Introduce 'iqdisc' global option

7 years agoValidate module options on start_module/2
Evgeniy Khramtsov [Thu, 4 May 2017 06:09:10 +0000 (09:09 +0300)]
Validate module options on start_module/2

7 years agoParse ldap_uids in mod_vcard_ldap like in eldap_utils (#319)
Badlop [Wed, 3 May 2017 21:32:56 +0000 (23:32 +0200)]
Parse ldap_uids in mod_vcard_ldap like in eldap_utils (#319)

7 years agoMerge pull request #1697 from pipo02mix/dockerfile-17-04
Christophe Romain [Wed, 3 May 2017 07:29:23 +0000 (09:29 +0200)]
Merge pull request #1697 from pipo02mix/dockerfile-17-04

Update Dockerfile to be able to build 17.04 ejabberd version

7 years agoValidate new options before module reloading
Evgeniy Khramtsov [Mon, 1 May 2017 11:01:12 +0000 (14:01 +0300)]
Validate new options before module reloading

7 years agoDon't forget to delete digraph
Evgeniy Khramtsov [Mon, 1 May 2017 07:14:00 +0000 (10:14 +0300)]
Don't forget to delete digraph

7 years agoDon't validate an option in gen_mod:get*opt() functions
Evgeniy Khramtsov [Sun, 30 Apr 2017 16:01:47 +0000 (19:01 +0300)]
Don't validate an option in gen_mod:get*opt() functions

The changes are very similar to those from previous commit:
* Now there is no need to pass validating function in
  gen_mod:get_opt() and gen_mod:get_module_opt() functions,
  because the modules' configuration keeps already validated values.
* New functions gen_mod:get_opt/2 and gen_mod:get_module_opt/3 are
  introduced.
* Functions gen_mod:get_opt/4 and get_module_opt/5 are deprecated.
  If the functions are still called, the "function" argument is
  simply ignored.
* Validating callback Mod:listen_opt_type/1 is introduced to validate
  listening options at startup.

7 years agoMerge branch 'new-option-validation'
Evgeniy Khramtsov [Sat, 29 Apr 2017 08:48:57 +0000 (11:48 +0300)]
Merge branch 'new-option-validation'

7 years agoDon't validate an option in ejabberd_config:get_option() functions
Evgeniy Khramtsov [Sat, 29 Apr 2017 08:39:40 +0000 (11:39 +0300)]
Don't validate an option in ejabberd_config:get_option() functions

The commit introduces the following changes:
* Now there is no need to pass validating function in
  ejabberd_config:get_option() functions, because the configuration
  keeps already validated values.
* New function ejabberd_config:get_option/1 is introduced
* Function ejabberd_config:get_option/3 is deprecated. If the function
  is still called, the second argument (validating function) is simply
  ignored.
* The second argument for ejabberd_config:get_option/2 is now
  a default value, not a validating function.

7 years agoDon't re-define validation functions in multiple places
Evgeniy Khramtsov [Fri, 28 Apr 2017 10:23:32 +0000 (13:23 +0300)]
Don't re-define validation functions in multiple places

7 years agoFix elixir tests
Paweł Chmielowski [Fri, 28 Apr 2017 08:08:09 +0000 (10:08 +0200)]
Fix elixir tests

7 years agoBump cache_tab version
Evgeniy Khramtsov [Thu, 27 Apr 2017 17:07:44 +0000 (20:07 +0300)]
Bump cache_tab version

7 years agoStore options using p1_options module
Evgeniy Khramtsov [Thu, 27 Apr 2017 16:44:58 +0000 (19:44 +0300)]
Store options using p1_options module

7 years agoMerge pull request #1702 from skuroki/patch-1
badlop [Thu, 27 Apr 2017 07:58:37 +0000 (09:58 +0200)]
Merge pull request #1702 from skuroki/patch-1

Fix typo

7 years agoBug requesting non-existent data with private_get command (#1690)
Badlop [Wed, 26 Apr 2017 21:14:30 +0000 (23:14 +0200)]
Bug requesting non-existent data with private_get command (#1690)

7 years agoMerge remote-tracking branch 'processone/pr/1699'
Holger Weiss [Wed, 26 Apr 2017 19:18:16 +0000 (21:18 +0200)]
Merge remote-tracking branch 'processone/pr/1699'

* processone/pr/1699:
  Add support for HTTP File Upload, version 0.3.0

7 years agoFix typo
KUROKI Shinsuke [Wed, 26 Apr 2017 08:35:51 +0000 (17:35 +0900)]
Fix typo

7 years agoDon't check result of jid.start
Paweł Chmielowski [Wed, 26 Apr 2017 07:50:49 +0000 (09:50 +0200)]
Don't check result of jid.start

7 years agoAllow a room admin also to subscribe another JID
Badlop [Tue, 25 Apr 2017 23:30:12 +0000 (01:30 +0200)]
Allow a room admin also to subscribe another JID

7 years agomod_stream_mgmt: Fix typo in variable name
Holger Weiss [Tue, 25 Apr 2017 20:37:27 +0000 (22:37 +0200)]
mod_stream_mgmt: Fix typo in variable name

7 years agomod_stream_mgmt: Fix 'if_offline' detection
Holger Weiss [Tue, 25 Apr 2017 20:32:03 +0000 (22:32 +0200)]
mod_stream_mgmt: Fix 'if_offline' detection

7 years agoInclude original 'id' and 'type' attributes in offline event
Evgeniy Khramtsov [Tue, 25 Apr 2017 14:59:26 +0000 (17:59 +0300)]
Include original 'id' and 'type' attributes in offline event

7 years agoDon't check result of jid.start
Paweł Chmielowski [Tue, 25 Apr 2017 14:54:01 +0000 (16:54 +0200)]
Don't check result of jid.start

7 years agoDon't check result of jid.start
Paweł Chmielowski [Tue, 25 Apr 2017 14:31:14 +0000 (16:31 +0200)]
Don't check result of jid.start

7 years agoMake sure only jabber:x:event tag is present in offline event
Evgeniy Khramtsov [Tue, 25 Apr 2017 14:21:24 +0000 (17:21 +0300)]
Make sure only jabber:x:event tag is present in offline event

7 years agoUpdate Dockerfile to be able to build 17.04 ejabberd version
Fernando Ripoll [Tue, 25 Apr 2017 07:35:07 +0000 (09:35 +0200)]
Update Dockerfile to be able to build 17.04 ejabberd version

Because the default installation prefix has changed in the new release, it is needed to add in the configure line of Docker file the argument  --prefix=/

7 years agorandoms: Keep compatibility with Erlang/OTP 17
Holger Weiss [Mon, 24 Apr 2017 21:51:01 +0000 (23:51 +0200)]
randoms: Keep compatibility with Erlang/OTP 17

7 years agoAvoid changing configuration on listener deletion
Evgeniy Khramtsov [Sun, 23 Apr 2017 13:42:54 +0000 (16:42 +0300)]
Avoid changing configuration on listener deletion

7 years agoImprove Mnesia tables creation and transformation
Evgeniy Khramtsov [Sun, 23 Apr 2017 13:37:58 +0000 (16:37 +0300)]
Improve Mnesia tables creation and transformation

7 years agoUse round-robin algorithm when selecting worker from DB pool
Evgeniy Khramtsov [Sun, 23 Apr 2017 08:54:56 +0000 (11:54 +0300)]
Use round-robin algorithm when selecting worker from DB pool

7 years agoAdd clear_cache admin command
Evgeniy Khramtsov [Sat, 22 Apr 2017 08:33:39 +0000 (11:33 +0300)]
Add clear_cache admin command

7 years agoAdd support for HTTP File Upload, version 0.3.0
Holger Weiss [Fri, 21 Apr 2017 16:36:53 +0000 (18:36 +0200)]
Add support for HTTP File Upload, version 0.3.0

Support the current XEP-0363 version in addition to the previous
revisions.

7 years agoFix elixir tests
PaweÅ\82 Chmielowski [Fri, 21 Apr 2017 10:03:05 +0000 (12:03 +0200)]
Fix elixir tests

7 years agoSpeedup Mnesia tables initialization
Evgeniy Khramtsov [Fri, 21 Apr 2017 09:27:15 +0000 (12:27 +0300)]
Speedup Mnesia tables initialization

7 years agoUse new cache API in mod_shared_roster_ldap
Evgeniy Khramtsov [Fri, 21 Apr 2017 07:43:14 +0000 (10:43 +0300)]
Use new cache API in mod_shared_roster_ldap

7 years agoUse new cache API in ejabberd_oauth
Evgeniy Khramtsov [Fri, 21 Apr 2017 06:02:10 +0000 (09:02 +0300)]
Use new cache API in ejabberd_oauth

7 years agoCorrect option validation
Evgeniy Khramtsov [Thu, 20 Apr 2017 15:55:16 +0000 (18:55 +0300)]
Correct option validation

7 years agoUse new cache API in mod_mam
Evgeniy Khramtsov [Thu, 20 Apr 2017 15:52:16 +0000 (18:52 +0300)]
Use new cache API in mod_mam

7 years agoUse new cache API in mod_caps
Evgeniy Khramtsov [Thu, 20 Apr 2017 15:18:26 +0000 (18:18 +0300)]
Use new cache API in mod_caps

7 years agoFix private_get command sending a proper xmlel (#1683)
Badlop [Thu, 20 Apr 2017 14:50:08 +0000 (16:50 +0200)]
Fix private_get command sending a proper xmlel (#1683)

7 years agoWhen getting user rooms, filter by the serverhost as expected (#1683)
Badlop [Thu, 20 Apr 2017 14:49:32 +0000 (16:49 +0200)]
When getting user rooms, filter by the serverhost as expected (#1683)

7 years agomod_stream_mgmt: Preserve stanza count on timeout
Holger Weiss [Wed, 19 Apr 2017 21:04:20 +0000 (23:04 +0200)]
mod_stream_mgmt: Preserve stanza count on timeout

If a pending stream management session times out, call
ejabberd_c2s:process_terminated/2 *before* storing the incoming stanza
count.  Without this change, the session table entry that holds the
stanza count was purged while closing the session.

7 years agoUse #jid{} type for #muc_unsubscribe.jid
Holger Weiss [Wed, 19 Apr 2017 20:18:23 +0000 (22:18 +0200)]
Use #jid{} type for #muc_unsubscribe.jid

7 years agoDon't use jid:from_string as it's deprecated, see jid.erl line 43
Badlop [Wed, 19 Apr 2017 19:47:10 +0000 (21:47 +0200)]
Don't use jid:from_string as it's deprecated, see jid.erl line 43

7 years agoDon't try to load already loaded applications
Evgeniy Khramtsov [Wed, 19 Apr 2017 08:40:58 +0000 (11:40 +0300)]
Don't try to load already loaded applications

7 years agoejabberd_c2s: Don't close session on stream resume
Holger Weiss [Tue, 18 Apr 2017 23:20:28 +0000 (01:20 +0200)]
ejabberd_c2s: Don't close session on stream resume

Don't let ejabberd_c2s close the session and unset presence if a
'c2s_terminated' callback stops hook execution, as is done in
mod_stream_mgmt:c2s_terminated/2 on resumption.

Fixes #1680.

7 years agoFunction fix_from_to/2 should not crash when 'from' is undefined
Evgeniy Khramtsov [Mon, 17 Apr 2017 22:38:35 +0000 (01:38 +0300)]
Function fix_from_to/2 should not crash when 'from' is undefined

Fixes #1678

7 years agoMerge pull request #1677 from getong/catch_lager_crash_log_not_run
Evgeny Khramtsov [Mon, 17 Apr 2017 05:44:00 +0000 (09:44 +0400)]
Merge pull request #1677 from getong/catch_lager_crash_log_not_run

lager_crash_log in some cases not run, catch it

7 years agolager_crash_log in some cases not run, catch it
getong [Mon, 17 Apr 2017 04:07:23 +0000 (12:07 +0800)]
lager_crash_log in some cases not run, catch it

7 years agoImprove logging message
Evgeniy Khramtsov [Sun, 16 Apr 2017 20:56:12 +0000 (23:56 +0300)]
Improve logging message

7 years agoMove compile_exprs() to misc module
Evgeniy Khramtsov [Sun, 16 Apr 2017 17:05:46 +0000 (20:05 +0300)]
Move compile_exprs() to misc module

7 years agoSpeedup configuration options lookup
Evgeniy Khramtsov [Sun, 16 Apr 2017 12:29:10 +0000 (15:29 +0300)]
Speedup configuration options lookup

We now avoid excessive ETS lookups; instead, we use dynamically
compiled module 'ejabberd_options' keeping the configuration options

7 years agoDefault config file should be ejabberd.yml
Evgeniy Khramtsov [Sat, 15 Apr 2017 22:26:33 +0000 (01:26 +0300)]
Default config file should be ejabberd.yml

7 years agoLog human readable description when configuration file is not found
Evgeniy Khramtsov [Sat, 15 Apr 2017 22:22:55 +0000 (01:22 +0300)]
Log human readable description when configuration file is not found

7 years agoReport configuration file location on startup
Evgeniy Khramtsov [Sat, 15 Apr 2017 22:02:46 +0000 (01:02 +0300)]
Report configuration file location on startup

7 years agoSpeedup loading of translation files
Evgeniy Khramtsov [Sat, 15 Apr 2017 21:29:55 +0000 (00:29 +0300)]
Speedup loading of translation files

A dump of 'translations' ETS table is now stored on disc.
The table is only re-created when new/deleted/modified translation
files are detected; otherwise, the ETS table is restored from
the dump file on startup.

7 years agoLower log level for some messages
Evgeniy Khramtsov [Sat, 15 Apr 2017 12:47:00 +0000 (15:47 +0300)]
Lower log level for some messages

7 years agoAdd Riak as mod_proxy65 RAM backend
Evgeniy Khramtsov [Sat, 15 Apr 2017 12:38:48 +0000 (15:38 +0300)]
Add Riak as mod_proxy65 RAM backend

7 years agoAdd Riak as mod_carboncopy RAM backend
Evgeniy Khramtsov [Sat, 15 Apr 2017 11:41:14 +0000 (14:41 +0300)]
Add Riak as mod_carboncopy RAM backend

7 years agoAdd Riak as BOSH RAM backend
Evgeniy Khramtsov [Sat, 15 Apr 2017 10:52:36 +0000 (13:52 +0300)]
Add Riak as BOSH RAM backend

7 years agoFix cleaning of Riak route table
Evgeniy Khramtsov [Sat, 15 Apr 2017 10:36:29 +0000 (13:36 +0300)]
Fix cleaning of Riak route table

7 years agoAdd Riak as router RAM backend
Evgeniy Khramtsov [Sat, 15 Apr 2017 10:07:56 +0000 (13:07 +0300)]
Add Riak as router RAM backend

7 years agoFix closing of outbound S2S connections
Evgeniy Khramtsov [Sat, 15 Apr 2017 08:15:50 +0000 (11:15 +0300)]
Fix closing of outbound S2S connections

7 years agoAdd Riak as session manager RAM backend
Evgeniy Khramtsov [Sat, 15 Apr 2017 07:02:32 +0000 (10:02 +0300)]
Add Riak as session manager RAM backend

7 years agoImprove ejabberd_c2s:close()
Evgeniy Khramtsov [Sat, 15 Apr 2017 05:30:41 +0000 (08:30 +0300)]
Improve ejabberd_c2s:close()

7 years agoMake sure stream trailer is sent in the very end
Evgeniy Khramtsov [Fri, 14 Apr 2017 17:56:01 +0000 (20:56 +0300)]
Make sure stream trailer is sent in the very end

7 years agoBetter process session close
Evgeniy Khramtsov [Fri, 14 Apr 2017 17:41:25 +0000 (20:41 +0300)]
Better process session close

7 years agoFix a typo
Evgeniy Khramtsov [Fri, 14 Apr 2017 17:40:39 +0000 (20:40 +0300)]
Fix a typo

7 years agoFix ejabberd_router:is_my_route/1
Evgeniy Khramtsov [Fri, 14 Apr 2017 17:34:00 +0000 (20:34 +0300)]
Fix ejabberd_router:is_my_route/1

7 years agoDon't forget to disconnect
Evgeniy Khramtsov [Fri, 14 Apr 2017 17:32:26 +0000 (20:32 +0300)]
Don't forget to disconnect

7 years agoUse cache in front of Redis/SQL RAM backends
Evgeniy Khramtsov [Fri, 14 Apr 2017 10:57:52 +0000 (13:57 +0300)]
Use cache in front of Redis/SQL RAM backends

7 years agoBump xmpp dependency, it's required by previous commit
Paweł Chmielowski [Fri, 14 Apr 2017 07:47:25 +0000 (09:47 +0200)]
Bump xmpp dependency, it's required by previous commit

7 years agoAllow a room admin to unsubscribe another JID
Badlop [Thu, 13 Apr 2017 20:37:39 +0000 (22:37 +0200)]
Allow a room admin to unsubscribe another JID

7 years agoTravis CI: Update MySQL package
Holger Weiss [Tue, 11 Apr 2017 11:52:10 +0000 (13:52 +0200)]
Travis CI: Update MySQL package

The "mysql-server-5.6" package is no longer available.

7 years agomod_muc_room: Replace deprecated function call
Holger Weiss [Tue, 11 Apr 2017 11:38:33 +0000 (13:38 +0200)]
mod_muc_room: Replace deprecated function call

Use jid:decode/1 instead of jlib:string_to_jid/1.

7 years agoRename aux.erl as misc.erl 17.04
Christophe Romain [Tue, 11 Apr 2017 10:13:58 +0000 (12:13 +0200)]
Rename aux.erl as misc.erl

Thanks Microsoft Windows to not support some filenames

7 years agoUse p1_utils 1.0.8
Christophe Romain [Tue, 11 Apr 2017 06:11:29 +0000 (08:11 +0200)]
Use p1_utils 1.0.8

7 years agoNew muc_register_nick command (thanks to Peter Marheine)(#1407)
Badlop [Mon, 10 Apr 2017 10:23:14 +0000 (12:23 +0200)]
New muc_register_nick command (thanks to Peter Marheine)(#1407)

7 years agoMerge pull request #1666 from weiss/fix-csi
Christophe Romain [Fri, 7 Apr 2017 13:10:39 +0000 (15:10 +0200)]
Merge pull request #1666 from weiss/fix-csi

Let CSI keep latest stanzas of each given full JID

7 years agoMerge pull request #1664 from weiss/fix-routing
Christophe Romain [Fri, 7 Apr 2017 13:10:26 +0000 (15:10 +0200)]
Merge pull request #1664 from weiss/fix-routing

Fix routing of groupchat and headline messages