Compare commits

...

3778 Commits

Author SHA1 Message Date
Paweł Chmielowski c526b0e8ff Update mix.lock 2018-06-28 12:11:44 +02:00
Paweł Chmielowski 35136f47ed Bump version in mix.exs 2018-06-28 10:57:09 +02:00
Paweł Chmielowski 8f2233eff7 Update deps 2018-06-28 10:56:59 +02: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
https://github.com/erlang/otp/commit/304dd8f81e28ed04cde9f6f7ac1f79870da1c2cd

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 d809aafba0 Fix Erlang limits in ejabberdctl.cfg.example to reflect current situation 2018-06-23 20:01:21 +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 f465742f2c Remove lowercased duplicates from ejabberd.pot 2018-06-20 13:02:06 +03: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 aea6166efe Omit summary form for push tests 2018-06-20 00:15:56 +02: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 7bd5c7fe59 Update mod_muc_room.hrl 2018-06-14 19:19:09 +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 141be53c21 Get rid of ejabberd.hrl reference from the test suite 2018-06-14 14:24:15 +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
Christophe Romain 4f293751f0 Update mix deps 2018-06-11 14:21:35 +02:00
Evgeniy Khramtsov 6f481e3ceb Avoid lager crash on external authentication failure
Fixes #2463
2018-06-08 09:51:26 +03:00
Holger Weiss 00534d4566 Increase start-up/stop timeout in systemd unit
On slow systems, it can take quite a while for "ejabberdctl started"
and/or "ejabberdctl stopped" to return.
2018-06-07 17:40:05 +02:00
Paweł Chmielowski 40185b6bd3 Add ability to modify version string 2018-06-07 15:38:33 +02:00
Evgeny Khramtsov 1de407c420 Merge pull request #2460 from imShara/patch-1
OMEMO enable HOWTO added
2018-06-06 20:05:42 +03:00
imShara 815b95c623 OMEMO enable HOWTO added
Depend on #2425
2018-06-06 20:03:42 +03:00
Holger Weiss 8e1a13b259 upload_tests: Make size error check stricter 2018-06-04 23:29:24 +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 22d76659c0 Bump xmpp version in order to support language tags validation 2018-05-30 09:54:26 +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
Evgeny Khramtsov 3b9e6eaa95 Merge pull request #2438 from licaon-kter/patch-3
Add default_db in the example config
2018-05-28 16:22:30 +03:00
Licaon_Kter 2c18f89d5b Add default_db in the example config
I only found it in the docs after setting up per module db_
2018-05-28 13:19:59 +00: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
Evgeny Khramtsov 2bbfc0b79e Merge pull request #2431 from yokomizor/fix-xmpp-commit
Missing #block_item{} record building with mix
2018-05-22 17:45:53 +03:00
Evgeny Khramtsov 10a5a5eb01 Merge pull request #2430 from yokomizor/ext_mod-export-add_sources_1
Export ext_mod:add_sources/1
2018-05-22 17:39:27 +03:00
Rogério da Silva Yokomizo 2e529f5826 Missing #block_item{} record building with mix
Ref: #638f2d2
2018-05-22 16:37:39 +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 82c42051c3 Correctly resolve upload.localhost for the test suite 2018-05-17 13:24:23 +03:00
Evgeniy Khramtsov e4c106e0dd Add tests for mod_http_upload 2018-05-17 12:02:00 +03: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
Paweł Chmielowski 338d27b45b Use never version of moka 2018-05-09 10:58: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
Evgeniy Khramtsov 3ac1675919 Option watchdog_admins has no effect anymore 2018-05-08 23:47:37 +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 46f47db512 Get rid of unused rebar instructions 2018-05-08 16:17:07 +03:00
Paweł Chmielowski 6811b92a80 Don't use warnings_as_errors in samerlib 2018-05-08 11:37:20 +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 56ee6f0518 Ignore any policy when signing a certificate for the test suite 2018-05-02 10:52:46 +03:00
Evgeniy Khramtsov 4e83fc41d4 Also generate CA certificates for the test suite 2018-05-02 10:28:22 +03:00
Evgeniy Khramtsov 4ea481d1dd Add validator for 'accept_interval' listening option 2018-04-30 11:52:00 +03:00
Christophe Romain 0bd4d1aade Update mix.exs version 2018-04-25 12:30:36 +02:00
Paweł Chmielowski d49aa429ca Update deps 2018-04-25 10:45:18 +02:00
Christophe Romain 316a19d600 Merge pull request #2399 from 4z3/ejabberdctl-fix-parser
ejabberdctl: fix parameters parsing
2018-04-25 10:39:19 +02:00
tv c43037887a ejabberdctl: fix parameter parsing 2018-04-25 00:41:30 +02: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
Christophe Romain 67773c5174 Merge branch 'master' of github.com:processone/ejabberd 2018-04-24 14:44:58 +02:00
Christophe Romain 61dee97738 Pubsub creation/modification use varchar (#2397) 2018-04-24 14:44:52 +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 ec819b4002 Update MUC MAM tests 2018-04-16 16:10:44 +03: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
Paweł Chmielowski 95244c3b6f Fix csi tests 2018-04-12 17:08:27 +02:00
a-iv 89d91b609a New schema support for tests. (#2355) 2018-04-12 15:42:43 +02:00
Christophe Romain d28064518b Improve pubsub#itemreply implementation (#2325) 2018-04-12 15:38:12 +02:00
Evgeniy Khramtsov 7627575856 Update the xmpp dependency to support 'parent' attribute
Fixes #2375
2018-04-11 09:34:06 +03: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
Evgeny Khramtsov 0041a11c4a Merge pull request #2357 from Pouriya-Jahanbakhsh/component-send-packet-hook
feat: add hook for sending packet from component
2018-03-30 21:51:03 +03: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
Evgeny Khramtsov a84771fd14 Merge pull request #2351 from rom1dep/config-order_c2s-direct
config: move section about direct-tls for c2s just under regular c2s config
2018-03-29 08:32:13 +03:00
Romain DEP. 2bb6782bee config: move section about direct-tls for c2s just under regular c2s config (to ease parameters comparison) 2018-03-28 23:17:43 +02:00
Mickael Remond ae151927ae Add support for PATCH http method
This is needed to improve out APIs.
2018-03-28 17:34:47 +02:00
Paweł Chmielowski dfbdffad44 Fix process_discoitems_result in mod_multicast 2018-03-28 11:23:28 +02:00
Paweł Chmielowski d71bc73271 Update eimp 2018-03-26 16:18:29 +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
Christophe Romain f3b3bffec0 Get rid of 'fs' package dependency in mix 2018-03-23 14:48:17 +01: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 75450a62b3 Clarify the statement about mod_http_upload thumbnails 2018-03-23 16:19:13 +03:00
Evgeniy Khramtsov a15039638b Force node config for bookmarks 2018-03-23 16:16:27 +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
Paweł Chmielowski 92bc5dc85b Update mix deps 2018-03-23 13:27:58 +01:00
Christophe Romain baf2473688 Update mix.exs version 2018-03-23 12:56:17 +01:00
Evgeniy Khramtsov f5bab5d6c4 Fetch 'registration_watchers' option from the correct module
Fixes #2337
2018-03-23 09:42:55 +03:00
Paweł Chmielowski b23be02dfe Update deps 2018-03-22 16:15:19 +01: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 b293e99aee Add option --enable-group=xxx (thanks to andreabenini)(#1429) 2018-03-20 23:39:07 +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:x: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 b179874ec6 Add mod_fail2ban to the example config 2018-03-10 21:41:55 +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
Evgeny Khramtsov b5138a8ddb Merge pull request #2311 from nosnilmot/validate-listen-opts
Validate additional listen opts
2018-02-28 19:37:57 +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 5912c573ea Use length on fields in mysql indexes 2018-02-26 09:43:04 +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
Evgeny Khramtsov 0a67cdfb16 Merge pull request #2304 from weiss/run-auth-callbacks-earlier
Run SASL result callbacks earlier
2018-02-26 09:04:32 +03: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
Evgeny Khramtsov 35be7d2718 Merge pull request #2299 from weiss/add-username-to-indexes
Add username to peer indexes for MAM lookups
2018-02-24 07:41:44 +03:00
Holger Weiss f7566bd00e sql/*: Add username to peer indexes
The username is available for all MAM queries in question, and adding it
to the indexes can improve the lookup performance significantly.
2018-02-24 00:50:20 +01:00
Evgeny Khramtsov 5bf753fd2d Merge pull request #2297 from af8a524db1/move_make_rand_string
Move make_rand_string() to 'randoms' module
2018-02-23 20:35:37 +03: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
Evgeniy Khramtsov f5d208441d Improve example extauth script 2018-02-16 20:34:09 +03:00
Paweł Chmielowski 71a856deaa Handle gracefully that mnesia is already loaded when starting tests 2018-02-16 16:49:48 +01: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
Evgeny Khramtsov 42794ce4e4 Merge pull request #2274 from Torxen/feature/fixed-return-value-mod_muc
Issue: mod_muc.erl expect wrong return value
2018-02-12 17:36:47 +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 11a58f8dff Bump xmpp version 2018-02-11 09:45:54 +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 3327da72a6 Merge branch 'master' of github.com:processone/ejabberd 2018-02-05 15:13:23 +03:00
Evgeniy Khramtsov c65dcfeda7 Export is_online/1 function 2018-02-05 15:13:13 +03:00
Jérôme Sautret 411d1711a0 Merge pull request #2266 from mieciu/master
Fix MySQL ERROR 1170 (42000) 'server_host'
2018-02-05 13:04:25 +01:00
phejman bef7d1ba66 Fix MySQL error server_host used in key specification without a key length 2018-02-05 12:33:59 +01:00
Evgeniy Khramtsov c990abf222 Improve log message when module startup has failed 2018-02-02 13:16:14 +03:00
Paweł Chmielowski 983aaac765 Another try to fix travis 2018-01-31 17:54:32 +01:00
Paweł Chmielowski 0f25e59143 Properly escape string in travis config 2018-01-31 17:10:05 +01:00
Paweł Chmielowski 2a77805072 Print something when doing tests in travis, as not doing that get us killed 2018-01-31 17:03:18 +01:00
Paweł Chmielowski b86402f3e7 Don't run tests in verbose mode on travis 2018-01-31 16:10:09 +01:00
Paweł Chmielowski f6ebbe4c78 Fix compilation ordering in mix by s/-behavior/-behaviour/ 2018-01-31 14:57:43 +01:00
Paweł Chmielowski 485f8e48e5 Fix mod_roster start invocation in elixir tests 2018-01-31 09:34:54 +01:00
Paweł Chmielowski 51f652a1e1 Fix elixir tests 2018-01-30 19:45:12 +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 69de43d5ee Remove line left from debugging 2018-01-30 18:37:17 +01:00
Paweł Chmielowski ad4ffce788 Start ejabberd_config earlier 2018-01-30 18:24:47 +01:00
Paweł Chmielowski cd82a9d534 Disable riak in travis 2018-01-30 15:31:07 +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 b69fb5aae0 Bump sqlite deps version 2018-01-30 12:51: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 719dfe12f6 Use named functions instead of carrying self as argument 2018-01-29 10:02:20 +01:00
Paweł Chmielowski c47366ba97 Restore original return value to ejabberd_config:add_option 2018-01-29 09:46:11 +01:00
Holger Weiss 1b26c8d214 ejabberdctl: Omit redundant erl option
The "-detached" flag implies "-noinput".
2018-01-29 01:16:20 +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
Paweł Chmielowski 7e561dd20a Fix more tests 2018-01-25 18:43:34 +01:00
Paweł Chmielowski 2afdde84ea Adopt tests to changes in xmpp 2018-01-25 18:24:05 +01: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
Paweł Chmielowski 6cdb7b4468 Fix tag used in luerl dependency 2018-01-23 09:37:46 +01: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
Christophe Romain 121d12f4d1 Move luerl as optional tools dependency 2018-01-22 17:42:27 +01:00
Christophe Romain 7abd13974b Remove deps override on mix 2018-01-22 17:42:02 +01:00
Holger Weiss ae86af9399 Merge remote-tracking branch 'processone/pr/2238'
* processone/pr/2238:
  Fix typo /this/it/
2018-01-21 15:05:05 +01:00
Licaon_Kter a0c8cac1b6 Fix typo /this/it/ 2018-01-21 13:44:30 +00: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
Christophe Romain 1daa7ef785 Sync mix and rebar for eimp dep 2018-01-16 11:45:29 +01:00
Evgeniy Khramtsov 7b0fa7e6e2 Improve validation of 'convert' option 2018-01-16 01:06:20 +03:00
Christophe Romain 8bdccc25ab Include acme deps in release, fixes f2c3fe8ac 2018-01-15 22:21:24 +01:00
Paweł Chmielowski 59b7c89944 Use correct name of new rebar command 2018-01-15 15:21:04 +01:00
Paweł Chmielowski a7639fd4ad Call configure on deps in separate rebar command that compile
This way we rebar.config.script can use vars detected by configure
2018-01-15 12:31:47 +01:00
Paweł Chmielowski 99f8e58eaf Use override syntax that rebar3 accepts 2018-01-15 11:56:20 +01: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 be592c9272 Don't report errors when trying to remove not existing files in make install 2018-01-15 10:38:36 +01: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
Evgeny Khramtsov d2427c98c3 Merge pull request #2221 from licaon-kter/patch-1
Fix example config macro names
2018-01-14 09:54:22 +03:00
Licaon_Kter 84819ba0fe Fix example config macro names
These were missed in https://github.com/processone/ejabberd/commit/c26b56679e06ef8b88734030de11c6b885f9bb78#diff-19e0c10699732f76181f70cfbec95d38 I guess.
2018-01-13 21:38:01 +00:00
Evgeniy Khramtsov f66a004821 Improve logging of failed s2s EXTERNAL authentication 2018-01-13 13:01:40 +03:00
Paweł Chmielowski e1da673502 Fix detection of rebar3
Looks like sometimes rebar3 report version that can't be split to 3 fields
by '.', we need only first one so don't match the rest
2018-01-12 17:12:46 +01:00
Paweł Chmielowski 7d58b7a100 Improve resolving of system deps
This version is able to search for know alternative names of deps and
helps with running tests when using system deps
2018-01-12 16:16:12 +01:00
Christophe Romain f2c3fe8ac6 Add mix dependencies for acme support 2018-01-12 12:28:31 +01:00
Evgeniy Khramtsov 1c1b12fc64 Note about direct-tls connections in example config 2018-01-12 10:27:33 +03:00
Paweł Chmielowski 1825cfaf05 Include newly releases fast_tls/esip/stun in mix.lock 2018-01-11 14:38:54 +01:00
Paweł Chmielowski b8319c6617 Update mix.lock 2018-01-11 11:20:07 +01:00
Paweł Chmielowski 9e3a000748 Update deps 2018-01-11 11:11:56 +01:00
Christophe Romain d6e1bc242c Remove old docker specs 2018-01-11 10:19:56 +01:00
Christophe Romain 465629d458 Prepare mix for 18.01 2018-01-10 23:06:06 +01:00
Christophe Romain 7875cac786 Update mix deps 2018-01-10 18:14:52 +01:00
Paweł Chmielowski d0bfcbbfd8 Handle error case from code:lib_dir in ResolveDepPath in rebar.config.script 2018-01-10 16:34:16 +01:00
Christophe Romain 88e6f1c6aa Update mix deps 2018-01-10 12:07:19 +01:00
Paweł Chmielowski cea5f14e88 Update deps again 2018-01-10 11:55:34 +01:00
Christophe Romain 8641c6cb34 Update mix deps 2018-01-10 11:48:53 +01:00
Paweł Chmielowski e04b4c52fd Update deps 2018-01-10 11:32:11 +01:00
Christophe Romain 1fac3e58b3 Fix indentation in commented example 2018-01-10 11:24:09 +01:00
Christophe Romain f914c61f42 Report fs not suported on SunOS (#2204) 2018-01-10 10:58:47 +01: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
Mickaël Rémond 8a05c4ee27 Create CODE_OF_CONDUCT.md 2018-01-09 14:17:55 +01:00
Evgeniy Khramtsov e822ce3554 Merge branch 'master' of github.com:processone/ejabberd 2018-01-08 13:45:21 +03:00
Evgeniy Khramtsov aa9f2e5b88 Ignore result of sending stream trailer in test suite 2018-01-08 13:45:08 +03:00
Paweł Chmielowski c5a4f67935 Delete old .so and executable files before installing new one
This fixes crash for people who have live ejabberd installed in make install
target directory, by ensuring that loaded binaries aren't replaced in memory
with new content.
2018-01-08 11:11:50 +01:00
Paweł Chmielowski 2b0cc2ddb4 Make all install target rules as .PHONY 2018-01-08 11:11:50 +01:00
Paweł Chmielowski 3f8eff27fa Refactor code for installing binaries 2018-01-08 11:11:50 +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 150f33b39b Update copyright dates in header files 2018-01-06 14:01:45 +03:00
Evgeniy Khramtsov 2d23dfccfd Don't display copyright dates in vCards of services
Copyright dates in vCards may paritally disclose server version,
which is not always desired
2018-01-06 13:55:24 +03:00
Evgeniy Khramtsov ee23b688a7 Use TLS defaults from fast_tls 2018-01-06 13:46:02 +03:00
Evgeniy Khramtsov cdc7c1d1ed Update copyright dates 2018-01-05 23:18:58 +03:00
Evgeniy Khramtsov da2353d996 Refer to new fast_tls version 2018-01-05 17:56:32 +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
Holger Weiss dbbe3a9e62 Merge remote-tracking branch 'processone/pr/2203'
* processone/pr/2203:
  mod_proxy65: Expand @HOST@ keyword in 'hostname' option
2018-01-03 22:33:18 +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
Mickael Remond 1fcb6d7f36 Make mysql and pgsql one of the default module for Mix 2017-12-29 17:22:59 +01:00
Mickael Remond 4ae688605f Regenerated mix.lock file 2017-12-29 17:18:59 +01:00
Evgeniy Khramtsov 485100f907 Merge branch 'master' of github.com:processone/ejabberd 2017-12-28 21:37:19 +03:00
Evgeniy Khramtsov 240977a0da Repair hosts check during certfiles validation 2017-12-28 21:36:57 +03:00
Christophe Romain cdc9c93b9b Fix stun/esip mix deps 2017-12-28 15:38:24 +01:00
Evgeniy Khramtsov 529d6d8a93 Return default certificate on domain mismatch 2017-12-28 17:24:23 +03:00
Christophe Romain dd9281da13 Let mix pass compile ejabberd as dependency 2017-12-28 15:16:29 +01:00
Christophe Romain 1b8794c991 Update mix spec 2017-12-28 14:43:13 +01:00
Paweł Chmielowski 48c96dc1a9 Update stun and esip 2017-12-28 14:34:50 +01:00
Christophe Romain 439fe0b504 Fix check_opt_range when no boundary is configured 2017-12-28 13:51:26 +01:00
Evgeniy Khramtsov e03d41647b Merge branch 'master' of github.com:processone/ejabberd 2017-12-28 14:01:39 +03:00
Evgeniy Khramtsov 23c5fd9a4f Return send() result to the caller 2017-12-28 14:01:34 +03: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 d59d4e27ec Adopt tests to changes introduced by b54e1e49ba 2017-12-27 16:16:15 +01:00
Paweł Chmielowski e6d1ff85f1 Use bare jid when processing roster subscriptions 2017-12-27 16:14:47 +01:00
Christophe Romain ef6af11f17 Rename mnesiadb 2017-12-27 12:42:55 +01:00
Christophe Romain 6bdf29676c Add missing application building with mix 2017-12-27 12:33:52 +01:00
Christophe Romain 56241feb58 Include os_mon application 2017-12-27 12:28:13 +01:00
Christophe Romain 9fcc12dca7 Prepare mix for 17.12 2017-12-27 11:42:37 +01:00
Evgeny Khramtsov bbb1f7002d Merge pull request #2188 from weiss/fix-acl-reload
Forget old access/shaper rules and ACLs on reload
2017-12-27 09:34:19 +03:00
Evgeniy Khramtsov 812acf0688 Update the test suite to support new XMPP socket API 2017-12-27 08:55:14 +03:00
Holger Weiss 60b6a508e0 Forget old access/shaper rules and ACLs on reload 2017-12-26 19:37:11 +01:00
Alexey Shchepin 34d09018a7 Add new schemas for SQLite and MySQL 2017-12-26 20:48:15 +03:00
Evgeniy Khramtsov 7cdc51becd Merge branch 'no-more-ejabberd-receivers'
Conflicts:
	rebar.config
2017-12-26 19:02:54 +03: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
Christophe Romain 514df9ac18 Cleanup rebar.config 2017-12-26 11:16:48 +01:00
Christophe Romain a8c3ed5ed4 Remove obsolete option 2017-12-26 11:13:47 +01:00
Christophe Romain e7308b7d86 Update dependencies 2017-12-26 11:13:18 +01: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
Paweł Chmielowski 32ad7d3761 Disable test for now 2017-12-21 11:49:33 +01:00
Paweł Chmielowski 7f073fbcd8 Update expected error type in test 2017-12-21 11:43:09 +01:00
Christophe Romain 826387446a Let mix aware of unpackaged hex.pm dependencies (#2170) 2017-12-21 11:10:56 +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
Evgeny Khramtsov 4352cb9fed Merge pull request #2167 from weiss/last-pep-items-to-owner
Send last PEP items to owner on initial presence
2017-12-14 10:30:03 +03:00
Holger Weiss 5968bc9318 Send last PEP items to owner on initial presence
Closes #2112.
2017-12-13 18:59:06 +01:00
Christophe Romain a65a78ebfe Merge pull request #2158 from bowlofeggs/su-with-sh
Use /bin/sh as the explicit shell when using su in ejabberdctl.
2017-12-13 16:04:25 +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
Christophe Romain 57e3f49352 Merge pull request #2160 from weiss/publish-options
Support pubsub#publish-options PRECONDITIONs
2017-12-12 10:53:17 +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
Christophe Romain 47f6fc8dd2 Revert removal of certfile option on http listener 2017-12-11 11:00:24 +01:00
Christophe Romain 42b2e6c5ab Update example configuration 2017-12-11 10:27:48 +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
Randy Barlow 12d9d97baa Use /bin/sh as the explicit shell when using su in ejabberdctl.
Some distributions (such as Fedora) use /sbin/nologin as the login
shell for the ejabberd user. The newer version of ejabberdctl uses
su to perform the command if the INSTALLUSER invokes the script.
This commit adjusts the call to su so that it passes /bin/sh as
the shell to use so that it will work correctly when the ejabberd
user's shell is set to nologin.

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
2017-12-10 12:52:22 -05: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 a820d735c0 Replace s2s_cafile with ca_file in ejabberd.yml.example 2017-12-07 14:58:58 +03:00
Evgeniy Khramtsov a303373b0f Speedup certificate chains creation and validation 2017-12-07 14:32:12 +03:00
Paweł Chmielowski d8ace67a50 Compile sql_pt early 2017-12-07 10:47:30 +01: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 abeee837fc Bump xmpp and fast_xml revisions 2017-12-06 18:36:04 +03: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
nosnilmot bca87e2c89 Set executable permission on mac_listener when installing (#2138) 2017-12-01 17:28:31 +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
Alexey Shchepin cf67b9ec54 Add missed server_host column in pg.new.sql 2017-11-30 13:08:38 +03:00
Evgeniy Khramtsov ddaa8c7c1d Merge branch 'master' of github.com:processone/ejabberd 2017-11-27 13:09:53 +03:00
Paweł Chmielowski b072342aa9 Adapt test to changed error 2017-11-27 11:12:46 +01: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
Christophe Romain cf8e70abc8 Fix minor typo in comment 2017-11-24 17:17:48 +01: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 6a0e24fb14 Update URL to IM Observatory 2017-11-20 15:07:06 +03:00
Evgeniy Khramtsov e9e56ed183 Add notes about s2s_cafile 2017-11-20 15:02:24 +03:00
Paweł Chmielowski 6686a64d5f Fix filtering of rebar list-deps 2017-11-20 12:51:19 +01:00
Evgeniy Khramtsov c26b56679e Modernize the example config a bit 2017-11-20 13:34:16 +03:00
Paweł Chmielowski 98b411523d Update deps 2017-11-20 10:42:05 +01:00
Paweł Chmielowski 4b9d299e90 Make update-deps-releases.pl work with older perl 2017-11-20 10:41:52 +01: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
Paweł Chmielowski b67a114ef5 Fix elixir tests 2017-11-17 12:19:26 +01:00
Evgeniy Khramtsov 224a3e13c9 Improve ACME options validation 2017-11-17 13:06:04 +03:00
Evgeniy Khramtsov 382fb62f29 Merge branch 'master' of github.com:processone/ejabberd 2017-11-17 12:50:38 +03:00
Paweł Chmielowski b6b70ec0d4 Switch riak backend to leveldb on travis 2017-11-17 10:54:28 +01: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
Paweł Chmielowski c05626a1ba Fix sed invocation that was incompatible with FreeBSD sed 2017-11-17 09:50:24 +01: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 11ee896f10 Improve ACME description 2017-11-15 12:57:53 +03: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
nosnilmot 0c6ef98d01 Avoid badarg error when running get-deps before ./configure has created src/ejabberd.app (#2103) 2017-11-15 09:21:05 +01:00
Holger Weiss 6cd3867197 Makefile.in: Fix "make clean && make" 2017-11-15 08:50:40 +01: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 1413f5dd23 Fix a record default 2017-11-13 11:29:03 +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
Konstantinos Kallas 78f494dd2e Configuration file changes
Explain the acme configuration options
2017-11-11 15:38:47 +02: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
Evgeniy Khramtsov 675a1e0b0f Fix a test related to mod_caps 2017-11-10 20:58:13 +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
Evgeny Khramtsov 66c9f6458d Merge pull request #2096 from weiss/always-add-stanza-id
Tag all archived messages with a stanza ID
2017-11-10 09:34:49 +04: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
Paweł Chmielowski e47b016e76 Add fs as dep in mix.exs 2017-11-09 09:59:49 +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
Holger Weiss 74749f5dbb ejabberdctl: Fix 'read' syntax for non-bash shells 2017-11-07 21:23:48 +01:00
Evgeniy Khramtsov fe9b191382 Erase transient certificates on exit 2017-11-07 09:04:20 +03:00
Holger Weiss 5d5b4cdfb5 ejabberdctl: Fix paths for release build
The ejabberdctl version generated by "make rel" relies on the SCRIPT_DIR
variable which got lost in commit cbe6553baa.
2017-11-06 21:35:44 +01:00
Badlop cbbfe32d8b Unregister commands when stopping node only if it's last one (#2083) 2017-11-06 16:53:49 +01:00
Paweł Chmielowski 7121a95428 Define flags that depend on erlang version in mix.exs 2017-11-06 12:40:00 +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
Paweł Chmielowski 7d8ad17fa1 Remove code left from debugging 2017-11-03 16:11:34 +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 ec3ea61585 Don't start hosts for disabled backends from CT_BACKENDS passed to make test 2017-11-03 14:44:13 +01:00
Paweł Chmielowski 90e1f3f29d Use correct table field name in sql query 2017-11-03 12:17:34 +01:00
Badlop 2060022b19 Remember previous German translator 2017-11-03 10:16:21 +01:00
badlop 681d81bdcc Merge pull request #2081 from nekoswag/master
updated German translation
2017-11-03 09:56:19 +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
Maximilian Trummer 8eb1e5c68c updated de.po 2017-11-01 18:22:27 +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 ce98843dd4 Fix sql syntax error in lite.sql 2017-10-31 14:43:36 +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 9b8ae80dab Improve --enable-system-deps 2017-10-30 13:55:10 +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
Holger Weiss ed792274e3 Omit "ProtectSystem" option from systemd unit
With "ProtectSystem", /usr is mounted read-only, so things will fail
when e.g. /usr/local is used as the installation prefix.  Whether such
options make sense depends on the environment, so they should rather be
set by package maintainers and/or admins.
2017-10-28 21:31:04 +02:00
Christophe Romain dbdda745af Delete cached item on node removal (#2071) 2017-10-27 21:16:25 +02:00
Badlop df86ecdd87 Update Greek translation (thanks to James Iakovos Mandelis) 2017-10-27 15:39:48 +02:00
Alexey Shchepin e1c8e88d87 Update SQL archive index to match mysql.sql 2017-10-27 15:20:29 +03:00
Evgeniy Khramtsov b6c88fb17e Fix typespec 2017-10-27 12:05:05 +03: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
Paweł Chmielowski 88928c0149 Adopt 'make install' to updated output from 'rebar list-deps' 2017-10-26 11:21:41 +02: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 7c1b4d0fcd Fix pubsub test, title not mandatory 2017-10-25 11:41:45 +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
Evgeny Khramtsov ce83e2261e Merge pull request #2065 from jorjeb/mix-enable-graphics
Support for --enable-graphics in mix.exs
2017-10-24 14:35:47 +04:00
Jorje Barrera 06cd373a18 Support for --enable-graphics in mix.exs 2017-10-24 18:02:52 +08:00
Badlop 46fb2d0f56 Update Hebrew translation (thanks to Genghis Khan) 2017-10-23 16:14:01 +02:00
badlop 21f2c57920 Merge pull request #2023 from rom1dep/endings
Line endings consistency edits in the example config file
2017-10-16 12:59:04 +02:00
badlop 5667b4b0f9 Merge pull request #2052 from suchatorg/patch-1
Update gl.po
2017-10-16 10:16:54 +02:00
Carlos 91e8249284 Update gl.po 2017-10-14 11:06:03 +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
Badlop 9d6ec1ba12 Fix ZH translation 2017-10-12 12:09:50 +02:00
badlop 0c29f07758 Merge pull request #2047 from fotock/patch-1
Update zh translations
2017-10-12 11:44:12 +02:00
Shelley Shyan 7f93b72a1d Update zh.po 2017-10-12 00:17:32 -05:00
Evgeniy Khramtsov e5e64c99f3 Don't crash when Host header is missing 2017-10-11 18:53:53 +03:00
Maximilian Trummer 85c703a8f7 updated and extended German translation 2017-10-11 16:56:05 +02:00
Badlop 2832130afc Update Catalan translation 2017-10-11 16:21:28 +02:00
Shelley Shyan f751023bd6 Update zh.po 2017-10-11 04:33:14 -05:00
Shelley Shyan f0a68b85f0 Update zh.po 2017-10-11 01:47:43 -05:00
Evgeniy Khramtsov 02fa719a87 Fix a typo: meta -> viewport 2017-10-10 13:25:38 +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 8513e31498 Update Russian translation 2017-10-06 23:44:50 +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
Christophe Romain 0ed210877a Update French translation 2017-10-06 17:48:56 +02:00
Badlop a06f1a0ba5 Update Czech translation (thanks to Jan Pinkas) 2017-10-06 13:23:33 +02: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
Paweł Chmielowski 3c7ab13374 Update pl.po 2017-10-06 12:11:14 +02:00
Badlop df439f27ee Update Spanish translation 2017-10-06 10:54:36 +02:00
Badlop d37d43495b Updated all translation files
Simply running:
 make; make translations
2017-10-06 10:02:16 +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
Christophe Romain 9e95150803 Fix warning when compile with newer elixir 2017-10-04 12:03:36 +02: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
Paweł Chmielowski 668d45cbc7 Install binaries with 755 permissions 2017-10-02 11:51:15 +02:00
Paweł Chmielowski e2f4cb5838 Remove find-outdated-deps script, we have better replacement for it 2017-10-02 11:49:34 +02:00
Evgeniy Khramtsov 6658806820 Generate more readable code for run_fold hooks 2017-10-02 10:47:03 +03:00
Romain DEP. a7341957f2 config: makes line endings consistent when followed by '-' 2017-09-30 11:12:20 +02:00
Romain DEP. 2cb0cedc6b config: makes line endings consistent when followed by ':' 2017-09-30 11:10:34 +02:00
Paweł Chmielowski 77a1f728cf Install eimp binary with +x attribute 2017-09-28 18:34:27 +02:00
Christophe Romain d576902bd4 Prepare mix for 17.09 2017-09-28 15:21:11 +02:00
Christophe Romain a3da27e917 Fix race introduced by ffdaff374 on ejabberd_mnesia init 2017-09-28 15:14:11 +02:00
Evgeniy Khramtsov 3f015c829c Make sure Riak gets compiled on OTP20 2017-09-28 12:25:06 +03: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
Holger Weiss 1c6aa5e84e mysql.sql: Use multi-column index on username/ID 2017-09-27 15:30:23 +02:00
Christophe Romain 609a1d07cf harden ejabberdctl (#1977) 2017-09-27 15:04:57 +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
Paweł Chmielowski f464189819 Update dependences 2017-09-27 11:39:16 +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
Badlop 368ba3fc55 When running "make translations", use the new tools/prepare-tr.sh 2017-09-27 10:57:11 +02:00
Badlop cd098c5adc Remove remaining files of old contrib/ dir 2017-09-27 10:57:07 +02:00
Badlop 221e58fff0 Simplify prepare-tr.sh to work with new extract-tr.sh 2017-09-27 10:57:03 +02:00
Badlop 9b043ae276 Move prepare-translations.sh from contrib to tools/prepare-tr.sh 2017-09-27 10:56:58 +02: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
Paweł Chmielowski 05feab35c4 Call earlier deps configure scripts durring compilation 2017-09-26 17:32:37 +02:00
Badlop 2198fbce97 Fix command set_last that always returned code 1, error (#2010) 2017-09-25 18:43:24 +02:00
Christophe Romain b8ab80d1f3 Sync containers from rroemhild and add instructions in README (#1655) 2017-09-25 17:48:57 +02:00
Evgeniy Khramtsov 30e5c9bd3e Add mod_avatar to the example configuration 2017-09-25 16:23:02 +03: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
Evgeniy Khramtsov 138cc25355 Pre-install libgd and libwebp 2017-09-25 11:19:49 +03:00
Evgeniy Khramtsov a15f186253 Remove OTP20 from Travis tests for now 2017-09-25 11:17:46 +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
Badlop 5882c9b456 Add some recommended TLSOPTS as comments in the default config (#2004) 2017-09-21 16:28:17 +02:00
Evgeniy Khramtsov db41643bea Also replace vcard-x-update in direct presences 2017-09-18 14:17:34 +03:00
Christophe Romain cb076924cc Merge pull request #1996 from nosnilmot/ejabberdctl-quote-peer
Quote $PEER in ping command to avoid hostnames containing "-" being interpreted as arithmetic
2017-09-18 13:09:16 +02:00
Christophe Romain cce4056040 Fix iexdebug and iexlive commands (#1981) 2017-09-18 13:01:10 +02: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
Christophe Romain 5414cbe821 Add riakc dependency version 2017-09-13 09:49:43 +02:00
Holger Weiss e6b1521b29 mod_push_keepalive: Remove unused 'db_type' option 2017-09-11 23:48:25 +02:00
Stu Tomlinson 2a7d9d93c8 Quote $PEER in ping command to avoid hostnames containing "-" being interpreted as arithmetic 2017-09-11 15:00:00 +01: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 9e35af54e0 The redis_reconnect_timeout was no longer used (#1983) 2017-09-07 20:25:20 +02: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 315e330237 Fix version of jose library 2017-09-06 18:35:33 +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
Badlop 32397aa0c3 Replace example config of drop_chat_states with queue_* in mod_client_state (#1985) 2017-09-06 13:48:33 +02: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
Paweł Chmielowski d7891a5562 Fix 'make install' to work with new output from rebar list-deps 2017-08-24 11:43:47 +02: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 7f3fceb432 Recompile rebar script with OTP17.5 2017-08-23 11:45:10 +03:00
Evgeniy Khramtsov 81581f7794 Use forked repo of Riak Erlang client 2017-08-23 10:35:39 +03:00
Evgeniy Khramtsov 47175adc74 Explicitly match against <domain/resource>
Fixes #1958
2017-08-23 09:00:13 +03:00
Evgeniy Khramtsov 350827f8f4 Ignore some options from rebar.config
Namely, the following options are ignored in dependency packets:
require_erts_vsn, require_otp_vsn and require_min_otp_vsn
2017-08-22 15:26:35 +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 8c56fbc0d8 Remove debugging script 2017-08-22 14:53:38 +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 37a54cd498 List the possible ca_urls in example config file 2017-08-22 10:38:33 +03:00
Konstantinos Kallas 6f972fa3fe Clean run_acme testcase 2017-08-22 10:29:12 +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 793ca45dda Add OTP 20.0 to Travis testsing platforms 2017-08-17 22:14:54 +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
Christophe Romain 8f5a1c4a2a Merge pull request #1926 from weiss/import-metronome-pep
prosody2ejabberd: Support PEP import
2017-08-11 10:19:17 +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
badlop bee251d928 Merge pull request #1912 from mathiasertl/master
fix FIREWALL_WINDOW option
2017-08-09 09:48:18 +02:00
Mathias Ertl c658907331 fix typo 2017-08-08 19:09:55 +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 52525eb76d Fix tests for 8679cfd2f 2017-08-07 15:38:17 +02:00
Christophe Romain 8679cfd2f3 Rename stop_all_connections to stop_s2s_connections for consistency 2017-08-07 15:06:07 +02:00
Paweł Chmielowski 25af3fb029 Compile mod_push early as it defines behaviour 2017-08-07 09:32:58 +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 b673539a2a Merge remote-tracking branch 'processone/pr/1914'
* processone/pr/1914:
  ejabberd_c2s: Fix priority of 'certfile' option
2017-08-05 19:27:43 +02: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
Mathias Ertl aa9eb001d0 fix FIREWALL_WINDOW option 2017-08-04 18:49:33 +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
Badlop 0516a3dc0e Remove unused 'managers' option, related to the deferred XEP-0321 (#1443) 2017-08-04 12:29:15 +02:00
Christophe Romain 3d185c0fb8 Fix missing validation from 633b68db1 (#1900) 2017-08-04 11:53:32 +02:00
Christophe Romain 7815164216 Add minor details (#1353) 2017-08-04 10:34:13 +02:00
Christophe Romain 65f4094804 Prepare packaging for 17.08 2017-08-03 16:55:56 +02:00
Christophe Romain 06450f4a82 Keep disco#info on PEP compatible with XEP-0060 (#1717) 2017-08-03 15:48:23 +02:00
Christophe Romain ce0beb550c Move pubsub sql export to pubsub_db_sql module 2017-08-03 15:34:01 +02:00
Christophe Romain 96c0483533 Fix Xref from 5dcc97c 2017-08-03 14:54:06 +02:00
Paweł Chmielowski 1274bcdba9 Change policy of user_resources command
This fixes issue #1908
2017-08-03 13:49:06 +02:00
Badlop 5dcc97c85a Preliminary export PubSub data from Mnesia tables to SQL file (#1571) 2017-08-03 10:53:01 +02:00
Konstantinos Kallas e6e8e64f84 Improve return format of get_certificates command 2017-08-02 21:10:49 +03:00
Konstantinos Kallas ac7105d39e Implement verbose list_certificates option 2017-08-02 19:36:11 +03:00
Christophe Romain 6deceeec2e Merge branch 'master' of github.com:processone/ejabberd 2017-08-02 14:36:43 +02:00
Christophe Romain 9edcbadd60 Fix clustering table reg_users_counter (#1889) 2017-08-02 14:36:32 +02:00
Christophe Romain f65492e27f Merge pull request #1837 from marcphilipp/feature/set_room_affiliation_test
Add integration test for set_room_affiliation
2017-08-02 14:34:30 +02:00
Christophe Romain 1df61a82c8 Merge branch 'master' of github.com:processone/ejabberd 2017-08-02 12:25:50 +02:00
Christophe Romain 73509686f1 Fix getting cached last item (#1814) 2017-08-02 12:24:34 +02:00
Evgeny Khramtsov 93e521d65e Merge pull request #1903 from himawri/fix_pubsub_spec
Fix spec for mod_pubsub:subscribe_node
2017-08-02 13:52:21 +04:00
Jing Sun 50511fcff7 Fix spec for mod_pubsub:subscribe_node 2017-08-02 10:31:42 +02:00
Christophe Romain 5e26190b98 Fix PubSub send last published items (#1572) 2017-08-01 17:00:52 +02:00
Christophe Romain f22bd6eb46 Fix PEP node removal (#1839) 2017-08-01 15:40:34 +02:00
Christophe Romain 0ba6c78ed0 Fix disco#items on PEP service 2017-08-01 15:15:01 +02:00
Christophe Romain 636d68e0a9 Fix PEP node identity (#1717) 2017-08-01 14:41:16 +02:00
Christophe Romain 7e6d1c24c2 Update spec from custom and allow modules dependencies (#1740) 2017-08-01 13:33:14 +02:00
Badlop 67918b17d3 Fix extauth.py so support : in passwords (thanks to jmberg)(#1676) 2017-07-31 22:51:31 +02:00
Konstantinos Kallas 3abe3aeeec Finish revoke_certificate and add specs
1. Add a try catch in the final revoke_certificate function
2. Also delete the certificate from persistent memory when it is done revoked
2017-07-29 19:10:06 +03:00
Paweł Chmielowski 51fa438340 Request basic auth dialog from browser 2017-07-28 16:08:05 +02:00
Christophe Romain 35a11526f9 Revert "Fix get_module_opt call in mod_block_strangers"
This reverts commit e5f64bc24a.
2017-07-27 18:23:10 +02:00
Paweł Chmielowski 0cfec92c14 Generate log messages when websocket is closed due timeouts 2017-07-27 17:53:16 +02:00
Alexey Shchepin e5f64bc24a Fix get_module_opt call in mod_block_strangers 2017-07-27 17:48:41 +02:00
Konstantinos Kallas cc6f4b90fb Support certificate revocation 2017-07-27 18:25:44 +03:00
Paweł Chmielowski 5c48ba4609 Set high water mark in lager for all backends 2017-07-27 17:14:03 +02:00
Jérôme Sautret 3ca62a797a Fix nick bug with MUC on riak 2017-07-27 17:06:34 +02:00
Christophe Romain b66dab1313 Add muc related hooks 2017-07-27 17:02:06 +02:00
Christophe Romain 58110e4bc1 Update OTP version check by configure 2017-07-27 15:31:59 +02:00
Marco Adkins ea96615460 Ability to filter passwords from the log in mod_http_api (#1888)
* Ability to filter passwords from the log when creating users through the mod_http_api
2017-07-27 15:30:56 +02:00
Konstantinos Kallas 61d1411ab3 Sync fork with upstream 2017-07-26 09:54:23 +03:00
Konstantinos Kallas 1a506da932 Add an erl_opt so that rsa can be used when the otp version is enough 2017-07-26 09:52:44 +03:00
Paweł Chmielowski b8c26671c4 Update oauth2 dependency 2017-07-25 17:59:32 +02:00
Konstantinos Kallas 92e38190aa Encode strings using a library function and not my custom made 2017-07-25 14:13:40 +03:00
Konstantinos Kallas 09918b5912 Add a try catch arounf list certificates 2017-07-23 21:47:22 +03:00
Christophe Romain 2e88d001d6 Fix errors from 1a0db3d 2017-07-21 11:42:03 +02:00
Badlop 1a0db3de3a Describe commands arguments and results in ejabberd_sm, ext_mod, mod_mam 2017-07-21 11:26:53 +02:00
Badlop 250876ea1a Fix indentation of commands lines 2017-07-21 11:26:47 +02:00
Holger Weiss 66510c1d78 Add mod_push_keepalive
This module tries to keep pending stream management sessions of push
clients alive (as long as the disconnected clients are reachable via
push notifications).
2017-07-21 01:07:36 +02:00
Holger Weiss d6f1d3df5b Support XEP-0357: Push Notifications
Closes #1379.
2017-07-20 20:22:50 +02:00
Christophe Romain 72dbb6e7c1 Fix errors when running ejabberdctl as root 2017-07-20 14:40:50 +02:00
Paweł Chmielowski b1082a96c9 Add ability to update changelog in update-deps-releases 2017-07-20 11:43:25 +02:00
Paweł Chmielowski ed17586cf0 Update cache_tab and xmpp dep 2017-07-20 11:43:06 +02:00
Christophe Romain 26b8dd75f7 Merge pull request #1869 from wahjava/master
Fix ERLANG_OPTS when setting INET_DIST_INTERFACE
2017-07-19 11:33:38 +02:00
Paweł Chmielowski c3473c2077 Update fast_tls 2017-07-19 10:58:10 +02:00
Paweł Chmielowski e216654c52 Don't add indentation after single item result in docs 2017-07-18 17:48:53 +02:00
Christophe Romain cc3391cc1c Use string:join instead of lists:join 2017-07-18 15:43:46 +02:00
Christophe Romain b8d56a7c11 Improve formatting of documented API parameters 2017-07-18 15:01:01 +02:00
Konstantinos Kallas 9ce1f12b66 Pretty print list-certificates 2017-07-18 13:28:44 +03:00
Evgeny Khramtsov 1bb9e83501 Merge pull request #1871 from rstgroup/master
Fix old route record in mnesia's route table haven't been remove when restarting in some cases (#1184)
2017-07-17 17:56:39 +04:00
Paweł Dorofiejczyk de1a66dfbe Fix old route record in mnesia's route table haven't been remove when restarting in some cases (#1184) 2017-07-17 15:14:30 +02:00
Konstantinos Kallas 2e18122cd9 Print validity in list-certificates 2017-07-17 13:40:53 +03:00
Konstantinos Kallas 8fe551cc68 Add a stub for the list-certificates command 2017-07-17 11:39:27 +03:00
Konstantinos Kallas 09c3496ff1 Remove httpdir from some function arguments as we now use the built in ejabberd http server for authorizations 2017-07-17 10:48:57 +03:00
Konstantinos Kallas fa3108e6e2 Save acquired certificates in persistent storage 2017-07-17 10:42:09 +03:00
Konstantinos Kallas 9cf596c67b Change the persistent data structure from a record to a proplist
This is done so that possible future updates to the data structure don't break existing code.
With this change it will be possible to update the data structure and keep the same old persistent data file, which will still have the expected list format but with more properties
2017-07-17 09:59:38 +03:00
Konstantinos Kallas 478a12637d Separate the persistent data structure functions 2017-07-17 09:40:36 +03:00
Konstantinos Kallas 4d977535f2 Make some persistent data wrapper functions 2017-07-17 09:35:37 +03:00
Ashish SHUKLA 95613a11ab Fix ERLANG_OPTS when setting INET_DIST_INTERFACE 2017-07-15 16:42:47 +05:30
Paweł Chmielowski 2cd193f97c Expand catch block used to report errors in doc generator 2017-07-14 17:18:07 +02:00
Paweł Chmielowski 33a9d6a3c3 Fix args_examples from last commit 2017-07-14 17:17:26 +02:00
Badlop fdb863ce70 Describe even more command arguments and results in mod_admin_extra 2017-07-14 16:43:30 +02:00
Paweł Chmielowski 43fc29873e Add refresh repos option in update-deps-releases 2017-07-14 15:08:13 +02:00
Paweł Chmielowski e216a54ead Update fast_tls 2017-07-14 15:08:13 +02:00
Konstantinos Kallas 77a96b0ec6 Solve acme challenges using built in http server 2017-07-12 19:23:52 +03:00
Badlop d4cdc3a246 Fix ERLANG_OPTS end lines when setting FIREWALL_WINDOW (#1856) 2017-07-12 14:43:28 +02:00
Konstantinos Kallas 5199ede4a2 Changle acme file permissions
Also changed some specs
2017-07-11 11:11:00 +03:00
Konstantinos Kallas b4b4e247dd Add the certificate directory in ejabberd.yml.ecample 2017-07-07 19:40:57 +03:00
Konstantinos Kallas c50f6c218f Clean up code by adding throws instead of passing the error value 2017-07-07 18:32:07 +03:00
Konstantinos Kallas 5866124138 Clean up get_certificate code 2017-07-07 17:37:44 +03:00
Holger Weiss f6bdc6fdb2 mod_privacy: Don't crash while copying c2s state
Don't assume 'privacy_active_list' is set when c2s_copy_session/2 is
called.
2017-07-07 14:28:22 +02:00
Holger Weiss 8f25baada6 mod_privacy: Apply cosmetic change to type spec 2017-07-07 14:25:55 +02:00
Badlop aaef1a14b4 Fix set_presence command to work in recent ejabberd 2017-07-07 10:55:08 +02:00
Evgeniy Khramtsov 22e8f5fd51 Add copyright and fix description for some sources 2017-07-06 21:27:04 +03:00
Paweł Chmielowski 88ab787ba6 Start gen_mod from elixir tests 2017-07-06 17:57:46 +02:00
Paweł Chmielowski eb9faffadd Improve elixir tests 2017-07-06 17:19:22 +02:00
Paweł Chmielowski 3b0eee785f Handle new possible result from ejabberd_config.add_option 2017-07-06 17:19:22 +02:00
Paweł Chmielowski 5ef542a638 Remove tests for old commands interface 2017-07-06 17:19:22 +02:00
Evgeniy Khramtsov ffdaff3740 Make ejabberd_cluster modular
For setting the cluster backend new global option 'cluster_backend' is
introduced. The default and only available value at the moment is 'mnesia'
2017-07-06 15:47:35 +03:00
Paweł Chmielowski 56d273477e Remove old command calling interface 2017-07-06 14:24:25 +02:00
Evgeniy Khramtsov a35b9dd9cc Close accepted socket if sockname/peername has failed
Fixes #1834
2017-07-06 14:49:21 +03:00
Marc Philipp c69720a1ab Add integration test for set_room_affiliation 2017-07-06 13:33:13 +02:00
Konstantinos Kallas 56fc0efbc8 Split ACME module into two
1. A communications module that handles all requets/responses and other low level stuff that have to do with the ACME CA
2. A head module that will do all the useful stuff
2017-07-04 11:44:22 +03:00
Konstantinos Kallas d3c477646f Add support for command get_certificates, very crude 2017-07-03 13:37:32 +03:00
Paweł Chmielowski a58de70f06 Fix invalid argument in get_messages_susbset
This should fix #1818
2017-06-30 14:24:35 +02:00
Christophe Romain 800965a957 Avoid useless calls on simples subscriptions (#1313) 2017-06-29 15:24:18 +02:00
Alexey Shchepin fcf672c50e Add allow_local_users to mod_block_strangers (#1804, #1809) 2017-06-29 14:55:24 +03:00
Badlop b66e369a1d Fix Salt import from prosody SCRAMmed password (#1803) 2017-06-29 10:28:44 +02:00
Paweł Chmielowski 9dd03c873c Fix clone code in update-deps-release 2017-06-28 16:47:31 +02:00
Paweł Chmielowski e42bb47ce3 Update deps 2017-06-28 16:46:48 +02:00
Paweł Chmielowski dc7fa076d7 Fix problem with updating deps in rebar.config for non-tags 2017-06-28 16:36:59 +02:00
Paweł Chmielowski 960cf495c6 Don't use asn1rt:decode, it's not available on R20 2017-06-28 14:51:45 +02:00
Christophe Romain 0f12804a49 Quote paths to allow spaces (#1789) 2017-06-28 11:39:05 +02:00
Badlop 3c7c71cfa6 In offline export to SQL, first write all DELETE, later all INSERT (#1509) 2017-06-28 11:14:59 +02:00
Paweł Chmielowski aac190255b Update fast_tls 2017-06-27 15:02:23 +02:00
Paweł Chmielowski 85a08a087b Improve update-deps-releases deps parsing 2017-06-27 14:56:00 +02:00
Konstantinos Kallas 637d9b054b Support get-cert, revoke-cert. Also cleaned some typespecs 2017-06-26 19:03:21 +03:00
Badlop 1bfb0ab39c Fix username in mam export (#1510)(thanks to themaverik) 2017-06-26 14:38:12 +02:00
Badlop 4ef1cdec12 Write validator for mod_multicast's limits option 2017-06-26 13:39:50 +02:00
Badlop 0534678028 Use YAML syntax for limits option in mod_multicast 2017-06-26 11:26:53 +02:00
Paweł Chmielowski 70606d7f1a Catch exception that may happen when sending data over websocket
This fixes #1667
2017-06-23 17:19:37 +02:00
Mickaël Rémond bb39ecbc08 More explicit bosh configuration handler
I also updated default url from to match URL suggested by XEP-0156
2017-06-23 16:47:14 +02:00
Evgeny Khramtsov 54e6e1a5fb Merge pull request #1793 from marcphilipp/bugfix/set_room_affiliation_master
Fix mod_muc_admin:set_room_affiliation
2017-06-22 18:28:12 +04:00
Evgeniy Khramtsov 5bb7a0b0db Don't let a receiver to crash if a controller is unavailable
Fixes #1796
2017-06-22 16:58:46 +03:00
Konstantinos Kallas 330456bcf0 Indent using Emacs 2017-06-22 14:47:56 +03:00
Konstantinos Kallas 396bd5eb3d Removed some ?INFO_MSG 2017-06-22 11:38:40 +03:00
Konstantinos Kallas dd79dea81d Support new_cert, make certificate request 2017-06-22 11:31:50 +03:00
Marc Philipp 976a8c9cc9 Fix mod_muc_admin:set_room_affiliation 2017-06-21 17:20:58 +02:00
Christophe Romain a095477b4c Fix outgoing_s2s_timeout description (#1684) 2017-06-21 16:30:51 +02:00
Holger Weiss 950aca380c mod_client_state: Reset state on session resume
Don't restore the previous CSI state when a stream management session is
resumed.
2017-06-21 01:05:46 +02:00
Holger Weiss 985b0a1933 mod_stream_mgmt: Add missing function specs 2017-06-21 01:00:29 +02:00
Christophe Romain a7841ed486 Improve API documentation generator 2017-06-20 14:45:57 +02:00
Christophe Romain a11e833a98 Make ext_mod api return rescode 2017-06-20 14:45:31 +02:00
Paweł Chmielowski 62ee051c6e Fix invalid {args,result}_examples in mod_muc_admin 2017-06-19 16:31:07 +02:00
Paweł Chmielowski 5424ead01d Generate better errors when not being able to generate documentation 2017-06-19 16:30:45 +02:00
Paweł Chmielowski 96d385bf82 Another tweak to md generator 2017-06-19 15:10:34 +02:00
Paweł Chmielowski 8e2258b16a Update markdown api document generator 2017-06-19 15:02:02 +02:00
Konstantinos Kallas dc4c00a78c Add support for solving http-01 challenge 2017-06-18 13:20:47 +03:00
Konstantinos Kallas 1d1250b056 Cleanup acme_challenge.erl, move types and records in ejabberd_acme.hrl 2017-06-17 19:06:39 +03:00
Badlop f87b46f454 Fix srg_user_add/del for non-Mnesia database backends (#1780) 2017-06-15 11:05:41 +02:00
Konstantinos Kallas 133d2ae6d5 Derive the alg field of the JWS object using a erlang-jose library function rather than hardcoding 2017-06-15 11:47:29 +03:00
Christophe Romain 5418b37314 Add pubsub import from prosody/metronome 2017-06-15 09:56:05 +02:00
Paweł Chmielowski 6353a06a5d Catch exception from Elixir.ExUnit.Server.cases_loaded 2017-06-14 14:56:59 +02:00
Christophe Romain 58b9077b51 Fix OTP-17.5 support 2017-06-14 14:18:35 +02:00
Paweł Chmielowski 10fcfa860a Show operations to perform before asking to apply them 2017-06-14 14:05:41 +02:00
Konstantinos Kallas 4fc3d511ce Synchronize fork 2017-06-14 12:35:01 +03:00
Konstantinos Kallas 032ce9e53c Refactor get requests, Implement authorization handling functions 2017-06-14 12:12:43 +03:00
Holger Weiss 5f2dcc51ce Bump xmpp version 2017-06-14 01:05:15 +02:00
Evgeniy Khramtsov 0aa64381ff Fix IP address parsing for mod_metrics 2017-06-13 16:54:29 +03:00
Christophe Romain 6c8b037422 Fix refactor bug on wait_status 2017-06-13 12:37:27 +02:00
Christophe Romain d63ea000c7 Prepare package for 17.06-beta 2017-06-13 11:02:30 +02:00
Christophe Romain 5e148df0a9 Update esip and stun dependencies 2017-06-13 10:35:00 +02:00
Konstantinos Kallas 4b1c59e199 Major Refactoring, Separated Logic from Requests 2017-06-12 21:35:43 +03:00
Paweł Chmielowski d8f05acb67 Add script for managing updates to deps 2017-06-12 19:23:41 +02:00
Paweł Chmielowski d6f4c99243 Remove luerl from floating_deps 2017-06-12 19:23:41 +02:00
Konstantinos Kallas c25aa8378f Add new-authz, refactor the http requests that all used the same code 2017-06-12 15:31:48 +03:00
Badlop 63b6e0d381 Switch access rule delete_old_users with protect_old_users (#1772) 2017-06-09 19:18:47 +02:00
Konstantinos Kallas 911b8188d2 Refactor the http response handlers.
Encapsulate some dangerous calls with try catch.
2017-06-09 19:47:50 +03:00
Konstantinos Kallas 167edacb5f Make Stylistic Changes in order to conform to guidelines:
1. Remove trailing whitespace
2. Remove Macros
3. Handle all erroneous response codes the same way
4. Add specs
Also don't return nonces anymore when the http response is negative.
2017-06-09 18:53:54 +03:00
Konstantinos Kallas 53d47483c8 Implement some basic account handling functions 2017-06-09 15:49:27 +03:00
Paweł Chmielowski 8c1568ff93 Add more ipv6 loopback addresses 2017-06-09 14:38:34 +02:00
Paweł Chmielowski 7b5895c90d Allow api access on both ipv4 and 6 loopback addresses
This should fix issue #1769
2017-06-09 13:57:26 +02:00
Paweł Chmielowski 115cb23bd8 Fix elixir tests on elixir 1.4 2017-06-09 12:59:47 +02:00
Paweł Chmielowski 62806607bf Add missing , 2017-06-09 12:10:40 +02:00
Badlop b25b5c2f98 Improve export2sql explanation; remove obsolete and duplicated command 2017-06-09 12:02:49 +02:00
Christophe Romain 444c385f23 Update dependencies 2017-06-09 10:34:35 +02:00
Badlop ee8bbccb2a Fix and document push_roster_all command 2017-06-08 19:54:34 +02:00
Christophe Romain 66237abd35 Merge pull request #1766 from IRog/master
fixing exec_iex bug with proper --name arguement
2017-06-08 10:41:26 +02:00
Ivy Rogatko 0973a8d6c1 fixing iex bug with proper --name arguement 2017-06-07 21:15:17 -07:00
Christophe Romain fbead19c88 Update elixir 2017-06-07 17:09:06 +02:00
Christophe Romain baf574d6c4 Update lager p1_mysql and p1_pgsql dependencies 2017-06-07 16:56:00 +02:00
Christophe Romain e3c801f1f5 Update dependencies 2017-06-07 16:18:41 +02:00
Paweł Chmielowski f773edcb98 Override version of subdeps with version from main rebar.config 2017-06-07 16:06:28 +02:00
Christophe Romain 2a73068aac Add missing space separator on EJABBERD_OPTS 2017-06-06 15:41:48 +02:00
Konstantinos Kallas 926de60f5d Support for new_cert 2017-06-05 17:10:37 +03:00
Evgeny Khramtsov 5971eb3da0 Merge pull request #1758 from reneklacan/fix-mix-warnings
Fix mix warnings
2017-06-04 14:25:31 +04:00
Rene Klacan 04fd5567a7 Fix mix warnings 2017-06-04 12:24:35 +02:00
Evgeny Khramtsov 4f8c132b53 Merge pull request #1759 from reneklacan/fix-version-to-be-semver
Fix version to be SemVer compatible
2017-06-04 14:18:39 +04:00
Rene Klacan a98685e0bb Fix version to be SemVer compatible 2017-06-04 03:01:51 +02:00
Konstantinos Kallas df5d673e63 Solve http-01 challenge 2017-06-03 12:34:15 +03:00
Christophe Romain 12733bd21b Fix EJABBERD_OPTS 2017-06-02 17:56:57 +02:00
Badlop f6767ed061 Fix rooms list in WebAdmin (#1753) 2017-06-01 19:27:41 +02:00
Christophe Romain de10a7a8ce Respect INSTALLUSER when creating spool directory 2017-06-01 17:48:44 +02:00
Christophe Romain 5081a180fa Create spool directory at start if not exists 2017-06-01 17:44:23 +02:00
Christophe Romain a576f3a6d1 Remove use of getopt to support simpler shells 2017-06-01 12:10:06 +02:00
Christophe Romain 3201f8e513 Improve ejabberdctl parameters parsing 2017-06-01 11:48:11 +02:00
Christophe Romain 92003fa4dc Minor ejabberdctl improvements 2017-06-01 08:04:11 +02:00
Christophe Romain 818d9c8c42 Merge branch 'joudinet-master' 2017-05-31 18:12:26 +02:00
Christophe Romain cbe6553baa Refactor ejabberdctl 2017-05-31 18:11:45 +02:00
Paweł Chmielowski 5d3870faa3 Add --enable-system-deps configure option 2017-05-31 11:30:34 +02:00
Christophe Romain 2d8ce266bd Add license files into lib and deps directories 2017-05-30 15:03:06 +02:00
Christophe Romain 0042f18c1f Merge branch 'master' of https://github.com/joudinet/ejabberd into joudinet-master 2017-05-30 12:37:27 +02:00
Badlop 0982a9bc3c Parse correctly presence_broadcast option in change_room_option command 2017-05-29 12:49:53 +02:00
Evgeniy Khramtsov 50327a0cfc Fix case clause
Fixes #1746
2017-05-25 13:46:17 +03:00
Holger Weiss 5802062746 Cosmetic change: Fix indentation errors 2017-05-24 17:16:16 +02:00
Evgeniy Khramtsov 69de1780a0 Introduce --enable-stun and --enable-sip configure options
STUN/TURN and SIP is not compiled by default anymore.
Use --enable-stun, --enable-sip or --enable-all to enable them.
2017-05-23 13:12:48 +03:00
Evgeniy Khramtsov 6e8895f9e9 Get rid of sql_queries.erl 2017-05-23 12:25:13 +03:00
Evgeniy Khramtsov e93762a720 Deprecate misc:encode_base64/1 and misc:decode_base64/1 2017-05-23 10:43:26 +03:00
Evgeniy Khramtsov 268065e5c4 Validate all certfiles on startup 2017-05-23 09:27:52 +03:00
Evgeniy Khramtsov d7878ef131 Implement cache for mod_announce 2017-05-22 16:14:28 +03:00
Badlop 908bedeaa6 Describe command arguments and results in mod_muc_admin 2017-05-22 12:55:32 +02:00
Evgeniy Khramtsov 504860f065 Don't leak with UDP sockets 2017-05-22 11:29:53 +03:00
Evgeniy Khramtsov 3a96d72a7f Implement cache for mod_private 2017-05-22 10:34:57 +03:00
Evgeniy Khramtsov d88e4d495f Don't store messages via a single process 2017-05-21 23:21:13 +03:00
Evgeniy Khramtsov 66a4e405e0 Improve mod_metrics
* Do not spawn a process per event
* Avoid UDP socket creation on every event
* Get rid of calls to str.erl module
* Add options 'ip' and 'port'
2017-05-21 14:24:57 +03:00
Evgeniy Khramtsov 0a77b9f43e Get rid of a workaround against old Erlang bug 2017-05-21 13:30:46 +03:00
Evgeniy Khramtsov 470669fa6b Get rid of db_type warning for mod_vcard_xupdate 2017-05-21 11:40:24 +03:00
Evgeniy Khramtsov af29fb21df Get rid of detection of modules' db_type detection
The detection sometimes leads to errorneous warnings.
We need to improve it later. For now I just remove the
detection as it doesn't fully work anyway.
2017-05-21 11:33:16 +03:00
Evgeniy Khramtsov be50d57ddd Declare ejabberd_oauth behaviour 2017-05-21 11:31:30 +03:00
Evgeniy Khramtsov 35d19b32f4 Implement cache for mod_privacy/mod_blocking 2017-05-20 22:36:32 +03:00
Paweł Chmielowski 654d907dcf export_all is not needed here 2017-05-19 17:03:41 +02:00
Paweł Chmielowski b013c29c7e Fix values put in args_examples 2017-05-19 16:56:37 +02:00
Evgeniy Khramtsov 0ed23980a6 Get rid of Mnesia transaction in get_vcard/2 2017-05-18 21:24:47 +03:00
Evgeniy Khramtsov a78862e05e The default 'iqdisc' is now 'no_queue' 2017-05-18 19:13:18 +03:00
Evgeniy Khramtsov bcb44ccb6f Implement cache for mod_last 2017-05-18 13:21:17 +03:00
Evgeniy Khramtsov 736a182544 ?SQL_UPSERT returns 'ok' on success 2017-05-18 12:10:36 +03:00
Evgeniy Khramtsov 97bb1250ba Avoid erroneous usage of ?MODULE macro 2017-05-18 12:09:28 +03:00
Evgeniy Khramtsov b0b7ac101c Fix function_clause after authentication refactoring
Fixes https://github.com/processone/ejabberd-contrib/issues/213
2017-05-18 09:51:04 +03:00
Evgeniy Khramtsov 3e35d44b0f Replace 'if_version_above' directive with 'if_have_fun' 2017-05-17 19:37:06 +03:00
Evgeniy Khramtsov 6691c59a7a Clean up database code related to mod_vcard_xupdate 2017-05-17 19:29:19 +03:00
Evgeniy Khramtsov 1391d5a304 Use disc_only_copies for oauth_token Mnesia table 2017-05-17 17:42:22 +03:00
Evgeniy Khramtsov 8f595b58a7 Increase gen_mod's supervisor shutdown time 2017-05-17 17:33:07 +03:00
Evgeniy Khramtsov 5bdc6c0822 Get rid of deprecated option 'resume_timeout' in test config 2017-05-17 17:21:59 +03:00
Evgeniy Khramtsov 1925b94131 Implement cache for mod_vcard and mod_vcard_xupdate 2017-05-17 17:13:34 +03:00
Konstantinos Kallas ddb043aa71 More account support(Update/Info) 2017-05-17 16:55:26 +03:00
Evgeniy Khramtsov fc794b680a Add cache options to the validator 2017-05-17 16:03:41 +03:00
Evgeniy Khramtsov a71065fcda Ciphers should be a binary string 2017-05-17 15:42:18 +03:00
Evgeniy Khramtsov 7165196211 Get rid of unused variable 2017-05-17 15:24:32 +03:00
Evgeniy Khramtsov f782955c06 Implement cache for roster 2017-05-17 14:47:35 +03:00
Evgeniy Khramtsov 3f13396d73 Fix use_cache/1 callback 2017-05-15 08:58:37 +03:00
Konstantinos Kallas 88365ed507 New account functional, very crude 2017-05-15 01:41:09 +03:00
Evgeniy Khramtsov 061d5f2380 Shut up dialyzer/xref if public_key:short_name_hash/1 is not available 2017-05-13 13:11:08 +03:00
Evgeniy Khramtsov 2d17a2850c Only validate certfiles if public_key:short_name_hash/1 is available 2017-05-12 17:51:17 +03:00
Evgeniy Khramtsov cc58ce6301 Introduce Certficate Manager
The major goal is to simplify certificate management in ejabberd.
Currently it requires some effort from a user to configure certficates,
especially in the situation where a lot of virtual domains are hosted.

The task is splitted in several sub-tasks:
* Implement basic certificate validator. The validator should check all
configured certificates for existence, validity, duration and so on. The
validator should not perform any actions in the case of errors except
logging an error message. This is actually implemented by this commit.
* All certificates should be configured inside a single section (something
like 'certfiles') where ejabberd should parse them, check the full-chain,
find the corresponding private keys and, if needed, resort chains and
split the certficates into separate files for easy to use by fast_tls.
* Options like 'domain_certfile', 'c2s_certfile' or 's2s_certfile' should
probably be deprecated, since the process of matching certificates with the
corresponding virtual hosts should be done automatically and these options
only introduce configuration errors without any meaningful purpose.
2017-05-12 16:27:09 +03:00
Evgeniy Khramtsov d3c8fb7705 Check presence of some files during option validation 2017-05-12 09:34:57 +03:00
Evgeniy Khramtsov 9fe16a29e1 Gracefully process malformed passwords during password change 2017-05-11 17:15:23 +03:00
Evgeniy Khramtsov 31a3cc7b10 Gracefully process malformed passwords during registration 2017-05-11 17:09:26 +03:00
Evgeniy Khramtsov a8dc5f80d1 Add 'access_remove' ACL to mod_register 2017-05-11 16:37:01 +03:00
Evgeniy Khramtsov 81d9770d4f Update Elixir tests for using new auth API 2017-05-11 16:15:18 +03:00
Evgeniy Khramtsov cdb191bb48 Rename is_user_exists -> user_exists 2017-05-11 15:49:06 +03:00
Evgeniy Khramtsov 633b68db11 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`.
2017-05-11 14:37:21 +03:00
Badlop e890525788 Use misc:atom_to_binary/1 instead of the deprecated jlib.erl (#1510) 2017-05-10 12:05:52 +02:00
Badlop 6b8c61b3a2 Update comment: aux.erl was renamed to misc.erl 2017-05-10 12:03:13 +02:00
Badlop 4849ac9781 Use jid:encode/1 instead of the deprecated jid:to_string/1 (#1510) 2017-05-10 11:22:15 +02:00
Lamtei W cd18d3d8a7 Fix: update sql statement, added missing delimeter for sql queries 2017-05-10 11:22:11 +02:00
Lamtei W a0908ba393 Added export function for mam module 2017-05-10 11:22:07 +02:00
Konstantinos Kallas 02dbe39b06 Examining jose functionality 2017-05-09 23:27:37 +03:00
Konstantinos Kallas 67a00939db Small improvements to the acme module 2017-05-08 20:29:58 +03:00
Evgeniy Khramtsov 5d7a704ca5 Remove forgotten 'export_all' 2017-05-08 17:23:29 +03:00
Evgeniy Khramtsov cee90a886e Don't list 'redis_pool_size' option multiple times 2017-05-08 17:22:34 +03:00
Evgeniy Khramtsov 6b6d07745d Split some functions in smaller ones 2017-05-08 16:29:01 +03:00
Konstantinos Kallas 05362b9a7d Very basic acme client, only stubs 2017-05-08 15:35:11 +03:00
Evgeniy Khramtsov bf2a2f291f State that Erlang 17.5 or higher is only supported 2017-05-08 15:10:42 +03:00
Evgeniy Khramtsov 8368a0850a Don't call gen_mod:get_opt() outside of modules 2017-05-08 14:34:35 +03:00
Evgeniy Khramtsov 01a2c9fe12 Add type specs for Module:opt_type/1 2017-05-08 12:59:28 +03:00
Evgeniy Khramtsov 6aefd24eb3 LOG_PATH macro should be of string type 2017-05-06 09:42:06 +03:00
Evgeniy Khramtsov 3241c2506b Introduce 'sql_connect_timeout' option (#1698) 2017-05-05 16:25:10 +03:00
Evgeniy Khramtsov 48d6ae1def Introduce 'sql_query_timeout' option
Fixes #1698
2017-05-05 13:20:28 +03:00
Evgeniy Khramtsov f2dc8c0442 Emit deprecation warning for SM related listening options 2017-05-05 12:31:17 +03:00
Evgeniy Khramtsov b174e2c9c6 Improve validation of second-level options 2017-05-05 11:11:17 +03:00
Evgeniy Khramtsov fb17c1b99f Make it possible to validate second-level options 2017-05-04 17:34:32 +03:00
Paweł Chmielowski e790e66f47 Fix elixir tests 2017-05-04 12:17:41 +02:00
Paweł Chmielowski c64e77a08c Catch exceptions from acl:add_list in web admin 2017-05-04 12:01:22 +02:00
Evgeniy Khramtsov cf53d834e9 Introduce 'iqdisc' global option 2017-05-04 12:24:47 +03:00
Evgeniy Khramtsov a2a4a4970e Validate module options on start_module/2 2017-05-04 09:09:10 +03:00
Badlop 31fa36003f Parse ldap_uids in mod_vcard_ldap like in eldap_utils (#319) 2017-05-03 23:32:56 +02:00
Christophe Romain cd1c41e448 Merge pull request #1697 from pipo02mix/dockerfile-17-04
Update Dockerfile to be able to build 17.04 ejabberd version
2017-05-03 09:29:23 +02:00
Evgeniy Khramtsov 54cc49bc70 Validate new options before module reloading 2017-05-01 14:01:12 +03:00
Evgeniy Khramtsov fe662c1a0a Don't forget to delete digraph 2017-05-01 10:14:00 +03:00
Evgeniy Khramtsov fddd6110e0 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.
2017-04-30 19:01:47 +03:00
Evgeniy Khramtsov 2b63d07329 Merge branch 'new-option-validation' 2017-04-29 11:48:57 +03:00
Evgeniy Khramtsov b82b93f8f0 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.
2017-04-29 11:39:40 +03:00
Evgeniy Khramtsov 7129aebe76 Don't re-define validation functions in multiple places 2017-04-28 13:23:32 +03:00
Paweł Chmielowski 2bcf822637 Fix elixir tests 2017-04-28 10:08:09 +02:00
Evgeniy Khramtsov 6658c0d386 Bump cache_tab version 2017-04-27 20:07:44 +03:00
Evgeniy Khramtsov 0b93cb7ece Store options using p1_options module 2017-04-27 19:44:58 +03:00
badlop b51e2aa213 Merge pull request #1702 from skuroki/patch-1
Fix typo
2017-04-27 09:58:37 +02:00
Badlop d18d99e8ec Bug requesting non-existent data with private_get command (#1690) 2017-04-26 23:14:30 +02:00
Holger Weiss 9b8364b6c8 Merge remote-tracking branch 'processone/pr/1699'
* processone/pr/1699:
  Add support for HTTP File Upload, version 0.3.0
2017-04-26 21:18:16 +02:00
KUROKI Shinsuke 959419419f Fix typo 2017-04-26 17:35:51 +09:00
Paweł Chmielowski 2988d84cfb Don't check result of jid.start 2017-04-26 09:50:49 +02:00
Badlop c0eb85ce53 Allow a room admin also to subscribe another JID 2017-04-26 01:30:12 +02:00
Holger Weiss 56a4bf8f3c mod_stream_mgmt: Fix typo in variable name 2017-04-25 22:37:27 +02:00
Holger Weiss 9cc332d6b3 mod_stream_mgmt: Fix 'if_offline' detection 2017-04-25 22:32:03 +02:00
Evgeniy Khramtsov 120682ec8b Include original 'id' and 'type' attributes in offline event 2017-04-25 17:59:26 +03:00
Paweł Chmielowski a67b3dc6a6 Don't check result of jid.start 2017-04-25 16:54:01 +02:00
Paweł Chmielowski f4c98f635b Don't check result of jid.start 2017-04-25 16:46:00 +02:00
Evgeniy Khramtsov 069bf6dec6 Make sure only jabber:x:event tag is present in offline event 2017-04-25 17:21:24 +03:00
Fernando Ripoll a59bef1afe 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=/
2017-04-25 09:35:07 +02:00
Holger Weiss d0f3696596 randoms: Keep compatibility with Erlang/OTP 17 2017-04-24 23:51:01 +02:00
Evgeniy Khramtsov c923bb5c10 Avoid changing configuration on listener deletion 2017-04-23 16:42:54 +03:00
Evgeniy Khramtsov 9a93acc62a Improve Mnesia tables creation and transformation 2017-04-23 16:37:58 +03:00
Evgeniy Khramtsov 8770fc98e1 Use round-robin algorithm when selecting worker from DB pool 2017-04-23 11:54:56 +03:00
Evgeniy Khramtsov 18433e289f Add clear_cache admin command 2017-04-22 11:33:39 +03:00
Holger Weiss 168712ebbd Add support for HTTP File Upload, version 0.3.0
Support the current XEP-0363 version in addition to the previous
revisions.
2017-04-21 18:36:53 +02:00
Paweł Chmielowski 44ae6bcc83 Fix elixir tests 2017-04-21 12:17:23 +02:00
Evgeniy Khramtsov 02790b105e Speedup Mnesia tables initialization 2017-04-21 12:27:15 +03:00
Evgeniy Khramtsov d88c08e074 Use new cache API in mod_shared_roster_ldap 2017-04-21 10:43:14 +03:00
Evgeniy Khramtsov 9937cb48fd Use new cache API in ejabberd_oauth 2017-04-21 09:02:10 +03:00
Evgeniy Khramtsov 5444475b1d Correct option validation 2017-04-20 18:55:16 +03:00
Evgeniy Khramtsov 264a40f217 Use new cache API in mod_mam 2017-04-20 18:52:16 +03:00
Evgeniy Khramtsov a26f90a346 Use new cache API in mod_caps 2017-04-20 18:18:26 +03:00
Badlop ca9d04ba6b Fix private_get command sending a proper xmlel (#1683) 2017-04-20 16:50:08 +02:00
Badlop 4e86a71ab2 When getting user rooms, filter by the serverhost as expected (#1683) 2017-04-20 16:49:32 +02:00
Holger Weiss 3682888655 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.
2017-04-19 23:04:20 +02:00
Holger Weiss 3adf720bc1 Use #jid{} type for #muc_unsubscribe.jid 2017-04-19 22:18:23 +02:00
Badlop d7a999eaf5 Don't use jid:from_string as it's deprecated, see jid.erl line 43 2017-04-19 21:47:59 +02:00
Evgeniy Khramtsov 64333f69ea Don't try to load already loaded applications 2017-04-19 11:40:58 +03:00
Holger Weiss b8a7720986 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.
2017-04-19 01:20:28 +02:00
Evgeniy Khramtsov 7c9415356d Function fix_from_to/2 should not crash when 'from' is undefined
Fixes #1678
2017-04-18 01:38:35 +03:00
Evgeny Khramtsov c97aade33e Merge pull request #1677 from getong/catch_lager_crash_log_not_run
lager_crash_log in some cases not run, catch it
2017-04-17 09:44:00 +04:00
getong ab751d290a lager_crash_log in some cases not run, catch it 2017-04-17 12:07:23 +08:00
Evgeniy Khramtsov f496d22074 Improve logging message 2017-04-16 23:56:12 +03:00
Evgeniy Khramtsov 86b680a3ad Move compile_exprs() to misc module 2017-04-16 20:05:46 +03:00
Evgeniy Khramtsov 78dba217bf Speedup configuration options lookup
We now avoid excessive ETS lookups; instead, we use dynamically
compiled module 'ejabberd_options' keeping the configuration options
2017-04-16 15:29:10 +03:00
Evgeniy Khramtsov 3b14b35252 Default config file should be ejabberd.yml 2017-04-16 01:26:33 +03:00
Evgeniy Khramtsov 878c762cdf Log human readable description when configuration file is not found 2017-04-16 01:22:55 +03:00
Evgeniy Khramtsov 920f2678ac Report configuration file location on startup 2017-04-16 01:02:46 +03:00
Evgeniy Khramtsov b6182e6fe8 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.
2017-04-16 00:29:55 +03:00
Evgeniy Khramtsov 41fe062a8d Lower log level for some messages 2017-04-15 15:47:00 +03:00
Evgeniy Khramtsov 4c5f97bb9a Add Riak as mod_proxy65 RAM backend 2017-04-15 15:38:48 +03:00
Evgeniy Khramtsov f9c24ab16d Add Riak as mod_carboncopy RAM backend 2017-04-15 14:41:14 +03:00
Evgeniy Khramtsov 72b536b52d Add Riak as BOSH RAM backend 2017-04-15 13:52:36 +03:00
Evgeniy Khramtsov 598c79ff86 Fix cleaning of Riak route table 2017-04-15 13:36:29 +03:00
Evgeniy Khramtsov da66eb5714 Add Riak as router RAM backend 2017-04-15 13:07:56 +03:00
Evgeniy Khramtsov c290b4284f Fix closing of outbound S2S connections 2017-04-15 11:15:50 +03:00
Evgeniy Khramtsov fcb978248f Add Riak as session manager RAM backend 2017-04-15 10:02:32 +03:00
Evgeniy Khramtsov 5774edfe79 Improve ejabberd_c2s:close() 2017-04-15 08:30:41 +03:00
Evgeniy Khramtsov 5c23187d2c Make sure stream trailer is sent in the very end 2017-04-14 20:56:01 +03:00
Evgeniy Khramtsov 0a7eb33772 Better process session close 2017-04-14 20:41:25 +03:00
Evgeniy Khramtsov 9de075029b Fix a typo 2017-04-14 20:40:39 +03:00
Evgeniy Khramtsov d110cbb6e2 Fix ejabberd_router:is_my_route/1 2017-04-14 20:34:00 +03:00
Evgeniy Khramtsov 5f1f126613 Don't forget to disconnect 2017-04-14 20:32:26 +03:00
Evgeniy Khramtsov e40baf0bda Use cache in front of Redis/SQL RAM backends 2017-04-14 13:57:52 +03:00
Paweł Chmielowski aa7d5df6a0 Bump xmpp dependency, it's required by previous commit 2017-04-14 09:47:25 +02:00
Badlop 177d5fec86 Allow a room admin to unsubscribe another JID 2017-04-13 22:37:39 +02:00
Holger Weiss 0c0d79fd93 Travis CI: Update MySQL package
The "mysql-server-5.6" package is no longer available.
2017-04-11 13:52:10 +02:00
Holger Weiss 87ae2d7996 mod_muc_room: Replace deprecated function call
Use jid:decode/1 instead of jlib:string_to_jid/1.
2017-04-11 13:38:33 +02:00
Christophe Romain b1acd1183f Rename aux.erl as misc.erl
Thanks Microsoft Windows to not support some filenames
2017-04-11 12:13:58 +02:00
Christophe Romain 265aa54bc2 Use p1_utils 1.0.8 2017-04-11 08:11:29 +02:00
Badlop 1e82db5655 New muc_register_nick command (thanks to Peter Marheine)(#1407) 2017-04-10 12:23:14 +02:00
Christophe Romain f2ca4cb3cd Merge pull request #1666 from weiss/fix-csi
Let CSI keep latest stanzas of each given full JID
2017-04-07 15:10:39 +02:00
Christophe Romain cf784772c9 Merge pull request #1664 from weiss/fix-routing
Fix routing of groupchat and headline messages
2017-04-07 15:10:26 +02:00
Christophe Romain 0567d528c6 Let ext_mod be aware of p1_utils includes 2017-04-07 12:51:43 +02:00
Christophe Romain 36e3f4bc2a Generate ejabberd lib dir when not available in code server (#1665)
This is the case if running ejabberd from development directory
when code:lib_dir(ejabberd) returns {error, nad_name}.
2017-04-07 12:09:43 +02:00
Christophe Romain 2a6c50832e Improve S2S examples (#1583) 2017-04-07 11:12:27 +02:00
Christophe Romain d759875db8 Add more examples on config template (#1583) 2017-04-07 11:02:11 +02:00
Christophe Romain 1510ee0b3c Merge pull request #1660 from michal800106/master
Fix order of starting supervisors.
2017-04-07 10:04:38 +02:00
Evgeniy Khramtsov 3729acc5b0 Improve logging of Redis errors 2017-04-07 09:10:33 +03:00
Holger Weiss 9fa5f37f74 mod_client_state: Remove some empty lines 2017-04-06 23:00:53 +02:00
Holger Weiss 0ddd2e0ebf mod_client_state: Queue stanzas of each full JID
Keep the latest stanzas of each given full JID, rather than dropping
them when stanzas from a different resource are received.  This change
makes sure the recipient receives the latest status of all clients of
each contact.  It also ensures the recipient will see the current list
of occupants of joined MUC rooms.
2017-04-06 22:19:00 +02:00
Holger Weiss 7827faae4b mod_client_state: Don't keep track of queue size
Use maps:size/1 rather than keeping track of the size ourselves.
2017-04-06 21:01:26 +02:00
Evgeniy Khramtsov 245fe04289 Improve type specs and return values 2017-04-06 20:56:46 +03:00
Evgeniy Khramtsov 6876a37e61 Add Redis pool support
Fixes #1624
2017-04-06 17:56:37 +03:00
Christophe Romain 00c613b351 Set default prefix to /usr/local 2017-04-06 15:35:02 +02:00
michal 81fe380de2 Fix order of starting supervisors.
ExtMod should be loaded before GenModSupervisor because ext_mod adds proper paths to ebin from modules (ejabberd-contrib).
Without this change you have to add -pa parameter with path to module's ebin.
2017-04-06 08:50:23 +02:00
Holger Weiss 179e8934cf ejabberd_sm: Fix routing of headline messages
As per RFC 6121, silently drop headline messages sent to the bare JID of
an offline user or to the full JID of an unavailable resource.
2017-04-05 21:03:13 +02:00
Holger Weiss 8bfb6fdd4e ejabberd_sm: Fix routing of groupchat messages
As per RFC 6121, don't (re)route groupchat messages sent to a bare JID
or to an unavailable resource.
2017-04-05 20:41:10 +02:00
Holger Weiss 89f81c89da ejabberd_sm: Fix typo in debug message 2017-04-05 20:23:28 +02:00
Evgeniy Khramtsov ad948d33c0 Add description to feature-not-implemented error 2017-04-05 15:19:00 +03:00
Evgeniy Khramtsov 6fa55e7c38 Set 'read_concurrency' for some ETS tables 2017-04-05 15:10:18 +03:00
Evgeniy Khramtsov 2febbe5ffb Don't misuse monotonic_time/0 2017-04-05 10:42:42 +03:00
Christophe Romain 578ecad93c Disable mix tests 2017-04-04 17:02:15 +02:00
Evgeniy Khramtsov f5b0cd1793 Don't log warning on successful ping reply 2017-04-04 17:14:24 +03:00
Evgeniy Khramtsov 3a0b4ad8da Merge branch 'master' of github.com:processone/ejabberd 2017-04-04 09:53:45 +03:00
Evgeniy Khramtsov 408f9b515e Fix c2s connection close on demand
Fixes #1652
2017-04-04 09:52:42 +03:00
Alexey Shchepin f45dc46856 Forget prepared SQL queries on database connect (#1325) 2017-04-03 16:42:41 +03:00
Christophe Romain b75780b9cd Always init pubsub_index when using mnesia 2017-04-03 12:13:20 +02:00
Alexey Shchepin 19614678e9 Change mnesia dir detection 2017-04-03 12:57:47 +03:00
Christophe Romain 55ea097bce Remove obsolete mnesia migration calls
Now that plugins directly use ejabberd_mnesia and can include their own
transform handler, we don't need pubsub_migrate anymore.

People upgrading from 2.1.1x version must upgrade to 17.01 first.
pubsub_migrate module remains to support any manual process requiring it
2017-04-03 11:37:07 +02:00
Evgeniy Khramtsov 9d9037856c Improve redis related code 2017-04-02 11:56:09 +03:00
Evgeniy Khramtsov 5087e9c2df Use ejabberd_sql:abort/1 instead of exit/1 2017-03-31 19:10:07 +03:00
Evgeniy Khramtsov 178a0a3e1b Merge branch 'master' of github.com:processone/ejabberd 2017-03-31 19:08:16 +03:00
Evgeniy Khramtsov 05ef009552 Add Redis as mod_proxy65 RAM backend 2017-03-31 19:07:56 +03:00
Alexey Shchepin 316da00345 Add ejabberd_sql:abort/1 and ejabberd_sql:restart/1 2017-03-31 17:37:24 +03:00
Evgeniy Khramtsov f449df161a Add SQL as mod_proxy65 RAM backend 2017-03-31 08:16:28 +03:00
Evgeniy Khramtsov 3e4ed83cb3 Raise bad_node instead of node_down for consistency reason 2017-03-30 17:51:37 +03:00
Evgeniy Khramtsov f5f353d90a Do not duplicate enc_pid/dec_pid functions 2017-03-30 17:44:43 +03:00
Christophe Romain bfde473c3b Add missing jlib->aux convertion 2017-03-30 14:28:55 +02:00
Christophe Romain c93bf732db Refactor pubsub's get_last_items 2017-03-30 14:26:30 +02:00
Evgeniy Khramtsov 7bcbea2108 Deprecate jlib.erl in favor of aux.erl
Since the main goal of jlib.erl is lost, all auxiliary functions
are now moved to aux.erl, and the whole jlib.erl is now deprecated.
2017-03-30 14:17:13 +03:00
Christophe Romain 997ac58329 Merge pull request #1646 from weiss/custom-headers
Add custom_headers option for ejabberd_http listeners
2017-03-30 12:47:42 +02:00
Evgeniy Khramtsov 085b61eea5 Add Redis as mod_carboncopy RAM backend 2017-03-30 11:45:09 +03:00
Evgeniy Khramtsov 31fd83b2ae Add SQL as mod_carboncopy RAM backend 2017-03-30 10:31:51 +03:00
Badlop 4b4c039fde oauth_list_tokens and oauth_revoke_token work only in Mnesia (#1644) 2017-03-29 12:41:27 +02:00
Evgeniy Khramtsov 0b3cf26406 Fix a typo 2017-03-29 13:20:15 +03:00
Evgeniy Khramtsov 12e01a5119 Add SQL as mod_muc RAM backend 2017-03-29 12:58:01 +03:00
Evgeniy Khramtsov ba6c88cb90 Add Redis as mod_bosh RAM backend 2017-03-28 21:12:26 +03:00
Evgeniy Khramtsov e5815553cb Add SQL as mod_bosh RAM backend 2017-03-28 20:33:57 +03:00
Evgeniy Khramtsov cba6e1b3ab Add Redis as router RAM backend 2017-03-28 19:34:04 +03:00
Christophe Romain 0f864d9466 Mix needs include path to p1_utils 2017-03-28 16:08:10 +02:00
Evgeniy Khramtsov 117f31125d Add SQL as router RAM backend 2017-03-28 16:31:37 +03:00
Holger Weiss 510fde58d8 mod_http_upload: Don't add "Server" header line
Administrators can add the "Server" header line using the new listener
option "custom_headers", if desired.
2017-03-28 00:03:17 +02:00
Holger Weiss 191fc1b4e8 ejabberd_http: Expand @VERSION@ in custom headers
Let ejabberd_http expand the @VERSION@ keyword to the ejabberd version
if specified in the "custom_headers" listener option.

Closes #1414.
2017-03-27 23:52:49 +02:00
Holger Weiss 41de5e78d0 ejabberd_http: Add "custom_headers" option
If the new listener option "custom_headers" is specified, include those
headers with the HTTP(S) response.

Closes #517.
2017-03-27 23:19:11 +02:00
Christophe Romain 5b6d042de2 Fix PEP issues (#1636) 2017-03-27 16:24:24 +02:00
Evgeniy Khramtsov e30d41e5f0 Merge branch 'new_queue'
Conflicts:
	rebar.config
	src/mod_muc_admin.erl
2017-03-24 13:27:56 +03:00
Evgeniy Khramtsov e1f01f0c8a Avoid PID collisions
Fixes #1470
2017-03-24 11:03:23 +03:00
Christophe Romain e56c6545fa Add inets in included_application for mix 2017-03-23 12:20:02 +01:00
Paweł Chmielowski cb0627e6b2 Expand ejabberd.yml.example by enabling mod_http_api with couple commands 2017-03-22 14:30:12 +01:00
Christophe Romain 6c0419db2b Update mix dependencies 2017-03-22 11:59:39 +01:00
Christophe Romain 232cb3dd45 Update dependencies 2017-03-22 10:06:21 +01:00
Christophe Romain 430fc8eb62 Update docker files from latest Rafael's changes 2017-03-21 18:59:12 +01:00
Holger Weiss e469b6ffb4 prosody2ejabberd: Fix offline message record type
mod_offline now expects a #message{} rather than an #xmlel{} record.
2017-03-21 18:35:07 +01:00
Holger Weiss a1068df602 prosody2ejabberd: Fix message attribute removal
Actually remove the 'stamp' and 'stamp_legacy' attributes from imported
offline messages as intended.
2017-03-21 18:23:55 +01:00
Paweł Chmielowski f819272b88 Fix crash in mod_muc_admin, we operate on integers here not lists 2017-03-21 15:36:42 +01:00
Alexey Shchepin 9fb188afbc Don't block contacts with subscription=to in mod_block_strangers (#1609) 2017-03-21 15:42:38 +03:00
Christophe Romain 70050b52ad Use item creation date in rsm order (#1516) 2017-03-21 12:45:41 +01:00
Evgeny Khramtsov 44484fa4ae Merge pull request #1626 from weiss/fix-scram-import
prosody2ejabberd: Fix SCRAM hash conversion
2017-03-21 15:44:29 +04:00
Christophe Romain 69b52196bd Replace mod_http_bind by mod_bosh in config example 2017-03-21 11:15:01 +01:00
Evgeniy Khramtsov f7cb7ef014 Remove misleading sentence about s2s dialback 2017-03-20 21:48:31 +03:00
Paweł Chmielowski b9cd5ca07f Resolve vars.config relative to to rebar.config.script
This fixes problem with missing deps in make rel - issue #1615
2017-03-20 18:28:49 +01:00
Christophe Romain 6017785e10 Fix compilation with mix (#1588) 2017-03-20 16:58:48 +01:00
Christophe Romain 186fda098c Update mix deps 2017-03-20 16:26:16 +01:00
Christophe Romain b6e1858ce6 Update xmpp and fast_tls versions 2017-03-20 15:33:55 +01:00
Evgeniy Khramtsov 7ab4f32c1a Revert "Bump OTP version to 19.3 in Travis config"
This reverts commit 7113f2b8ba.
2017-03-20 14:08:58 +03:00
Evgeniy Khramtsov 7113f2b8ba Bump OTP version to 19.3 in Travis config 2017-03-20 13:49:23 +03:00
Evgeniy Khramtsov c526c02d92 Remove webtool from erlang.plt creation 2017-03-20 13:48:17 +03:00
Evgeniy Khramtsov f3ecba0445 Use new xdata compiler API 2017-03-20 09:57:11 +03:00
Evgeniy Khramtsov 06f42bc749 Better log s2s auth failures when TLS is not available 2017-03-18 13:59:24 +03:00
Evgeniy Khramtsov 72da5bd062 Log startup time 2017-03-18 10:24:42 +03:00
Evgeny Khramtsov e56a76299c Merge pull request #1617 from edwardchow33/patch-1
Fix wrong parameter values in mod_muc_admin
2017-03-18 02:40:14 +04:00
Edward Chow c5af421cee Fixed wrong parameter values in mod_muc_admin
Corrected wrong parameter values passing to register_online_room(Room, Host, Pid) of mod_muc
2017-03-18 03:07:23 +08:00
Evgeniy Khramtsov 91245141e9 Set translation callback on startup 2017-03-17 21:35:02 +03:00
Paweł Chmielowski 2d67ff2249 Teach mod_http_fileserver ability to send 304 Not Modified 2017-03-17 11:58:40 +01:00
Holger Weiss 0ef6973457 prosody2ejabberd: Fix SCRAM hash conversion
Closes #1549.
2017-03-16 23:15:08 +01:00
Badlop 1aeaa794e1 Encode in base64 when getting scram data with import_prosody (#1549) 2017-03-15 11:42:26 +01:00
Evgeniy Khramtsov b932afb0cd Use correct pid when registering local route
This fixes #1600
2017-03-15 10:27:22 +03:00
Alexey Shchepin 9a142eb807 Update cyrsasl_oauth to internal API changes 2017-03-14 17:25:09 +03:00
Alexey Shchepin 069d28b1ed Get rid of p1_sha calls 2017-03-14 02:31:51 +03:00
Paweł Chmielowski 301b1b7a7a Fix handling of xmlrpc request without authentication structure
This is problem from issue #1602
2017-03-13 16:41:52 +01:00
Badlop 113ed66f49 In module_install copy also deps/ebin and priv files (ejabberd-contrib#200) 2017-03-13 11:26:58 +01:00
Evgeny Khramtsov a90c337297 Merge pull request #1603 from strugee/patch-1
Note how to apply s2s Access Rights in the example
2017-03-12 18:34:14 +04:00
Evgeniy Khramtsov 071c1dcb64 Return 'closed' instead of 'einval' on closed sockets 2017-03-12 08:55:54 +03:00
Alex Jordan c4ed1c2764 Note how to apply s2s Access Rights in the example 2017-03-10 23:53:01 -05:00
Evgeniy Khramtsov 4b1bdb563e Improve overloaded S2S queue processing 2017-03-10 20:21:04 +03:00
Paweł Chmielowski 0822108fc8 Teach web admin about ip acl rules 2017-03-10 14:39:47 +01:00
Evgeniy Khramtsov 02064ae12a Add support for file-based queues
It's now possible to use files as internal packet queues.
The following options are introduced:

* queue_type: the option can be set to `ram` (default) or `file`.
  The option can be set per virtual host.
* queue_dir: path to the directory where queues will be allocated.
  The default is 'queue' directory inside Mnesia directory.
  This is a global option and cannot be set per virtual host.
2017-03-10 15:12:43 +03:00
Paweł Chmielowski 782caaa678 Improve formatting of erlang terms shown in web admin 2017-03-10 10:33:16 +01:00
Badlop ee849338dd Include shared groups also when contact is is personal roster (#1585) 2017-03-09 19:21:45 +01:00
Badlop 7e2380ab0c Remove mod_pubsub from ejd2sql export, as it isn't implemented (#1584) 2017-03-08 16:23:01 +01:00
Badlop b0a950b6dd Fix handling ejabberd_sql:sql_transaction result (#1584) 2017-03-08 16:22:13 +01:00
Evgeniy Khramtsov dd11ed82d7 Report more TLS errors 2017-03-08 08:27:54 +03:00
Evgeniy Khramtsov bdc278399d Fix typo and spec 2017-03-07 22:21:44 +03:00
Evgeniy Khramtsov b71c4c0e52 Remove forgotten compile_all 2017-03-07 21:40:39 +03:00
Evgeniy Khramtsov d0a185f2d9 Report some TLS errors 2017-03-07 18:46:02 +03:00
Evgeniy Khramtsov 0aa22e5149 Don't call deprecated jid functions from the test suite 2017-03-07 18:11:28 +03:00
Evgeniy Khramtsov 8b29af629b Best Practices for Use of SASL EXTERNAL with Certificates (XEP-0178) support
It is now possible for client connections to login using PKIX certificates.
This is disabled by default, to enable it:

- either set 'tls_verify: true' and 'cafile: /path/to/CAfile'
  in the corresponding listener's section
- or set equivalent per-vhost options 'c2s_tls_verify' and 'c2s_cafile'
2017-03-07 14:20:50 +03:00
Evgeniy Khramtsov e5aac80cb4 Better handle errors in ejabberd_receiver calls 2017-03-02 16:02:44 +03:00
Evgeniy Khramtsov 4e014b4c5c Fix previous commit 2017-03-02 15:34:26 +03:00
Evgeniy Khramtsov cebdb87387 Revert "Remove relict mod_service_log"
This reverts commit 0d4e1abbd1.
However, stanzas are now encapsulated into forwarded element
(as per XEP-0297) instead of <route/> nonza.
2017-03-02 15:30:34 +03:00
Evgeniy Khramtsov 8e41bdc25e Improve reporting of unavailable SASL mechanisms 2017-03-01 15:23:22 +03:00
Evgeniy Khramtsov 28f4131d50 Resolve all addresses from SRV lookup 2017-03-01 14:37:35 +03:00
Evgeniy Khramtsov f6e2840947 External components must always provide 'to' attribute 2017-03-01 00:17:27 +03:00
Evgeniy Khramtsov c3ef56702a Add s2s work-around for gmail.com 2017-02-28 20:15:05 +03:00
Evgeniy Khramtsov 489385d565 Make sure all hooks are called with proper host in ejabberd_c2s 2017-02-28 16:47:31 +03:00
Paweł Chmielowski ce3317da7a Fix bug in api_permission parsing 2017-02-28 13:36:34 +01:00
Jerome Sautret d6a9ef5bc1 Propagate the TRANSACTION_TIMEOUT to pgsql driver (EJAB-1266) 2017-02-28 12:19:07 +01:00
Evgeniy Khramtsov ac74b7dca1 Don't crash on malformed IP addresses 2017-02-28 13:11:49 +03:00
Evgeniy Khramtsov d81b07bd5f Improve logging of outbound s2s auth failures 2017-02-28 12:13:35 +03:00
Evgeniy Khramtsov 95a8f58314 Improve logging of dialback failures 2017-02-28 10:13:09 +03:00
Evgeniy Khramtsov f3594ec881 Resend stream header before calling handle_auth_success/2 callback 2017-02-28 10:12:11 +03:00
Paweł Chmielowski 7a186e242d Fix compilation on R17 2017-02-27 20:38:59 +01:00
Paweł Chmielowski b2e16ffb12 Fix parsing of acl/access rules inside oauth sections of api_permissions
This should fix problem reported in #1568
2017-02-27 20:23:37 +01:00
Evgeniy Khramtsov ac025ee6f2 Clarify new modules usage in the example config 2017-02-27 17:20:04 +03:00
Paweł Chmielowski b1b3aba439 Fix elixir tests 2017-02-27 13:05:08 +01:00
Evgeniy Khramtsov 719b4d1183 Don't perform useless resourceprep 2017-02-27 13:58:57 +03:00
Paweł Chmielowski a098d1ec62 Update tests to ejabberd_commands changes 2017-02-27 10:45:39 +01:00
Paweł Chmielowski ac548f2e95 Update tests to cyrsasl modifications 2017-02-27 10:45:15 +01:00
Paweł Chmielowski 6808865068 Return ok from start/2 2017-02-27 10:05:35 +01:00
Evgeniy Khramtsov 7a9fa52e91 Change loglevel on configuration reload 2017-02-27 11:11:29 +03:00
Evgeniy Khramtsov d523357ba8 Invalidate access permissions on configuration reload 2017-02-27 09:55:54 +03:00
Evgeniy Khramtsov 933351ab4c Fix log message format 2017-02-26 16:27:26 +03:00
Evgeniy Khramtsov fadcc85553 Put more stuff under supervision 2017-02-26 15:10:59 +03:00
Evgeniy Khramtsov 7decd58aaa Don't fail on elements decoding 2017-02-26 11:53:41 +03:00
Evgeniy Khramtsov c1439ddd5b Get rid of jid:to_string/1 and jid:from_string/1 2017-02-26 10:07:12 +03:00
Evgeniy Khramtsov 603ec9cb19 Don't pass empty resource to jid:make() 2017-02-25 10:01:01 +03:00
Evgeniy Khramtsov 485aae8134 Don't pass 'from' and 'to' along with stanza in hooks' arguments 2017-02-24 21:25:25 +03:00
Evgeniy Khramtsov 039ac46963 Don't polute log with known content types 2017-02-24 20:57:24 +03:00
Evgeniy Khramtsov 4892b01eb4 Get rid of unused variable warning 2017-02-24 17:48:17 +03:00
Evgeniy Khramtsov 03e2b0f0bf Remove previous options when the config gets reloaded 2017-02-24 17:03:11 +03:00
Evgeniy Khramtsov 0124d292b5 Add gen_mod:is_loaded_elsewhere/2 2017-02-24 16:31:39 +03:00
Evgeniy Khramtsov b8fbac72ac Restart listeners on configuration reload 2017-02-24 15:18:10 +03:00
Paweł Chmielowski e8c0e21f71 We don't like now() 2017-02-24 12:08:57 +01:00
Paweł Chmielowski a85a953e8e Adapt get_last tests to new output 2017-02-24 12:08:57 +01:00
Paweł Chmielowski c950fc05f0 Update tests for changes in acl start code 2017-02-24 12:08:57 +01:00
Evgeniy Khramtsov 0db99ccb4b Improve config reloading support by ejabberd_auth 2017-02-24 14:06:47 +03:00
Paweł Chmielowski 6aab450c16 Make sure that addr_re is always initialized when creating http state 2017-02-24 11:30:36 +01:00
Evgeniy Khramtsov c15d230a57 Return ejabberd_sm:stop/0 back 2017-02-24 12:39:44 +03:00
Paweł Chmielowski f310d7bb12 Make host header parser work correctly with ipv6 literal addresses 2017-02-24 10:25:26 +01:00
Evgeniy Khramtsov 67d6ca9f10 Improve startup procedure 2017-02-24 12:05:47 +03:00
Evgeniy Khramtsov 5b112c86bf Fix a case clause and run c2s_filter_send on send_error/3 2017-02-24 07:57:57 +03:00
Badlop 57181c0a76 get_last now always returns tuple with UTC XEP-0082 and status (#1565) 2017-02-23 23:27:57 +01:00
Badlop 6314a96b05 Protect users from delete_old_users command using a fixed access rule (#1462) 2017-02-23 19:38:17 +01:00
Badlop 4294ba6b52 Separate list of strings with \n for srg_get_info in mod_http_api (#1500) 2017-02-23 19:23:24 +01:00
Holger Weiss 519f3db6b6 Specify "ExecReload" command in systemd unit
Now that "ejabberdctl reload_config" works the way most admins would
expect, expose the command via systemd.
2017-02-23 18:16:56 +01:00
Christophe Romain e7901f9d70 Prepare mix for 17.03 2017-02-23 18:14:29 +01:00
Christophe Romain 1030f041e3 Update dependencies 2017-02-23 18:13:10 +01:00
Holger Weiss c76253cb0a tools/hook_deps.sh: Search for escript in PATH 2017-02-23 17:38:56 +01:00
Evgeny Khramtsov 33e82de475 Merge pull request #1499 from weiss/offline-stanza-id
Include stanza ID with archived offline messages
2017-02-23 20:36:05 +04:00
Holger Weiss b475df2250 Include stanza ID with archived offline messages
Fixes #1480.
2017-02-23 16:55:35 +01:00
Christophe Romain 720741b725 Avoid orphan_item leak on affiliation/subscription removal (#1563) 2017-02-23 16:43:22 +01:00
Jerome Sautret bc9f178b6d Fix pubsub MySQL schema 2017-02-23 16:04:29 +01:00
Evgeniy Khramtsov 6cdead166b Start/stop auth modules when host is added/deleted 2017-02-23 16:19:22 +03:00
Evgeniy Khramtsov 0542c65a07 Stop all s2s connections via supervisor calls 2017-02-23 16:18:29 +03:00
Paweł Chmielowski f4081a363b Fix elixir tests 2017-02-23 09:53:20 +01:00
Evgeniy Khramtsov a3ea6e7723 Improve reload_config admin command 2017-02-23 11:14:49 +03:00
Evgeniy Khramtsov 7d68112265 Start/stop virtual hosts when reloading configuration file 2017-02-23 10:12:19 +03:00
Evgeniy Khramtsov ed34b04e9b Remove unused macro 2017-02-22 20:48:51 +03:00
Evgeniy Khramtsov 96a690f607 Merge branch 'master' of github.com:processone/ejabberd 2017-02-22 19:47:00 +03:00
Evgeniy Khramtsov 3c4057ff55 Reload modules when reloading configuration file 2017-02-22 19:46:47 +03:00
Evgeniy Khramtsov ff67860cdb Make sure all hooks are called with proper host 2017-02-22 19:45:12 +03:00
Christophe Romain 87b5e2500b Fix match of itemid on get_cached_item, fixes 14e771d8 2017-02-22 17:44:47 +01:00
Christophe Romain 56df6e7ba8 Add missing NOT NULL restrictions 2017-02-22 15:47:36 +01:00
Christophe Romain c0b346e0b8 Move archive tables into lite.sql for better comparison with other schemas 2017-02-22 15:44:03 +01:00
Evgeniy Khramtsov 635dfa2eae Re-enable "replaced" tests 2017-02-21 12:53:08 +03:00
Evgeniy Khramtsov 6ffd5ffd0c Test stream management queue overload 2017-02-21 12:38:03 +03:00
Evgeniy Khramtsov e11bcf9c43 Improve stream management tests 2017-02-21 09:19:51 +03:00
Evgeniy Khramtsov adbd174959 Rename mod_sm -> mod_stream_mgmt 2017-02-21 09:18:58 +03:00
Evgeniy Khramtsov 1c34f89c19 Merge branch 'master' of github.com:processone/ejabberd 2017-02-21 08:46:28 +03:00
Evgeniy Khramtsov bbfd089b7e Don't count resent stanzas
Thanks to Holger Weiß for an advise
2017-02-21 08:44:39 +03:00
Holger Weiss 1e679e6f84 Travis CI: Update MySQL APT repository key
The old key expired on February 16, 2017.
2017-02-20 21:17:34 +01:00
Holger Weiss 61cdee97fc ejabberd_c2s: Don't drop 'user_send_packet' result
When handling a <session/> IQ, use the stanza returned by the
'user_send_packet' hook.

Thanks to Evgeniy for spotting this.
2017-02-20 13:07:34 +01:00
Badlop 7d767fac7f Support scrammed passwords in ejabberdctl import_prosody (#1549) 2017-02-20 12:47:56 +01:00
Evgeniy Khramtsov 9426c67302 Fix s2s_dns_timeout issues 2017-02-20 10:42:16 +03:00
Evgeny Khramtsov a664d6389e Merge pull request #1555 from weiss/count-session-iq
Let ejabberd_c2s handle <session/> IQ
2017-02-20 10:21:15 +04:00
Holger Weiss 7c159e3881 Let ejabberd_c2s handle <session/> IQ
This fixes the counting of incoming stanzas for stream management.
2017-02-19 22:43:10 +01:00
Evgeniy Khramtsov 70bfc5b4a8 Get rid of non-breaking space 2017-02-18 12:13:48 +03:00
Evgeniy Khramtsov 940ca9311d Fix some dialyzer warnings 2017-02-18 09:36:27 +03:00
Evgeny Khramtsov b2de1d7438 Merge pull request #1553 from lemenkov/config_functions_deprecation
Mark local/global config functions as deprecated
2017-02-17 20:40:04 +04:00
Peter Lemenkov 1a2dd3680f Mark local/global config functions as deprecated
See discussion in PR #1548.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2017-02-17 19:20:44 +03:00
Christophe Romain 68cc1e775c Fix compilation when included as Elixir dependency (#1526) 2017-02-17 16:26:39 +01:00
Badlop a1e8d3c3dc Commands documentation lack arguments when policy=user (#1514) 2017-02-17 12:37:42 +01:00
Evgeny Khramtsov ae25fa994c Merge pull request #1548 from lemenkov/use_get_option
Use ejabberd_config:get_option/2 instead of ejabberd_config:get_local_option/2
2017-02-16 23:34:50 +04:00
Peter Lemenkov 009a5007ff Use ejabberd_config:add_option/2 instead of ejabberd_config:add_local_option/2
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2017-02-16 20:47:47 +03:00
Peter Lemenkov cb30f7733d Use ejabberd_config:get_option/2 instead of ejabberd_config:get_local_option/2
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2017-02-16 20:41:57 +03:00
Paweł Chmielowski eec63dbefe Correct access_matches spec 2017-02-16 15:38:44 +01:00
Evgeniy Khramtsov 218eeae797 Fix some dialyzer warnings 2017-02-16 14:18:36 +03:00
Evgeniy Khramtsov 8b2d308498 Change routing API
Now 'From' and 'To' arguments must be omitted in functions
and structures related to routing.
The commit deprecates the following functions:
     ejabberd_router:route/3 in favor of ejabberd_router:route/1
     ejabberd_router:route_error/4 in favor of ejabberd_router:route_error/2
     ejabberd_local:route_iq/4 in favor of ejabberd_local:route_iq/2
     ejabberd_local:route_iq/5 in favor of ejabberd_local:route_iq/3
The format of {route, From, To, Packet} is changed in favor of {route, Packet}
2017-02-16 11:10:24 +03:00
Evgeniy Khramtsov 26a5811744 Merge branch 'master' of github.com:processone/ejabberd 2017-02-16 00:23:00 +03:00
Evgeniy Khramtsov 0d4e1abbd1 Remove relict mod_service_log 2017-02-16 00:22:48 +03:00
Paweł Chmielowski 5b019ab48c Disable undefined_function_calls xref_check
It looks like it will calling undefined function still will be catched
by xref_queries
2017-02-15 14:12:07 +01:00
Evgeniy Khramtsov f2b5153a8c Report password change in the log 2017-02-14 17:10:16 +03:00
Evgeniy Khramtsov 6fd89f5fe0 Attach IP metadata to every stanza received from stream 2017-02-14 17:09:25 +03:00
Paweł Chmielowski 0b304731c5 Use newer p1_utils 2017-02-14 15:06:00 +01:00
Paweł Chmielowski 63da351038 Fix handling of config.ctc files 2017-02-14 14:39:24 +01:00
Paweł Chmielowski cad02bb1b0 Add more check to make xref 2017-02-14 14:39:24 +01:00
Evgeniy Khramtsov f61c933a7a Only use GEN_SERVER macro where appropriate 2017-02-14 15:39:57 +03:00
Evgeniy Khramtsov 28f66ddd7c Attach modules to gen_mod's supervisor 2017-02-14 12:39:26 +03:00
Evgeny Khramtsov a1e45ab56c Merge pull request #1539 from lemenkov/use_crypto_sha
RFE: Use crypto:hash/2 function
2017-02-14 11:38:05 +04:00
Evgeniy Khramtsov f664e39374 Improve modules start/stop procedures 2017-02-14 10:25:08 +03:00
Peter Lemenkov e7733ce7d9 Use crypto:hash/2 function
Use crypto:hash/2 function instead of ones from p1_sha.

This function exists since commit
erlang/otp@208f9ad382 and also implemented
as NIF, so I believe it's safe to use it.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2017-02-13 18:42:50 +03:00
Evgeniy Khramtsov e1ba499bd6 Check result of gen_mod:start/2 callback (#1534) 2017-02-13 11:11:41 +03:00
Evgeniy Khramtsov fd885d0818 Apply SASLprep before storing/converting passwords
Fixes #996 and #1295
2017-02-12 10:06:30 +03:00
Evgeniy Khramtsov 67c9de6461 Use p1_server behaviour in xmpp_stream layer 2017-02-08 17:16:18 +03:00
Paweł Chmielowski ca0dd09944 Accept "add_commands: admin" in commands section not only "add_commands: - admin"
This fixes issue reported in #1518, and restores compatibility with
what older version were accepting and what is documented.
2017-02-06 21:40:37 +01:00
Paweł Chmielowski b703b4f022 Don't shadow binding in match 2017-02-06 11:38:51 +01:00
Evgeniy Khramtsov f30c9d49f7 Add TLS support for external components 2017-02-06 13:30:58 +03:00
Paweł Chmielowski af5457ba09 Make sure that api_permissions always have "console commands" section
If user didn't override it in config file, default version which allows
executing all commands will be added
2017-02-03 15:22:35 +01:00
Badlop a31154c035 Set subscribers nicks when recreating room (thanks to Girdhar Sojitra)(#1495) 2017-01-31 19:18:39 +01:00
Badlop b2a2e0f135 Support non-JID lines in command create_rooms_file 2017-01-31 17:50:04 +01:00
Christophe Romain 85eb8f022c Depend on fast_xml-1.1.20 2017-01-31 11:02:23 +01:00
Christophe Romain 589bc73838 Don't warn if custom schema is not available 2017-01-31 09:53:52 +01:00
Evgeny Khramtsov 649d3b753b Merge pull request #1502 from lemenkov/ignore_output_val
No need to explicitly return ok here
2017-01-30 18:15:25 +04:00
Peter Lemenkov c377708da1 No need to explicitly return ok here
No need to explicitly return ok here. Return value will be ignored
anyway.

Signed-off-by: Peter Lemenkov <lemenkov@redhat.com>
2017-01-30 14:52:04 +01:00
Paweł Chmielowski 326e8da06d Use newer version of epam 2017-01-29 14:51:03 +01:00
Paweł Chmielowski 44a9ceac0b More changes that are required from p1_pam -> epam 2017-01-29 14:35:22 +01:00
Paweł Chmielowski 5c1168c33f Change name of pam dep from p1_pam to epam
We need to use same name as .app file or rebar complains
2017-01-29 14:26:46 +01:00
Paweł Chmielowski dd458c637e Floating deps should always be executed
This fixes problem with recognizing latest_deps configure option
2017-01-29 12:14:32 +01:00
Paweł Chmielowski 2f3f6f8b71 Improve compilation with rebar3 2017-01-26 16:45:04 +01:00
Evgeniy Khramtsov 11326692f2 Merge branch 'master' of github.com:processone/ejabberd 2017-01-26 10:59:31 +03:00
Evgeniy Khramtsov 9d144bd495 Do not drop default TLS options
Fixes #1484
2017-01-26 10:58:26 +03:00
Paweł Chmielowski a284722fd0 Adapt to coveralls api change 2017-01-24 19:16:50 +01:00
Evgeniy Khramtsov c0a89e328a Change OTP version from 19.1 to 19.2 in travis config 2017-01-24 10:39:40 +03:00
Evgeniy Khramtsov 99fd621aed Speedup features list when a lot of virtual hosts configured 2017-01-24 10:38:29 +03:00
Paweł Chmielowski 5183f7724d Fix tests 2017-01-23 20:43:35 +01:00
Evgeniy Khramtsov 0c57044c59 Make mod_disco handle features of mod_ping 2017-01-23 22:33:46 +03:00
Evgeniy Khramtsov 5e2c105396 Merge branch 'master' of github.com:processone/ejabberd 2017-01-23 21:52:35 +03:00
Evgeniy Khramtsov 0ce3a3665a Make sure only {exit, normal} is not catched when executing a hook 2017-01-23 21:52:25 +03:00
Paweł Chmielowski b0e72ece43 Adapt to new ejabberd_sm changes 2017-01-23 19:34:29 +01:00
Alexey Shchepin 8b5e6e4a13 Compatibility with R17 in mod_block_strangers 2017-01-23 19:04:22 +03:00
Alexey Shchepin 43bfa0efbc Check message subject in mod_block_strangers 2017-01-23 17:10:28 +03:00
Christophe Romain ca298c7c39 Update deps in mix.lock 2017-01-23 14:42:52 +01:00
Evgeniy Khramtsov 48d8498dbb Avoid using maps:get/2 to keep compatibility with OTP 17.5 2017-01-23 16:30:16 +03:00
Evgeniy Khramtsov 19bec62eb5 Fix calling to mod_offline:store_packet 2017-01-23 15:00:46 +03:00
Paweł Chmielowski 5e5a8bbdcf Don't use maps:take it available in R19 only 2017-01-23 12:56:08 +01:00
Paweł Chmielowski 7c2ccb2cb7 Add tool for checking which dependences need update 2017-01-23 12:24:25 +01:00
Evgeniy Khramtsov 435e5e6263 Make test suite working again 2017-01-23 13:51:05 +03:00
Evgeniy Khramtsov e564f9ae31 Make a message is not bounced if it's archived 2017-01-21 13:47:47 +03:00
Evgeniy Khramtsov 68cf45a8b9 Archive message before delivering it to offline storage (#1348) 2017-01-21 11:47:04 +03:00
Evgeniy Khramtsov 94b23482a9 Send <compressed/> in correct order 2017-01-21 10:47:55 +03:00
Evgeny Khramtsov 1e968f5487 Merge pull request #1478 from weiss/multi-host-pubsub-cache
mod_pubsub: Fix last item cache for multiple hosts
2017-01-21 11:17:06 +04:00
Holger Weiss 14e771d871 mod_pubsub: Fix last item cache for multiple hosts
Don't let the last item cache intermix PubSub items of different virtual
domains.
2017-01-21 00:14:56 +01:00
Evgeniy Khramtsov 56ef607904 Add stanza-id to every archived message (#1477) 2017-01-20 23:21:06 +03:00
Evgeniy Khramtsov 17fe272dc5 Update copyright headers in new files 2017-01-20 19:56:19 +03:00
Evgeniy Khramtsov d5d906184f Merge branch 'new_stream'
Conflicts:
	src/cyrsasl.erl
	src/ejabberd_c2s.erl
	src/ejabberd_cluster.erl
	src/ejabberd_frontend_socket.erl
	src/ejabberd_node_groups.erl
	src/ejabberd_router.erl
	src/mod_bosh.erl
	src/mod_ip_blacklist.erl
	src/mod_muc_mnesia.erl
	src/mod_offline.erl
	src/mod_proxy65_sm.erl
2017-01-20 19:35:46 +03:00
Christophe Romain 3b2c2b5c04 Prepare 17.01 for hex.pm 2017-01-20 12:19:55 +01:00
Christophe Romain 39cfee239d Use xmpp 1.1.6 2017-01-20 11:51:56 +01:00
Paweł Chmielowski 1f02567507 Make shim for mod_http_api admin_ip_access more robust 2017-01-20 10:19:09 +01:00
Christophe Romain 4f5d54f062 Try db migration only when mnesia is configured (#1458) 2017-01-20 09:26:13 +01:00
Evgeniy Khramtsov fc2b71a04e Restore muc_invite_hook (#1467) 2017-01-19 18:24:29 +03:00
Evgeniy Khramtsov 87b964a7f6 Make sure 'jabber:client' namespace is added to forwarded messages (#1474) 2017-01-19 18:03:07 +03:00
Evgeniy Khramtsov 4cf83ca3a7 Restore multiple invitations support (#1468) 2017-01-19 17:26:08 +03:00
Evgeniy Khramtsov 3d9997288d Don't forget to convert muc#roomconfig_mam 2017-01-19 16:42:04 +03:00
Evgeniy Khramtsov 527472f18c Support legacy muc#roomconfig values (#1469) 2017-01-19 11:12:27 +03:00
Christophe Romain d2b8569452 Fix typo 2017-01-18 17:11:08 +01:00
Christophe Romain 3482ee5c75 Reset table only if new def change from runtime 2017-01-18 17:02:03 +01:00
Christophe Romain 3029e84faf Improve check of mnesia schema opearations 2017-01-18 16:53:36 +01:00
Evgeniy Khramtsov 044e55b98e Fix reporting dialback failures 2017-01-18 18:26:31 +03:00
Evgeniy Khramtsov 60a09285b7 Don't attempt to resolve _jabber._tcp SRV record 2017-01-18 17:54:42 +03:00
Evgeniy Khramtsov ba47fd4649 Improve <delay/> tag insertion 2017-01-18 14:09:39 +03:00
Evgeniy Khramtsov 2de2d00f14 Cope with malformed values in 'rosterusers' SQL table (#1466) 2017-01-18 11:59:46 +03:00
Evgeniy Khramtsov 7b8c01da12 Better log bytestream termination 2017-01-17 23:06:55 +03:00
Evgeniy Khramtsov 9021ba01ac Use crypto:exor/2 instead of hand-crafted bxor 2017-01-17 22:37:44 +03:00
Evgeniy Khramtsov b8db0a8ed6 Reset XML stream before sending SASL <success/> 2017-01-17 22:06:26 +03:00
Christophe Romain 2a68591181 Remove wrong index setting 2017-01-17 16:23:45 +01:00
Christophe Romain 94ac777f93 Let ejabberd_mnesia handles copy_type 2017-01-17 15:05:14 +01:00
Christophe Romain 0ea6c1dcf6 Fix index processing (#1461) 2017-01-17 14:53:41 +01:00
Christophe Romain 2ce6d49a40 Speedup table setup, no io if EJABBERD_SCHEMA_PATH not set (#1461) 2017-01-17 14:22:12 +01:00
Evgeniy Khramtsov c7476875e6 Avoid stopping mod_offline before supervisor termination (#1464) 2017-01-17 14:31:00 +03:00
Evgeniy Khramtsov 22ee16fd9d Get rid of ejabberd_frontend_socket 2017-01-17 14:00:01 +03:00
Evgeniy Khramtsov c68ac1d5eb Improve error reporting for forbidden servers 2017-01-17 13:38:05 +03:00
Alexey Shchepin a23c76fb82 Drop only messages with <body/> in mod_block_strangers 2017-01-17 01:34:40 +03:00
Alexey Shchepin fd4f5c0996 Stop hook on message drop in mod_block_strangers 2017-01-16 18:45:26 +03:00
Alexey Shchepin b080b8f54d Use user_receive_packet hook in mod_block_strangers 2017-01-16 18:40:30 +03:00
Alexey Shchepin 5a8dea1591 Remove stub in mob_block_strangers 2017-01-16 18:21:36 +03:00
Evgeniy Khramtsov a849b384f8 Merge branch 'new_stream' of github.com:processone/ejabberd into new_stream 2017-01-16 18:15:08 +03:00
Alexey Shchepin fedfe5427c Add mod_block_strangers 2017-01-16 18:14:14 +03:00
Evgeniy Khramtsov 1176e1f096 Add script to check hook dependencies 2017-01-16 17:14:33 +03:00
Evgeniy Khramtsov 22c25e4413 Don't allow raw elements in process_iq/3 2017-01-16 16:40:11 +03:00
Evgeniy Khramtsov 557820707b Implement database backend interface for mod_proxy65 2017-01-16 15:28:11 +03:00
Evgeniy Khramtsov 0078a3b904 Correctly set gen_server's name 2017-01-16 11:43:35 +03:00
Evgeniy Khramtsov 65d352d5de Remove handle_event/1 callback 2017-01-16 11:34:49 +03:00
Evgeniy Khramtsov 64997d9961 Add mod_sm and mod_s2s_dialback to example config 2017-01-16 10:12:46 +03:00
Paweł Chmielowski ce42b6be01 Add example api_permisions: definition to config template
Also expand default config to have rule for admin oauth
2017-01-13 16:53:48 +01:00
Evgeniy Khramtsov 7606be93d5 Decode message before checking for expiration (#1458) 2017-01-13 14:20:25 +03:00
Badlop e2665c5da9 Usable size for Shared rosters members textarea (EJAB-1753) 2017-01-13 12:16:23 +01:00
Evgeniy Khramtsov 32d548d99b Fix configuration commands (#1432) 2017-01-13 13:36:28 +03:00
Evgeniy Khramtsov 25ddb6c69d Add forgotten -include_lib() 2017-01-13 13:28:55 +03:00
Evgeniy Khramtsov 0baaad30b1 Implement database backend interface for MUC, BOSH and auth_anonyous 2017-01-13 12:03:39 +03:00
Evgeniy Khramtsov 31491ebe16 Fix some corner cases while re-reading RFC6120 2017-01-13 11:35:47 +03:00
Evgeniy Khramtsov b10e10efae Ignore unexpected events 2017-01-11 16:50:11 +03:00
Evgeniy Khramtsov 02f96d0f41 Implement database backend interface for ejabberd_router 2017-01-11 16:25:43 +03:00
Evgeniy Khramtsov 2129a33077 Fix attaching ejabberd_s2s_out process to a supervisor 2017-01-11 11:09:56 +03:00
Evgeniy Khramtsov 5cfe57ece5 Add 'supervisor' listening option
If set to 'true' (this is the default), new processes spawned by
ejabberd_listener will be attached to the corresponding supervisor.
No such processes will be attached to a supervisor otherwise.
Setting this to 'false' will improve performance of high loaded
systems where new C2S/S2S processes are spawned very rapidly.
2017-01-11 10:56:04 +03:00
Evgeniy Khramtsov 03667d0c73 Add SSL support for SQL connections
Currently only PostgreSQL is supported.
This requires p1_pgsql-1.1.2 and higher.
2017-01-10 17:40:38 +03:00
Christophe Romain f2acf57412 update deps 2017-01-10 15:11:41 +01:00
Christophe Romain efccee55e3 pubsub_subscription may is not used (migration is optional) 2017-01-10 13:53:23 +01:00
Christophe Romain 6ff81946cf Fix migration of old pubsub database (#1409) 2017-01-10 12:10:11 +01:00
Evgeniy Khramtsov 08d482b064 Allow old-stype mod_vcard_ldap in the config (#1410) 2017-01-10 11:29:01 +03:00
Evgeniy Khramtsov dd5389df23 Don't forget to advertise disco features 2017-01-10 11:25:12 +03:00
Evgeniy Khramtsov e01bece552 Make stream related calls module independent 2017-01-09 22:03:42 +03:00
Badlop 3d0d9cb354 Fix typo in previous commit 2017-01-09 17:54:10 +01:00
Badlop afc7f5aa37 Simplify setting allow_subscription (#1404) 2017-01-09 15:56:25 +01:00
Evgeniy Khramtsov f14a966680 Set from/to in every routed packet 2017-01-09 17:51:08 +03:00
Evgeniy Khramtsov 6c564775c4 Remove unused mod_ip_blacklist module 2017-01-09 17:22:31 +03:00
Evgeniy Khramtsov 1e55e018e5 Adopt remaining code to support new hooks 2017-01-09 17:02:17 +03:00
Badlop 9605e2b2a4 Fix problem with get_vcard command (#1447) 2017-01-06 16:13:57 +01:00
Christophe Romain a910ab8171 Get nodes from ejabberd_cluster instead of mnesia 2017-01-03 17:21:02 +01:00
Christophe Romain 32e5781a6a Cleanup file headers 2017-01-03 15:58:52 +01:00
Badlop f5290a8e44 Specify that process_rosteritems command works only with Mnesia storage 2017-01-03 01:38:56 +01:00
Badlop 5fdd1c39fe Update copyright date automatically (#1442) 2017-01-02 21:42:06 +01:00
Paweł Chmielowski 769975f6d7 Remove mod_http_bind and migration code to mod_bosh 2017-01-02 15:53:25 +01:00
Paweł Chmielowski 1bda40dac7 Fix cyrsasl test after recent changes 2017-01-02 13:36:21 +01:00
Evgeniy Khramtsov 5ef60bf594 Correctly process errors from new cyrsasl API 2017-01-02 15:02:03 +03:00
Evgeniy Khramtsov 666608544b Improve return values in cyrsasl API 2017-01-02 14:55:06 +03:00
Evgeniy Khramtsov 3dd2a614ac Get rid of "jlib.hrl" header in some files 2017-01-02 14:45:52 +03:00
Evgeniy Khramtsov 50682b98d6 Better cope with IPv6 domains 2016-12-31 17:43:40 +03:00
Evgeniy Khramtsov cf87c5664f Reflect cyrsasl API changes in remaining code 2016-12-31 13:48:55 +03:00
Evgeniy Khramtsov 247ca872f6 Improve return values in cyrsasl API 2016-12-31 13:47:35 +03:00
Evgeniy Khramtsov e7fe4dc474 More refactoring on session management 2016-12-30 00:00:36 +03:00
Badlop c6b5dd6c4f Fix case clauses when using compression (#1431)(thanks to Evgeniy Khramtsov) 2016-12-29 15:18:42 +01:00
Evgeniy Khramtsov 309bdfbe28 Add xmpp_stream_out behaviour and rewrite s2s/SM code 2016-12-28 09:47:11 +03:00
Christophe Romain ed679279fd Cleanup file headers 2016-12-27 10:57:50 +01:00
Badlop fad7612cf1 Allow subscriber to create room, then set allow_subscription=true (#1404) 2016-12-26 21:16:17 +01:00
Holger Weiss df92d96d4f Revert "Fix 'nodetree' configuration lookups for PEP"
This reverts commit 7ef8dfb4e0.

The config/3 function copes with the PEP case.
2016-12-25 01:24:40 +01:00
Holger Weiss 7ef8dfb4e0 Fix 'nodetree' configuration lookups for PEP 2016-12-25 00:58:20 +01:00
Christophe Romain b30b70db70 Prepare mix for 16.12 2016-12-22 20:41:01 +01:00
Paweł Chmielowski 08f73a5aeb Update deps 2016-12-22 15:10:57 +01:00
Badlop 3811a61573 Extract correctly the text from #stanza_error (#1425) 2016-12-17 11:46:16 +01:00
Badlop cc14e223c6 Describe command arguments and results in ejabberd_admin 2016-12-12 13:19:17 +01:00
Evgeniy Khramtsov 7f653cfe76 Rewrite ejabberd_service to use new XMPP stream API 2016-12-11 18:24:51 +03:00
Evgeniy Khramtsov 5cc8e807df Initial version of new XMPP stream behaviour (for review) 2016-12-11 15:03:37 +03:00
Badlop 1a4f63f058 Copy recent make_opts function from mod_muc_room.erl 2016-12-09 13:07:48 +01:00
Christophe Romain bcc04d93e1 Enforce pubsub node removal, revert previous commit (#1320)
This reverts commit 2976c2d921.
and enforce node purge/removal instead
2016-12-09 12:51:08 +01:00
Christophe Romain 2976c2d921 Enforce affiliation removal, remove corresponding items (#1320) 2016-12-09 11:35:51 +01:00
Paweł Chmielowski a50247c20d Improve handling on acl rules in api_permissions 2016-12-08 18:08:54 +01:00
Mickael Remond fdf69dcd0d API call does not necessary use token, it could use basic auth 2016-12-08 16:28:47 +01:00
Paweł Chmielowski a3b12fd745 Recognize "- who:" not only "who:" syntax in api_permissions 2016-12-08 12:01:24 +01:00
Christophe Romain 8a7ea85a7e Cleanup ext_mod and fix compilation path 2016-12-07 09:27:21 +01:00
Paweł Chmielowski a681874f67 Try to fix interminent failures in cyrsasl tests 2016-12-06 18:33:16 +01:00
Mickael Remond 1c8edd07a1 Update xmpp lib version and fix path when using deps.get and compile in same commande 2016-12-06 17:54:21 +01:00
Christophe Romain 1883a98d1c Fix compilation of external module with new xmpp lib 2016-12-06 12:01:04 +01:00
Christophe Romain 0c2491d9ea Remove obsolete remove_node api (use leave_cluster) 2016-12-05 14:17:57 +01:00
Christophe Romain 23f7075313 Fix reload_config 2016-12-02 16:29:46 +01:00
Paweł Chmielowski 23786c95c9 Grab new version of xmpp dep 2016-12-02 16:28:14 +01:00
Badlop 847376924e Add password support in muc_subscribe (#1306) 2016-12-02 16:18:35 +01:00
Badlop d7e1f6d7b3 When unsubscribes, check if room should get closed (#1396) 2016-12-01 22:09:57 +01:00
Badlop 34f2a8a4f2 Fix error formatting, which closed client connection (#1389) 2016-12-01 21:02:54 +01:00
Paweł Chmielowski 68cf6845e1 Fix mod_http_api_mock_test on 19.1 2016-12-01 18:51:23 +01:00
Paweł Chmielowski 294d58a393 Add more tests for digest-md5 cyrsasl 2016-12-01 18:51:23 +01:00
Mickael Remond 732eecac43 Move to latest Elixir version 2016-12-01 15:44:52 +01:00
Mickael Remond a3c134c43b We can now use dependencies published in hex.pm 2016-12-01 15:10:00 +01:00
Mickael Remond 309fd56fb4 Merge branch 'master' of github.com:processone/ejabberd 2016-12-01 15:05:09 +01:00
Badlop 8618af4e34 Fixes pt-br translation (thanks to Rodrigues)(#1393) 2016-11-30 16:51:42 +01:00
Christophe Romain 32f484a349 Fix typo introduced by 92db9ff changes 2016-11-30 13:50:46 +01:00
Christophe Romain 92db9ff105 Improve handling of mnesia schema 2016-11-30 11:09:17 +01:00
Christophe Romain 95a4b1b266 Cleanup admin_extra, add few functions 2016-11-30 10:31:36 +01:00
Christophe Romain 2cd70280d2 Merge branch 'docker' from Rafael Römhild 2016-11-30 10:30:19 +01:00
Christophe Romain fc7e52df71 Adds optional post_install and pre_uninstall hooks (thanks Igor Manturov Jr.)(#1300) 2016-11-28 17:15:57 +01:00
Evgeniy Khramtsov 56b30ab598 Improve translation of some messages 2016-11-26 10:05:22 +03:00
Christophe Romain 3ac73f9607 Update dependencies 2016-11-25 13:02:31 +01:00
Christophe Romain 18609befa4 Merge branch 'master' of github.com:processone/ejabberd 2016-11-25 10:07:04 +01:00
Christophe Romain ae297a4ae6 Merge branch 'ukutaht-enable-elixir-in-mix' 2016-11-25 10:05:28 +01:00
Christophe Romain 9432a16893 Merge branch 'enable-elixir-in-mix' of https://github.com/ukutaht/ejabberd into ukutaht-enable-elixir-in-mix 2016-11-25 10:05:01 +01:00
Evgeniy Khramtsov ca1b22bdd4 Use ejabberd_router:route_error/4 wherever possible 2016-11-25 11:41:24 +03:00
Christophe Romain 4d6eb31264 Use new version of xmpp in mix 2016-11-25 09:31:49 +01:00
Evgeniy Khramtsov e1539e5769 Get rid of compile warnings 2016-11-25 09:48:26 +03:00
Evgeniy Khramtsov 993cbcb133 Use new version of xmpp 2016-11-25 09:39:09 +03:00
Evgeniy Khramtsov d554827ebc Don't check for faked carbons 2016-11-24 20:16:07 +03:00
Evgeniy Khramtsov 0f11b1be36 Don't forget to erase cache on user removal 2016-11-24 18:40:20 +03:00
Paweł Chmielowski 28d0a1b9d2 Make compatible with rebar3 2016-11-24 14:23:20 +01:00
Evgeniy Khramtsov 49f1275e20 Get rid of excessive (io)list_to_binary/1 calls 2016-11-24 15:06:06 +03:00
Paweł Chmielowski b14843d098 Add missing -callbacks 2016-11-24 12:44:21 +01:00
Evgeny Khramtsov 8f692f51d8 Merge pull request #1391 from weiss/mark-copies
Mark messages as copies by attaching metadata
2016-11-24 15:43:38 +04:00
Holger Weiss 560038c808 Use xmpp:put_meta/3 to update metadata 2016-11-24 10:47:26 +01:00
Holger Weiss d12210f4e1 Use new versions of fast_xml and xmpp 2016-11-24 10:45:57 +01:00
Holger Weiss 9c3ebb7d22 Don't make ejabberd.service file executable 2016-11-24 07:59:27 +01:00
Holger Weiss b6ddcf3e58 Makefile.in: Substitute all @variables@ in a line
There are now lines with multiple occurrences of the @ctlscriptpath@
variable in the ejabberd.service template.
2016-11-24 07:55:06 +01:00
Christophe Romain cbda2e038e Merge branch 'weiss-systemd-unit-improvements' (#1346) 2016-11-23 14:37:34 +01:00
Christophe Romain 6a4f2a78ff Merge branch 'systemd-unit-improvements' of https://github.com/weiss/ejabberd into weiss-systemd-unit-improvements 2016-11-23 14:36:50 +01:00
Christophe Romain 12683b4aaf Fix typo in copyright date 2016-11-23 14:36:11 +01:00
Evgeniy Khramtsov 5d434c1aea Move copyright definition to ejabberd.hrl 2016-11-23 15:51:48 +03:00
Johan Oudinet d364eab74b Merge remote-tracking branch 'upstream/master' 2016-11-23 11:45:13 +01:00
Evgeniy Khramtsov 6f2f1e87c9 Don't use deprecated functions from jlib.erl 2016-11-23 10:41:26 +03:00
Holger Weiss 3325e69ae6 Let mod_carboncopy mark copied messages
Carbon copies are now marked with a 'carbon_copy' flag.  This makes it
easier to identify them.
2016-11-22 22:21:34 +01:00
Holger Weiss 114ca786ee Let ejabberd_sm mark copied messages
When multiple resources have the same (highest) priority, ejabberd_sm
dispatches messages addressed to the bare JID (or to an unavailable
resource) to each of these resources.  Such messages are now marked with
an 'sm_copy' flag for all but one of the resources.  This makes it
easier for other modules to identify those duplicates.

Resolves #1356.
2016-11-22 19:25:20 +01:00
Christophe Romain ee8cc1dac2 Fix xref issue injected by fbfbb96 2016-11-22 17:51:21 +01:00
Christophe Romain 9ab169bc63 Fix get_roster issue injected by fbfbb96 2016-11-22 16:59:02 +01:00
Christophe Romain 24ef90c556 Fix vcard_ldap exports 2016-11-22 16:23:02 +01:00
Christophe Romain c0e7b298db Add missing export 2016-11-22 16:12:19 +01:00
Christophe Romain cc63bcc997 Fix issues on import improvements 2016-11-22 16:01:08 +01:00
Paweł Chmielowski a2fb493f91 Add missing include file 2016-11-22 15:35:47 +01:00
Paweł Chmielowski ebadcf71c2 New bosh module 2016-11-22 15:26:15 +01:00
Christophe Romain fbfbb96872 Improve ODBC import 2016-11-22 14:48:01 +01:00
Christophe Romain 577eeb642f Add new xmpp repo as dependency in mix.exs 2016-11-22 14:43:10 +01:00
Paweł Chmielowski 7ffab38b44 Remove now() from mod_offline.hrl 2016-11-22 13:15:43 +01:00
Evgeniy Khramtsov 2786df651a Add OTP 19.1 to Travis' testing platforms 2016-11-22 09:52:26 +03:00
Evgeniy Khramtsov c0b5c6e9d4 Fix logging in tests on R17 2016-11-21 22:04:25 +03:00
Evgeniy Khramtsov 3189bb3bb9 Set 'sql_pool_size' to 1 by default for sqlite 2016-11-21 21:34:56 +03:00
Johan Oudinet 404a7c3381 Remove bashismes from ejabberdctl
To avoid unecessary extra quoting, do not call commands with sh -c ''
and use the -- option from su to supply arguments.

Parse command line parameters is a bit tricky as the previous behavior
allows to mix options to ejabberdctl with unknown options given to
the next script (usually, the ctl). This is solved by relying on the
fact that for loop saves its argument, so we can flush its content
with set -- and re-add unknown options with set -- "$@" "$arg".

Finally, remove unecessary quotes in mnesia options and in the ping
command.
2016-11-21 15:25:58 +01:00
Evgeniy Khramtsov 3908a80ac9 Merge branch 'master' of github.com:processone/ejabberd 2016-11-21 16:55:28 +03:00
Evgeniy Khramtsov 1a02a2a51d Set 'sql_pool_size' to 1 for sqlite tests 2016-11-21 16:55:18 +03:00
Paweł Chmielowski b8e8e4b971 Fix elixir tests 2016-11-21 12:50:51 +01:00
Evgeniy Khramtsov 04fdf69737 Fix non-empty disco-nodes processing 2016-11-21 14:21:34 +03:00
Paweł Chmielowski e57de02e0f Fix s2s test 2016-11-21 12:06:58 +01:00
Badlop c5e7b4738f Fix handling mod_http_upload disco#info queries: need decoded elements
As reported in
https://www.ejabberd.im/forum/28605/ejabberd-modhttpupload-error-405-not-allowed
2016-11-21 12:06:11 +01:00
Evgeniy Khramtsov e6365979bd Merge branch 'master' of github.com:processone/ejabberd 2016-11-21 12:14:37 +03:00
Evgeniy Khramtsov 274303f248 Fix conference disco#items when running multiple virtual hosts 2016-11-21 12:14:24 +03:00
Evgeniy Khramtsov 507e756b69 Do not send empty <after/> tag 2016-11-21 12:13:34 +03:00
Paweł Chmielowski 3f91668c46 Log more data for failed s2s connection 2016-11-21 09:52:36 +01:00
Evgeniy Khramtsov c7ae916afc Don't forget to start XMPP application 2016-11-21 10:23:09 +03:00
Evgeniy Khramtsov 049a6d97f1 Fix RSM for conference disco#items 2016-11-20 18:08:49 +03:00
Evgeniy Khramtsov 13c6039700 Use xmpp_util.erl from XMPP library 2016-11-19 13:57:25 +03:00
Evgeniy Khramtsov de7a143a2c Transform ejabberd_commands on the start 2016-11-19 13:05:13 +03:00
Evgeniy Khramtsov 9aff7e52a8 Switch to stand-alone XMPP library 2016-11-19 13:03:33 +03:00
Paweł Chmielowski d00a634025 Fix includes in eunit compilation flags 2016-11-18 14:02:47 +01:00
Paweł Chmielowski daab95e3b5 Fix elixir tests 2016-11-18 12:54:06 +01:00
Christophe Romain 45e77ea483 Remove useless NO_EXT_LIB flag 2016-11-18 12:25:01 +01:00
Paweł Chmielowski e69937d93a Get rid of substitute_forwarded 2016-11-18 11:51:57 +01:00
Evgeniy Khramtsov f57f267c54 Merge branch 'master' of github.com:processone/ejabberd
Conflicts:
	test/ejabberd_SUITE.erl
2016-11-18 13:39:10 +03:00
Evgeniy Khramtsov b8dcc911a3 Make common tests working again 2016-11-18 13:38:08 +03:00
Paweł Chmielowski 995c97671d Add auth to mod_http_fileserver 2016-11-17 12:59:46 +01:00
Christophe Romain 1c90b19d74 Fix typo 2016-11-16 18:24:12 +01:00
Christophe Romain 8ced3bdbe9 Remove obsolete/temp file 2016-11-16 14:18:51 +01:00
Badlop 3cd174cb56 Ensure that presence_broadcast room option is stored (#1380) 2016-11-16 13:35:50 +01:00
Badlop e69ddd981f Tell git to ignore the example file ejabberd.service 2016-11-16 13:12:57 +01:00
Badlop b1723c6e2d Handle correctly p1_http:request result 2016-11-16 13:11:23 +01:00
Rafael Römhild 5a01b5f1fc add docker support 2016-11-16 11:48:50 +01:00
Christophe Romain 2929f5b5bc Minor cosmetic changes on pubsub code 2016-11-15 18:35:20 +01:00
Christophe Romain 4d4ad922a2 Cosmetic validator changes 2016-11-15 18:14:21 +01:00
Christophe Romain 8df68266f2 Add missing verbs for RESTfull operation 2016-11-15 14:35:26 +01:00
Christophe Romain 2b93de6912 apply string optimizations 2016-11-15 14:32:22 +01:00
Christophe Romain 909e0eb5dd Add configurable weight for commands 2016-11-15 14:18:34 +01:00
Paweł Chmielowski e75dd17e2c Fix tests that use #forwarded 2016-11-15 10:02:21 +01:00
Paweł Chmielowski 41794c57d6 Use new version of fast_xml 2016-11-15 10:02:21 +01:00
Paweł Chmielowski 5ffc01db53 Fix types in check_password_hash 2016-11-15 10:02:21 +01:00
Paweł Chmielowski 717159a98f Make string args in http_api be list strings 2016-11-15 10:02:21 +01:00
Christophe Romain 309962fb8b Use p1_http from p1_utils 1.0.6 2016-11-14 16:52:03 +01:00
Evgeniy Khramtsov 3765210698 Fix IQ result processing 2016-11-13 16:56:05 +03:00
Evgeniy Khramtsov 13d5da4da6 Add some copyright notices 2016-11-13 16:46:04 +03:00
Evgeniy Khramtsov 75c15d3853 Make xref working again if elixir is disabled 2016-11-13 14:29:52 +03:00
Evgeniy Khramtsov ebefd0d8d6 Add more control for decoding IQ payloads 2016-11-13 14:17:21 +03:00
Evgeniy Khramtsov 7e9f1a6dc1 Don't auto-decode forwarded payload 2016-11-13 13:41:04 +03:00
Evgeniy Khramtsov 132033d01a Remove unused header file 2016-11-13 10:57:53 +03:00
Evgeniy Khramtsov 21d78ed7f4 Don't use jlib.hrl outside of jlib.erl 2016-11-13 10:56:36 +03:00
Evgeniy Khramtsov b8f22ff538 Deprecate most of the functions from jlib.erl 2016-11-13 10:44:53 +03:00
Evgeniy Khramtsov 534e73f732 Uncomment forgotten block of code 2016-11-12 14:51:43 +03:00
Evgeniy Khramtsov de81c50199 Revert "Support to provide password when subscribing to a room (#1306)"
This reverts commit 566ac872fe.
2016-11-12 14:47:29 +03:00
Evgeniy Khramtsov 5d552c8463 Merge branch 'master' into xml-ng 2016-11-12 14:41:37 +03:00
Evgeniy Khramtsov 78a44e0176 Merge branch 'master' into xml-ng
Conflicts:
	src/adhoc.erl
	src/cyrsasl_oauth.erl
	src/ejabberd_c2s.erl
	src/ejabberd_config.erl
	src/ejabberd_service.erl
	src/gen_mod.erl
	src/mod_admin_extra.erl
	src/mod_announce.erl
	src/mod_carboncopy.erl
	src/mod_client_state.erl
	src/mod_configure.erl
	src/mod_echo.erl
	src/mod_mam.erl
	src/mod_muc.erl
	src/mod_muc_room.erl
	src/mod_offline.erl
	src/mod_pubsub.erl
	src/mod_stats.erl
	src/node_flat_sql.erl
	src/randoms.erl
2016-11-12 13:27:15 +03:00
Badlop 566ac872fe Support to provide password when subscribing to a room (#1306) 2016-11-10 20:48:43 +01:00
Mickael Remond 42bede77a1 Merge branch 'master' of github.com:processone/ejabberd 2016-11-09 09:04:58 +01:00
Mickael Remond 35506f5470 Expose unregister API command 2016-11-09 09:04:52 +01:00
Evgeniy Khramtsov e841a6ec34 Add more tests for offline storage 2016-11-08 15:15:19 +03:00
Evgeniy Khramtsov e9dd3ffe9c Merge branch 'xml-ng' of github.com:processone/ejabberd into xml-ng 2016-11-07 10:11:40 +03:00
Evgeniy Khramtsov 56c91d3c58 Add roster tests 2016-11-07 10:10:57 +03:00
Badlop bd060bc1bb Support several groups separated by ; in add_rosteritem command 2016-11-04 18:45:27 +01:00
Badlop 49d3b7ec1d Throw error if room name or host has invalid characters (#1360) 2016-11-04 17:28:28 +01:00
Badlop 5e723bc90e Fix reading room jids from file for create and destroy_rooms_file commands 2016-11-04 16:54:31 +01:00
Badlop bab71f0832 Replace ctlscriptpath and produce ejabberd.service file (#434) 2016-11-04 16:35:59 +01:00
Paweł Chmielowski 62db030942 Merge mod_opt_type from db sub-modules to main module mod_opt_type 2016-11-04 12:58:08 +01:00
Holger Weiss 2a63d0e95a mod_mam: Use user JID for stanza ID 'by' attribute
Use the user (or room) JID instead of the server JID for the 'by'
attribute of <stanza-id/> and <archived/> tags.  That's what the
examples in XEP-0313 v0.2 and XEP-0359 v0.3.0 suggest.
2016-11-01 08:47:08 +01:00
Badlop 149cc9654f Append ; to privacy_list_data exporting lines (thanks to Marcio Luciano Donada) 2016-10-24 13:42:33 +02:00
Evgeniy Khramtsov 9d977e484a Use base64:mime_decode/1 for SASL packets
It will be now possible to accept SASL packets with only
single '=' character set as required by RFC6120
2016-10-22 13:09:11 +03:00
Evgeniy Khramtsov f6236d456d Add more tests for privacy lists and blocking command 2016-10-22 13:01:45 +03:00
badlop ed6bc9081b Merge pull request #1349 from prasadvaidya/master
Fix: Replace erlang function with fail-safe jlib function.
2016-10-21 13:32:29 +02:00
Prasad Vaidya cdafd3254b Rollback minor change, to avoid redundant use of fail-safe function 2016-10-21 15:02:39 +05:30
Prasad Vaidya 509776a0d1 Fix: Replace erlang function with fail-safe jlib function. 2016-10-21 13:57:47 +05:30
Badlop 2ab72bcd00 Nidx may be integer or binary, so use jlib:i2l instead
As reported in
https://www.ejabberd.im/forum/28580/erlang-function-integertobinary1-throwing-badargs-exception
2016-10-20 21:56:19 +02:00
Badlop 0212559ca7 If a participant can change subject, let asubscriber too (#1345) 2016-10-20 20:35:00 +02:00
Holger Weiss 1bdbe54442 Let systemd stop ejabberd gracefully
Make sure the "ExecStop" command line blocks until ejabberd is actually
stopped.  This prevents systemd from killing the ejabberd process(es)
immediately.

Also, let the "ExecStart" command line block until ejabberd's startup is
completed.  This makes sure that services which depend on ejabberd
aren't started up too early.
2016-10-20 00:27:50 +02:00
Holger Weiss a5e737157c Increase file descriptor limit in systemd unit
16,000 file descriptors will only suffice for small setups.
2016-10-20 00:12:02 +02:00
Holger Weiss 0a3fcc9ade Don't specify "ExecReload" command in systemd unit
The "reload_config" command doesn't work the way admins would typically
expect, so it shouldn't be exposed via systemd.  Those who understand
the behavior can execute the command using ejabberdctl.
2016-10-19 23:37:26 +02:00
Holger Weiss 7621564839 Let systemd restart ejabberd on failure
The "RestartSec=5" setting has no effect if "Restart" is not also
specified.
2016-10-19 23:35:22 +02:00
Holger Weiss 686305bb21 Use "Type=forking" in systemd unit
ejabberd is not a "oneshot" process.
2016-10-19 23:32:07 +02:00
Holger Weiss c3b62d2f75 Don't set "NoNewPrivileges" in systemd unit
The "NoNewPrivileges" setting breaks some PAM and extauth setups.

Fixes #1281.
2016-10-19 23:29:46 +02:00
Holger Weiss f56840a682 Don't let systemd hide /home and /tmp
Admins might expect ejabberd to be able to access data below /home or
/tmp.  For example, they might use those locations to dump/restore
Mnesia backups, or as a document root for mod_http_fileserver or
mod_http_upload.

Fixes #1297.
2016-10-19 23:11:26 +02:00
Christophe Romain 059a806bb0 Let mix be able to cope with configured deps 2016-10-19 13:57:19 +02:00
badlop 3ec68a4ecf Merge pull request #1343 from gardenia/mod_muc_configurable_max_discoitems
New option max_rooms_discoitems instead of constant (#1236)
2016-10-19 12:32:09 +02:00
colm 3b876875e9 mod_muc: made the constant MAX_ROOMS_DISCOITEMS configurable 2016-10-18 21:59:34 +01:00
Evgeniy Khramtsov d19552f464 Fix randoms:uniform/1 return
Make sure randoms:uniform/1 returns values from the same interval
as deprecated random:uniform/1
2016-10-18 08:35:47 +03:00
Evgeniy Khramtsov 4c5460f0bd Get rid of compile warnings for random/crypto modules on R19 2016-10-18 08:17:21 +03:00
badlop 90acec8a2b Merge pull request #1338 from marcphilipp/muc_invite_hook
Introduce muc_invite hook
2016-10-17 17:46:25 +02:00
Jerome Sautret 305d4c05dc Fix delete_old_messages command for SQL backends 2016-10-17 17:02:23 +02:00
Evgeniy Khramtsov 67720c7713 Add more MUC tests 2016-10-17 13:37:23 +03:00
Paweł Chmielowski fd6f0f94b5 Convert ejabberd_xmlrpc to new api_permissions 2016-10-14 13:55:50 +02:00
Marc Philipp a1faecc4c9 Introduce muc_invite hook
This adds a new hook that is triggered for each invite to an MUC room:

- muc_invite(RoomJID, RoomConfig, From, To, Reason) -> ok

where

- RoomJID = From = To = #jid (see jlib.h)
- RoomConfig = #config (see mod_muc_room.hrl)
- Reason = binary()
2016-10-14 12:52:59 +02:00
Holger Weiss d97e777c9b Always include <actions/> with ad-hoc responses
XEP-0050 says: "The result for each stage (other than the last) of a
command's execution SHOULD include an <actions/> element."  Some clients
insist on this.
2016-10-13 22:34:29 +02:00
Holger Weiss b693601dd1 Don't let MAM messages go into offline storage 2016-10-12 23:10:25 +02:00
badlop 4935ac8866 Merge pull request #1331 from weiss/send-message-omit-copies
Don't let "send_message" duplicate the message
2016-10-12 13:52:27 +02:00
Holger Weiss ead7e21037 Ignore offline sessions in statistics
Offline sessions should not be counted when reporting the number of
connected resources.

Apart from that, this number is now also reported when using a
non-default session management backend.
2016-10-11 22:20:22 +02:00
Christophe Romain 0f67a8f98b Update riakc to support r19 2016-10-10 10:57:04 +03:00
Evgeniy Khramtsov a915fd161e Create room on configuration request as per XEP-0045, 10.1.3 2016-10-10 10:51:39 +03:00
Holger Weiss dffcfe74d4 Don't let "send_message" duplicate the message
In the past, the "send_message" command sent a copy of the message to
each resource if the message was addressed to the bare JID of a local
online user.  When message carbons are enabled, this creates duplicates;
and with MAM enabled, each copy is archived.  Therefore, "send_message"
no longer creates copies of the message.
2016-10-10 00:17:17 +02:00
Uku Taht 5c48263579 Enable elixir when ejabberd used as a mix dependency 2016-10-07 10:47:20 +01:00
Evgeniy Khramtsov 6a3691ef7c Add xdata generator and make some code using it 2016-10-07 10:31:03 +03:00
Holger Weiss d701230555 Make map syntax compatible with Erlang/OTP 17 2016-10-07 00:36:47 +02:00
Holger Weiss e54ba3db5b XEP-0198: Cope with invalid 'from'/'to' attributes
Check whether the 'from' and 'to' attributes are valid before bouncing
or resending a stanza from the stream management queue.  They might be
invalid in certain corner cases.

Thanks to Evgeniy for spotting this.
2016-10-06 23:20:45 +02:00
Paweł Chmielowski 0ae84a646f Disable one test for now, we may change how this part is handled 2016-10-06 11:17:10 +02:00
Paweł Chmielowski b01fbfadf3 Use correct field for oauth scope 2016-10-06 11:03:26 +02:00
Paweł Chmielowski 438dbc8bda Make handling of oauth clauses be more consistent with other rules 2016-10-06 10:59:43 +02:00
Paweł Chmielowski 8accb8ee0c Use proper default value for api_permissions 2016-10-06 10:59:43 +02:00
Badlop a78c3422cd Fix typos in Czech translation (#1318) 2016-10-05 15:04:42 +02:00
Paweł Chmielowski 695d22ef95 Initialize ejabberd_access_permissions in elixir tests 2016-10-05 13:54:29 +02:00
Paweł Chmielowski 98e0123ca4 New api permissions framework 2016-10-05 13:21:11 +02:00
Holger Weiss 9cee3760db ejabberd_sm: Clean up old offline session entries
If the number of offline sessions exceeds the 'max_user_sessions' limit,
remove the oldest entry from the table.
2016-10-02 22:01:03 +02:00
Christophe Romain 1de0bb83a0 PubSub: creation jid must be bare jid 2016-09-30 07:51:33 +03:00
Christophe Romain 7566e267a7 PubSub: fix error type on item deletion with insufficient priviledge 2016-09-30 07:51:17 +03:00
Christophe Romain 15ebb79160 PubSub: creation jid must be bare jid 2016-09-29 16:10:11 +02:00
Christophe Romain 767dba8f3b PubSub: fix notification on subscription change 2016-09-29 12:00:59 +02:00
Christophe Romain a42bf67957 PubSub: fix error type on item deletion with insufficient priviledge 2016-09-29 11:20:56 +02:00
Badlop 6f538545b4 Fix 404 response formatting (thanks to Kaggggggga)(#1306) 2016-09-28 11:03:46 +02:00
Holger Weiss d4b4f35a0e ejabberd_http: Handle missing POST data gracefully
Return a "bad request" error instead of crashing if receiving POST/PUT
data fails.
2016-09-27 23:22:30 +02:00
Alexey Shchepin acab2270f1 Use inets instead of lhttpc in http_p1 2016-09-27 07:12:10 +03:00
Alexey Shchepin ac6f701033 Add http_p1.erl, rest.erl, and oauth2 ReST backend for tokens. 2016-09-27 05:57:14 +03:00
Evgeniy Khramtsov d327119cf7 Text legacy IQ handler support 2016-09-25 10:17:03 +03:00
Evgeniy Khramtsov 3112a7187f Test anonymous auth 2016-09-25 09:57:56 +03:00
Evgeniy Khramtsov 7100c67be6 Get rid of compile warnings in test suite 2016-09-25 08:38:41 +03:00
Evgeniy Khramtsov fa31e3ef23 Deprecate jlib:integer_to_binary/1 and jlib:binary_to_integer/1 2016-09-24 23:34:28 +03:00
Evgeniy Khramtsov 58969fb854 Improve namespace handling 2016-09-24 14:17:21 +03:00
Evgeniy Khramtsov 53209b9ab1 Add tests for s2s code 2016-09-23 12:30:33 +03:00
Evgeniy Khramtsov ceda073766 Add tests for external component 2016-09-21 10:45:11 +03:00
Evgeniy Khramtsov a4ec064455 Add more tests for C2S 2016-09-20 14:04:07 +03:00
Holger Weiss e7787e2f33 mod_carboncopy: Don't copy MUC PMs
Carbon copies of private MUC message are generally not desired,
especially not when multiple clients joined the room with the same nick.
In this case, the MUC service usually sends PMs to all joined resources
anyway, so carbon-copying those PMs would create duplicates.
2016-09-19 22:46:36 +02:00
Badlop 5bcfcf4c5e When getting list of subscribed rooms, check all including temporary ones (#1242) 2016-09-19 13:46:01 +02:00
Badlop 9fa92092bf Revert "Fix getting of subscribed rooms: consider also temporary ones (#1242)"
This reverts commit f2cc81dfea.
2016-09-19 12:54:19 +02:00
Badlop f2cc81dfea Fix getting of subscribed rooms: consider also temporary ones (#1242) 2016-09-19 12:35:53 +02:00
Badlop 8244c1fa8c Store the Allow Subscription room option (#1301) 2016-09-19 12:35:32 +02:00
Badlop ed62d705d8 Don't worry about storage_type of the Acl mnesia table (#1206) 2016-09-19 11:59:40 +02:00
Badlop da291d804c Use mnesia calls instead of ets for Acl and Access tables (#1206) 2016-09-19 11:56:22 +02:00
Christophe Romain 662b6f1020 Update riakc to support r19 2016-09-16 14:59:06 +02:00
Holger Weiss 27999a122f node_mb_sql: Add missing (SQL-specific) functions 2016-09-15 23:02:04 +02:00
Evgeniy Khramtsov 151668ac10 Fix dialyzer warnings for mod_mam 2016-09-13 16:56:34 +03:00
Christophe Romain 405a0a21c1 Merge pull request #1249 from weiss:push-requirements 2016-09-13 14:31:39 +02:00
Christophe Romain c39501a48d Merge branch 'push-requirements' of https://github.com/weiss/ejabberd into weiss-push-requirements 2016-09-13 14:29:14 +02:00
Christophe Romain c3543e002d Allow to create room with custom config 2016-09-13 11:52:59 +02:00
Evgeniy Khramtsov e987b88848 Make common tests working again 2016-09-13 12:30:05 +03:00
Paweł Chmielowski 2f596b0e10 Expand parsing of json input to be able to handle update_roster command 2016-09-13 11:27:59 +02:00
Paweł Chmielowski 054382f074 Add X-Admin and basic auth header to CORS allowed headers in http_api 2016-09-12 15:40:38 +02:00
Paweł Chmielowski 96d05dad8f Properly process OPTIONS header in http_api for all paths 2016-09-12 15:40:38 +02:00
Evgeniy Khramtsov 1aca541639 Fix nick-to-jid mapping for MUC subscribers 2016-09-12 14:41:33 +03:00
Badlop d0761039ff Support multiple room invitations (#1285) 2016-09-09 12:18:27 +02:00
Evgeniy Khramtsov fe1bf27ef3 Fix subscribed rooms list retreivement 2016-09-09 13:04:47 +03:00
Holger Weiss d222fed228 XEP-0198: Cancel timer when waiting for resumption
If an ACK timer is active while going into the 'wait_for_resume' state,
cancel that timer.
2016-09-09 00:21:36 +02:00
Holger Weiss 8fd888eb2b Revert "Don't log an [error] message if Elixir is missing"
This reverts commit 41386d718d.  The issue
was fixed with commit 4bd45bada7.
2016-09-08 18:11:54 +02:00
Holger Weiss 41386d718d Don't log an [error] message if Elixir is missing
The Elixir support is still optional.

Closes #1250.
2016-09-08 17:59:40 +02:00
Christophe Romain 26a040e2d5 Fix typo on previous commit (#1284) 2016-09-08 16:32:16 +02:00
Paweł Chmielowski 4bd45bada7 Start elixir config code only if elixir was enabled in configure script 2016-09-08 16:29:45 +02:00
Christophe Romain ad39da0b0a Full jid entity subscriptions should include bare jid records (#1284) 2016-09-08 16:27:16 +02:00
Evgeniy Khramtsov c29a48695d Rename #error{} record to #stanza_error{} 2016-09-08 17:08:48 +03:00
Evgeniy Khramtsov 36ab9cc2ea Fix message routing from subscribers 2016-09-08 16:39:34 +03:00
Evgeniy Khramtsov 5ec972b00f Improve pubsub code 2016-09-08 15:49:27 +03:00
Paweł Chmielowski 6c943aa293 Merge pull request #1287 from weiss/ack-timeout
New stream management option: ack_timeout
2016-09-08 12:45:16 +02:00
gabrielgatu 803270fc6b Support for Elixir configuration file #1208
Contribution for Google Summer of code 2016 by Gabriel Gatu
2016-09-08 11:37:14 +02:00
Mickael Remond e6f7233351 Support for publishing to hex.pm with latest Elixir mix 2016-09-08 10:52:43 +02:00
Mickael Remond 58a72bd395 Fix compilation with Elixir 1.3 / R19 2016-09-08 10:29:44 +02:00
Paweł Chmielowski d2621130a3 Typo 2016-09-08 10:27:14 +02:00
Paweł Chmielowski a8368278ec Properly normalize resource_regexp acl rule
This fixes issue #1288.
2016-09-08 08:45:10 +02:00
Holger Weiss 621f0e2b7c New stream management option: ack_timeout
Close the connection if a stream management client fails to respond to
an acknowledgement request within 60 seconds.  This number of seconds
can be changed with the new "ack_timeout" option, and the mechanism can
be disabled by specifying 'infinity'.

As a side effect of this change, a new acknowledgement is no longer
requested before the response to the previous request is received.
2016-09-07 23:16:54 +02:00
Christophe Romain 7a538bb88b Enforce pathtype use with config path (#1264) 2016-09-07 17:38:35 +02:00
Christophe Romain af0a493c66 Merge pull request #1253 from Amuhar/xep0356 2016-09-07 14:34:31 +02:00
Evgeniy Khramtsov f304149615 Create room on configuration request as per XEP-0045, 10.1.3 2016-09-07 11:15:19 +03:00
Evgeniy Khramtsov 3803a8de3c Link MUC subscription to bare JID 2016-09-07 10:33:37 +03:00
Holger Weiss 1edca899ff Add SQL support for microblogging node plugin 2016-09-07 07:15:12 +02:00
Evgeniy Khramtsov c6afb9731b Handle <subscriptions/> request to list MUC subscribers 2016-09-06 19:06:02 +03:00
Evgeniy Khramtsov 5ec2874a96 Do not update muc_online_users table on MUC/Sub operations 2016-09-06 18:17:30 +03:00
Evgeniy Khramtsov 417284a921 Add get_subscribers command to list MUC subscribers 2016-09-06 17:55:18 +03:00
Holger Weiss af2999a783 node_mb: Call node_pep instead of node_hometree 2016-09-06 00:30:46 +02:00
Holger Weiss 48ce34987d node_mb: Fix configuration documentation
A node plugin used in a 'pep_mapping' must explicitly be added to the
list of 'plugins'.
2016-09-06 00:08:43 +02:00
Holger Weiss e29f47893f mod_pubsub: Remove outdated comment 2016-09-06 00:05:54 +02:00
Paweł Chmielowski c770a54aac Clean ejabberd_commands before tests 2016-09-05 17:18:27 +02:00
Paweł Chmielowski 96a748d34f ejabberd_oauth requiere working cache_tab, initialize it before tests 2016-09-05 16:42:05 +02:00
Evgeniy Khramtsov 45eb49125b Rewrite mod_pubsub to use XML codec 2016-08-30 09:48:08 +03:00
Holger Weiss 31592fe51f Merge remote-tracking branch 'processone/pr/1262'
* processone/pr/1262:
  Fixed typo in  Stream Management option name
2016-08-22 22:35:17 +02:00
Igor Manturov Jr f1afea223b Fixed typo in Stream Management option name 2016-08-23 02:21:09 +06:00
Holger Weiss 1bfa1c613b Merge remote-tracking branch 'processone/pr/1261'
* processone/pr/1261:
  Fixed #1260 Stream Management feature for the websocket connections
2016-08-22 21:22:08 +02:00
Igor Manturov Jr d5659735b3 Fixed #1260 Stream Management feature for the websocket connections 2016-08-23 00:59:39 +06:00
Holger Weiss 23d9fb0592 mod_muc_admin: Accept 'allow_subscription' option
Allow for setting the new 'allow_subscription' option using the
'change_room_option' command.
2016-08-22 01:17:32 +02:00
badlop 8dd2044a27 Merge pull request #1254 from lemenkov/remove_p1_xmlrpc
Remove no longer necessary p1_xmlrpc
2016-08-19 11:53:20 +02:00
Peter Lemenkov e13edff6ae Remove no longer necessary p1_xmlrpc
Ths module was superceded by fast_xml in commit
processone/ejabberd@dfc29ea03c. So let's remove it entirely to
avoid any confusion.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2016-08-17 18:32:09 +03:00
Badlop 8af85d913f Erlang R17 has a Time limit in erlang:send_after (#1246) 2016-08-16 18:32:06 +02:00
Holger Weiss 20a510d877 mod_mam: Add 'store_mam_message' hook
The new 'store_mam_message' hook is invoked whenever a MAM message is
stored.
2016-08-15 23:28:36 +02:00
Holger Weiss 8821cf8b27 mod_offline: Add 'store_offline_message' hook
The new 'store_offline_message' hook is invoked whenever an offline
message is stored.
2016-08-15 22:30:08 +02:00
Holger Weiss 4d19fb518f ejabberd_c2s: Add XEP-0198 resumption hooks
The new 'c2s_session_pending' and 'c2s_session_resumed' hooks are
invoked when a stream management session is pending and resumed,
respectively.
2016-08-15 21:49:58 +02:00
Holger Weiss e7217e6320 Add functions to get/set some c2s state elements 2016-08-15 20:24:43 +02:00
Badlop 5b4f347da8 Support sql backend in mod_shared_roster commands (#1244) 2016-08-15 15:53:35 +02:00
Evgeny Khramtsov 38666cfd58 Merge pull request #1245 from hamano/clean_redis_table
fix clean redis table
2016-08-15 15:12:20 +04:00
HAMANO Tsukasa 877d0752e2 fix clean redis table 2016-08-15 17:51:06 +09:00
Badlop 0ab08f4eeb Don't delete ejabberd_commands table, it's problematic in cluster (#1210) 2016-08-14 20:35:25 +02:00
Holger Weiss 4ee8af633b Store announcements for offline users
Add a <store/> hint to announcements (unless they are explicitly sent to
online users).  Without that hint, announcements weren't delivered to
offline users, since they are sent as messages of type "headline".
2016-08-13 00:07:27 +02:00
Holger Weiss bf9d6b5534 Honor <store/> hint for any non-"error" message
XEP-0334 says: "A message containing the <store/> hint that is not of
type 'error' SHOULD be stored by the entity."
2016-08-12 21:13:10 +02:00
Holger Weiss 28dde294e5 mod_mam: Don't store messages of type "headline"
XEP-0313 says: "a server SHOULD include in a user archive all of the
messages a user sends or receives of type 'normal' or 'chat' that
contain a <body> element."
2016-08-12 20:38:17 +02:00
Evgeniy Khramtsov 31faa4eb9a Add more type specs 2016-08-12 13:17:42 +03:00
Evgeniy Khramtsov ffba664f2c Add a requirement for full JID in subscribe_room command 2016-08-11 17:13:20 +03:00
Paweł Chmielowski 50596dc4d3 Provide proper args_desc in oauth_issue_token command 2016-08-10 11:26:04 +02:00
Paweł Chmielowski e63fe5c216 Fix result type of subscribe_room command 2016-08-10 11:22:19 +02:00
Evgeniy Khramtsov 1fc58ace2f Add commands for MUC subscriptions management 2016-08-09 13:36:43 +03:00
Evgeniy Khramtsov 522a186a38 Improve some type specs 2016-08-09 10:56:32 +03:00
Mickael Remond c4b14d045a Update to released version 2016-08-07 18:31:55 +02:00
Mickael Remond 9c6ee60f1a Update moka dependency 2016-08-07 18:28:14 +02:00
Mickael Remond efc744092b We do not force yet access rules check on register command 2016-08-07 18:27:16 +02:00
Mickael Remond a0c8012c66 Do not force command line to pass a credentials 2016-08-07 18:24:08 +02:00
Holger Weiss b62aa3d2dc mod_client_state: Let other modules filter stanzas
Don't stop execution of the 'csi_filter_stanza' hook if mod_client_state
won't queue the stanza.
2016-08-06 13:36:27 +02:00
Holger Weiss 91e26fbf7a Add user's JID to CSI hook arguments
Add the JID of the CSI user to the arguments of the 'csi_filter_stanza'
and 'csi_flush_queue' hooks.
2016-08-05 23:47:18 +02:00
Holger Weiss c2ef55a075 Cosmetic change: Set CSI state 'active' on resume
The CSI state is always set to 'active' when a stream management session
is resumed; so there's no need to apply the CSI state of the old c2s
process, first.
2016-08-05 20:09:52 +02:00
Paweł Chmielowski d969e917c6 Use newer samerlib/moka 2016-08-05 13:03:22 +02:00
Evgeniy Khramtsov 4ff8d7918a Change code to reflect recent changes in fxml_gen 2016-08-05 08:41:08 +03:00
Holger Weiss 9a5f0751be mod_mam: Simplify "assume_mam_usage" option
The "assume_mam_usage" option now takes a boolean value.  Setting it to
"true" has the same effect as "if_enabled" had before.  The "on_request"
behavior is no longer offered, as it made the option (and its
documentation) overly complex.
2016-08-05 01:57:01 +02:00
Evgeniy Khramtsov b487ccfb34 Delete mod_configure2
The module doesn't work properly for many years and nobody reported
this, which means nobody is using it. Also, mod_configure does
the same (and more) in a standard compliant way (XEP-0133).
2016-08-04 16:45:33 +03:00
Evgeniy Khramtsov ca217dc105 Rewrite HTTP Bind and Web Admin code to use XML generator 2016-08-04 13:41:38 +03:00
Evgeniy Khramtsov 8b81b9ecb1 Rewrite PIEFXIS code to use XML generator 2016-08-04 13:37:07 +03:00
Evgeniy Khramtsov cbdc106427 Rewrite jd2ejd to use XML generator 2016-08-04 12:34:12 +03:00
Evgeniy Khramtsov bc33a3873d Rewrite multicast code to use XML generator 2016-08-04 11:49:17 +03:00
Christophe Romain 72b0fb49e8 Fix type convertion bug injected by 4ccc40b (#1229) 2016-08-04 09:49:23 +02:00
Alexey Shchepin 111aa83f5e Add tokens cache to ejabberd_oauth 2016-08-04 01:59:28 +03:00
Evgeniy Khramtsov abb4446b51 Fix calls to undefined functions 2016-08-03 21:00:22 +03:00
Evgeniy Khramtsov a417fbf45b Rewrite mod_irc to use XML generator 2016-08-03 20:57:05 +03:00
Evgeniy Khramtsov 5d06c6acbf Rewrite mod_configure to use XML generator 2016-08-03 10:34:54 +03:00
Holger Weiss 78fa9e08a5 XEP-0198: Handle timeouts during stream resumption
If session resumption failed because requesting the #state from the old
c2s process took too long, the new c2s process will usually receive the
response.  Let the new process handle that case gracefully.
2016-08-03 02:28:46 +02:00
Holger Weiss 3c1e4f0dfd XEP-0198: Increase timeout for stream resumption
During stream resumption, the #state is transferred from the old c2s
process to the new one.  This is usually very fast, but under certain
conditions, it can take longer than five seconds.
2016-08-03 02:15:15 +02:00
Alexey Shchepin 4add262090 Add OAUTH SQL backend 2016-08-01 16:55:43 +03:00
Mickael Remond 76eba3647a Implement gen_mod callback in ModPresenceDemo module 2016-08-01 15:46:14 +02:00
Mickaël Rémond 2ef58a33a9 Merge pull request #1223 from processone/expand_api
More API fixes and improvements
2016-08-01 15:36:47 +02:00
Mickael Remond d02d7b2b6a Remove compile warning 2016-08-01 15:35:54 +02:00
Mickael Remond 90ea3ca361 Improve error message when try to call api on api root 2016-08-01 15:29:47 +02:00
Christophe Romain bf45c9eeee Switch mix worker to transient 2016-08-01 14:09:16 +02:00
Christophe Romain a9c6748ec7 Add missing comas in sql statement (#1219) 2016-08-01 10:55:02 +02:00
Mickael Remond 4982639d05 Fix error return expectation in command test 2016-08-01 09:28:54 +02:00
Mickael Remond c5c394e929 Fix HTTP process return formatting 2016-08-01 08:58:49 +02:00
Mickael Remond 6ea7153e31 Improve error handling 2016-07-31 22:48:24 +02:00
Evgeniy Khramtsov c0272ae766 Rewrite mod_stats to use XML generator 2016-07-31 14:51:16 +03:00
Evgeniy Khramtsov e258462b6b Improve vCard creation from LDAP result 2016-07-31 14:17:17 +03:00
Evgeniy Khramtsov 0bcbd12776 Rewrite mod_mix to use XML generator 2016-07-31 08:51:47 +03:00
Mickael Remond 2a49f8cae7 Change name of result key for offline count to value
This is more user friendly and should be more consistent with other commands.
2016-07-30 20:12:04 +02:00
Mickael Remond 674a8039ef Add support for sending back missing scope error to API ReST command calls 2016-07-30 18:51:54 +02:00
Mickael Remond 4bf8ce7681 Make s2s stats commands more robust 2016-07-30 18:50:58 +02:00
Evgeniy Khramtsov eb1d385d4e Get rid of "jlib.hrl" dependency in mod_service_log 2016-07-30 18:42:17 +03:00
Evgeniy Khramtsov 5cd1cf5096 Get rid of "jlib.hrl" dependency in some modules 2016-07-30 18:37:57 +03:00
Evgeniy Khramtsov 792e6a7c1c Rewrite mod_http_upload to use XML generator 2016-07-30 17:48:52 +03:00
Mickael Remond 19ad6e6145 Ensure ejabberdctl status result is in valid shell supported range 2016-07-30 13:18:39 +02:00
Mickael Remond 39640b67c7 Add support for rich error reporting for API 2016-07-30 13:08:30 +02:00
Evgeniy Khramtsov d2d3b961eb Rewrite mod_sic to use XML generator 2016-07-30 13:30:29 +03:00
Mickael Remond fb2603d3cd Return 409 conflict error code on register if user already exists 2016-07-30 11:50:04 +02:00
Mickaël Rémond 4a49dfecf3 Merge pull request #1221 from processone/expand_api
Do not crash on check when we do not have JID
2016-07-30 10:55:39 +02:00
Evgeniy Khramtsov f19d2fdcff Rewrite mod_shared_roster backends module to use XML generator 2016-07-30 08:39:30 +03:00
Evgeniy Khramtsov a093e9d441 Rewrite mod_shared_roster to use XML generator 2016-07-30 08:37:34 +03:00
Mickael Remond 42e6f72ee9 Do not crash on check when we do not have JID 2016-07-29 20:38:05 +02:00
Evgeniy Khramtsov 9bf1bac7df Rewrite mod_vcard_ldap to use XML generator 2016-07-29 17:39:13 +03:00
Evgeniy Khramtsov f91f2bc3d2 Rewrite several modules to use XML generator 2016-07-29 13:21:00 +03:00
Christophe Romain 3c58a93eb8 Merge pull request #1178 from candrews/patch-1
Harden the systemd unit
2016-07-29 11:33:32 +02:00
Christophe Romain a080322055 Switch workers from temporary to transient 2016-07-29 11:18:42 +02:00
Paweł Chmielowski fd365b2893 Display data that is send to websocket connection in debug log level
This should help with detecting problems like in #1097
2016-07-28 16:20:28 +02:00
Christophe Romain fad088a3c4 Merge pull request #1193 from gabrielgatu/support-elixir-module-installer
Fix issue #625: Writing Elixir modules
2016-07-28 16:06:12 +02:00
gabrielgatu 91865c66c0 Start elixir application after ejabberd_app:start_apps() 2016-07-28 15:57:35 +02:00
Mickaël Rémond 7a74a4836a Merge pull request #1211 from processone/expand_api
There is still work to do, be we reached a stable state and can merge up to this point.
2016-07-28 14:57:48 +02:00
Evgeniy Khramtsov b31ebd2ea0 Rewrite captcha to use XML generator 2016-07-28 15:10:41 +03:00
Evgeniy Khramtsov 96e912b09a Rewrite mod_register to use XML generator 2016-07-27 18:06:54 +03:00
Evgeniy Khramtsov 8275e95a16 Swap variables in their correct places 2016-07-27 18:06:34 +03:00
Evgeniy Khramtsov 1097d31d63 Fix type spec for set_from_to/3 2016-07-27 18:05:11 +03:00
Evgeniy Khramtsov c409ed2f2c Rewrite S2S and ejabberd_service code to use XML generator 2016-07-27 10:45:08 +03:00
Holger Weiss 72445bb374 mod_http_upload_quota: Apply cosmetic changes
Use "fun f/1" syntax in place of "fun(X) -> f(X) end".
2016-07-27 00:28:47 +02:00
Evgeniy Khramtsov 984c4cf6bd Add 'allow_subscription' MUC configuration option 2016-07-26 14:37:28 +03:00
Mickael Remond 2a8005e47f Add ability to run test with Elixir mix 2016-07-26 12:17:37 +02:00
Mickael Remond 7781f39b74 Clarify command module API 2016-07-26 12:15:03 +02:00
Mickael Remond e5fd1ee4f6 Avoid starting several time the owner process 2016-07-26 12:12:48 +02:00
Mickael Remond 9ff7257287 Make jlib ETS table more resilient 2016-07-26 11:58:14 +02:00
Mickael Remond 12f74b4aa7 Fix list appending bug 2016-07-26 11:57:38 +02:00
Mickael Remond fede85c9bd Remove unused import 2016-07-26 11:53:34 +02:00
Evgeniy Khramtsov 23858469b7 Get rid of "jlib.hrl" dependency in some files 2016-07-26 11:29:17 +03:00
Evgeniy Khramtsov c26d38a893 Remove jlib dependency from acl.erl 2016-07-26 10:01:59 +03:00
Evgeniy Khramtsov da310a5173 Rewrite mod_adhoc and mod_announce to use XML generator 2016-07-26 09:52:29 +03:00
Alexey Shchepin 839490b0d9 Add DB backend support for ejabberd_oauth 2016-07-25 20:08:30 +03:00
Mickael Remond dbc0498279 Fix tests, command need to be properly added to list of exposed commands 2016-07-25 18:28:40 +02:00
Mickael Remond c183092aa4 Simplify code for command policy group expansion 2016-07-25 18:28:05 +02:00
Badlop 5d4f8bcf0d Export acl:parse_ip_netmask/1 for mod_rest (ejabberd-contrib#175) 2016-07-25 16:57:05 +02:00
Evgeniy Khramtsov 179fcd9521 Rewrite mod_mam and mod_muc to use XML generator 2016-07-25 13:50:30 +03:00
Mickael Remond d7ad99f147 Initial attempt on access on commands
May change and will require more work / test / refactor
2016-07-25 11:43:49 +02:00
Holger Weiss 4b0d71d402 Don't return error for blocked MUC PMs
If a message stanza is blocked as per XEP-0016 or XEP-0191 and the
stanza is marked as a private MUC message, don't return an error.  This
makes sure users won't be kicked from MUC rooms when blocking other
participants.
2016-07-24 20:55:11 +02:00
Mickael Remond b4a430541d Return more user friendly, human readable error description 2016-07-24 14:10:12 +02:00
Mickael Remond bfa61eaa46 Make default OAuth token TTL values more user friendly 2016-07-23 18:57:57 +02:00
Mickael Remond 68555ff466 Add support for checking access rules conformance for commands 2016-07-23 18:21:45 +02:00
Mickael Remond caf2c20210 Error when not authorized should be 403 2016-07-23 18:21:45 +02:00
Mickael Remond 1485b56211 Move any access rules check to ACL module 2016-07-23 18:21:45 +02:00
Mickael Remond 2c70c572c8 Clean-up of error codes and format json structure 2016-07-23 18:21:45 +02:00
Holger Weiss d4d1941133 XEP-0198: Log debug message when dropping stanza
Log a debug message when an unacknowledged message is neither resent nor
bounced because it's archived.
2016-07-23 01:23:24 +02:00
Holger Weiss 814b80c644 Preserve PID for offline sessions
Don't set the PID to 'undefined' when a session goes offline, as this
looses the information which node created the session table entry.

Fixes #1196.
2016-07-23 01:08:05 +02:00
Pablo Polvorin 4332dddbc4 Support oauth password grant type
As in https://tools.ietf.org/html/rfc6749#section-4.3
2016-07-22 19:17:12 -03:00
Pablo Polvorin 57aeef74d5 stringprep might already be started
Depending on the way the test us ran
(full test suite or the elixir quicktest one)
the stringprep might already be loaded.
2016-07-22 19:15:56 -03:00
Pablo Polvorin 12b58b9870 Fix elixir test case: stringprep was required 2016-07-22 16:25:54 -03:00
Pablo Polvorin caf7b54305 oauth: single jid field instead of username/password fields 2016-07-22 15:37:48 -03:00
Badlop c5d9d35e7b Convert password provided by web form to UTF8 before passing it (#375) 2016-07-22 16:52:13 +02:00
Jerome Sautret ffbe97d988 Quote postgresql database name (#1136) 2016-07-22 16:33:40 +02:00
Paweł Chmielowski bdfef09c0f Fix handling of complex values as arguments in http_api 2016-07-22 15:26:27 +02:00
Evgeny Khramtsov dd38bef8b1 Merge pull request #1201 from xmppjingle/master
External Component Connection Hooks
2016-07-22 00:35:43 +04:00
xmppjingle 6983dfa21f External Component Hook
Changed Hook Trigger Event and included a Reason upon
component_disconnected/2 Hook
2016-07-21 14:03:01 -03:00
Pablo Polvorin cbfab687e8 Oauth callback must pass expires_in as ttl instead of epoch 2016-07-20 14:47:11 -03:00
Paweł Chmielowski c2753cd51c Use different version of elixir depending on erlang version 2016-07-20 10:12:00 +02:00
Paweł Chmielowski 5458d8bfcb Add else branch to if_version_{above,below} 2016-07-20 10:11:34 +02:00
Paweł Chmielowski 7748dd4e5d Make processing of if_* clauses in rebar.config recursive 2016-07-20 10:11:08 +02:00
Pablo Polvorin 0c0c6465ba Fix test for changes in oauth expiry 2016-07-19 20:36:02 -03:00
Pablo Polvorin b5a90be3cb Merge branch 'master' of github.com:processone/ejabberd 2016-07-19 20:19:17 -03:00
Pablo Polvorin 1d317e8068 Let user choose the desired oauth token TTL 2016-07-19 20:18:07 -03:00
Holger Weiss 8f8c499cfa mod_mam: Fix handling of result set page limit
Restore function clause for handling a client-specified result set page
limit that doesn't exceed mod_mam's upper threshold.
2016-07-19 21:23:30 +02:00
Holger Weiss 9fcb81dea9 mod_mam: Always limit result set page size
Limit the number of messages returned for a given MAM request even if
the client didn't specify an RSM set (not just if the client specified
an RSM set without a limit).

This is still not done for MAM v0.2 requests though, as that version of
the XEP doesn't require clients to support RSM.
2016-07-19 21:08:13 +02:00
Evgeniy Khramtsov 5d90292849 Fix hooks de-registration 2016-07-19 15:33:17 +03:00
Mickael Remond 490a758050 Upgrade Elixir version to 1.2 in rebar config
This matches the version used in mix.exs
2016-07-19 13:05:01 +02:00
Mickael Remond f79ac6874e Lock relx version as newer version does not compile fine 2016-07-19 12:35:45 +02:00
Paweł Chmielowski 655cbf6055 Make access rules in ejabberd_web_admin configurable 2016-07-19 11:27:45 +02:00
Evgeniy Khramtsov bc802a4049 Rewrite mod_blocking to use XML generator 2016-07-19 10:07:04 +03:00
Evgeniy Khramtsov a4a9dd7f03 Rewrite mod_offline to use XML generator 2016-07-19 07:56:14 +03:00
Pablo Polvorin 483ef09263 Fix command argument formatting 2016-07-19 00:51:04 -03:00
Pablo Polvorin 33e0283f0d Add 'ejabberd:user' and 'ejabberd:admin' oauth scopes
'ejabberd:user' includes all commands defined with policy "user".
'ejabberd:admin' includes commands defined with policy "admin".
2016-07-19 00:24:06 -03:00
Pablo Polvorin 673a654c47 Fix ce0d1704c6
Original request was to allow ejabberd sysadmin to generate
tokens for specific users.  JIDs must not be passed as argument
when requesting the tokens.
2016-07-18 20:25:23 -03:00
xmppjingle 48c88b61b6 Merge remote-tracking branch 'processone/master' 2016-07-18 17:55:31 -03:00
xmppjingle fca2f24231 External Component Connection Hooks 2016-07-18 17:55:10 -03:00
Holger Weiss 8bc3dc9c49 jlib: Don't try to keep just one <delay/> tag
It seems unclear whether XEP-0203 really mandates that stanzas may not
have multiple <delay/> tags.  Editing/removing existing tags doesn't
seem worth the effort, especially as we'd have to take more care which
tag to keep if the stanza already has more than one.
2016-07-18 22:31:08 +02:00
Evgeniy Khramtsov 9a8e197d7e Initial version based on XML generator 2016-07-18 15:01:32 +03:00
Holger Weiss 749033598d Omit [info] message with number of queued stanzas
Just log a debug message if a stream management session times out and
some stanzas weren't acknowledged.
2016-07-10 22:21:57 +02:00
Evgeniy Khramtsov f6e960d326 Fix compilation error 2016-07-10 08:45:24 +03:00
Evgeniy Khramtsov 786bd4f26c Use hooks instead of direct calls to mod_mam 2016-07-09 12:43:01 +03:00
Holger Weiss 5f48d2641b mod_http_upload_quota: Depend on mod_http_upload
mod_http_upload_quota uses mod_http_upload's "docroot" option, so the
mod_http_upload configuration must be parsed, first.  Fixes #1025.
2016-07-08 20:47:02 +02:00
Mickael Remond 1a62d4e04b Update stringprep and iconv 2016-07-08 18:28:51 +02:00
Christophe Romain 6b38d19085 Do send last items only for subscription on current plugin type 2016-07-08 15:18:39 +02:00
Evgeniy Khramtsov 661b041302 Rename MUC/Sub's namespace 2016-07-08 15:07:26 +03:00
Evgeniy Khramtsov 368b202144 Handle MUC/Sub subscriptions list request 2016-07-08 15:07:10 +03:00
Evgeniy Khramtsov caaf02eaa0 Advertise MUC/Sub support in MUC service disco#info 2016-07-08 15:06:08 +03:00
Evgeniy Khramtsov 32de9a56a5 Experimental MUC/Sub support 2016-07-08 15:05:50 +03:00
Mickael Remond febbc2bb5a Update dependencies 2016-07-08 11:40:28 +02:00
Evgeniy Khramtsov 71f27ee7d4 Get rid of warnings 2016-07-07 12:17:38 +03:00
Evgeniy Khramtsov c718cbbd9f Warn on cyclic modules dependencies 2016-07-07 11:34:17 +03:00
Badlop 12c0d888b1 Revert "Recover fix of 907e239 lost in 9deb294 (thanks to Alexey Shchepin)" (#1183)
This reverts commit 53f3a45803.
2016-07-06 17:54:37 +02:00
Evgeniy Khramtsov 4220a2b98c Make modules loading in a dependent order (#1191) 2016-07-06 14:58:48 +03:00
Christophe Romain de9f80f2ce Add missing '/' for jid matching from commit e300f80 2016-07-06 10:06:17 +02:00
Alexey Shchepin be3a4acb55 Fix missed escaping in node_flat_sql.erl 2016-07-05 17:45:37 +03:00
Christophe Romain 3820aaa421 Quote reserver 'type' keyword for pgsql to fix e300f80 2016-07-05 16:16:40 +02:00
Christophe Romain e300f8095d Fix use of like parameter in sql pubsub's requests 2016-07-05 15:43:59 +02:00
gabrielgatu b31c0d9e2e Support elixir module installer 2016-07-05 12:36:49 +02:00
Holger Weiss 8e04a7ef4d mod_configure: Fix editing of access rules 2016-07-03 22:58:54 +02:00
Paweł Chmielowski 16b1d8541a Grab new p1_utils that has fix for R19 2016-07-01 21:41:12 +02:00
Paweł Chmielowski 0737958b45 Fix compilation issues on R19 2016-07-01 21:20:10 +02:00
Mickael Remond 024124decb Fix dependencies when using Elixir Mix 2016-06-30 11:35:42 +02:00
Mickael Remond 88ac1dc56b Update dependencies 2016-06-30 11:33:38 +02:00
Holger Weiss 8be1d49961 mod_mam_mnesia: Force garbage collection
The VM fails to collect the garbage generated during MAM lookups
automatically, so mod_mam_mnesia's memory usage easily goes up to
several gigabytes if we don't force garbage collection.
2016-06-29 22:32:59 +02:00
Holger Weiss 10d4c16a97 mod_client_state: Throttle PEP stanzas by default 2016-06-29 22:22:49 +02:00
Pablo Polvorin ce0d1704c6 Allow generation of oauth tokens from command line
Oauth tokens can be generated for commands (scopes) having admin|user|open
policy. Restricted commands are not available as those are only usable
from ejabberdctl command line.

Four new commands are available:

$ejabberdctl oauth_issue_token "stats;get_roster"
    Generates a token authorized to call both stats and get_roster
    commands.  Note scopes must be separated by semicolon.

$ejabberdctl oauth_list_tokens
    List tokens generated from the command line, with their scope
    and expirity time.

$ejabberdctl oauth_list_scopes
    List scopes available

$ejabberdctl oauth_revoke_token "Lbs7qdJfdKXOWzVrArgyckY055tE1xnt"
    Revokes the given token
2016-06-29 00:22:28 -03:00
Craig Andrews 2e28d06744 Harden the systemd unit
Restrict capabilities, have a private tmp directory, private /dev, and don't accessing file system locations that really shouldn't be accessed.
2016-06-28 17:02:41 -04:00
Paweł Chmielowski 3446aba753 Include correct version in stream:stream when reporting errors
This fixes issue #1174
2016-06-27 16:40:57 +02:00
Paweł Chmielowski 75366ca2fd Inline muc access rules 2016-06-24 15:12:58 +02:00
Paweł Chmielowski f56cff925c acl: ACLName rule should match if any part of ACLName matches 2016-06-24 15:09:51 +02:00
Christophe Romain 94461948db Update dependencies for 16.06x 2016-06-24 11:12:18 +02:00
Christophe Romain 0b438d09d1 Fix typo from d8bb5d9c 2016-06-23 17:31:32 +02:00
Christophe Romain 06bf8cb032 Prepare hex.pm release 2016-06-23 15:23:28 +02:00
Holger Weiss 1794dd19d0 mod_pubsub: Fix matching of set_node/1 result
nodetree_tree_sql:set_node/1 returns {result, NodeIdx} on success, not
{ok, NodeIdx}.  Thanks to Christophe Romain for spotting this.
2016-06-23 14:23:24 +02:00
Paweł Chmielowski 1b5c50a384 When convertion of xmlrpc argument to type fails, report it as error 2016-06-23 10:41:16 +02:00
Jerome Sautret a9b456ccb3 xref was broken when Elixir wasn't enabled 2016-06-23 10:23:02 +02:00
Paweł Chmielowski 2ebdd8915e Compile gen_mod early to help with undefined behaviour warnings 2016-06-23 10:22:01 +02:00
Evgeny Khramtsov e54400a8e4 Merge pull request #1165 from weiss/default-blocking-list
mod_blocking_sql: Handle default list corner case
2016-06-23 10:44:47 +04:00
Holger Weiss 065f5272e6 mod_blocking_sql: Handle default list corner case
Handle the situation where a list of the name "Blocked contacts" was
created by an XEP-0016 client, but no default list exists.
2016-06-22 22:36:27 +02:00
Paweł Chmielowski 751be3cca6 Add some tests for {shaper,access}_rules_validator 2016-06-22 16:52:45 +02:00
Christophe Romain cd0244eb71 Merge pull request #1120 from anagromataf/feature/archive-id-in-message-carbons
Send unique stanza id and archived tag also in the message carbons
2016-06-22 15:47:27 +02:00
Christophe Romain f029488260 Restore get_items conditions when not using RSM (#1147) 2016-06-22 13:12:40 +02:00
Badlop eeeb190680 Set HTTP/1.0 so github accepts the request (#1157) 2016-06-22 12:43:24 +02:00
Christophe Romain 95ff94b054 Fix PubSub RSM on get_items (#1147) 2016-06-22 12:25:41 +02:00
Christophe Romain 7744339347 Update supported xep version 2016-06-22 11:24:01 +02:00
Christophe Romain 2efa8677c9 Fix pgsql compatibility on delete_old_messages (#1137) 2016-06-22 11:21:11 +02:00
Holger Weiss c928956d73 XEP-0198: Apply cosmetic changes 2016-06-21 23:17:17 +02:00
Holger Weiss 7ddeac38b6 XEP-0198: Also count stanzas when socket is closed
Don't forget to count stanzas received from the stream management client
that are processed right after the connection was lost.
2016-06-21 22:54:41 +02:00
Paweł Chmielowski 3a8da27d86 Use {access,shaper}_rules_validator in other places where access rules are used 2016-06-21 13:18:24 +02:00
Paweł Chmielowski 52d45604ba Use new access_rules_validator in couple places 2016-06-21 12:28:53 +02:00
Paweł Chmielowski 804190e4a8 Add acl:{access,shaper}_rules_validator for use in {mod_}opt_type() 2016-06-21 12:26:31 +02:00
Paweł Chmielowski 4b9613e8fe Allow {mod_}opt_type to transform values passed to it, and for better error reporting 2016-06-21 12:25:29 +02:00
Christophe Romain b2f53fb962 Avoid cleanup on bag when disc_only, switch in memory (#1161) 2016-06-21 10:43:19 +02:00
Holger Weiss c91c5aa352 Fix handling of queued stanzas on session timeout
Don't fail to resend or bounce unacknowledged stanzas if the stream
management session timed out.

Closes #1160.
2016-06-19 23:32:15 +02:00
Christophe Romain 6f2b0179e7 Give more time to stop and kill epmd (#882) 2016-06-17 17:09:45 +02:00
Christophe Romain 8583958268 Use shorter jid acl in config template 2016-06-17 11:58:51 +02:00
Paweł Chmielowski d1425f0d78 Use new short access rules in config template 2016-06-16 11:13:07 +02:00
Paweł Chmielowski f1138baa80 Add test for more allowed access_rules 2016-06-16 11:12:16 +02:00
Paweł Chmielowski 1fb1e8721b Allow using shaper defined by name like in in s2s_shaper: fast 2016-06-16 11:04:01 +02:00
Paweł Chmielowski 0a09f27373 Typo in option name 2016-06-16 11:00:38 +02:00
Paweł Chmielowski 7b308e0d41 Add shorter version of some common access rules definitions
This add conversion of

- allow
to
- allow: all

and

- allow: acl_name
to
- allow:
  - acl: acl_name

(this works also for deny, and number in shapers)
2016-06-15 19:23:55 +02:00
Badlop 9004608181 Check password with jid:resourceprep when registering account (#996) 2016-06-14 23:35:47 +02:00
Holger Weiss 26bce5dee3 mod_mam: Fix "assume_mam_usage: if_enabled" 2016-06-14 16:40:46 +02:00
Badlop 34cf693231 Recover ec6c58a which was reverted in 100827e (thanks to Alexey Shchepin) 2016-06-10 13:18:32 +02:00
Mickael Remond 0e61e57ed9 Preparing hex.pm release to fix lager bug 2016-06-10 11:02:45 +02:00
Mickael Remond 34cbed54cd Force use of lager 3.0.2 at most.
Lager 3.2.0 has a bug that prevent it to work with ejabberd.
Lager 3.2.0 bug is fixed in https://github.com/basho/lager/commit/4c87abcd4f9d70a1136fff8f573dc7adcc833e43
2016-06-10 11:01:46 +02:00
Badlop 4ccc40bce5 push_roster must convert read strings to binaries (#1075) 2016-06-08 21:16:30 +02:00
Badlop 53f3a45803 Recover fix of 907e239 lost in 9deb294 (thanks to Alexey Shchepin) 2016-06-08 19:34:05 +02:00
Badlop 858d880675 Allow again multiple fqdn values in configuration (EJAB-1578) 2016-06-08 19:28:17 +02:00
badlop a4f213837e Merge pull request #1125 from vthriller/roster-push
mod_roster should probably respect roster item changes introduced with roster_process_item hooks upon pushing
2016-06-08 13:57:52 +02:00
Badlop 5173de503c Produce mod_last entry on account creation (processone/ejabberd-contrib#62) 2016-06-08 13:02:20 +02:00
Badlop 8a7b31ca63 When stopping ejabberd, stop modules after broadcasting c2s shutdown (#1144) 2016-06-07 18:41:38 +02:00
Paweł Chmielowski f8d2589ee5 Add tests for new acl functions 2016-06-06 17:12:39 +02:00
Holger Weiss 78d4200f05 mod_pubsub: Fix node configuration changes for SQL
nodetree_tree_sql:set_node/1 returns {ok, NodeIdx} rather than 'ok' on
success.
2016-06-06 00:18:24 +02:00
Holger Weiss 60803f5780 Simplify check for carbon-copied chat states
Let jlib:is_standalone_chat_state/1 unwrap carbon copies rather than
leaving this to the caller.  We still export jlib:unwrap_carbon/1, as
this function might also be useful for other purposes.
2016-06-05 22:36:56 +02:00
Holger Weiss 5c3074c0fb mod_client_state: Fix handling of chat states
Fix the check for chat states sent from other resources of the same
user.
2016-06-05 22:04:38 +02:00
Holger Weiss 4789ddf1ee mod_client_state: Simplify handling of PEP stanzas
Let mod_client_state simply queue the most recent item of a given PEP
node (from a given contact) instead of also taking the payload namespace
into account.
2016-06-05 21:48:03 +02:00
Pablo Polvorin 41c3751fa1 Fix quicktest case
Missing initialization, required for ets table to exists
2016-06-05 16:35:51 -03:00
Holger Weiss 8305cc293b XEP-0352: Pass chat states of other resources
Don't hold back (carbon copies of) chat states from other resources, as
they might be used to sync the state of conversations across clients.
E.g., if one client becomes active, another one might want to remove a
notification (immediately).
2016-06-03 21:52:11 +02:00
Holger Weiss 4d5eab6662 Unwrap carbon copies when checking for chat states
Detect standalone chat states that were carbon-copied.
2016-06-03 20:28:48 +02:00
Holger Weiss 3a1fc6fb66 Ignore <delay/> when checking for chat states
Ignore XEP-0203 elements when checking whether a message stanza is a
standalone chat state.
2016-06-03 19:02:26 +02:00
Holger Weiss 5c1db176a9 Fix "unused variable" warning 2016-06-03 12:58:20 +02:00
Badlop 0503d899cf Fix problem in dfee843 when non-occupant admin kicks an occupant (#1135) 2016-06-03 00:10:25 +02:00
Alexey Shchepin 0093326f7d Fix ejabberd.ldif 2016-06-02 18:56:27 +03:00
Alexey Shchepin 9ef52b8c64 Fix a typo 2016-06-02 18:22:50 +03:00
Alexey Shchepin d201f013b2 Stronger tests in the test suite, SQL updates and fixes 2016-06-02 18:09:58 +03:00
Badlop 5352037680 Report in SQL when scram is enabled but the stored password isn't (#1096) 2016-06-01 20:48:52 +02:00
Holger Weiss bbb90b9928 Ignore offline sessions
Let mod_admin_extra and mod_configure ignore offline sessions when
querying the session table.
2016-06-01 01:01:54 +02:00
Paweł Chmielowski 9c27f31d72 Process cover information on travis only if cover support is enabled 2016-05-31 12:12:46 +02:00
Christophe Romain e7843bf92b Fix set_presence API 2016-05-31 11:47:08 +02:00
Paweł Chmielowski db240413ab Disable cover analyzys on R17 as this causes problems with elixir tests 2016-05-31 11:29:19 +02:00
Paweł Chmielowski 8e883a76e3 Update test after roster code reorganization 2016-05-31 00:09:26 +02:00
Paweł Chmielowski 622bff23a4 Update test 2016-05-31 00:07:26 +02:00
Paweł Chmielowski be0dd51e51 Fix mod_http_api_test.exs 2016-05-30 23:06:29 +02:00
Paweł Chmielowski fc2b7018cc More strict check for commands with policy user 2016-05-30 23:06:29 +02:00
Paweł Chmielowski 17f87eb899 Fix tests 2016-05-30 23:06:29 +02:00
Paweł Chmielowski 1ade88402c Better code for setting up ejabberd app location 2016-05-30 23:06:29 +02:00
Paweł Chmielowski f252b9d489 Update acl tests to new internal access rules syntax 2016-05-30 14:36:17 +02:00
Paweł Chmielowski 1d3959b5a2 Make tests run correctly even when ejabberd src in not in ejabberd-xxx dir 2016-05-30 14:35:53 +02:00
Paweł Chmielowski e81302dc79 Allow @ inside acl user{,_glob,_regexp} to pass both user and server in single string 2016-05-30 12:30:44 +02:00
Paweł Chmielowski 9e68c4c0d9 Convert example config to use new syntax for access rules 2016-05-26 11:08:53 +02:00
Paweł Chmielowski 1981e13326 Allow passing username and ip to ejabberd_comamnds, and use it in mod_http_api 2016-05-26 11:08:53 +02:00
Paweł Chmielowski fffae97940 Use acl:access_matches in c2s 2016-05-26 11:08:53 +02:00
Paweł Chmielowski 49658e1655 New ACL infrastructure 2016-05-26 11:08:53 +02:00
Paweł Chmielowski c55319c81e Do not call transform_terms multiple times on configs when merging them 2016-05-26 11:08:53 +02:00
Paweł Chmielowski 13ead140f4 Copy lite.sql to place where tests expect it in failback mode 2016-05-26 11:08:53 +02:00
Badlop ca329826cb Retrieve parenthesis for easy reading, lost in old commit 9deb294 2016-05-25 12:44:05 +02:00
Evgeny Khramtsov 14b53fbcb0 Merge pull request #1131 from weiss/failed-resume-h
XEP-0198: Indicate number of handled stanzas if resumption fails
2016-05-25 11:56:47 +04:00
Evgeny Khramtsov b055c2a13a Merge pull request #1126 from weiss/muc-send-affiliation
Notify on MUC affiliation changes of non-occupants
2016-05-25 11:55:06 +04:00
Christophe Romain 639e9fab4e Merge pull request #1132 from weiss/publish-options
Add support for PubSub publishing options
2016-05-25 07:49:55 +00:00
Holger Weiss c958fa2f06 Add support for PubSub publishing options
Add code necessary to support publishing options as described in
XEP-0060, #7.1.5.  A node plugin that expects publishing options must
add <<"publish-options">> to the features/0 list and then handle the
publishing options handed over to the publish_item/7 call.

Signed-off-by: Christian Ulrich <christian@rechenwerk.net>
2016-05-25 08:40:12 +02:00
Holger Weiss 30e814dd4b XEP-0198: Add 'h' attribute to <failed/> element
If a resume request is rejected because the session timed out, indicate
the number of handled stanzas as per version 1.5 of XEP-0198.
2016-05-24 22:20:58 +02:00
Holger Weiss 8c16fdf59f mod_mam_mnesia: Clarify error message 2016-05-24 07:58:07 +02:00
Holger Weiss a2f0e157bc ejabberd_auth*: Fix indentation 2016-05-24 00:40:25 +02:00
Holger Weiss 2a9dd548b5 mod_mam_mnesia: Don't exceed table size limit
Don't write MAM messages into an Mnesia archive if the size of the table
comes close to the 2 GB limit for tables with disc-only copies.  That
way, the table is at least not corrupted when the limit is reached.
2016-05-24 00:25:52 +02:00
Holger Weiss 3f3ecad981 mod_mam_mnesia: Use transactions when writing
Let mod_mam_mnesia use transactions when storing or deleting messages.

If old messages of a user are to be removed, delete the user's archive
and rewrite it from scratch, as that seems to be much faster than
removing individual records with delete_object/1.

Closes #1065.
2016-05-24 00:08:23 +02:00
Holger Weiss 70452ba25a mod_register: Only set timeout on success
Don't set the registration timeout if the password was rejected for
being too weak.
2016-05-23 23:27:42 +02:00
Holger Weiss 1b02c5fbf3 Merge remote-tracking branch 'processone/pr/1122'
* processone/pr/1122:
  mod_client_state: Add function specifications
  mod_client_state: Add "queue_pep" option
  mod_client_state: Queue chat state notifications
  Move CSI queue handling into mod_client_state
2016-05-20 09:57:07 +02:00
Holger Weiss 9d87a4a6d4 mod_muc_room: Notify on affiliation changes
Notify the current room occupants if the affiliation of a non-occupant
is changed as per example 195 of XEP-0045.  In anonymous rooms, only
moderators are notified, though.
2016-05-20 01:28:16 +02:00
vthriller f6ba91ff97 mod_roster should probably respect roster item changes introduced with roster_process_item hooks upon pushing 2016-05-19 13:45:42 +03:00
Holger Weiss 420ae65590 mod_client_state: Add function specifications
Add function specifications and apply cosmetic changes to
mod_client_state.
2016-05-18 21:30:38 +02:00
Holger Weiss 8f72c27b88 mod_client_state: Add "queue_pep" option
If the new "queue_pep" option is enabled and the client is inactive, PEP
notifications are throttled in a similar way to presence stanzas and
chat states.  Only the most recent notification of a given node and
payload type will be queued from a given contact.
2016-05-17 22:12:04 +02:00
Holger Weiss 4f009e64fc mod_client_state: Queue chat state notifications
Queue standalone chat states instead of simply dropping them when the
client is inactive.  Only the most recent chat state of a given client
is queued.
2016-05-17 20:55:45 +02:00
Holger Weiss ba74c1c367 Move CSI queue handling into mod_client_state
Let mod_client_state handle the queueing of stanzas, not just their
classification.  This simplifies the ejabberd_c2s code and gives
(custom) CSI modules more flexibility.
2016-05-17 19:27:18 +02:00
Badlop ba2680df61 Delete duplicated command export_sql, use export2sql instead (#1118) 2016-05-16 17:57:57 +02:00
Tobias Kräntzer 2529acc36c Send unique stanza id and archived tag also in the message carbons
- Change order of the hooks in mod_mam for sending and receiving packets. Messages are archived before a carbon copy is send to the other recourcces.
- Add archived tag and unique stanza id to the outgoing packet to have message carbons with the archive information.
- Add additional hook (in mod_mam) to strip the archive tag for outgoing packets after message carbons have been send.
2016-05-15 20:13:25 +02:00
Holger Weiss ff199a323d Fix jid:from_string/1 function specification 2016-05-15 16:19:13 +02:00
Alexey Shchepin 64bb371285 Fix a typo 2016-05-13 18:22:59 +03:00
Alexey Shchepin 9bd446e519 Less strict extauth.py 2016-05-13 17:56:52 +03:00
Alexey Shchepin 792f47b4bd Update SQL escaping 2016-05-13 17:56:48 +03:00
Evgeniy Khramtsov be2a9e35ae Fix C2S session data leak (#1078) 2016-05-09 14:18:47 +03:00
Evgeniy Khramtsov 068db1a2d9 Handle Redis connection in a separate module 2016-05-09 08:36:30 +03:00
Holger Weiss 4717d64d7a mod_client_state: Delete only the configured hooks 2016-05-08 16:45:31 +02:00
Holger Weiss f7f40cf9a6 Let client retry HTTP upload on file size mismatch
Let the main mod_http_upload process look at the size of an HTTP upload
rather than performing this check in the ejabberd_http handler.  This
way, the upload slot won't be invalidated if the size of the uploaded
file doesn't match the size requested for the slot.  The PUT request is
still rejected, but the client now has a chance to retry the upload.
2016-05-08 15:36:51 +02:00
Holger Weiss bcf07fd032 Avoid error bounces when testing stream management
The test suite sends messages to the server JID while checking whether
the stream management code counts outgoing stanzas correctly.  We now
set type='headline' for those messages to avoid error bounces.
2016-05-06 16:37:17 +02:00
Holger Weiss ff4a0e1808 XEP-0198: Use different error message for bounces
When stanzas are bounced from the stream management queue (because the
session timed out or was closed for some other reason), use a different
error message so that this situation can be distinguished from other
cases.
2016-05-06 14:12:22 +02:00
Holger Weiss 51238bff83 Bounce messages sent to server JID
If a message is sent to the server JID (without node part), generate an
error message rather than dropping the message silently.
2016-05-06 13:59:21 +02:00
Badlop 86d5cf6d6c Don't require ejabberd to be installed to run "make translations" 2016-05-06 13:47:02 +02:00
Alexey Shchepin b2ffa1db96 Add missed jlib:term_to_expr and jlib:expr_to_term functions 2016-05-05 16:42:48 +03:00
Alexey Shchepin 0ea0ba3004 Update more SQL queries 2016-05-05 15:51:58 +03:00
Holger Weiss d6700bdc5b Merge remote-tracking branch 'processone/pr/1088'
* processone/pr/1088:
  Process messages of unknown type consistently
2016-05-05 00:20:15 +02:00
Christophe Romain 13c6430341 Add missing odbc->sql in comment from commit 1aae8a9f 2016-05-04 09:11:18 +02:00
Holger Weiss 12a8d915cd Merge remote-tracking branch 'processone/pr/1087'
* processone/pr/1087:
  Return error when blocking last activity request
2016-05-04 00:16:56 +02:00
Holger Wei 6cb60aaff5 Cosmetic change: Make variable names consistent
Use the same variable names in both mod_mam:select/8 clauses to avoid
confusion.
2016-05-03 19:12:57 +02:00
Holger Weiss 575ef9c619 Merge remote-tracking branch 'processone/pr/1102'
* processone/pr/1102:
  Fix ejabberdctl.template duplication
2016-05-03 19:07:11 +02:00
Matthias Rieber 5e5328da4a Fix ejabberdctl.template duplication 2016-05-03 16:36:20 +02:00
Holger Weiss 6da07d78b5 Merge remote-tracking branch 'processone/pr/1086'
* processone/pr/1086:
  Return error when blocking message to offline user
2016-05-02 21:08:06 +02:00
Paweł Chmielowski 0c0ce17bc0 Add ability to configure server loglevel when running tests 2016-05-02 15:25:30 +02:00
Christophe Romain 8a6c51290a Pass noauth when auth isn't provided 2016-05-02 15:07:00 +02:00
Juan Pablo Carlino 671bc4e573 Use MEDIUMTEXT type for muc_room.opts in MySQL schema 2016-05-02 15:06:40 +02:00
Christophe Romain 07196b6c62 Fix sender in case of explicit pep subscriptions 2016-05-02 15:04:14 +02:00
Paweł Chmielowski 53e1100cc4 Don't halt program when include_config_file is missing/can't be read 2016-05-02 14:52:23 +02:00
Evgeniy Khramtsov 47050db6b8 Don't forget to import mod_opt_type/1 in mod_metrics 2016-05-02 12:18:18 +03:00
Holger Weiss d54f211514 Add mod_opt_type/1 callback to gen_mod behaviour 2016-05-01 22:09:40 +02:00
Holger Weiss b46ed7044a Cope with modules that don't export mod_opt_type/1 2016-05-01 22:06:15 +02:00
Holger Weiss b202004862 ejabberdctl: Fix path to epmd 2016-05-01 21:29:59 +02:00
Evgeniy Khramtsov 8700a3401e Add tests for MUC MAM 2016-05-01 12:48:23 +03:00
Evgeniy Khramtsov 82082f1799 Add behaviour to mod_vcard_xupdate DB modules 2016-05-01 11:03:20 +03:00
Evgeniy Khramtsov 3493a87469 Fix typo in mod_mam:select() (#1098) 2016-04-30 21:37:18 +03:00
Christophe Romain 6a10916dda Let shaper cope with low resolution system clock
We no longer rely on getting unique values from clock source, so we need
to handle cope with systems which does not have a microsecond resolution
on system clock (such as MS Windows)
2016-04-29 10:57:34 +02:00
Christophe Romain 639c2fb640 Add pubsub subscribe/unsubscribe hook 2016-04-28 15:57:55 +02:00
Evgeniy Khramtsov c585f74730 Better formatting of configuration problem log message 2016-04-28 09:03:05 +03:00
Mickael Remond d18fe138aa Update esip and stun to match Fast TLS version 2016-04-27 16:22:47 +02:00
Christophe Romain d6f02a51e4 Use fast_tls 1.0.3 2016-04-27 16:18:24 +02:00
Evgeniy Khramtsov 9c369b7a8c Improve detection of databases supported by modules (#1092) 2016-04-27 17:10:50 +03:00
Christophe Romain d8bb5d9c01 Force ERL_PATH for elixir 2016-04-27 12:32:01 +02:00
Mickael Remond 26d3a978cc Update stun and esip dependencies 2016-04-27 12:19:55 +02:00
Mickael Remond 0f06ed8a9b Prepare 16.04 release 2016-04-27 11:59:05 +02:00
Mickael Remond d1db9f92c4 We now use fast_tls 1.0.2 2016-04-27 11:54:50 +02:00
Evgeniy Khramtsov 52fde758b3 Get rid of "internal" DB type. This also fixes #1092 2016-04-27 09:44:32 +03:00
Christophe Romain b79aef3bbc SCRIPT_DIR needed for release 2016-04-25 15:26:23 +02:00
Christophe Romain bae24464d3 Remove useless variable and quote EPMD and SPOOL_DIR 2016-04-25 14:26:04 +02:00
Christophe Romain ef90a389c1 Fix use of pubsub node plugin when configured with default_node_config 2016-04-25 09:44:46 +02:00
Holger Weiss 36164d9446 Return error when blocking last activity request
As per XEP-0016 and XEP-0191, return a service-unavailable error when an
incoming last activity query was blocked by a privacy list (just as we
do for other IQ requests).
2016-04-25 09:33:47 +02:00
Holger Weiss 45321fa2e2 Process messages of unknown type consistently
If an incoming message sent to an unavailable resource has an unknown
type, handle it like messages of type "normal" (as mandated by RFC 6121,
section 5.2.2).  The same is already done for messages of unknown type
sent to the bare JID of an offline user.
2016-04-25 01:13:41 +02:00
Holger Weiss 65ad70d7dc Fix error text for message bounces 2016-04-25 00:53:48 +02:00
Holger Weiss a37cf33358 Drop headline messages sent to offline resources
Don't bounce an error when a message of type "headline" is sent to an
unavailable resource.  This is consistent with how headline messages
sent to the bare JID of an offline user are dropped, and it avoids a
presence leak.
2016-04-25 00:02:12 +02:00
Holger Weiss 58478e52bf Don't omit bounces for messages of type "result" 2016-04-24 22:47:53 +02:00
Holger Weiss cebdfb6523 Return error when blocking message to offline user
As per XEP-0016 and XEP-0191, return a service-unavailable error when an
incoming message sent to an offline user was blocked by a privacy list.
The same is done for a message sent to an online user, so this avoids a
presence leak.
2016-04-24 22:00:15 +02:00
Holger Weiss b79f09d0eb Match namespace when checking for chat states
When checking for standalone chat states, match the namespace rather
than the names of the elements defined in the current XEP-0085 revision.
2016-04-24 17:16:28 +02:00
Holger Weiss beeb1c82d9 Fix check for standalone chat state notifications
Ignore whitespace (and other XML CDATA) when checking whether a message
stanza is a standalone chat state notification.
2016-04-24 17:09:56 +02:00
badlop 2660dcabba Merge pull request #931 from cclam0827/dev/mod_ping
change mod_ping Timers using maps instead of dict
2016-04-22 13:07:03 +02:00
Holger Weiss f0e6def3ed Set default value for pubsub#itemreply option 2016-04-21 23:47:07 +02:00
Christophe Romain 8487b51ecd Fix node ping command 2016-04-21 12:16:21 +02:00
Christophe Romain f7d4aae64d Use UUID for ctl node name (#1021) 2016-04-21 12:00:51 +02:00
Paweł Chmielowski 97e3a33077 Accept commands: add_commands syntax (along commands: - add_commands) 2016-04-21 11:16:36 +02:00
Evgeniy Khramtsov 1aae8a9fda Rename odbc to sql everywhere 2016-04-20 13:25:42 +03:00
Evgeniy Khramtsov fafeeb80c2 Rename ejabberd_sm_odbc -> ejabberd_sm_sql 2016-04-20 09:11:02 +03:00
Christophe Romain 655c22021b Fix hometree root check (#1070) 2016-04-19 15:18:32 +02:00
Holger Weiss 382c6ce1fb Specify type of second terminate/2 parameter 2016-04-19 09:15:09 +02:00
Paweł Chmielowski 0bdcafdb02 Use erlang 18.3 in travis tests 2016-04-18 14:25:41 +02:00
Badlop e5e4f39c01 Remove --auth in ejabberd_ctl.erl as it's useless, still useful for mod_rest 2016-04-15 15:35:57 +02:00
Evgeniy Khramtsov 222572bd56 Clean mod_carboncopy.erl from DB specific code 2016-04-15 15:48:56 +03:00
Evgeniy Khramtsov 64fdbe7866 Add mod_mam header file 2016-04-15 15:13:38 +03:00
Evgeniy Khramtsov fb0ecf3361 Merge branch 'move-db-code' 2016-04-15 15:12:12 +03:00
Evgeniy Khramtsov 52571e8624 Clean mod_mam.erl from DB specific code 2016-04-15 15:11:31 +03:00
Evgeniy Khramtsov 901d2e0aed Clean mod_offline.erl from DB specific code 2016-04-15 13:44:33 +03:00
Evgeniy Khramtsov 860db2ddca Clean mod_blocking.erl from DB specific code 2016-04-14 14:17:20 +03:00
Evgeniy Khramtsov c8c4a41b66 Clean mod_privacy.erl from DB specific code 2016-04-14 14:16:32 +03:00
Evgeniy Khramtsov 79d64e0d71 Clean mod_irc.erl from DB specific code 2016-04-14 12:18:04 +03:00
Evgeniy Khramtsov f8e3560ad2 Clean mod_shared_roster.erl from DB specific code 2016-04-14 11:45:43 +03:00
Evgeniy Khramtsov 398f1de5ae Clean mod_roster.erl from DB specific code 2016-04-14 10:58:32 +03:00
Evgeniy Khramtsov 0b439a7d5b Clean mod_muc.erl from DB specific code 2016-04-13 21:07:32 +03:00
Evgeniy Khramtsov ae69f09257 Clean mod_vcard.erl from DB specific code 2016-04-13 17:37:52 +03:00
Evgeniy Khramtsov ef70ce65ab Clean mod_private.erl from DB specific code 2016-04-13 14:09:34 +03:00
Evgeniy Khramtsov b5d1ce795f Clean mod_announce.erl from DB specific code 2016-04-13 13:04:04 +03:00
Evgeniy Khramtsov cd094bc903 Clean mod_caps.erl from DB specific code 2016-04-13 11:41:04 +03:00
Evgeniy Khramtsov 2d7e03f5e1 Clean mod_vcard_xupdate.erl from DB specific code 2016-04-13 11:06:59 +03:00
Mickaël Rémond b2abc1edb7 Add preliminary tests on ACL module and prepare clean-up / refactor 2016-04-13 09:45:56 +02:00
Evgeniy Khramtsov 7fd4808cde Clean mod_last.erl from DB specific code 2016-04-13 09:59:39 +03:00
Evgeniy Khramtsov 5eef8a8bcf Make it possible to get DB backend of a module 2016-04-13 09:56:10 +03:00
Mickael Remond cd2e2b1a88 Synchronizing master changes 2016-04-12 10:34:24 +02:00
Mickael Remond 5958a91428 Fix typo in error message 2016-04-12 10:27:43 +02:00
Holger Weiss 15d184a909 Disable TLS compression for s2s by default
TLS compression is not recommended, and it's already disabled by default
for c2s connections and for ejabberd_http.
2016-04-11 22:50:11 +02:00
Badlop 8c8a6869be process2/2 is needed by mod_rest to provide its own AccessCommands
See processone/ejabberd-contrib#161
2016-04-11 17:21:44 +02:00
Badlop 695592a38c Update check_password tests are the command now is fixed 2016-04-11 13:39:35 +02:00
badlop bd3b7cd2df Merge pull request #1064 from sezuan/fix_check_password
Fix check_password
2016-04-11 13:38:22 +02:00
Matthias Rieber b67dc00db2 Fix check_password 2016-04-10 15:37:36 +02:00
Mickael Remond 127342449e Allow testing user pattern directly in access rules 2016-04-08 19:45:25 +02:00
Paweł Chmielowski b4739396ec Switch to varchar(64) in mysql user.server/salt as text can't have default values 2016-04-08 17:50:59 +02:00
Mickael Remond 1dbdd58b1b Add TODO to improve ACL 2016-04-08 12:55:35 +02:00
Evgeniy Khramtsov c5dbdfc71a 'serverkey' and 'salt' should have empty string as default 2016-04-08 13:02:08 +03:00
Paweł Chmielowski 86dfbe6ece Make sure that ejabberd_sm sid are unique 2016-04-08 10:52:29 +02:00
Evgeniy Khramtsov b83ec483e9 Send stream trailer at the very end 2016-04-08 11:49:50 +03:00
Paweł Chmielowski afd3accf75 Generate shorted jid for anonymous connections 2016-04-07 16:47:30 +02:00
Paweł Chmielowski 0935f493ee Add tests for anonymous and digest-md5 auth 2016-04-07 16:47:01 +02:00
Mickael Remond 373f9fb0eb Add tests on Access rules returning values 2016-04-07 13:04:58 +02:00
Mickael Remond 60c0c8e968 Add test when mixing ip / user rules 2016-04-07 12:35:29 +02:00
Paweł Chmielowski 18557fa3d6 Start of tests for cyrsasl module 2016-04-07 12:28:19 +02:00
Mickael Remond a938af4180 IP based ACL / Access rules and sequential evaluation of rules 2016-04-07 12:06:30 +02:00
Paweł Chmielowski d5c29360fb Fix anonymous auth 2016-04-07 10:02:37 +02:00
Mickael Remond 48a1d818d6 Rebase master 2016-04-06 18:14:47 +02:00
Mickael Remond eb36440c2e Variant for user ACL test 2016-04-06 18:13:08 +02:00
Mickael Remond 47039aed15 Allow clearing all ACL and access rules 2016-04-06 18:13:08 +02:00
Mickael Remond d45ad3e3a5 Add initial basic ACL test 2016-04-06 18:13:08 +02:00
Mickael Remond 5ad8c790c7 Export add_access/3 to allow setting ACL outside of yaml config file 2016-04-06 18:13:08 +02:00
Mickael Remond 5efcf0a175 Stringprep can already be started, do not check result 2016-04-06 18:11:46 +02:00
Mickael Remond 0916694e0e Merge branch 'master' of github.com:processone/ejabberd 2016-04-06 17:56:01 +02:00
Mickael Remond 2900aa208f Log Elixir test result for investigation and include this log file in travis for troubleshooting failed tests 2016-04-06 17:55:56 +02:00
Badlop 27b4217a9d Tweak srg_get_info result formatting (#1048) 2016-04-06 17:55:19 +02:00
Mickael Remond a9e50468b6 Better error message in logs 2016-04-06 15:07:44 +02:00
Mickael Remond abf768274a Fix error message paramater formatting 2016-04-06 15:05:19 +02:00
Mickael Remond f78b170c24 Add initial basic ACL test 2016-04-06 13:59:33 +02:00
Mickael Remond 991529a657 Export add_access/3 to allow setting ACL outside of yaml config file 2016-04-06 13:59:06 +02:00
Mickael Remond b2279d481d Merge branch 'master' of github.com:processone/ejabberd 2016-04-06 13:57:12 +02:00
Mickael Remond 267fdb2e95 Now we need to start stringprep before config 2016-04-06 13:51:05 +02:00
badlop d9f1061b8a Merge pull request #1051 from genric/patch-1
Fix mod_muc_admin:set_room_affiliation options persistence
2016-04-06 13:44:12 +02:00
badlop dd654fa794 Merge pull request #1052 from genric/patch-2
Fix mod_muc_admin:get_room_options
2016-04-06 13:25:46 +02:00
Mickael Remond 1b9b5f8e6a Merge branch 'master' of github.com:processone/ejabberd 2016-04-06 12:59:58 +02:00
Mickael Remond 67b9b82261 We need to set hosts in options to be able to retrieve 'MYHOSTS' 2016-04-06 12:59:27 +02:00
Mickaël Rémond 2eee2de6e2 Merge pull request #1054 from richp10/master
upgrade stringprep to 1.03
2016-04-06 12:05:26 +02:00
richp10 acc11195f8 upgrade stringprep to 1.03 2016-04-06 08:40:10 +00:00
genric be7f65da05 Fix mod_muc_admin:get_room_options
Fix mod_muc_admin:get_room_options to match the ejabberd_commands result spec.
2016-04-05 14:13:28 +02:00
Evgeniy Khramtsov 232915184c Merge branch 'add-error-reason' 2016-04-05 13:10:09 +03:00
Evgeniy Khramtsov 9ac6e4edf7 Replace more ?ERR_* macros with ?ERRT_* 2016-04-05 13:09:44 +03:00
genric 490aa2c6a6 Fix mod_muc_admin:set_room_affiliation
Add missing options so they are stored when set_room_affiliation is invoked, instead of being ignored and set to default values after muc restart.
2016-04-04 14:02:34 +02:00
Mickaël Rémond ca9ac019eb Merge pull request #1046 from processone/commands-update
Add support for versioning in ejabberd commands
2016-04-01 14:24:08 +02:00
Mickael Remond e24da5789e Apply fixes and remove tests for missing methods 2016-04-01 13:05:41 +02:00
Mickael Remond 47266de6d7 Do not use underscore variable 2016-04-01 12:24:49 +02:00
Mickael Remond f243c30847 Rollback mod_admin_extra 2016-04-01 12:24:00 +02:00
Mickael Remond 2a2a47b5c6 Fix merge issues 2016-04-01 12:12:19 +02:00
Mickael Remond b5f1479763 Fix tests, they are now running fine locally 2016-04-01 11:13:48 +02:00
Mickael Remond a8f92ae767 Add logger macro to help troubleshooting Elixir tests 2016-04-01 11:11:42 +02:00
Mickael Remond 97d345d287 Port mod_admin_extra test to work with new API 2016-03-31 22:01:57 +02:00
Mickael Remond ef2e2e45b3 Fix failing tests 2016-03-31 17:34:58 +02:00
Mickael Remond 3290a5ff15 Force protobuffs version to be able to use new meck release 2016-03-31 16:05:18 +02:00
Mickael Remond 7988e2e350 Merge lastest commits from master 2016-03-31 15:37:21 +02:00
Mickael Remond dc0ca51ef1 Try keeping names of test same as master to limit merge conflicts 2016-03-31 15:06:41 +02:00
Mickael Remond 78c4a0d65f Add test file whose name was conflicting during merge 2016-03-31 14:42:08 +02:00
Mickael Remond 91233eafaa Use version of moka that do not depend on proper 2016-03-31 14:36:30 +02:00
Mickael Remond da0751239c Rename conflicting test file after merge 2016-03-31 14:33:34 +02:00
Alexey Shchepin 3dc55c6d47 Commands refactor, first pass.
- add API versionning
- changed error handling, based on exception
- commands moved/merged from mod_admin_p1 to mod_admin_extra
- command bufixes
- add some elixir unit test cases

Squashed commit of the following:

commit dd59855b3486f78a9349756e4f102e79b3accff8
Merge: 14e8ffc 506e08e
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Fri Oct 30 11:43:18 2015 +0100

    Merge branch '3.2.x' into api

commit 14e8ffce78cbea6c8605371d1fc50a0c1d1e012c
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Tue Oct 27 16:35:17 2015 +0100

    Added OAuth tests to ejabberd_commands

commit f81c550c14628edfe4861c228576cb767924366a
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Tue Oct 27 16:34:55 2015 +0100

    Added some mod_http_api tests

commit 6a64578d5b2ba532a2feb6503ed98561e56d5d53
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Mon Oct 26 15:29:36 2015 +0100

    Fix get_last command test

    Previous version won't work with dst.

commit 27e0cde9e9c1f001effe68f8424a365ad947c068
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Fri Oct 23 17:59:34 2015 +0200

    Add tests on admin command policy

commit 19dad8d54f54c9fabd454280483cccfb06c8e78a
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Fri Oct 23 16:49:36 2015 +0200

    Added command related tests (http api & user policy)

commit e0e596ab4a3f3a70aba5f374f028939ab794de33
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Fri Oct 23 16:49:16 2015 +0200

    Fix command call.

commit 128cd7d1ede3c47a34f8ec3a750c980ccad2c61d
Merge: 60c4c4c 447313c
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Thu Oct 22 14:48:39 2015 +0200

    Merge branch '3.2.x' into api

commit 60c4c4c0751302524c14219c6bc8c56a6069a689
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Thu Oct 22 14:45:57 2015 +0200

    Fix ejabberd_commands spec.

commit 8e145c28c5da762c2b93ee32327eff1db94ebfed
Merge: 397273a f13dc94
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Wed Oct 21 18:26:07 2015 +0200

    Merge branch '3.2.x' into api

commit 397273a23ed415feac87aed33da6452229793387
Merge: c30e89b f289e27
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Wed Oct 21 15:27:45 2015 +0200

    Merge branch '3.2.x' into api

commit c30e89bb8a0013bff37e61e4c6953350c9c1f313
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Wed Oct 21 12:47:02 2015 +0200

    Merge mod_http_api

commit 7b0db22b4acd48ff6fabce41c1b2525e6580a3c5
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Fri Oct 16 11:55:48 2015 +0200

    Fix exunit tests to run with common_test suites

commit d8b1a89800ac7379a57a7eb4a09c3c93c3e1e5eb
Merge: 2879ae8 63455b3
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Thu Oct 15 11:39:45 2015 +0200

    Merge branch '3.2.x' into api

commit 2879ae87ff3eee369ef3d780136b96ecff5285d1
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Wed Oct 14 14:53:44 2015 +0200

    Fix update_roster command.

commit a1d453dd7a3afda9861a8d747494a45057ad574b
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Tue Oct 13 16:14:28 2015 +0200

    API commands refactor

    Moving and/or merging commands from mod_admin_p1 to mod_admin_extra

commit b709ed26b0fc0ca4f3bdd5a59fa58ec7e3db97fa
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Wed Oct 7 15:10:01 2015 +0200

    Add tests on commands

commit 6711687bee9c672cb3d5aed0744e13420ecf6dbd
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Tue Sep 29 15:58:16 2015 +0200

    Add ejabberd_commands tests

commit df8682f419cf3877e77e36a19bca0fc55dc991f8
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Mon Sep 28 14:54:39 2015 +0200

    Added API versioning for ejabberdctl and rest commands

commit cd017b0e3aac431bc3ee807ceb7f8641e1523ef5
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Fri Sep 18 11:21:45 2015 +0200

    Better error handling of HTTP API commands.

commit ca5cb6acd8e4643f9d6c484d2277b0d7e88471e5
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Tue Sep 15 15:03:05 2015 +0200

    add commands to mod_admin_extra:
    - get_offline_count
    - get_presence
    - change_password

commit 7f583fa099e30ac2b0915669fd8f102ac565b833
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Tue Sep 15 15:02:16 2015 +0200

    Improve REST API error handling

commit 14753b1c02cdce434a786b7f80f6c09f0d210075
Author: Jerome Sautret <jerome.sautret@process-one.net>
Date:   Mon Sep 14 10:51:17 2015 +0200

    Change REST API return codes for integer type.
2016-03-31 14:53:31 +03:00
Mickael Remond d35c5ebde5 Test / Document ejabberd_commands checks 2016-03-31 13:14:06 +02:00
Mickael Remond 3cfcdbb245 Check that various type of commands are properly rejected without auth 2016-03-31 12:38:53 +02:00
Mickaël Rémond 7c2998a55d Merge pull request #1044 from processone/http-api
Add ability to call open ejabberd commands through ReST API
2016-03-31 11:37:14 +02:00
Evgeniy Khramtsov fced8dc3d9 Replace some ?ERR_* macros with ?ERRT_* 2016-03-31 11:00:29 +03:00
Mickael Remond c00cfca8e7 mix version updated for 16.03 release 2016-03-30 19:21:12 +02:00
Mickael Remond 3c480a5b0b Fix Dialyzer inconsistency 2016-03-30 16:47:40 +02:00
Paweł Chmielowski b160bd7ac1 Provide authzid in scream response 2016-03-30 16:08:04 +02:00
Mickael Remond 809057678b Better error report when command is not exposed through API 2016-03-30 15:59:29 +02:00
Mickael Remond 36ac1cd6c7 Returns unauthorized error when we do not have correct credentials 2016-03-30 14:49:19 +02:00
Mickael Remond ead83b008c HTTP ReST API now supports 'open' ejabberd commands 2016-03-30 14:23:09 +02:00
Mickael Remond 6f25122f8c Support flagging so Elixir tests as pending 2016-03-30 13:59:01 +02:00
Holger Weiss bf79f223df Travis CI: Cosmetic changes to Riak setup commands 2016-03-30 01:15:12 +02:00
Holger Weiss e58b62f737 Travis CI: Revert to checking for skipped tests
Now that the issues with running Riak on Travis are solved, we can check
for skipped test cases again.
2016-03-30 01:02:27 +02:00
Mickael Remond 82cf7f7ca8 Adds support for option admin_ip_access on mod_http_api
This allows granting access to admin commands to backend, by using IP address restrictions.
(Pawel Chmielowski)
2016-03-29 19:40:20 +02:00
Mickael Remond 6d7891ed16 Merge branch 'master' of github.com:processone/ejabberd 2016-03-29 15:45:57 +02:00
Mickael Remond c7c70ffa0a Add basic test for command registration 2016-03-29 15:45:48 +02:00
Badlop 78a44d8099 Move start and stop_modules/0 from ejabberd_app to gen_mod (#1039) 2016-03-29 15:26:34 +02:00
Mickael Remond b49a615e21 Fix commands api option 2016-03-29 13:19:16 +02:00
Mickael Remond 3b2d0fd24a Fix commands access check.
Fixes ECS-20
2016-03-29 13:06:13 +02:00
Mickael Remond aa15148898 Fix commands access check. 2016-03-29 13:05:12 +02:00
Badlop 3809b898aa Pass noauth when auth isn't provided, reverts a1129dc (processone/ejabberd-contrib#159) 2016-03-29 12:51:26 +02:00
Badlop e386bf6b58 In SQL files create Users table with SCRAM support by default (#956) 2016-03-29 12:37:49 +02:00
Mickael Remond 221d8e0e5d Merge branch 'master' of github.com:processone/ejabberd 2016-03-29 11:21:58 +02:00
Mickael Remond 53d12caa56 Fix log printout
Log is not only called for admin commands. It is call for all commands call.
2016-03-29 11:21:53 +02:00
Evgeniy Khramtsov b0ef3e66a8 Update MSSQL schema 2016-03-29 11:53:13 +03:00
Evgeniy Khramtsov 7a9e93839a Fix some LIMIT related problems with MSSQL 2016-03-29 11:34:00 +03:00
Mickael Remond 54ddc990c2 Use new fast_yaml 2016-03-29 09:21:24 +02:00
Mickaël Rémond 4afe0b195c Merge pull request #1036 from processone/shared-roster-ldap
Fix issue getting shared roster
2016-03-25 19:36:10 +01:00
Evgeny Khramtsov 494e638f03 Merge pull request #1024 from rbarlow/luerl_release
Use the v0.2 release of luerl instead of a commit.
2016-03-25 21:29:19 +04:00
Evgeny Khramtsov 915ccbbdfb Merge pull request #684 from wcy123/master
bug fix: ejabberd:start_app need to pass Type to application:start
2016-03-25 21:00:35 +04:00
Mickael Remond 381065397f Fix issue getting shared roster
I rollbacked to correct version and slightly refactored the code
2016-03-25 17:44:12 +01:00
Mickael Remond a08ecc0f41 Proper naming for LDAP test function for shared roster 2016-03-25 17:42:58 +01:00
Mickael Remond eace5fc463 Switch back to proper log level 2016-03-25 17:42:19 +01:00
Mickael Remond 0afcf561d6 Add test to demonstrate issue to retrieve roster with mod_shared_roster_ldap 2016-03-25 17:30:12 +01:00
Evgeniy Khramtsov 46568fb959 Merge commit 'refs/pull/524/head' of github.com:processone/ejabberd into sasl-api-change 2016-03-25 18:16:50 +03:00
Mickaël Rémond c7cf95ba99 Merge pull request #1035 from processone/modular-tests-run
Allow running test groups independently
2016-03-24 15:46:51 +01:00
Christophe Romain 914578a85e Fix start via systemd (#978) 2016-03-24 11:06:42 +01:00
Christophe Romain df4c551f06 Specify lacking nodename (thanks to hamano)(#1020) 2016-03-24 10:21:51 +01:00
Mickael Remond a3a33bd5fc Allow running test groups independently
We need to be able to run only a few test groups, even if we do not have all
database backends installed and configured locally.

ejabberd test suite configures a specific host per backend. I changed ejabberd
to allow ignoring some hosts from config file on start, by providing the exact
list of hosts we want to start.

This is done by setting an ejabberd app Erlang environment variable 'hosts' and
passing the list of hosts we want to actually define.

When doing so, the backend specific hosts defined in ejabberd test configuration file
are simply ignored. As a result, we do not try to connect to unavailable backends.

I linked that part to CT run test by defining the hosts list based on environment variable
CT_BACKENDS. This variable is expected to be a comma separated list of available backends.

When Erlang Common Tests are run with that environment variable set, only the host matching
the name of the backend will be set, plus the default "localhost", common to many tests.

This can be combined with rebar ct groups list.

Example commands to run tests:
CT_BACKENDS=riak,mnesia rebar ct suites=ejabberd
CT_BACKENDS=mnesia rebar ct suites=ejabberd groups=mnesia
2016-03-24 10:02:13 +01:00
Mickael Remond 7066338948 Enable Riak test suite on Travis-CI 2016-03-23 16:16:50 +01:00
Evgeniy Khramtsov cb27a3540e Fix is_connected/0 function 2016-03-22 20:01:23 +03:00
Evgeniy Khramtsov 61e914a83f Keep alive Riak connections by default 2016-03-22 19:32:30 +03:00
Evgeniy Khramtsov b90c3764c0 Fix a typo in travis.yml 2016-03-22 19:05:38 +03:00
Evgeniy Khramtsov bdce5556bd Tell Travis not to fail if some tests are skipped 2016-03-22 19:03:06 +03:00
Evgeniy Khramtsov 57f7b34b90 Do not auto append IP suffix to usernames (#1008) 2016-03-22 13:25:34 +03:00
Mickael Remond f8cf1aef91 Disable Riak test on Travis as they are too unpredictable on Travis
For now, we are running them on local Jenkins
2016-03-21 19:43:59 +01:00
Badlop e7ef65a22d Improve ban_account command to work with other DBs than Mnesia (#977) 2016-03-21 18:30:05 +01:00
Badlop 107569a17d New command delete_mnesia deletes all tables that can be exported 2016-03-21 16:19:06 +01:00
Mickael Remond 0112135096 Elixir test suite is already run with global CT run command 2016-03-21 14:12:00 +01:00
Mickaël Rémond 4be9cc1b6d Merge pull request #1029 from processone/coveralls
Add support for test code coverage
2016-03-21 12:45:02 +01:00
Mickael Remond 95475966fd We do not have C code to cover, they are in dependencies. 2016-03-21 12:15:07 +01:00
Mickael Remond ef04dd75aa Add Coveralls support 2016-03-21 12:01:20 +01:00
Paweł Chmielowski 3441157a38 Use static key for mysql repo 2016-03-21 11:02:32 +01:00
Mickael Remond c98df3c0da Attempting to use other keyserver, as we see failure from Travis fetching 2016-03-21 10:06:07 +01:00
Mickael Remond c924cd42ff Run basic Elixir unit tests 2016-03-21 09:45:40 +01:00
Mickael Remond 31c194a682 Add simple Elixir unit test on jid:from_string 2016-03-21 09:44:23 +01:00
Mickael Remond 5b7dc0c215 Merge branch 'master' of github.com:processone/ejabberd 2016-03-21 09:43:14 +01:00
Mickael Remond 0e3026539e Comment on error failures in logs + indenting 2016-03-21 09:42:59 +01:00
Badlop dc7b2c45c2 Fix indentation of mod_register in default configuration file 2016-03-19 17:42:12 +01:00
Evgeny Khramtsov cf9ef456b7 Merge pull request #1022 from hamano/riak_auth
riak authentication support
2016-03-18 23:10:37 +04:00
Randy Barlow 7b5825a205 Use the v0.2 release of luerl instead of a commit.
The luerl project has made a tag for v0.2, which should be usable
by ejabberd. Discussion about the v0.2 release is here:

https://github.com/rvirding/luerl/issues/60
2016-03-18 14:22:59 -04:00
HAMANO Tsukasa 2d103b4ae1 support riak authentication 2016-03-19 01:41:14 +09:00
Christophe Romain 939bb244e1 Extend scope of ejabberdctl ping 2016-03-18 11:08:30 +01:00
Christophe Romain f19a54e9a1 Escape quoting node name for ejabberdctl ping 2016-03-18 10:22:11 +01:00
Paweł Chmielowski ef02053a9d Fix issue #1015 2016-03-17 18:41:39 +01:00
Mickaël Rémond d9bb3730b7 Merge pull request #926 from lpil/fix/remove-empty-mod
Remove empty and unused module
2016-03-16 18:28:01 +01:00
Paweł Chmielowski 7b72247b2c Don't use jlib:jid_remove_resource 2016-03-16 13:32:19 +01:00
Paweł Chmielowski 34bc698526 Merge pull request #1011 from oxoWrk/master
Bare JID in 'from' of Roster Push (RFC 6121 section 2.1.6) in mod_adm…
2016-03-16 11:37:25 +01:00
Paweł Chmielowski efbaba5d04 Make auto generated resources shorter 2016-03-16 11:30:45 +01:00
Badlop c985a2bd3d Start ezlib only if required, as it's optional (#1006) 2016-03-16 11:11:43 +01:00
Mickael Remond 74053b114e When building Elixir inside ejabberd, rely on version 1.1 for Erlang R17 compliance 2016-03-16 09:01:40 +01:00
Mickael Remond b40154f8f4 Update OTP release to use and drop release 17.1
Attempt to build with Elixir
2016-03-16 08:55:25 +01:00
Mickael Remond 3c2cd91fb1 Merge branch 'master' of github.com:processone/ejabberd 2016-03-15 22:42:15 +01:00
Mickael Remond 367adc2113 Better error reporting when running Elixir test suite 2016-03-15 22:42:07 +01:00
Paweł Chmielowski 5b5548b8ca Produce less verbose logs for tests on travis 2016-03-15 18:14:27 +01:00
root 058b3d96bf Bare JID in 'from' of Roster Push (RFC 6121 section 2.1.6) in mod_admin_extra 2016-03-15 10:57:56 +05:00
Holger Weiss 68675effac Apply cosmetic changes to GitHub templates 2016-03-15 00:12:01 +01:00
badlop 3fef1a4435 Merge pull request #991 from suchatorg/patch-1
Update Galician (galego) translations
2016-03-14 17:08:30 +01:00
Carlos 7f25c3b3e8 Update gl.po 2016-03-14 16:52:16 +01:00
Evgeny Khramtsov dcefb6bbe3 Merge pull request #980 from sharewax/EJAB-1480
EJAB-1480: fix issue with retreiving user roster
2016-03-14 17:49:01 +03:00
Badlop 5351e8236d Fix Addresses element which lacked others local destinations
When sending single packet, in addresses include all other group
destinations, not only oneself
2016-03-14 12:53:14 +01:00
Carlos 9440049208 Update gl.po 2016-03-14 12:47:52 +01:00
Holger Weiss b871fbba1b Fix result type of "connected_users_info" command
Closes #1002.
2016-03-14 00:51:12 +01:00
Holger Weiss 91573a8e82 Don't store watchdog notifications in MAM archives 2016-03-14 00:05:50 +01:00
Evgeniy Khramtsov 55c567ff00 Unregister route at the very end 2016-03-13 17:37:39 +03:00
Evgeniy Khramtsov 5a4b7817df Add ODBC backend for MIX 2016-03-13 15:38:50 +03:00
Evgeniy Khramtsov 50e5cdc2fa Add ODBC tests for MIX 2016-03-13 13:16:55 +03:00
Evgeniy Khramtsov 5045fb584d Define pubsub node configuration per route/host explicitly 2016-03-13 13:16:43 +03:00
Evgeniy Khramtsov 357e48fb6b Make it possible to get virtual host of a registered route 2016-03-13 11:38:40 +03:00
Mickael Remond 9ceeaf213b Provide guidance for issue reporting and pull requests on Github 2016-03-12 17:54:23 +01:00
Christophe Romain 9297782868 Fix config fetch after host/serverhost cleanup 2016-03-11 17:25:46 +01:00
Holger Weiss 0d1edc4771 Don't enable in-band registration by default 2016-03-11 12:31:16 +01:00
Mickaël Rémond 1336c6c9fa Merge pull request #997 from tnull/fix_auth_method_order
Minimal auth_method ordering fix during configuration merge.
2016-03-11 11:37:50 +01:00
Elias Rohrer 8b03c0a385 Minimal auth_method ordering fix 2016-03-10 17:52:55 +01:00
Evgeniy Khramtsov 15ee72138a Add tests for MIX 2016-03-10 17:42:37 +03:00
Mickael Remond 92a0181932 Lager to Elixir Logger bridge is now compliant with ejabberd loglevel set / get
This should fix #966
2016-03-09 22:30:46 +01:00
Mickael Remond 035c63fd2a Fix call to lager_util:is_loggable/3 2016-03-09 21:03:06 +01:00
Mickael Remond 9e6efaf9bc Use p1_time_compat util for generating timestamp 2016-03-09 20:57:01 +01:00
Mickael Remond f4ee8a2505 Add Elixir Logger Backend to bridge logs from lager
We will need to support loglevel bridging.
It should help with #966
2016-03-09 19:12:56 +01:00
Paweł Chmielowski 842d52352a Fix escaping of argument in iexlive and iexdebug 2016-03-09 14:26:28 +01:00
Evgeniy Khramtsov e31799a3b1 Define mod_opt_type/1 callback 2016-03-09 11:19:15 +03:00
Evgeniy Khramtsov 1860801e36 Unregister hooks and iq handlers on terminate 2016-03-09 11:14:45 +03:00
Holger Weiss ae4fa22180 mod_http_upload: Add XEP-0363 v0.2 support
Include the maximum file size in the service discovery information, as
specified by XEP-0363, version 0.2.
2016-03-09 00:27:06 +01:00
Evgeniy Khramtsov b5121a346d Experimental MIX (XEP-0369) support 2016-03-08 20:04:29 +03:00
Carlos b6289d646f Update gl.po 2016-03-08 01:21:37 +01:00
Carlos c065a2c5b9 Update gl.po 2016-03-07 22:26:46 +01:00
badlop 6e40573c13 Merge pull request #989 from galambalazs/patch-1
fix syntax highlighting by keeping "~s" together
2016-03-07 19:06:59 +01:00
badlop eb0890284a Merge pull request #988 from tnull/edoc_fix
Fixed type specifications for 'rebar doc'
2016-03-07 18:44:05 +01:00
Badlop 16c1b9a5c2 Fix format_result also in xmlrpc, after aa5caa3 (#982) 2016-03-07 17:34:08 +01:00
Balázs Galambosi 83accedded fix syntax highlighting by keeping "~s" together 2016-03-07 16:06:18 +01:00
Elias Rohrer 8e6a301026 Fixed type specifications for 'rebar doc'
- Fixed type @specs and -specs to remove 'rebar doc' errors
- Removed a lot of wrong and deprecated documentation in ejabberd_piefxis.erl
2016-03-07 15:06:19 +01:00
Anton Samets 4013629e5d EJAB-1480: fix issue with retreiving user roster 2016-03-04 15:52:38 +03:00
Paweł Chmielowski 6e14a47316 Define opt_type required be ejabberd_config behaviour. 2016-03-04 11:45:18 +01:00
Paweł Chmielowski 304afd75ac Compile ejabberd_config early to stop undefined behaviour warnings 2016-03-04 11:32:34 +01:00
Badlop 9c3d57e63e Mark get_queue_length obsolete, and use count_offline_messages (#970) 2016-03-04 11:09:14 +01:00
Christophe Romain 44978ce978 ext_mod: switch to fast_xml and remove old p1_logger reference 2016-03-03 15:46:15 +01:00
Christophe Romain 10d6c330a5 Fix pubsub disco after host/serverhost cleanup 2016-03-03 14:52:03 +01:00
Evgeniy Khramtsov e95cf420a2 Enable flexible offline on disco#info as well 2016-03-03 14:10:40 +03:00
Christophe Romain 3ecd7e850c Use Elixir v1.2.3 2016-03-03 10:36:13 +01:00
Christophe Romain fee5873310 Minor format cleanup 2016-03-03 10:34:45 +01:00
Mickael Remond 96b09c587d Use upcoming version of ejabberd with Elixir 1.2 2016-03-02 13:35:35 +01:00
Alexey Shchepin 79853ad44f Missed a few calls in previous commits 2016-03-02 02:00:02 +03:00
Alexey Shchepin 9a049442ff Raise an error when there are no fields to set in ?SQL_UPSERT 2016-03-02 00:12:49 +03:00
Alexey Shchepin e21f25f5b9 Update more SQL queries 2016-03-02 00:12:49 +03:00
Alexey Shchepin 1f9fd25ff8 Update more SQL queries 2016-03-02 00:12:49 +03:00
Alexey Shchepin 968576d4f2 Update p1_pgsql tag 2016-03-02 00:12:49 +03:00
Alexey Shchepin d8fbe8a289 Update more SQL queries 2016-03-02 00:12:49 +03:00
Alexey Shchepin 6d7ce0237a Update mod_last SQL queries to the new API 2016-03-02 00:12:49 +03:00
Alexey Shchepin 2d042f078e New parse transform for ?SQL_UPSERT and ?SQL_UPSERT_T 2016-03-02 00:12:49 +03:00
Alexey Shchepin 3d8219d8f9 Update mod_roster and ejabberd_auth_odbc SQL queries to the new API 2016-03-02 00:12:49 +03:00
Alexey Shchepin 7f3bffe821 Allow balanced expressions inside @(...) in ejabberd_sql_pt 2016-03-02 00:12:49 +03:00
Alexey Shchepin 99255631dd Updated some mod_offline SQL queries to the new API 2016-03-02 00:12:11 +03:00
Alexey Shchepin ba35c1ed9d Use 'any' to match any DBMS in sql_query 2016-03-01 22:50:20 +03:00
Alexey Shchepin 437e768e4a Better error handling in ejabberd_sql_pt 2016-03-01 22:50:07 +03:00
Alexey Shchepin c58a4be6ee Support for run-time SQL queries selection depending on DBMS version 2016-03-01 22:49:56 +03:00
Alexey Shchepin 6374ef4866 New parse transform for SQL queries, use prepare/execute calls with Postgres 2016-03-01 22:48:30 +03:00
Mickael Remond eeac7f9b02 Update ejabberd version for hex.pm release 2016-02-29 17:51:06 +01:00
Paweł Chmielowski 8c49d1e1af Disable back undefined_function_calls xref check 2016-02-29 14:56:28 +01:00
Evgeniy Khramtsov 382c7c21ad Do not call to deprected/undefined functions from mod_shared_roster_ldap 2016-02-29 16:35:45 +03:00
Paweł Chmielowski 59fe967ebb Enable undefined_function_calls xref option 2016-02-29 13:51:59 +01:00
Holger Weiss 6d8c7232d8 mod_register_web: Choose the right error messages 2016-02-29 00:39:57 +01:00
Evgeniy Khramtsov 6b126171da Improve LDAP shared roster support (EJAB-1480) 2016-02-26 17:27:12 +03:00
Christophe Romain 56523784e1 Implementation of pubsub#itemreply (EJAB-1347)(#928) 2016-02-26 10:32:03 +01:00
Christophe Romain 1c6d20924b Fix host/serverhost usage (#902) 2016-02-26 09:33:07 +01:00
Marek Foss ebaf750a9b Fix for #935 2016-02-25 18:56:43 +01:00
Paweł Chmielowski 217ba09408 Add extra items to .gitignore 2016-02-25 12:23:23 +01:00
Paweł Chmielowski 24617b5e25 Split long lines 2016-02-25 12:23:23 +01:00
Paweł Chmielowski d9ec923357 Elixir want {src_dirs, ["include"]} on top of a config 2016-02-25 12:23:23 +01:00
Paweł Chmielowski a9de13c5d9 Don't include empty line after java example 2016-02-25 12:14:17 +01:00
Badlop 2c856c71f6 Update translated files, as there wee many improvements 2016-02-24 12:34:53 +01:00
Christophe Romain 576c10ee3a Make caps warning less confusing (#955) 2016-02-23 14:14:24 +01:00
Holger Weiss 44f581c3b5 mod_http_upload: Also expand @HOST@ in 'docroot'
In some environments, it might be desirable to use separate document
roots for each virtual host.
2016-02-20 20:13:30 +01:00
Holger Weiss b971449f12 mod_http_upload: Expand 'docroot' before using it
Expand the @HOME@ keyword within the 'docroot' value before setting the
permissions of the document root directory.
2016-02-20 18:21:38 +01:00
Alexey Shchepin 9db9cbd814 Merge pull request #961 from weiss/compression-after-sasl
Accept stream compression request after SASL
2016-02-19 21:02:26 +03:00
Holger Weiss 5b4aefbacd Accept stream compression request after SASL
This is an updated version of the patch submitted to EJAB-1382 by
Alexey (thanks!).
2016-02-19 18:53:28 +01:00
Evgeniy Khramtsov 8f9c18edf2 Add Redis backend to the test suite 2016-02-19 17:06:41 +03:00
Evgeniy Khramtsov 4b0860e7de Make it possible to define 'sm_db_type' per virtual host 2016-02-19 16:38:43 +03:00
Badlop eece6e69cb Fix format_result so get_room_options command works again after aa5caa3 2016-02-17 20:43:35 +01:00
Paweł Chmielowski d40a091eda Another fix for \n in ejabberdctl arguments 2016-02-15 15:21:27 +01:00
badlop c9c59f00ad Merge pull request #953 from cdroege/fix_css
Fix the color of links in tables in web admin
2016-02-15 12:52:54 +01:00
Paweł Chmielowski 47a67c7320 Allow to pass \n in argument to ejabberdctl 2016-02-12 23:38:39 +01:00
Christian Dröge c579313821 Fix the color of links in tables in web admin 2016-02-12 18:45:45 +01:00
badlop 06f2237132 Merge pull request #951 from rodrigues/master
Update Portuguese (Brazil) translations
2016-02-12 13:16:46 +01:00
Victor Rodrigues 4f7f66fae8 Update Portuguese (Brazil) translations 2016-02-11 23:16:41 +01:00
Holger Weiss eaaab45c14 mod_muc_room: Let members see admin/owner JIDs
Let members retrieve all affiliation lists in non-anonymous rooms, not
just the list of members.
2016-02-11 22:52:27 +01:00
Holger Weiss 041e886b87 mod_muc_room: Don't expose JIDs in anonymous rooms
Don't let room members retrieve the member list unless the room is
non-anonymous.
2016-02-11 22:24:14 +01:00
Holger Weiss 3908c9710c Travis CI: Make sure Riak finds callback module
Riak calls back into ejabberd_riak during MapReduce.
2016-02-11 21:53:36 +01:00
Evgeniy Khramtsov 5680d4c3e9 Get rid of calls to jlib.erl from tests 2016-02-11 12:19:23 +03:00
Evgeniy Khramtsov 8e6adb4b3c Do not forget sending initial presence in XEP-0013 test 2016-02-11 11:53:33 +03:00
Holger Weiss 17be70339c mod_mam: Send new preferences when they are set
If a client updates the archiving preferences, include the new
preferences with the IQ result (as mandated by XEP-0313).
2016-02-10 23:06:31 +01:00
Evgeniy Khramtsov d6323a7b5e Add tests for XEP-0013 2016-02-10 16:15:43 +03:00
Badlop 02a519a11e Mention new XEP support 2016-02-08 21:35:46 +01:00
Badlop 1de085ec23 Prepare room JID in create_room command 2016-02-08 21:35:26 +01:00
Paweł Chmielowski 217b6da5fd Fix example value for rescode return type 2016-02-09 16:44:57 +01:00
Paweł Chmielowski d5b3e6af00 More documentation of arguments in mod_admin_extra 2016-02-09 16:33:32 +01:00
Evgeniy Khramtsov 4839ba5ae4 XEP-0013: Flexible Offline Message Retrieval support 2016-02-09 17:59:54 +03:00
Paweł Chmielowski 2bca8d5121 Remove remanants of pre-binary strings 2016-02-09 15:50:35 +01:00
Christophe Romain 583476380a Use muc_online_room record for pattern matching 2016-02-09 15:33:00 +01:00
Paweł Chmielowski c0da9b43ce Better presentation of result description in docs 2016-02-09 13:18:01 +01:00
Paweł Chmielowski 30d171e79e Start documenting arguments in mod_admin_extra commands 2016-02-09 13:03:40 +01:00
Paweł Chmielowski d36c351fc7 Typo in markdown generator 2016-02-09 13:03:40 +01:00
Holger Weiss 10ed4a1c85 Add most status codes only to initial MUC presence 2016-02-08 20:10:20 +01:00
Badlop 04a315eb52 Fix section links to the Guide in the WebAdmin 2016-02-08 16:16:53 +01:00
badlop cf2f80bd09 Merge pull request #944 from cdroege/configureable_host-mod_register_web
Allow to modify host when deleting account or changing password over web
2016-02-08 13:48:11 +01:00
badlop ebd5ee36d9 Merge pull request #945 from nikolauspolak/master
Update German translation
2016-02-08 13:41:48 +01:00
Evgeny Khramtsov 2bfb619d19 Merge pull request #914 from weiss/mam-expose-jid
Expose occupant JID in MUC MAM messages whenever possible
2016-02-08 14:23:19 +03:00
Mickael Remond 6af9aa3de8 Add link to ProcessOne site 2016-02-08 11:50:04 +01:00
Mickael Remond 3af055fabe Link to Hex.pm 2016-02-08 11:34:52 +01:00
Mickael Remond ed30bd64cd Preparing to release beta package on hex.pm 2016-02-08 10:54:05 +01:00
Mickael Remond 0b1620a45c Remove compile warnings 2016-02-08 10:50:28 +01:00
Holger Weiss bf49c292f8 Omit redundant check for overcrowded MUC room
The send_update_presence/4 function already checked whether the room is
overcrowded before calling send_update_presence1/4, so there's no need
to have send_new_presence/4 perform the same check.
2016-02-08 00:46:33 +01:00
Holger Weiss 8098f7d9a8 mod_mam: Don't let outcasts access MUC archive
XEP-0313 says: "A MUC archive MUST check that the user requesting the
archive has the right to enter it at the time of the query [...].  In
the case of open MUC rooms, the MUC archives can generally be accessed
by any users [...] who do not have an affiliation of 'outcast'".
2016-02-08 00:16:02 +01:00
Holger Weiss a31f59ea31 XEP-0198: Fix session timeout corner case
If the "resend_on_timeout" option is set to 'if_offline' and a pending
stream management session is terminated because a new session is opened
by the same resource (while no other resource is online), resend
unacknowledged messages rather than bouncing error messages.
2016-02-06 22:28:55 +01:00
Nikolaus Polak f44bf00e0d Update German translation 2016-02-06 09:25:39 +01:00
Badlop 7435ee464f Rename option to regexp_room_id for consistency with other options (#905) 2016-02-05 12:09:27 +01:00
HAMANO Tsukasa 268f0b30ec add room_id_regexp option 2016-02-05 12:09:18 +01:00
Christian Dröge 30388fa2bf Allow to modify host when deleting account or changing password over web 2016-02-04 21:31:16 +01:00
Pablo Polvorin 942072cf9d Make hibernate timeouts configurable
Two *global* options added:
c2s_hibernate and receiver_hibernate.

Default if not specified is 90000, the previous hardcoded value.
2016-02-04 15:45:29 -03:00
Mickaël Rémond e207d0af56 Merge pull request #943 from processone/deps-cleanup
Dependencies rework
2016-02-04 15:48:56 +01:00
Mickael Remond 89dda473cf Convert tests to Fast XML 2016-02-03 19:22:59 +01:00
Mickael Remond dfc29ea03c Switch to Fast XML module 2016-02-03 19:03:17 +01:00
Badlop 315fc9493e Handle spaces in vsn attribute of app file when installing deps (#940) 2016-02-03 17:45:27 +01:00
Mickael Remond 5539db37b6 Remove reference to p1_logger 2016-02-03 16:26:15 +01:00
Mickael Remond 71ee0d56fa Switch to fast_tls and update app names 2016-02-03 16:13:16 +01:00
Mickael Remond 9ae1371c6e Convert more dependencies to new repository / packages 2016-02-03 12:30:12 +01:00
Mickael Remond e83ae9e461 Proper name for included applications 2016-02-03 11:31:23 +01:00
Mickael Remond 0de222d998 Convert code to use Fast YAML 2016-02-03 11:30:48 +01:00
Mickael Remond b137ee3beb Move to new dependencies for SIP and STUN 2016-02-03 11:26:14 +01:00
Mickael Remond 99b5c5712c Move to new iconv package 2016-02-03 11:17:24 +01:00
Mickael Remond bad50b8dd1 Move database dependencies to new repository / modules 2016-02-03 11:10:11 +01:00
Mickael Remond ba11165fb4 Syntax highlight file + comment on rebar_elixir_plugin 2016-02-03 11:00:12 +01:00
Mickael Remond 9b837860cd Switch a few version to hex.pm version 2016-02-03 10:55:40 +01:00
Mickael Remond a457105831 Run ejabberd test on Erlang R18 2016-02-03 10:16:05 +01:00
Mickael Remond e8ba7bce24 Use stringprep app name 2016-02-03 10:12:25 +01:00
Christophe Romain 59c471aad5 Merge pull request #937 from Iperity/fix-presence-based-delivery
Fix presence-based delivery
2016-02-02 15:41:21 +01:00
Nathan Bruning 80fc34fb0c Fix presence-based delivery 2016-02-02 14:06:07 +01:00
Paweł Chmielowski fa55ac5c8f More strict checking for MUC initial presence 2016-02-01 12:09:58 +01:00
Paweł Chmielowski dc52ec904c Send presence with code 170 only in initial presence from MUC 2016-02-01 11:30:49 +01:00
Evgeniy Khramtsov d3ee2a9c18 Add 'import_prosody' command 2016-01-29 14:30:50 +03:00
Evgeniy Khramtsov 54dc2f56c6 Import privacy lists from Prosody 2016-01-29 14:14:08 +03:00
Richard ae77b1300a change mod_ping Timers using maps instead of dict 2016-01-29 00:07:38 +08:00
Evgeniy Khramtsov b20db3b736 Initial version of migration script from Prosody to ejabberd 2016-01-28 14:23:51 +03:00
Paweł Chmielowski aaa84dc118 Need extra line before ## in markdown 2016-01-27 11:42:13 +01:00
Louis Pilfold d89bbba181 Remove empty and unused module 2016-01-26 21:25:34 +00:00
Paweł Chmielowski 239b1c6f74 Always use lagger 2016-01-26 14:34:58 +01:00
Christophe Romain b2c6e397fc Set set utf8mb4 charset on mysql connection 2016-01-26 13:47:24 +01:00
Paweł Chmielowski 621dff7307 Add header to generated markdown file 2016-01-26 10:46:38 +01:00
Paweł Chmielowski bdeb4a7e32 Add a way to get all ejabberd_commands, not only those that was registered
This is part of (TECH-1828).
2016-01-26 10:00:28 +01:00
Mickael Remond fc2d5da112 Merge branch 'master' of github.com:processone/ejabberd 2016-01-25 23:28:33 +01:00
Mickael Remond 28569d6209 As default, attempt to add path to Elixir 2016-01-25 23:28:27 +01:00
Paweł Chmielowski 22696e8388 Geenarte markdown that is acceptable by docs.ejabberd.org processor 2016-01-25 16:51:54 +01:00
Mickael Remond 6c499f510b Merge branch 'master' of github.com:processone/ejabberd 2016-01-25 10:47:29 +01:00
Mickael Remond 0b492f43fe If lager is false, we will use p1_logger 2016-01-25 10:47:20 +01:00
Badlop 60175784f0 Updated Portuguese-Brazilian translation (thanks to Otávio Fernandes) 2016-01-24 19:59:53 +01:00
Mickael Remond 14c0ff1c82 Add missing description 2016-01-24 10:19:28 +01:00
Mickael Remond a7e3df4fec Merge branch 'master' of github.com:processone/ejabberd 2016-01-24 10:07:25 +01:00
Mickael Remond 67b5162df9 Prepare hex.pm release 2016-01-24 10:07:12 +01:00
Paweł Chmielowski a2a692d081 Merge pull request #919 from hamano/rename_timestamp_function
rename timestamp function #917
2016-01-24 07:51:25 +01:00
Mickael Remond dae41ec183 ejabberd will handle Mnesia start
Mix need to know if must not autostart Mnesia before ejabberd
2016-01-23 19:00:22 +01:00
Mickael Remond 0920511de2 lager is the default logger, we need to reverse the define flag
Also make sure that configure without option does not force lager to false
2016-01-23 18:57:29 +01:00
Mickael Remond e97195b3a6 Mix requires override 2016-01-23 18:44:38 +01:00
Mickael Remond a3931e6b73 lager is the default logger, we need to reverse the define flag 2016-01-23 18:43:06 +01:00
Mickael Remond 7cc951ab1b Make sure all version are consistent before big repositories changes 2016-01-23 18:42:16 +01:00
Mickael Remond dae1ec2b7b Make sure mix does not trigger conflict on p1_utils 2016-01-23 17:36:40 +01:00
Mickael Remond f933cae2d6 Update Elixir dependency to latest p1_utils and cache_tab 2016-01-23 17:29:18 +01:00
HAMANO Tsukasa 5a85b0fb52 rename timestamp function #917 2016-01-23 17:58:10 +09:00
Christophe Romain a189655f31 Add missing ref key 2016-01-21 12:56:03 +01:00
Badlop 42f86e7c3b Fix order of arguments references 2016-01-20 19:43:12 +01:00
badlop 3d42be5394 Merge pull request #915 from fotock/master
Update translations
2016-01-20 19:38:54 +01:00
Shelley Shyan 46a85d3f9b Merge pull request #1 from fotock/fotock-patch-1
Update zh.po
2016-01-21 01:02:28 +08:00
Shelley Shyan e2c1368e0e Update zh.po
Translated untranslated. Fixed fuzzy messages. Other fixes.
2016-01-21 01:01:14 +08:00
Shelley Shyan 3d3034cd11 Update zh.po
to be continued
2016-01-20 23:07:45 +08:00
Holger Weiss b62607037a mod_mam: Expose MUC occupant JID in more cases
Include the occupant JID with MUC MAM messages if the room is not
anonymous, and also when the MAM user sent the MUC message himself (not
just in the case where he is a room moderator).
2016-01-20 00:02:40 +01:00
Badlop 278d8a6fcd Fix fuzzy tag in correct string 2016-01-19 22:34:58 +01:00
Christophe Romain 2ddbd032ee Add error handling to send_stanza 2016-01-19 16:16:04 +01:00
Holger Weiss 5e4ed4266d mod_mam: Strip existing JID tags from MUC messages
Strip any pre-existing <x/> tags which have an <item/> child with a
'jid' attribute from MUC MAM messages.  This way, if such a tag exists,
clients can be sure it was added by mod_mam.
2016-01-19 00:39:10 +01:00
Badlop 3feceb8279 Update Czech translation (thanks to Jan Pinkas) 2016-01-18 19:09:58 +01:00
Badlop 6b775fb9a1 Update Walon translation (thanks to Pablo Saratxaga) 2016-01-18 18:44:55 +01:00
Badlop 05bc0d4d17 Update Ukrainian translation (thanks to Oleg Deordiev) 2016-01-18 18:44:50 +01:00
Alexey Shchepin a150bf8fdc Make C2S session establishment optional (ECS-11) 2016-01-18 16:33:57 +03:00
Holger Weiss bd383fb8c1 mod_mam: Remove unused code
This mod_mam version doesn't store groupchat messages in user archives,
and it also doesn't support the "store_body_only" option.
2016-01-18 13:27:29 +01:00
Paweł Chmielowski 9741dba51f Update polish localisation 2016-01-18 13:18:40 +01:00
Paweł Chmielowski ee1cf939c5 Make --disable-debug work again 2016-01-18 13:10:28 +01:00
Holger Weiss 0125870f92 Merge remote-tracking branch 'processone/pr/907'
* processone/pr/907:
  don't escape ERL_OPTIONS
2016-01-17 00:08:30 +01:00
Holger Weiss 63777f830d Use maps instead of dicts in HTTP upload modules
ejabberd currently depends on Erlang/OTP 17.1 or higher, so we can now
use maps.
2016-01-16 01:30:22 +01:00
badlop 6ac839dd76 Merge pull request #906 from hamano/stats_processes
add stats processes command
2016-01-15 19:26:23 +01:00
badlop c31875cad0 Merge pull request #911 from hamano/ja
update japanese translation
2016-01-15 19:21:53 +01:00
HAMANO Tsukasa 7ab3b0d793 update japanese translation 2016-01-16 00:35:23 +09:00
HAMANO Tsukasa ad448efa1d update japanese translation 2016-01-16 00:15:24 +09:00
Evgeniy Khramtsov c8bc6cecdc Fix records in mod_muc.hrl 2016-01-15 15:46:07 +03:00
Evgeniy Khramtsov 33b67f54ba Include mod_muc.hrl 2016-01-15 15:45:16 +03:00
Evgeniy Khramtsov a83c5a8f3a Do not redefine records 2016-01-15 15:44:50 +03:00
Evgeniy Khramtsov 1d452c98c1 Describe option type of 'domain_balancing' 2016-01-15 14:32:10 +03:00
Badlop 09ab01084d Update Spanish and Catalan translation 2016-01-15 12:27:22 +01:00
Badlop fc1237963a Update translations files 2016-01-15 10:40:49 +01:00
Holger Weiss ddaa409ee2 XEP-0198: Let MAM take care of pending messages
If a stream management session times out for a user who appears to be
using MAM, drop any unacknowledged messages rather than resending or
bouncing them.  This avoids duplicates or bogus error messages.

However, this is only done if the new mod_mam option "assume_mam_usage"
is set to 'if_enabled' or 'on_request'.  In the former case, a user is
assumed to be using MAM if archiving is enabled for his account.  In the
latter case, MAM usage is assumed only if archiving was explicitly
requested by the client, or if archiving was enabled by means of
mod_mam's "request_activates_archiving" option.
2016-01-15 01:08:22 +01:00
HAMANO Tsukasa b244bce49c don't escape ERL_OPTIONS 2016-01-15 00:30:40 +09:00
HAMANO Tsukasa 6cb1905f7c add stats processes command 2016-01-15 00:27:15 +09:00
Holger Weiss db04cdf2ca mod_mam: Sort messages returned by Mnesia
Sort the messages retrieved from an Mnesia archive before selecting the
subset limited by the <max/> value.  This makes sure the desired subset
of messages is sent to the client.
2016-01-14 02:27:02 +01:00
Holger Weiss 58c8fc5770 mod_mam: Limit result set page size
If the client doesn't specify a maximum number of messages to retrieve
per page, set a limit of 50 messages.  If the client specifies a limit
larger than 250, cap the number to 250 messages.

These limits aren't enforced for MAM v0.2 requests though, as that
version of the XEP doesn't require clients to support RSM.  The newer
revisions say that "a server MAY place a reasonable limit on how many
stanzas may be pushed to a client in one request.  Whether or not the
client query included a <set/> element, the server MAY simply return its
limited results, modifying the <set/> element it returns appropriately."
2016-01-14 02:12:28 +01:00
Holger Weiss 35ec0d58a4 mod_mam: Reject <index/>-based paging
If an <index/> is specified in the MAM request, reject the request
rather than ignoring the desired index and returning wrong results.
XEP-0059 says that the server "MAY return a <feature-not-implemented/>
error."
2016-01-14 01:39:19 +01:00
Holger Weiss 11afa45646 mod_mam: Remove unused variable 2016-01-14 01:15:11 +01:00
Holger Weiss 89f63a4fdf mod_mam: Check whether MUC message is desired 2016-01-14 01:13:16 +01:00
Holger Weiss 85f4f90b45 mod_mam: Support XEP-0313 v0.2 MUC archive queries 2016-01-14 00:58:48 +01:00
Holger Weiss 8117092e6a mod_mam: Respond to form requests
If the client requests a data form with the supported filters, return it
as per XEP-0313 v0.3 and newer.
2016-01-13 23:56:05 +01:00
Holger Weiss 89b1700279 mod_mam: Add 'from' attribute to <delay/> tag 2016-01-13 23:17:23 +01:00
Holger Weiss 9cd048c442 mod_mam: Improve binary comparison of message UIDs
Make sure the binary comparison performed when clients use message UIDs
to page through Mnesia archives yields correct results even if the
specified UIDs don't have the same number of digits as the UIDs of the
stored messages.  This way, MAM will continue to work as expected after
migrating from mod_mam_mnesia to mod_mam.
2016-01-13 23:01:51 +01:00
Holger Weiss 3dccc20d8b mod_mam: Add "delete_old_mam_messages" command
The new "delete_old_mam_messages" command allows for purging all MAM
messages of the specified type older than the specified number of days.
(Currently only implemented for Mnesia archives.)
2016-01-13 22:46:30 +01:00
Holger Weiss a61b0c303d mod_mam: Add "request_activates_archiving" option
Enabling "request_activates_archiving" tells mod_mam not to store any
messages for a user until his client issued a MAM request, regardless of
mod_mam's "default" option.  Once a MAM request is issued, messages are
archived as usual.
2016-01-13 21:38:08 +01:00
Holger Weiss 0183b2487e Advertise MUC MAM v0.4.1 in room JID's disco#info 2016-01-13 20:30:44 +01:00
Badlop f448ff608a Update copyright to 2016 (#901) 2016-01-13 12:29:14 +01:00
Evgeniy Khramtsov fd3e3a99c5 Log failed SQL requests 2016-01-13 14:13:32 +03:00
Evgeniy Khramtsov 776fe8b32a Fix MAM MUC for v0.4.1 2016-01-13 11:45:08 +03:00
Evgeny Khramtsov 04b3efd14c Merge pull request #900 from weiss/suppress-groupchat-error
Don't return error for blocked headlines and MUC messages
2016-01-12 14:07:58 +03:00
Holger Wei 64d96778b4 Don't return error for blocked MUC messages
If a message stanza is blocked as per XEP-0016 or XEP-0191, return an
error only if the type of the blocked message is "normal" or "chat".
This makes sure users won't be kicked from MUC rooms when blocking other
participants.

Closes #897.
2016-01-12 10:20:35 +01:00
Holger Weiss 3e1425b905 Merge remote-tracking branch 'processone/pr/899'
* processone/pr/899:
  mod_http_upload: Use application/octet-stream instead of text/html for security reasons
2016-01-11 12:38:51 +01:00
Evgeniy Khramtsov 65e6dfb9dd Do not fail on incorrect data coming from SQL (898) 2016-01-11 14:35:11 +03:00
Evgeniy Khramtsov c7931b4a4f CVE-2016-1232: Add Dialback Key Generation and Validation support (XEP-0185) 2016-01-11 14:22:17 +03:00
Matthias Rieber 0ad0fd2187 mod_http_upload: Use application/octet-stream instead of text/html for security reasons 2016-01-11 12:13:19 +01:00
Badlop 15245e9ec4 Update Hebrew translation (thanks to Genghis Khan) 2016-01-08 13:14:44 +01:00
Badlop c7b67ff00b Clarify a little more room error string (thanks to Genghis Khan) 2016-01-08 13:14:40 +01:00
Christophe Romain 00f502f6e9 Fix 'make install' to work on osx 2016-01-08 11:22:59 +01:00
Paweł Chmielowski 0d750ff169 Add version sufixes to application locations in 'make install' 2016-01-07 18:51:48 +01:00
Paweł Chmielowski 6d8263df15 Extract deps from rebar.config to use in reltool.config.script 2016-01-07 14:11:16 +01:00
Christophe Romain 006e96612c We need to checkout elixir first when elixir enabled 2016-01-06 16:03:10 +01:00
Christophe Romain 14815b9a45 Update mix deps 2016-01-06 12:27:43 +01:00
Paweł Chmielowski bbd428a0e1 Update deps in reltool.config.scripts 2016-01-06 12:08:20 +01:00
Holger Weiss e1539a11be mod_http_upload: Use full PUT URL for process name
Don't just use the "put_url" domain name, but also any path components
of the specified URL, to generate a mod_http_upload process name.  This
way, a single domain name can be used for multiple virtual hosts by
specifying a "put_url" such as "https://example.com/@HOST@/".
2016-01-06 00:12:36 +01:00
Holger Weiss 3f5a20c90a mod_http_upload: Rename variable for clarity 2016-01-05 22:06:34 +01:00
Christophe Romain efda70e73a Update dependencies 2016-01-05 16:00:47 +01:00
Badlop c01e3f24a5 Error converting times in mod_fail2ban (#889) 2016-01-05 12:29:21 +01:00
Paweł Chmielowski da45a064a8 Fix handling of some options in old style configs
This fixes issue #893.
2016-01-04 22:06:19 +01:00
Paweł Chmielowski 98bad73d56 Improve escaping of arguments passed to ejabberdctl
This fixes issue #804
2016-01-04 12:13:18 +01:00
Alexey Shchepin fb8a511365 Use crypto:rand_uniform instead of random:uniform 2016-01-04 13:59:37 +03:00
Holger Weiss 94c620cc27 mod_http_upload: Fix logging of file size mismatch 2016-01-04 01:01:14 +01:00
Holger Weiss fc013442bb ejabberdctl: Call erl without -pa argument
The path to ejabberd's ebin directories is now specified by setting the
ERL_LIBS variable.
2016-01-03 23:35:41 +01:00
Holger Weiss 5deb6a91f7 mod_admin_extra: Replace deprecated function calls 2016-01-02 21:27:48 +01:00
Holger Weiss b73678992b mod_muc_admin: Allow for setting MAM option
Fixes #890.
2016-01-02 20:57:01 +01:00
Badlop 91d205715e New send_stanza command (ejabberd_contrib#142) 2015-12-30 12:53:40 +01:00
Holger Weiss 1d2dc6cdc1 mod_muc_room: Replace deprecated function call 2015-12-29 11:11:50 +01:00
Holger Weiss 4cdb30d59e mod_mam: Use <stanza-id/> tags for deduplication
Use <stanza-id/> elements instead of <delay/> tags to check for messages
resent by the stream management code.  The <stanza-id/> element is
preferable, as it is added by mod_mam itself.
2015-12-29 09:54:48 +01:00
Badlop 48deb47021 Update translations 2015-12-28 15:09:49 +01:00
Badlop 0df6d7ae39 Improve explanation in registration page (#876) 2015-12-28 15:08:59 +01:00
Paweł Chmielowski a18a3dfbb1 Add commands for generating html or markdown documentation for commands 2015-12-28 12:20:06 +01:00
Evgeniy Khramtsov babb484cfc Restrict access to MAM archives for members-only rooms 2015-12-24 15:04:06 +03:00
Badlop f3cb5e0d77 Support binary strings in extract_translations 2015-12-23 20:54:40 +01:00
Badlop c42e026f9c Degenderise room error message (#747) 2015-12-23 19:34:23 +01:00
Paweł Chmielowski 1f4916041e Update set-dep-versions script to work with new rebar.config 2015-12-23 14:11:49 +01:00
Holger Weiss 8cf0d31ee9 Revert "mod_mam: Keep 'to' attribute for MUC MAM messages"
This reverts commit 0e330da2a6.  XEP-0313
says: "When sending out the archives to a requesting client, the 'to' of
the forwarded stanza MUST be empty".
2015-12-22 13:20:23 +01:00
Paweł Chmielowski cfe0aea219 Use built-in nif for integer_to_binary/binary_to_integer 2015-12-22 11:49:12 +01:00
Badlop 88c9991f90 Adding WEBIRC, custom realname & ident, ISO-8859-15 (thanks to iwalkalone69)(#877) 2015-12-21 16:20:20 +01:00
Alexey Shchepin d88d5d6807 Support presence_broadcast in default_room_options mod_muc option 2015-12-21 02:25:31 +03:00
Holger Weiss 2d22507636 ejabberd_http: Cope with large POST/PUT requests
gen_tcp returns 'enomem' if we try to receive more than 64 MiB.
2015-12-20 23:30:11 +01:00
Holger Weiss d039b9b72b ejabberd_http: Log debug message on receive errors 2015-12-20 23:26:57 +01:00
Paweł Chmielowski 48909bdbee Add --enable-latest-deps to configure
This option make 'rebar get-deps' command to always fetch latest versions
of deps that are developed together with ejabberd instead of using frozen
commit/branch/tag.
2015-12-18 17:20:41 +01:00
Paweł Chmielowski 99fdba0745 Convert rebar.config.script to more declarative format 2015-12-18 17:20:41 +01:00
Christophe Romain bb5a8a42c3 Fix pubsub virtual nodetree plugin 2015-12-17 10:16:17 +01:00
Christophe Romain 6957e892dd Fix last item message type as message attribute 2015-12-16 17:04:45 +01:00
Christophe Romain c8986ffa5e Use correct notification_type for last items (#827) 2015-12-16 16:19:35 +01:00
Alexey Shchepin c6798fc515 Add accept_interval option in ejabberd_listener 2015-12-16 17:26:44 +03:00
Christophe Romain 5ffdfdd95d Merge branch 'master' of github.com:processone/ejabberd 2015-12-16 13:01:12 +01:00
Christophe Romain 08b0530164 Don't read pubsub options when plugin does not use them
This also revert commit 6052f7b
2015-12-16 12:56:06 +01:00
Holger Weiss b5cc4a3a7d Remove "--enable-nif" flag
Specifying "--enable-nif" or "--disable-nif" when running ejabberd's
configure script has no effect anymore: NIF support is enabled by
default and can only be disabled by building the p1_xml dependency with
"--disable-nif".
2015-12-16 12:29:02 +01:00
Paweł Chmielowski bae333788b Add plugin for passing extra erl_opts flags to deps, and use it for hipe
This fixes #425 in github issue tracker
2015-12-16 12:23:13 +01:00
Holger Weiss 5fd1aa0d04 Advertise MAM in disco info for account/room JID
As per XEP-0313 version 0.2 and newer, advertise the MAM feature in the
service discovery information for the bare account (or MUC room) JID.

Some clients check the server's discovery information instead, so we'll
continue to advertise the feature there as well.
2015-12-16 00:08:23 +01:00
Holger Weiss 11ad96fced Use MUC domain for 'by' attribute of <stanza-id/>
Let mod_mam specify only the domain part of the room JID in the 'by'
attribute of <stanza-id/> tags.
2015-12-15 21:37:41 +01:00
Holger Weiss 0e330da2a6 mod_mam: Keep 'to' attribute for MUC MAM messages 2015-12-15 21:05:04 +01:00
Holger Weiss 5bb70e844d Fix mod_carboncopy configuration for test suite
The mod_carboncopy module doesn't have the "db_type" option.
2015-12-15 21:02:12 +01:00
Christophe Romain 6efdf78ce3 PubSub plugin for online users only 2015-12-15 16:23:04 +01:00
Christophe Romain 3b69d26368 Fix pubsub headers 2015-12-15 16:12:20 +01:00
Badlop 51b9dd029b Restore header in Hebrew translation file 2015-12-14 14:08:44 +01:00
badlop 2b00c13ad8 Merge pull request #875 from GreenLunar/patch-1
Update hebrew translation
2015-12-14 14:04:45 +01:00
GreenLunar a8683d5bcf Update hebrew translation
Minor corrections, enhancements, and refinements
2015-12-14 14:39:18 +02:00
Paweł Chmielowski 6052f7bfa8 Fix pubsub test error 2015-12-14 10:21:23 +01:00
Evgeniy Khramtsov 7d1c75d0e8 Use UTF8MB4 character set in MySQL tables 2015-12-11 16:13:48 +01:00
Pablo Polvorin aaa718741e Use BLOB instead of TEXT on mysql in stanza storage
Mysql 'utf8' do not support 4-bytes UTF8 chars.
Characters like 'KISS MARK' (U+1F48B) causes mysql
to cut the string at that point.
There is utf8mb4 encoding available on newer mysql
versions that do support 4-bytes utf8. But for storing
stanzas, that doesn't need to be indexed or searched or
inspected in any way,  it was easier to use BLOB
(the bytes stored are utf8 encoded anyway, like all XMPP),
and avoids the need to redefine indexes (as allowed size
is shorter on utf8mb4) or having mixed utf8 and utf8mb4
encodings on the same table.
2015-12-11 16:07:39 +01:00
Christophe Romain e3005f68e7 Remove undefined macro injected in 3bdd5d0d 2015-12-11 15:33:22 +01:00
Christophe Romain 8ee5f9fb6f Remove http supervisors 2015-12-11 14:13:24 +01:00
Christophe Romain 3bdd5d0d25 Remove receiver's supervisor 2015-12-11 14:11:44 +01:00
Christophe Romain 1a32f20c07 Disable use of multi-subscribe and subscription-option on standard plugins 2015-12-11 12:46:49 +01:00
Christophe Romain 6357ea1d5d Limit number of subscriptions per node and allow custom default node configuration 2015-12-11 12:46:44 +01:00
Christophe Romain 86a8606fd1 Virtual nodetree is not attached to any backend 2015-12-11 12:46:40 +01:00
Christophe Romain c4943cffe8 Follow pubsub configuration when using virtual nodetree 2015-12-11 12:46:35 +01:00
Christophe Romain 10c920ef13 Don't force max_items_node to MAXITEMS if not defined 2015-12-11 12:30:16 +01:00
Holger Weiss 469e93f37b mod_mam: Don't store resent messages
Make sure messages that were resent by the stream management code aren't
stored in MAM.
2015-12-09 22:44:45 +01:00
Holger Weiss e09afe367f Document XEP-0334 support 2015-12-09 22:28:44 +01:00
Evgeniy Khramtsov 4c47ee63f2 Do not forget to include xmlns in mam prefs response (#859) 2015-12-09 12:53:02 +03:00
Paweł Chmielowski be4d687a86 Fix problem with handling of old db entries in mod_mam 2015-12-09 09:47:03 +01:00
Holger Weiss 07baf2d973 Don't let "reopen_log" rotate files (EJAB-1243)
Make sure the "reopen_log" command really just reopens log files without
also rotating them.  For rotating log files, the new "rotate_log"
command can be used.
2015-12-08 22:48:04 +01:00
Holger Weiss 325c17f277 mod_mam: Update record field type 2015-12-08 22:21:39 +01:00
Holger Weiss 14609dbfa2 mod_mam: Remove unused code 2015-12-08 22:15:55 +01:00
Holger Weiss 59ba09826b mod_offline: Fix outdated comments 2015-12-08 21:58:54 +01:00
Holger Weiss 90fd7f3780 mod_offline: Honor <store/> hint
Ignore the "store_empty_body" option for messages that have a <store/>
hint as described in XEP-0334, version 0.2.
2015-12-08 21:46:36 +01:00
Alexey Shchepin c2f6bf0343 Improve muc#roomconfig_presencebroadcast support 2015-12-08 21:53:42 +03:00
Paweł Chmielowski 67f93b0d60 Don't keep 10 sec timeout that i used for testing... 2015-12-08 11:28:03 +01:00
Paweł Chmielowski 7a69dab596 Add ability to disable timeout for ejabberdctl command 2015-12-08 11:25:26 +01:00
Holger Weiss 5ce0b062ff mod_mam: Honor Message Processing Hints (XEP-0334) 2015-12-08 00:10:00 +01:00
Badlop 3e57850da7 If mod_register access_from is 'none', then don't advertise IBR (#857) 2015-12-07 18:30:52 +01:00
Paweł Chmielowski 95a9100623 Fix more places where random:seed is used 2015-12-07 16:48:29 +01:00
Paweł Chmielowski d0df7be722 Fix randoms.erl on R17 that don't have random:seed(integer()) 2015-12-07 16:37:40 +01:00
Paweł Chmielowski 5ac10d6555 Remove now() in pubsub code 2015-12-07 16:16:11 +01:00
Paweł Chmielowski 29db302808 More now() replacements 2015-12-07 16:09:48 +01:00
Paweł Chmielowski b9f751e099 Fix bug in last commit 2015-12-07 10:26:51 +01:00
Paweł Chmielowski 0a846d03bf More now() removal 2015-12-06 15:58:46 +01:00
Paweł Chmielowski 5c329a7699 Remove now() - part 1 2015-12-04 15:08:43 +01:00
Badlop daad71bc7e trusted_proxies option not parsed correctly (#860) 2015-12-04 13:14:39 +01:00
Holger Weiss ba916c3162 XEP-0198: Fix stanza counting corner case issue
Don't forget to count outgoing stanzas that are processed while the
ejabberd_c2s process is already waiting for stream resumption.
2015-12-02 19:25:10 +01:00
Badlop f9e12d900c No need for a top menu link as there's a top page link 2015-12-02 17:10:23 +01:00
Paweł Chmielowski c3888cb0ca Don't forget copying files that were compiled during make install 2015-12-02 12:40:49 +01:00
Badlop e412438aba When user joins logged room, he must be warned (EJAB-726) 2015-12-02 12:07:29 +01:00
Badlop 086fbc6a50 Only filter rooms in Service Disco when more than 100 (EJAB-343) 2015-12-02 02:32:25 +01:00
Badlop ff22782752 List in Service Disco non-empty rooms and provide Node for empty (EJAB-343) 2015-12-02 01:51:39 +01:00
Mickael Remond e5ae35c66b Update cache_tab app name 2015-12-01 19:17:51 +01:00
Evgeny Khramtsov 3397a9be5e Merge pull request #849 from weiss/discard-chat-states
mod_offline: Support discarding chat state notifications
2015-12-01 14:57:49 +03:00
Evgeniy Khramtsov f1ecbf80fb Fix archive preference retreiving (#848) 2015-12-01 14:06:23 +03:00
Christophe Romain 9eeee67da7 Webadmin console visual refresh (thanks to Marek Foss) (EJAB-1142) 2015-11-30 11:35:53 +01:00
Evgeniy Khramtsov 9cc5a5d467 Simplify external components configuration 2015-11-28 17:38:34 +03:00
Holger Weiss 44f5e411c5 mod_offline: Support discarding chat states
XEP-0160 says that standalone chat state notifications should not be
stored offline.  By default, mod_offline discards them now.

Closes #842.
2015-11-26 08:35:49 +01:00
Holger Weiss fee2530b1c Always use occupant JID as 'from' for room subject
When sending the room subject to a new participant, always use the
occupant JID that corresponds to the subject author as the 'from'
address.  It was already done this way when the subject was sent as part
of the room history.
2015-11-25 00:05:24 +01:00
Evgeniy Khramtsov 87fb5132be Make JID related functions from jlib.erl deprecated 2015-11-24 20:31:26 +03:00
Evgeniy Khramtsov 95265dd3ad Move JID related functions to jid.erl (#847) 2015-11-24 18:44:13 +03:00
Evgeniy Khramtsov 7eddfe073b Make Riak working on R18 2015-11-24 17:53:44 +03:00
Christophe Romain 16881597c9 Remove useless export_all flag 2015-11-23 12:03:08 +01:00
Christophe Romain f3ff660eae Export content_type/3 needed by mod_http_upload 2015-11-23 11:53:36 +01:00
Christophe Romain 4480749a52 Merge branch 'cluster_fix' 2015-11-20 14:52:36 +01:00
Christophe Romain b4ae1b63bc Allow longer command execution time 2015-11-20 10:39:32 +01:00
Christophe Romain 67a70b9107 Integrate join/leave cluster as ejabberd command 2015-11-20 10:39:27 +01:00
Evgeny Khramtsov 0e29307ad5 Merge pull request #840 from cenobites/mod_ping
Adding ping_ack_timeout in mod_opt_type configuration
2015-11-18 16:35:49 +03:00
Badlop 2659e2c4a0 Explain that reload_config only affects to ACL and Access 2015-11-18 13:25:19 +01:00
Nycholas de Oliveira e Oliveira 49a8de7c56 Adding ping_ack_timeout in mod_opt_type configuration
Avoid the error output

```
2015-11-18 12:02:40.297 [error] <0.37.0>@gen_mod:validate_opts:250 unknown option 'ping_ack_timeout' for module 'mod_ping' will be likely ignored, available options are: 'iqdisc', 'ping_interval', 'send_pings', 'timeout_action'
2015-11-18 12:02:40.334 [error] <0.37.0>@gen_mod:validate_opts:250 unknown option 'ping_ack_timeout' for module 'mod_ping' will be likely ignored, available options are: 'iqdisc', 'ping_interval', 'send_pings', 'timeout_action'
```

In setting mod_opt_type default, ping_ack_timeout parameter was added.
2015-11-18 10:25:01 -02:00
Badlop 2f9f4e6938 Fix example config about ejabberd_xmlrpc (#771) 2015-11-17 21:33:28 +01:00
Holger Weiss 43626f5c97 mod_http_upload: Return error atoms, not strings
Don't convert error atoms to strings before actually logging them.  This
avoids a bogus error message when a user who has no uploaded files is
removed.
2015-11-17 00:12:20 +01:00
Badlop 53d72bd85a Disable vJUD by default also in mod_vcard_ldap source code 2015-11-13 19:33:23 +01:00
Badlop f6d8f47451 Disable vJUD search in the default config and when not specified 2015-11-13 19:30:11 +01:00
Alexey Shchepin aa5caa30e2 Support for muc#roomconfig_presencebroadcast option 2015-11-12 19:53:10 +03:00
Paweł Chmielowski 3ee5195b7a Fix problem with pipelined http requests arriving in single packet
This fixes github issue ejabberd#835
2015-11-12 17:23:59 +01:00
Holger Weiss 55a92c2983 mod_http_upload: Log message if URL looks wrong
Log an [info] message if a PUT request looks like the specified
"put_url" contains a path component that doesn't match the
"request_handlers" path, as in the following configuration:

  listen:
    -
      module: ejabberd_http
      port: 5444
      request_handlers:
        "/": mod_http_upload

  modules:
    mod_http_upload:
      put_url: "http://example.com/path/"
2015-11-11 22:51:40 +01:00
Holger Weiss 415a75c25a mod_http_upload_quota: Don't track all users
Don't track the disk usage of accounts that have an unlimited quota.
2015-11-10 22:08:16 +01:00
Holger Weiss 20709f9880 mod_http_upload: Make case indentation consistent
Use four spaces (or the corresponding amount of tab characters) for case
indentation everywhere in mod_http_upload and mod_http_upload_quota.
2015-11-09 19:23:52 +01:00
Holger Weiss 113c315857 mod_http_upload: Apply cosmetic changes 2015-11-09 19:12:08 +01:00
Holger Weiss 842db2ca15 mod_http_upload: Don't flatten command strings 2015-11-09 18:50:45 +01:00
Holger Weiss 9c80cb2b26 mod_http_upload: Don't let identify/1 return error
Let identify/1 return 'pass' when it failed to identify the file type,
as this doesn't (necessarily) indicate an error condition.  This also
makes it consistent with the return value of convert/2.
2015-11-09 18:41:31 +01:00
Paweł Chmielowski 58c1bc4276 Use xml_stream:reset() when possible 2015-11-09 16:05:09 +01:00
Evgeny Khramtsov de7422b372 Merge pull request #821 from scrogson/update_readme_openssl
Update minimum required OpenSSL version
2015-11-05 12:10:38 +03:00
Sonny Scroggin d252b9948c Update minimum required OpenSSL version 2015-11-04 23:21:08 -06:00
Christophe Romain 341be9b682 Remove supervisor option, disable it for c2s and muc 2015-11-04 16:24:35 +01:00
Holger Weiss fec7e47169 Add copyright and license to HTTP upload modules 2015-11-04 01:22:39 +01:00
Holger Weiss 46bf190fd0 mod_client_state: Add my email address to header 2015-11-04 01:19:19 +01:00
Paweł Chmielowski e54e543a66 Faster string_to_jid/1 implementation
This version is about 10-15% faster than old one
2015-11-03 14:41:01 +01:00
Holger Weiss ff46738218 mod_http_upload_quota: Omit info message
The mod_http_upload_quota module attempts to delete a directory whenever
it removes a file from that directory.  However, if thumbnail creation
is enabled, directories will often contain two files.  Therefore, don't
log an info (but only a debug) message if directory removal fails.
2015-11-03 00:00:44 +01:00
Holger Weiss 4566325241 mod_http_upload: Don't complain during shutdown
Ignore the case where, for some reason, no process is found to be
stopped.

Closes #810.
2015-11-02 23:46:58 +01:00
Holger Weiss 1b368a86b7 mod_http_upload: Use binary strings in most places
Switch to binary strings to fix a type issue, and for consistency.

Closes #808.
2015-11-02 23:46:31 +01:00
Holger Weiss 9d2f1d5f0d mod_http_upload: Check availability of ImageMagick
Log an error message during startup if the thumbnail option is enabled
but ImageMagick is not installed.
2015-11-02 01:12:10 +01:00
Holger Weiss eeb705fc2f mod_http_upload: Suppress error on non-image files
Don't log an error (but only a debug) message if ImageMagick fails to
indentify the file type for thumbnail creation.  The image might be
encrypted, or it could be a non-image file.

Closes #809.
2015-11-01 23:29:22 +01:00
Evgeniy Khramtsov 8bff06bea9 Merge branch 'master' of github.com:processone/ejabberd 2015-10-30 17:20:50 +03:00
Evgeniy Khramtsov 99f506135b Fix ipv6 configuration processing (#803) 2015-10-30 17:20:32 +03:00
Paweł Chmielowski 2814dd2cb8 Merge pull request #801 from nanoz/patch-1
feat(ejabberdctl): Foreground option for docker
2015-10-29 19:46:18 +01:00
Arno B bee767158d feat(ejabberdctl): Foreground option for docker
Docker needs services to run in foreground.
2015-10-29 19:39:21 +01:00
Holger Weiss 915383e150 mod_http_upload: Add missing trailing dot
(Thanks to Matthias Rieber.)
2015-10-29 10:09:55 +01:00
Holger Weiss 43e7814714 mod_mam: Update supported XEP version 2015-10-28 23:53:53 +01:00
Holger Weiss 32fe74c923 mod_http_upload: Document protocol support 2015-10-28 23:52:33 +01:00
Paweł Chmielowski f112a91321 Copy elixir files in copy-files makefile target 2015-10-28 18:12:39 +01:00
Christophe Romain 1d5a441ce8 Revert "set dependencies versions for 15.10"
This reverts commit a497cdff5e.
2015-10-28 16:07:00 +01:00
Christophe Romain a497cdff5e set dependencies versions for 15.10 2015-10-28 15:53:12 +01:00
Holger Weiss 47b17acbaf ejabberdctl.cfg: Document CONTRIB_MODULES_CONF_DIR 2015-10-26 22:46:58 +01:00
Holger Weiss 788049be7b ejabberdctl: export CONTRIB_MODULES_CONF_DIR 2015-10-26 22:42:07 +01:00
Holger Weiss 62ea763089 mod_http_upload: Fix string()/binary() type issue 2015-10-26 22:32:12 +01:00
Holger Weiss 3e7ee6af6d mod_http_upload: Add/fix function specifications 2015-10-26 22:30:58 +01:00
Holger Weiss b5a09f8b15 mod_http_upload: Strip newline from command output
The list_to_integer/1 function doesn't cope with trailing newline
characters.
2015-10-26 22:10:32 +01:00
Holger Weiss 5dfd95e5a7 Support user quotas for HTTP File Upload
mod_http_upload_quota implements two features:

- When a "hard quota" is exceeded during a file upload, old files are
  removed until the disk usage equals or falls below the "soft quota".

- Once a day, all uploaded files (and directories) older than a
  configurable number of days are deleted.
2015-10-26 13:10:10 +01:00
Evgeniy Khramtsov 6f2e178de1 Rename badly entitled record field 2015-10-26 15:05:28 +03:00
Evgeniy Khramtsov 137a4ee087 Add HTTP File Upload support (XEP-0363) 2015-10-26 14:10:55 +03:00
Evgeniy Khramtsov b2eb9f197a Don't crash on certificates without extensions (EJAB-1724) 2015-10-23 18:41:35 +03:00
Christophe Romain 2a115a83d2 Let modules_update_specs report failures (#756) 2015-10-23 17:21:19 +02:00
Evgeny Khramtsov 1472bd398a Merge pull request #790 from gardenia/mod_ping_configurable_ack_timeout
Configurable ping ack timeout for mod_ping
2015-10-22 21:00:08 +03:00
Mickaël Rémond c6f48022a4 Merge pull request #781 from scrogson/master
Fix-up mix.exs; Include mix.lock
2015-10-22 18:50:11 +02:00
colm d048d1e619 mod_ping: allowed the ping ack timeout (the length of time taken to deem that a ping has not being responded to) configurable. it still defaults to 32 seconds as per the constant IQ_TIMEOUT (in ejabberd_local.erl) this just makes it optionally configurable (in my case I needed to be more trigger happy than 32 seconds) 2015-10-22 13:48:40 +01:00
Christophe Romain efdf5636be Add simple metrics module for use with grapherl 2015-10-22 14:02:26 +02:00
Evgeny Khramtsov 81a7ca7b1e Merge pull request #789 from gardenia/mod_shared_roster_remove_resource_in_push_from
Don't send full JID in 'from' of Roster Push (RFC 6121 section 2.1.6)
2015-10-22 13:50:36 +03:00
colm 92b9fb30e0 Don't send full JID in 'from' of Roster Push (RFC 6121 section 2.1.6). This is a patch by @badlop in the comments of github issue #367 2015-10-21 23:22:53 +01:00
Badlop c62bd0c911 Use homogeneous s2s connections stats (#761) 2015-10-21 12:51:22 +02:00
Alexey Shchepin 8a2fa62cac Remove access_commands 'unrestricted' option, use [] instead. Fix unauthenticated calls to commands with policy=user. 2015-10-20 17:20:13 +03:00
Paweł Chmielowski 2d22d6061e Pass {C,CPP,LD}FLAGS used in main ./configure call to invocations from deps 2015-10-20 15:23:23 +02:00
Alexey Shchepin 7c1e7e5b5f Improve access_commands option backward compatibility 2015-10-19 20:16:04 +03:00
Alexey Shchepin 1f2b7e8f20 Fix access_commands option handling 2015-10-19 18:50:44 +03:00
Paweł Chmielowski 06701b126b Make COPY_template compatible with gmake 3.8 2015-10-19 16:39:08 +02:00
Holger Weiss ff4a00b1f3 Let Travis CI test "make install" 2015-10-19 14:23:37 +02:00
Paweł Chmielowski 97a93263c1 Make install should work even without having DESTDIR set 2015-10-19 13:47:01 +02:00
Holger Weiss 28e28e926a ejabberd_listener: Fix ETS update on port reuse 2015-10-18 01:14:48 +02:00
Holger Weiss 5e467b96a1 ejabberd_c2s: Let stop/1 close XEP-0198 sessions
The stop/1 function now terminates stream management sessions
immediately, just as it does for other sessions.  The new
ejabberd_c2s:close/1 function can be used to close the socket without
terminating the stream management session, like stop/1 did before.
2015-10-17 23:15:31 +02:00
Holger Weiss 53bd0ee818 ejabberd_c2s: Close socket when waiting for resume
Make sure the socket is closed when mod_ping calls ejabberd_c2s:stop/1
for an XEP-0198 session.
2015-10-17 22:07:29 +02:00
Paweł Chmielowski 70606667c6 Use OTP directory structure for 'make install' 2015-10-15 15:08:45 +02:00
Paweł Chmielowski 7d99484859 Make KEEPALIVE_QUERY list as this is what sql_query/3 expects 2015-10-15 10:07:24 +02:00
Sonny Scroggin 35c33a8a29 Improve line lengths; use spaces in between commas. 2015-10-14 22:52:27 -05:00
Sonny Scroggin 98c172aed6 mix.lock should be commited to ensure consistent builds. 2015-10-14 22:50:28 -05:00
Sonny Scroggin 25f95d6954 This dependency was removed in 83dd79a 2015-10-14 22:49:47 -05:00
Alexey Shchepin 4fce1a17d7 Fix cyrsasl_oauth:mech_new call 2015-10-12 20:53:52 +03:00
Christophe Romain 1578f17eff Remove obsolete sasl init 2015-10-12 10:41:07 +02:00
Evgeniy Khramtsov 87273619a6 Advertise MAM (XEP-0313) v0.4 support in room disco 2015-10-11 19:43:24 +03:00
Paweł Chmielowski b5ac0db895 Be able to merge old style configs with {listen,...} 2015-10-08 13:07:00 +02:00
Paweł Chmielowski 6d25db6600 Handler module shouldn't be used for differentiating listeners when merging configs 2015-10-07 16:45:07 +02:00
Christophe Romain 880114a909 Enforce get_allowed_items_call 2015-10-07 16:40:37 +02:00
Christophe Romain 653105a44f Fix acl issue from cleanup 2015-10-07 15:12:15 +02:00
Christophe Romain f938c2a5e2 Revert "Avoid crypto:hmac/3 call for R15B compatibility"
This reverts commit 31e356c126.
2015-10-07 14:18:56 +02:00
Christophe Romain 6a23cad454 Revert "Fix compilation on Erlang R15B"
This reverts commit a5d6044448.
2015-10-07 14:18:47 +02:00
Christophe Romain 6aeb9dcb38 cosmetic cleanup 2015-10-07 14:18:38 +02:00
Christophe Romain 83dd79a6a7 Remove unused dependency 2015-10-06 11:06:04 +02:00
Evgeniy Khramtsov 6378c673df Avoid MAM dups when routing to multiple resources 2015-10-02 16:09:55 +02:00
Evgeniy Khramtsov c7750689e8 Fix force_update_presence 2015-10-02 16:06:47 +02:00
Mickael Remond 41d65f8fe2 We want oauth2 to be supported as default in Elixir environment 2015-10-02 10:40:55 +02:00
Paweł Chmielowski 24fa95fd60 Fix problem with --auth in ejabberd_ctl:process2/2 2015-10-01 21:09:03 +02:00
Paweł Chmielowski 67d3b50598 Switch macros resolving in config files to be global instead of per file 2015-10-01 14:34:48 +02:00
Mickaël Rémond df39fec5d0 Merge pull request #753 from scrogson/add_links
Add License and Links for display on hex.pm
2015-09-29 22:37:15 +02:00
Mickaël Rémond 152d80827a Merge pull request #755 from scrogson/fix_ejabberd_directory_name
Use lowecase directory name for lib/ejabberd
2015-09-29 22:36:02 +02:00
Sonny Scroggin 9c82f160e5 Use lowecase directory name for lib/ejabberd 2015-09-29 14:08:39 -05:00
Evgeny Khramtsov 189267c1a1 Merge pull request #754 from scrogson/gitignore
Ignore mnesiadb and _build
2015-09-29 21:27:49 +03:00
Sonny Scroggin 59b6a46f82 Ignore mnesiadb and _build 2015-09-29 13:21:35 -05:00
Sonny Scroggin 6b81a1ed90 clean up whitespace 2015-09-29 13:19:35 -05:00
Sonny Scroggin b63c51c245 Add additional package information for hex.pm 2015-09-29 13:18:49 -05:00
Paweł Chmielowski 704844fd2a Temporary switch to fork of oauth2 that compiles with r18 2015-09-29 15:34:02 +02:00
Christophe Romain 3fc1d8ca9a Set version 15.09 for mix 2015-09-29 14:21:57 +02:00
Badlop d08f73da47 Recompile translations 2015-09-29 08:19:44 +02:00
Alexey Shchepin cf975da8f2 Update several commands for recent ejabberd_commands changes 2015-09-28 15:29:25 +03:00
Paweł Chmielowski 846b520edc oauth uses jiffy so fetch it unconditionally 2015-09-28 10:08:27 +02:00
Alexey Shchepin 88a206400a Add oauth_access option 2015-09-25 19:48:53 +03:00
Badlop 1781a58929 Strip Nick element in message stanzas sent to a room (#686) 2015-09-25 17:00:00 +02:00
Paweł Chmielowski e2cc45933f Enable oauth unconditionally 2015-09-25 16:39:47 +02:00
Christophe Romain 5eab6e315e Revert "Remove "--enable-json" flag"
This reverts commit 5bb137940c.
This is needed for mod_http_api
2015-09-25 16:09:46 +02:00
Christophe Romain a1129dc96b Add OAuth support (thanks to Aleksey) 2015-09-25 15:49:07 +02:00
Christophe Romain 7cf904f4cf Merge pull request #742 from joudinet/master
Allow root to run join_cluster and leave_cluster
2015-09-25 14:20:37 +02:00
Badlop deccf91280 Fix calling problem introduced when reducing bashisms (#748) 2015-09-25 13:35:03 +02:00
badlop 825f4fcc35 Merge pull request #748 from joudinet/bashisms
Remove bashisms in {join,leave}cluster scripts
2015-09-24 19:26:03 +02:00
Badlop ee456cc2af Fix regression introduced when code was binarized (EJAB-641) 2015-09-24 17:21:14 +02:00
Johan Oudinet 1f4d8fd4d7 Remove bashisms in {join,leave}cluster scripts
So they can run in any POSIX shell, not bash only.
2015-09-24 15:32:06 +02:00
Holger Weiss 484fd1f51f Log TLS errors as [debug] messages only
Closes #652 and closes #679.
2015-09-24 12:00:59 +02:00
Evgeniy Khramtsov 89b3471742 Add <stanza-id/> (XEP-0359) to archived messages 2015-09-22 21:15:34 +03:00
Johan Oudinet c360326cdb Allow root to run join_cluster and leave_cluster
Prefix the call to joincluster and leavecluster in ejabberdctl by
$EXEC_CMD. Avoid using sh -c in these scripts.

Should fix #676.
2015-09-22 17:07:39 +02:00
Paweł Chmielowski 3300c8d994 Set disable caching headers in http-bind responses (EJAB-1643) 2015-09-22 15:42:57 +02:00
Paweł Chmielowski e289344972 Nameprep host name passed to http-bind before using in (EJAB-1658) 2015-09-22 15:42:57 +02:00
Christophe Romain 23a1aceac0 Improve external module configuration management (EJAB-1746) 2015-09-22 12:49:55 +02:00
Evgeniy Khramtsov 70b1dc479c Add MAM (XEP-0313) v0.4 support 2015-09-22 12:23:36 +03:00
Christophe Romain e57c1896f7 Avoid wrong failing cases on make install (#468) 2015-09-21 17:51:13 +02:00
Jerome Sautret df3862cf84 Add set_loglevel command (EJABS-2524) 2015-09-21 17:07:44 +02:00
Christophe Romain 497cbb3ec2 Merge branch 'master' of github.com:processone/ejabberd 2015-09-18 09:06:51 +02:00
Christophe Romain ec1969ddca Remove unused functions from old get_items api 2015-09-17 18:00:17 +02:00
Paweł Chmielowski a1a7beb24d Make sure that lager is first on our deps list 2015-09-17 17:59:13 +02:00
Paweł Chmielowski f6b892b366 Guard against passing undefined C2SPid to xml parser before become_controller gets called
Our new nif xml parser don't handle this gracefully, so we better don't
call it that way.

This is only triggered on old style ssl sockets, where ssl layer must
be activated early, before association between socket and c2s is
established
2015-09-17 11:37:01 +02:00
Holger Weiss 4a4065c9c6 Let BOSH/WebSocket support "max_resume_timeout"
Allow for specifying the "max_resume_timeout" option in an ejabberd_http
listener for ejabberd_http_bind and/or ejabberd_http_ws.
2015-09-17 00:33:08 +02:00
Evgeny Khramtsov 5d11a19087 Merge pull request #736 from quanzhuo/master
Comment unused type, unused term
2015-09-16 18:22:19 +03:00
Quan Zhuo ae51277316 Comment unused type, unused term 2015-09-16 22:52:36 +08:00
Paweł Chmielowski 5593ebbbca Properly handle define_macros in merged config files 2015-09-16 12:20:07 +02:00
Mickael Remond a8d6439a4b Update French translation 2015-09-16 11:33:00 +02:00
Mickael Remond 18d3329f8f Update French translation 2015-09-16 11:14:20 +02:00
Paweł Chmielowski e6279123e5 Update polish translation 2015-09-16 11:08:21 +02:00
Holger Weiss 59321ac56e XEP-0198: Improve handling of non-message stanzas
When an XEP-0198 session times out, always return an error for
unacknowledged IQ stanzas, and always drop presence stanzas.  That is,
the "resend_on_timeout" option no longer applies to those stanzas types,
but only to messages.
2015-09-15 22:42:22 +02:00
Evgeniy Khramtsov ab857b1a5e Improve MSSQL schema 2015-09-14 14:05:07 +03:00
Evgeniy Khramtsov fc7d3a44b8 Simplify MSSQL configuration 2015-09-13 18:34:10 +03:00
Evgeniy Khramtsov 25791cfde8 Fix MSSQL support 2015-09-13 18:31:49 +03:00
Christophe Romain 48c5e73321 ext_mod must be started before ejabberd_config 2015-09-11 15:14:12 +02:00
Badlop 8c1864eca1 Update German translation (thanks to Nikolaus Polak) 2015-09-11 13:22:52 +02:00
Badlop df08253e91 Update Hebrew translation (thanks to Isratine Citizen) 2015-09-10 21:25:12 +02:00
Badlop a50f00f9e8 Include ext_mod modules when checking accepted options (ejabberd-contrib#116) 2015-09-10 20:11:02 +02:00
Christophe Romain 8fd9670da2 typo fix 2015-09-10 12:21:50 +02:00
Badlop 4d19ef55b6 Update Esperanto and Dutch translations (thanks to Andreas van Cranenburgh) 2015-09-08 21:40:00 +02:00
Mickael Remond 6b79bcdc97 Merge branch 'master' of github.com:processone/ejabberd 2015-09-07 17:56:09 +02:00
Mickael Remond 73932fb507 Fix typo 2015-09-07 17:55:54 +02:00
Badlop 5a9f1b9bba Update Brazilian Portuguese translation (thanks to Otávio Fernandes) 2015-09-07 17:46:50 +02:00
Badlop 7b230e7e44 Update Japanese translation (thanks to Tsukasa Hamano)(#729) 2015-09-07 17:46:05 +02:00
Mickael Remond 420cf68ecd Use our own includes + includes from all dependencies 2015-09-07 17:35:58 +02:00
Badlop 64d1efa6f2 Update Catalan and Spanish translations 2015-09-07 15:06:57 +02:00
Evgeniy Khramtsov 9195fc5573 Update Russian PO file 2015-09-07 15:21:42 +03:00
Badlop 5d59a534a3 Run "make translations" and get updated PO files 2015-09-07 13:37:54 +02:00
Badlop 096d56235b Fix German translation (thanks to STPKITT)(#726) 2015-09-07 13:16:56 +02:00
Paweł Chmielowski f56a9e400d Pass stream management options defined in http listener to http-bind and websocket 2015-09-04 12:42:53 +02:00
Holger Weiss 5095fdb6b0 New XEP-0198 option: "max_resume_timeout"
In the past, the "resume_timeout" option defined both the default resume
timeout and the maximum resume timeout clients are permitted to request.
Admins might want to allow clients to request a timeout value that's
larger than the default, though.  This can now be done by specifying the
"max_resume_timeout" option.
2015-09-03 21:20:15 +02:00
Badlop 8d1ea87e02 Use hide_sensitive_log_data in eldap.erl 2015-09-03 16:28:21 +02:00
Mickael Remond a85a8dff45 Merge branch 'master' of github.com:processone/ejabberd 2015-09-02 17:02:20 +02:00
Mickael Remond 06193d18b8 Better to keep config file in a different config directory 2015-09-02 17:02:09 +02:00
Evgeniy Khramtsov 6740b1f0e1 Rename idna.erl to ejabberd_idna.erl (#702) 2015-09-02 16:02:46 +03:00
Mickaël Rémond 608661d8c0 Merge pull request #725 from processone/elixir-mix
Allow building an ejabberd release with mix and elixir release manager
2015-09-02 14:25:43 +02:00
Badlop 1bc2c8cbb1 Add verification of hide_sensitive_log_data global option 2015-09-02 13:46:03 +02:00
Evgeniy Khramtsov eebd4bbd8f Remove unused function now_to_iso/1 2015-09-02 14:13:23 +03:00
Mickael Remond 4ae7c81cfa Allow building ejabberd with Elixir mix and building and ejabberd OTP release 2015-09-02 12:49:19 +02:00
Mickael Remond e179727a0e ignore ejabberd release result directory 2015-09-02 12:48:19 +02:00
Mickael Remond 79d3b77de1 Update mix.exs to comply with exrm release system 2015-09-02 11:38:16 +02:00
Mickaël Rémond 87f39c8750 Update mix.exs
Fix version number.
2015-09-02 10:54:24 +02:00
Mickael Remond b6bf1eba42 Upgrade version number to ejabberd 15.07
We forgot before previous release
2015-09-02 09:11:06 +02:00
Evgeniy Khramtsov 14ddbce3a9 Do not forget to set from/to when fetching from MUC history 2015-09-01 12:35:51 +03:00
Paweł Chmielowski e24bfe7b62 Fix problem with merging same port, different ip listeners in config files
Also switch to function used by ejabberd_listener to extract that
information instead of rolling our own code for that.
2015-09-01 10:57:48 +02:00
Evgeniy Khramtsov 190f76c676 Fetch MUC MAM messages from room history directly if it's not enabled in room configuration 2015-09-01 11:52:08 +03:00
Holger Weiss 9f62426343 Update MAM tests to always expect RSM in response 2015-08-30 23:26:37 +02:00
Evgeny Khramtsov 3ed75890cb Merge pull request #721 from oxpa/muc_admin
get_room_options will not crash in case of query for a non-existent room
2015-08-28 15:23:00 +03:00
oxpa 3d5d1ecbe4 get_room_options will not crash in case of query for a non-existent room 2015-08-28 03:34:51 -08:00
Holger Weiss 5bb137940c Remove "--enable-json" flag
The "--enable-json" flag currently has no effect.
2015-08-27 22:16:11 +02:00
Evgeniy Khramtsov 832f6d39f9 Always include RSM in final message 2015-08-24 13:29:15 +03:00
Evgeniy Khramtsov 94444c87e8 Remove MAM archives on MUC room destroy 2015-08-24 13:28:58 +03:00
Badlop 247bd9eae5 More eye-candy mod_http_bind help page (thanks to Marek Foss) 2015-08-21 15:23:15 +02:00
Evgeniy Khramtsov 6177ae3ffb Improve S2S certificate checks 2015-08-20 01:04:56 +03:00
Evgeniy Khramtsov b570070834 Fix case clause during S2S certificate checks 2015-08-19 23:47:45 +03:00
Evgeniy Khramtsov 775cf2d459 Change namespace from muc#admin to muc#user 2015-08-19 15:31:35 +03:00
Paweł Chmielowski 6f0ee83317 Don't overwrite listeners for different transports in config merging
Before this having listeners on same port for both tcp and udp would after
config merging step left only one of them.

Many thanks to Holger Weiß for noticing this.
2015-08-19 10:14:39 +02:00
Paweł Chmielowski f89db30d77 Catch errors when calling inet:peername in ejabberd_http 2015-08-17 15:50:35 +02:00
Holger Weiss 6d16029716 Let ejabberdctl handle more shell metacharacters
Closes #704.
2015-08-15 17:01:47 +02:00
Holger Weiss 3efd0ebc5a configure.ac: Don't insist on Erlang/OTP >= 17.5
The current ejabberd code works on Erlang/OTP 17.1 or newer.  We now
also let Travis CI test this version in addition to 17.5.
2015-08-13 13:06:05 +02:00
Badlop ac6b436dcf Prettify copyright links (thanks to GreenLunar)(#692) 2015-08-13 12:22:14 +02:00
Badlop 994602c97d Store and retrieve "mam" value in room configuration 2015-08-12 20:28:23 +02:00
Badlop 279d4b00ac Fix and document create_rooms_file and destroy_ 2015-08-12 17:18:41 +02:00
Badlop 8c9c556f1f Changed API of some mod_muc_admin command arguments
With this commit, arguments change in two commands:
* destroy_room: does not require Host argument
* send_direct_invitation: instead of Room, now requires Name and Service
2015-08-12 13:26:24 +02:00
Badlop ab0f488dda Room response to disco#info node muc#traffic should be an error (EJAB-741) 2015-08-12 12:40:51 +02:00
Paweł Chmielowski 2392f09e99 Ejabberd now requires erlang R17+ 2015-08-12 11:53:54 +02:00
Evgeniy Khramtsov 40feed723d Add support for MUC MAM 2015-08-08 22:15:36 +03:00
Paweł Chmielowski c71d57a05d Handle merging of append_host_config as is done for host_config 2015-08-06 17:53:18 +02:00
Paweł Chmielowski 5a1ac4faf1 Add ability to override main config file options with data from included files 2015-08-06 17:12:15 +02:00
Christophe Romain 45a312a0eb Remove obsolete pubsub migration command 2015-08-06 16:57:04 +02:00
Holger Weiss d9caa51c12 Merge branch 'typo' of https://github.com/sezuan/ejabberd 2015-08-06 08:57:10 +02:00
Matthias Rieber f5e857a5bd typo 2015-08-06 08:44:15 +02:00
Alexey Shchepin 4125dfd166 mod_multicast changes:
- catch exceptions
- do ets:give_away for multicastp table on init
- don't send multicasts to itself
- don't check user@server for multicast support
- handle empty disco items
- ignore cdata in <addresses/>
- properly check for subdomains
2015-08-05 19:21:28 +03:00
Paweł Chmielowski 3a5dd51b42 Use websocket pings also on old style connections 2015-08-05 16:09:23 +02:00
Christophe Romain dc0934bff7 Update FSF address 2015-08-05 09:52:54 +02:00
Holger Weiss c0497d46af mod_client_state: Throttle stanzas by default
Enable the mod_client_state options "drop_chat_states" and
"queue_presence" by default.  These features are now well-tested in
practice.
2015-08-05 00:05:11 +02:00
Holger Weiss 13f7be682d Rename muc_filter_packet to muc_filter_message
The hook is just triggered on groupchat messages, not on other types of
stanzas.
2015-08-04 21:16:45 +02:00
Evgeny Khramtsov 6e61932765 Merge pull request #696 from weiss/muc-presence-hook
New hook: muc_filter_presence
2015-08-04 22:14:18 +03:00
Holger Weiss 3d4e8ffac6 New hook: muc_filter_presence
Add a hook that allows for modifying or dropping presence stanzas sent
to MUC rooms.
2015-08-04 20:13:00 +02:00
Mickael Remond e3b7d43b76 Add split_jid/1
This is a convenience reverse of make_jid/1. It allows extracting the jid parts
without relying on using the jid record structure, to abstract details.
2015-08-04 09:48:59 +02:00
Evgeniy Khramtsov f377992232 Do not crash SIP authentication on SCRAMed passwords 2015-08-02 14:47:45 +03:00
Alexey Shchepin dfe3082445 Update crypto calls 2015-07-30 19:17:53 +03:00
Evgeny Khramtsov a9a235c376 Merge pull request #682 from weiss/no-mam-carbons
Don't carbon-copy messages of type "normal" without body
2015-07-30 17:11:56 +03:00
wcy123 3e49bf0e83 bug fix: ejabberd:start_app need to pass Type to application:start 2015-07-30 18:57:59 +08:00
Holger Weiss 04094b3dcf Don't copy messages of type "normal" without body
Don't carbon-copy messages of type "normal" that don't have a body
element as an immediate subtag.  Those messages are usually generated by
clients or servers (as opposed to messages written by humans).  This
includes MAM messages, for example.
2015-07-28 21:34:02 +02:00
Holger Weiss 8fe930c3d1 Also check for <no-storage/> hint
Check for the <no-storage/> and <no-permanent-storage/> hints in
addition to <no-store/> and <no-permanent-store/>.  XEP-0334 (0.1)
mentions both variants, and unfortunately, both of them are in use.
2015-07-28 21:08:33 +02:00
Holger Weiss 1048e21643 XEP-0198: Don't add <delay/> tags to IQ stanzas 2015-07-28 21:00:12 +02:00
Badlop 0dbedb69a6 Recompile translations 2015-07-27 11:45:04 +02:00
Badlop 5788609e5c Updated Spanish translation 2015-07-27 11:43:31 +02:00
Badlop 5305b4a82c Updated Hebrew translation (thanks to Isratine Citizen) 2015-07-27 11:41:38 +02:00
Badlop d03d08539b Reuse some strings in WebAdmin's Listening Ports 2015-07-27 11:40:56 +02:00
Paweł Chmielowski 76104cd117 Fix problem with merging values from multiple config files 2015-07-24 15:46:08 +02:00
Christophe Romain e211bf7131 Ensure config snippet is loaded at module installation (EJAB-1741) 2015-07-24 15:09:57 +02:00
Christophe Romain 32fc586c08 Allow contribution to include .yml or .yaml config file 2015-07-24 14:30:31 +02:00
Christophe Romain 8fedc945bf Allow migration of old pubsub items with xmlelement in body (#479) 2015-07-24 13:44:01 +02:00
Christophe Romain d481017746 Merge pull request #642 from weiss/pep-on-caps-update
Also send PEP notifications when local contact updates CAPS
2015-07-24 12:07:22 +02:00
Badlop 19aad464da Provide command for ODBC's convert_to_scram 2015-07-23 13:16:15 +02:00
Paweł Chmielowski 8df134e025 Don't crash web admin when displaying info about websocket using users 2015-07-22 11:54:11 +02:00
Christophe Romain 9091fcb1a1 Let nodetree call default flat plugin now
this fix mistake from previous commit 311fedaa
2015-07-22 11:20:06 +02:00
Christophe Romain 9aa2d92d90 Allow include of simple dependencies (EJAB-1737)(#391)
Either contributed module include dependencies this way
  deps/
    dep1/
      src/
      include/
    dep1/
      src/
      include/

Or includes rebar.config or rebar.config.script:
In this case, only git is supported (if git command available)
and ext_mod checkout code in deps directory.

In both case, only basic built procedure is supported. ext_mod
does not do more than bare compilation like this:
erlc -I include src/*erl
2015-07-22 10:48:44 +02:00
Christophe Romain 311fedaa12 Let flat be default plugin (#609) 2015-07-22 10:37:26 +02:00
Christophe Romain 9c36a9df78 Do not init nodes from mod_pubsub (#609)
Let each plugin do its own initialisation in init_plugins
init_nodes was an old function to be removed.
2015-07-22 08:03:27 +02:00
Christophe Romain b47a27f3ac Merge pull request #608 from weiss/bare-jid-subscription
PubSub: Check for node subscription of bare JID
2015-07-22 07:58:34 +02:00
Evgeny Khramtsov 531638e946 Merge pull request #632 from weiss/increase-max-ack-queue
XEP-0198: Increase default value of "max_ack_queue" option
2015-07-21 12:36:01 +03:00
Evgeny Khramtsov a724893887 Merge pull request #618 from weiss/muc-message-hook
New hook: muc_filter_packet
2015-07-21 12:35:27 +03:00
Evgeniy Khramtsov 7f4c74dec9 Print content types more gracefully 2015-07-17 14:29:11 +03:00
Evgeniy Khramtsov 44cc99d616 Get rid of 'db_type' for mod_blocking in test suite 2015-07-16 13:32:46 +03:00
Badlop 7395cc910e Set direction of resource and connection (#650) 2015-07-15 21:39:13 +02:00
Badlop c53d764119 If local guide.html file not found, redirect to the online guide 2015-07-15 20:45:55 +02:00
Badlop 3eb0b161b2 Update links to Guide in WebAdmin 2015-07-15 20:40:13 +02:00
Badlop 65551afcba Support RTL page direction in WebAdmin for Hebrew (#650) 2015-07-15 19:01:32 +02:00
Badlop f4376671ac Set LTR direction to Raw links (#650) 2015-07-15 18:51:31 +02:00
Badlop c012d7555b Add links in WebAdmin to ejabberd and ProcessOne (#661) 2015-07-15 13:10:12 +02:00
Badlop 9ede414f01 Support more mod_muc_admin translation strings (#659) 2015-07-15 11:54:35 +02:00
Mickael Remond 062d2d696f Update dev section to show erl command-line start command 2015-07-11 11:20:38 +02:00
Evgeniy Khramtsov a53191fed5 Add "complete" attribute to MAM final response (EJABS-2484) 2015-07-10 14:05:47 +03:00
Evgeniy Khramtsov 8e27decdfd Fix mod_mam compatibility with RSM for other backends 2015-07-10 13:59:33 +03:00
Evgeniy Khramtsov 0dfc8ade68 Fix tests related to MAM 2015-07-10 13:57:27 +03:00
Jerome Sautret 1db65e3614 Fix mod_mam compatibility with RSM (only with odbc backend). 2015-07-10 13:56:33 +03:00
Evgeniy Khramtsov a168340838 During halt only shutdown MUC rooms on local node 2015-07-08 15:35:26 +03:00
Jerome Sautret 6604b9efbb Fix MAM tests (EJABS-2480). 2015-07-08 15:34:34 +03:00
Jerome Sautret 2598375051 Changed mam iq get to set as specified by XEP-0313 v0.3 2015-07-08 13:15:14 +03:00
Holger Weiss 0f96414279 Trigger PEP notifications on CAPS updates
Let mod_pubsub send last items whenever a contact updates the entity
capabilities.  This was already done for remote contacts and is now also
done for local contacts.
2015-07-07 09:33:00 +02:00
Holger Weiss edb18deb8f mod_pubsub: Explain caps_update usage in a comment
The reason to use the caps_update hook for sending last items to remote
contacts is probably not obvious.
2015-07-06 23:45:25 +02:00
Mickael Remond 0770252e9b Fix dialyzer warning
The function is call with binary format from ejabberd_c2s.
2015-07-05 13:33:34 +02:00
Evgeniy Khramtsov b0453ea2ce Remove ehyperloglog dependency 2015-07-03 13:18:35 +03:00
Holger Weiss b7d7dc5201 XEP-0198: Increase timeout during resumption
Give gen_fsm:sync_send_all_state_event/3 a little more time to transfer
the (possibly somewhat large) c2s #state during session resumption.
2015-07-03 11:35:22 +02:00
Holger Weiss 5856f6d06a XEP-0198: Increase default "max_ack_queue" value
During login, clients might receive a relatively large number of stanzas
in one go.  For some users, the default value of the "max_ack_queue"
option turned out to be too small in that situation.
2015-07-03 11:35:22 +02:00
Holger Weiss a25051fead New hook: muc_filter_packet
Add a hook that allows for modifying or dropping MUC room messages.

Closes #491.
2015-07-03 11:34:44 +02:00
Holger Weiss 95138864f4 Let Travis grab MySQL 5.6 from repo.mysql.com
We need MySQL 5.6 or newer in order to get support for InnoDB FULLTEXT
Indexes.

Closes #624.
2015-07-03 01:21:22 +02:00
Holger Weiss 4045c848c4 Send notifications on MUC configuration changes
Notify clients when the room configuration changes, as mandated by
XEP-0045, #10.2.1.

Closes #623.
2015-07-02 00:36:16 +02:00
Evgeny Khramtsov 3267d4c923 Merge pull request #628 from joudinet/master
configure.ac: add AC_CONFIG_MACRO_DIR
2015-06-30 12:06:49 +03:00
Johan Oudinet 0e7d2b73be configure.ac: add AC_CONFIG_MACRO_DIR
Otherwise, autoconf fails to find extra macros defined in the m4
directory.
2015-06-30 10:53:45 +02:00
Mickael Remond 0474804d4b Version number must be SemVersion in mix
Semantic version expects versioning with 3 components
2015-06-29 23:32:00 +02:00
Mickael Remond 56034e6ed5 Use https url for git dependencies for consistency 2015-06-29 23:23:31 +02:00
Mickael Remond df57a07dd5 Keep the version hardcoded in mix.exs file
Generated the mix.exs file through configure is not possible when using mix, as
it does not run configure after having downloaded the dependencies.
#621
2015-06-29 23:14:18 +02:00
Evgeniy Khramtsov 3c12d1a960 Do not rely on behaviour info when doing config validation 2015-06-29 22:50:34 +03:00
badlop 87d6ad395f Merge pull request #620 from weiss/omit-non-anon-msg
Omit warning message regarding non-anonymous MUC room
2015-06-29 15:18:04 +02:00
Holger Weiss 7c7e51b6e8 Omit warning message regarding non-anonymous room
Previous versions of XEP-0045 suggested sending a warning message to new
occupants of a non-anonymous MUC room.  The current revision (1.25) says
that a status code of "100" must be returned with the user's initial
presence, instead.  We already do this (in addition to generating the
warning message).

Receiving the warning message each time the client joins the room can
become annoying, especially when reconnections occur frequently (e.g.,
on mobile devices).  So, we omit it, now.
2015-06-28 14:05:55 +02:00
Badlop 4ae1b4db03 When passwords are scrammed, report check_password_hash cannot work (#559) 2015-06-25 13:39:45 +02:00
Badlop 72f35a6dc6 Add xep definition to mod_mam 2015-06-24 11:58:37 +02:00
Evgeniy Khramtsov 83cce468a5 Add MAM (XEP-0313) support 2015-06-22 16:56:08 +03:00
Badlop 6631078884 Document a few more supported protocols 2015-06-22 13:11:37 +02:00
Holger Weiss fc0754c609 Add s2s_dhfile to list of known options 2015-06-20 00:14:54 +02:00
Holger Weiss 73a0fb418c Update comment that explains how to set up node_mb
Specify settings that make sense with current ejabberd versions, and use
the YAML configuration format.  Also, specify the "urn:xmpp:microblog:0"
namespace, as that's the microblogging node name currently defined by
XEP-0277.
2015-06-19 23:13:36 +02:00
Holger Weiss 04038c01f7 PubSub: Check for node subscription of bare JID
Don't just check whether the full JID is subscribed when a node
subscription is required to list or publish items.  If the bare JID is
subscribed, these requests are now also accepted.
2015-06-19 00:50:08 +02:00
Christophe Romain 4dc23a5d81 Allow several ';' passed in commands (#599) 2015-06-18 14:59:00 +02:00
Badlop 36a96ae3f5 change_room_option misses handling some room options #604 2015-06-18 13:13:49 +02:00
Christophe Romain d528457ba5 Don't force persistence if cache enabled (fix previous commit) 2015-06-18 12:54:46 +02:00
Christophe Romain e5a98b100d Fix max_items and don't let PEP depends on item cache 2015-06-18 12:06:29 +02:00
Badlop 1cf2dfe63a New hide_sensitive_log_data option to hide client IP in log (#452 #471) 2015-06-17 11:32:42 +02:00
Christophe Romain 3c47a5bb75 Allow password with ';' passed in ejabberdctl (#599) 2015-06-17 08:59:09 +02:00
Holger Weiss e608274243 Add s2s_dhfile option to configuration validator 2015-06-16 15:18:34 +02:00
Alexey Shchepin 2110b929bc Merge pull request #581 from weiss/dh-param-file
New options: dhfile and s2s_dhfile
2015-06-16 11:59:06 +03:00
Paweł Chmielowski dcf5aefea0 Add option to set net_ticktime (EJAB-1742) 2015-06-15 14:57:07 +02:00
Badlop 357ff6c8f7 Fix bug introduced in commit b88fa6f617 2015-06-04 15:47:02 +02:00
Badlop c04053cfae Use https instead of git in rebar file for dependencies url (#589) 2015-06-04 13:12:49 +02:00
Badlop fe10c6f6f2 Pick first local multicast service, otherwise remote (ejabberd-contrib#105) 2015-06-04 12:13:10 +02:00
badlop 7206bff4a4 Merge pull request #592 from weiss/omit-subject-body
Don't add body element to MUC subject messages
2015-06-04 11:04:05 +02:00
Holger Weiss 6c712b6caa Don't add body element to MUC subject messages 2015-06-04 09:55:38 +02:00
Evgeny Khramtsov faa4851dbf Merge pull request #591 from jpegger/patch-1
Anonymous authmodule not registering correctly anonymous users in DB
2015-06-03 20:42:00 +03:00
jpegger 6f48f22c71 Authmodule using old style XML:get_attr_s() 2015-06-03 18:11:35 +02:00
Evgeniy Khramtsov 9a9633dbc5 Do not ignore unknown options so far 2015-06-03 16:21:22 +03:00
Evgeniy Khramtsov c1119b1f39 Remove unused validation code 2015-06-03 16:05:17 +03:00
Evgeniy Khramtsov ab196b4b02 Move opt_type/1 function out of if-else block 2015-06-03 15:52:19 +03:00
Evgeniy Khramtsov 730fd55ec9 Fix typo 2015-06-03 15:45:15 +03:00
Evgeniy Khramtsov 0ae9ef2b41 Add missing options of ejabberd_logger to validator 2015-06-03 15:25:20 +03:00
Evgeniy Khramtsov 83faff37e5 Add missing options of mod_muc to validator 2015-06-03 15:18:09 +03:00
Badlop 4ed6a3d78f Fix commands export2odbc, connected_users_vhost and push_alltoall (#586) 2015-06-02 12:52:15 +02:00
badlop 0de7864880 Merge pull request #585 from CorCornelisse/master
push_roster* not updated on binarification
2015-06-02 12:24:46 +02:00
Evgeniy Khramtsov 157ff4d093 Merge branch 'master' of github.com:processone/ejabberd 2015-06-01 15:38:37 +03:00
Evgeniy Khramtsov fb6267f38e Add config validation at startup 2015-06-01 15:38:27 +03:00
Badlop 9a802185ad Fix anonymous user login, it wasn't stored in anonymous mnesia table 2015-06-01 14:34:49 +02:00
Evgeniy Khramtsov a9f7d9481f Do not try to fetch module options via eldap_utils 2015-06-01 15:22:31 +03:00
Evgeniy Khramtsov ea7de2097f Reorganize get_opt() code in some modules 2015-06-01 15:20:49 +03:00
Evgeniy Khramtsov 48213b09ce Get rid of some fuzzy macros as it makes syntax tools getting mad 2015-06-01 15:19:56 +03:00
Cor Cornelisse 22d9011c0c These arguments should be binary instead of strings, otherwise it won't work properly 2015-06-01 13:30:26 +02:00
Badlop 100827ec6e In xmlrpc use process_unicode_codepoints instead of list_to_binary 2015-05-29 15:49:12 +02:00
Evgeniy Khramtsov a291e7d4e6 Fix MUC room options vaildation 2015-05-29 12:08:36 +03:00
Christophe Romain 6cba7bf834 Add correct package version for mix (#577) 2015-05-29 09:30:16 +02:00
Evgeniy Khramtsov e8ffbbb0b4 Validate MUC room options from the configuration file 2015-05-28 11:42:17 +03:00
badlop 6a9c9616d0 Merge pull request #582 from badlop/master-badlop-578
An auth external module requires ext_mod to be started first (#578)
2015-05-27 13:49:20 +02:00
Badlop d0443bb714 An auth external module requires ext_mod to be started first (#578) 2015-05-27 13:10:15 +02:00
Holger Weiss 5585fb1ecf New options: dhfile and s2s_dhfile
Let admins specify a file that contains custom parameters for
Diffie-Hellman key exchange.
2015-05-26 21:06:04 +02:00
Christophe Romain b83c07251c Fix pubsub/odbc crash on remote user unsubscribe (EJAB-1483) 2015-05-26 19:19:57 +02:00
Alexey Shchepin b2f98099bb Merge pull request #569 from weiss/send-element-error-checking
Update send_element error checking (EJAB-1739)
2015-05-26 15:59:50 +03:00
Mickael Remond 9574e71e8d Include session record from header file instead of duplicating it 2015-05-26 10:08:46 +02:00
Paweł Chmielowski 3af507cc43 Fix merging of not yaml config files 2015-05-25 15:37:46 +02:00
Christophe Romain e54e556e01 Fix use of publish_only affiliation with odbc backend 2015-05-22 18:47:17 +02:00
Christophe Romain 90225a4744 Minor cosmetic changes and add ping command 2015-05-22 17:28:40 +02:00
Badlop 0d322d8dab Add fold markers to config file for Vim editors 2015-05-22 12:42:24 +02:00
Badlop be6ac85f31 A few more... Fix epmd not in PATH (#484)(thanks to acediac) 2015-05-22 10:40:24 +02:00
Badlop b07cb1ed84 Use namespace definitions when possible 2015-05-21 17:04:14 +02:00
Badlop 0c725b5fac Document protocol support (EJABS-1620) 2015-05-21 17:04:05 +02:00
Badlop 3b24923458 Fix dialyzer warning in mod_muc_admin:206 2015-05-21 12:00:41 +02:00
badlop b04f3a4c93 Merge pull request #573 from sezuan/fix_odbc
Fix some string/binary issues with non-native ODBC drivers
2015-05-21 11:31:47 +02:00
Christophe Romain 3188941af2 Add minor robustness on cluster scripts 2015-05-20 14:06:03 +02:00
Christophe Romain fcdb519770 Add missing sm table (thanks to Rasim Kalimullin)(EJAB-1740) 2015-05-20 13:50:59 +02:00
Evgeny Khramtsov 8985a47468 Merge pull request #576 from processone/revert-570-fix_added_sm_table_to_pg
Revert "added sm table to pg.sql"
2015-05-20 13:59:04 +03:00
Evgeny Khramtsov 05011e6918 Revert "added sm table to pg.sql" 2015-05-20 13:57:44 +03:00
Evgeny Khramtsov da68b9a572 Merge pull request #570 from sezuan/fix_added_sm_table_to_pg
added sm table to pg.sql
2015-05-20 13:46:02 +03:00
Holger Weiss 889459b45c Fix function specification 2015-05-20 12:13:15 +02:00
Christophe Romain 1854b5e411 Remove obsolete doc and win32 files (EJAB-1738) 2015-05-20 11:43:29 +02:00
Evgeniy Khramtsov 3b267eaa61 Do not bounce normal messages sent to unavailable resource 2015-05-19 10:58:36 +03:00
Holger Weiss fba13a0b93 Simplify XEP-0203 (Delayed Delivery) code a bit
Now that XEP-0091 support is removed, the XEP-0203 code can be
simplified a little further.  This doesn't change the behavior.
2015-05-18 21:26:51 +02:00
Christophe Romain 8bb994dbca Call integer_to_binary using jlib (#554) 2015-05-18 17:30:25 +02:00
Holger Weiss dfbef8be8f Remove XEP-0091 tags from test suite 2015-05-18 14:38:57 +02:00
Badlop 2af659b737 Remove deprecated XEP-0090 Entity Time and 91 Delayed Delivery (EJAB-849) 2015-05-18 12:38:25 +02:00
Matthias Rieber 16532dd643 Fixed some string()/binary() issues in ejabberd_odbc 2015-05-18 12:14:56 +02:00
Holger Weiss 555c1736b7 Revert "Fix EJABBERD_OPTS quoting for Elixir"
This reverts commit 2a15453d98.

The commit broke the case where 'log_rotate_date' is set to "$D0", for
example.
2015-05-18 00:48:56 +02:00
Evgeny Khramtsov e66b45d886 Merge pull request #571 from sezuan/fix_export_term
fixed erl_prettypr in encode_term
2015-05-17 22:44:14 +03:00
Matthias Rieber 0800a9733c pg - added sm table 2015-05-17 21:38:33 +02:00
Matthias Rieber f5c9dfbc93 fixed erl_prettypr in encode_term 2015-05-17 19:37:49 +02:00
Badlop 084d0c4efe New command get_room_options (#567) 2015-05-15 17:47:10 +02:00
Holger Weiss 61afd668c2 Fix indentation 2015-05-15 15:50:43 +02:00
Paweł Chmielowski de7ff536b2 Load config snippets for modules installed with ext_mod (EJAB-1741) 2015-05-15 12:30:15 +02:00
Paweł Chmielowski 5dbe7a3c6c Export modules_dir/0 2015-05-15 12:27:59 +02:00
Holger Weiss 6efce7f706 Cosmetic change: Simplify error checking
Let send_stanza_and_ack_req/2 update the #state instead of propagating
the value returned by send_element/2.  This doesn't change the behavior.
2015-05-14 01:04:23 +02:00
Holger Weiss 42c7205739 Don't assume send_element/2 returns ok or error
Let send_text/2 and (therefore) send_element/2 return {error, Reason}
instead of error for consistency, and let send_stanza_and_ack_req/2
interpret any non-ok value as an error.  (EJAB-1739)
2015-05-14 00:58:36 +02:00
Christophe Romain dbcfd38c18 Allow run joincluster as non root when ejabberd installed as root (#497) 2015-05-13 15:54:28 +02:00
Christophe Romain 09f5565ca0 Merge pull request #503 from weiss/fix-quoting-for-elixir
Fix EJABBERD_OPTS quoting for Elixir
2015-05-13 15:46:40 +02:00
Badlop d885435552 Fix setting 'description' with change_room_option command (#567) 2015-05-12 17:37:39 +02:00
Mickaël Rémond eca3b46ee1 Merge pull request #560 from benlangfeld/feature/dev-vm
Point out availability of development environment
2015-05-12 09:52:12 +02:00
Badlop f817762cc4 New max_users_presence mod_muc option (thanks to anhcoi123)(#562) 2015-05-08 13:09:25 +02:00
Badlop 25beb46391 Fix check_password_hash argument parsing (#559) 2015-05-08 12:04:04 +02:00
Badlop 7ab6c4b4fd Try to support access_commands in YAML (ejabberd-contrib#45) 2015-05-07 18:34:05 +02:00
Badlop b0b004b26e Revert "Add private and roster local handlers (EJAB-682)" due to #556
This reverts commit 2e194bd997.
2015-05-07 17:07:49 +02:00
Badlop f7d9bb7ce4 Don't announce register feature once user is authenticated (#41) 2015-05-07 11:41:59 +02:00
Ben Langfeld 917d48f30b Use SASL PLAIN authzid as client identity if auth module permits it
This allows the authentication modules to perform SASL proxy authentication. It puts the onus on them to authorize the authcid to masquerade as the authzid. Doesn't currently implement such functionality in existing auth modules, since they cannot currently codify a relationship between the two identities. Does not permit the authzid to use a domain differently from the one of the connection.

Note: digest might not work, but I have no interest in it, being deprecated.
2015-05-06 14:12:15 -03:00
Ben Langfeld d9814709e2 Remove commented code 2015-05-06 12:55:35 -03:00
Evgeny Khramtsov b0b3870b2e Merge pull request #561 from weiss/muc-mark-private
Tag private MUC messages with muc#user namespace
2015-05-06 13:56:13 +03:00
Holger Weiss 7297b23508 Tag private MUC messages with muc#user namespace
Make it possible for clients to identify private MUC messages.  One use
case would be to filter out undesired carbon copies of those.
2015-05-05 22:00:05 +02:00
Ben Langfeld 6eab111d05 Point out availability of development environment 2015-05-05 09:24:41 -03:00
Badlop fa99519f8b Simplify internal code of get_last and set_last commands 2015-05-05 12:54:20 +02:00
Badlop 96c62acb1b Improve get_last command to provide also last activity status 2015-05-05 12:46:21 +02:00
Badlop 77e57afae1 Fix set_last command to work with recent ejabberd (#555) 2015-05-05 12:45:53 +02:00
Evgeniy Khramtsov 60fe008268 Remove duplicated code 2015-04-29 14:51:45 +03:00
Christophe Romain 6987e85602 Improve module install code, allows better error checking 2015-04-29 13:30:03 +02:00
Badlop 7492ecae52 New command get_user_rooms 2015-04-29 13:22:49 +02:00
Christophe Romain 4440b03b89 Fix fetching from git@github url and allow compilation from ejabberd sources 2015-04-29 10:19:15 +02:00
Christophe Romain 01718a4e42 Merge pull request #549 from joudinet/master
ejabberdctl: define mnesia options
2015-04-28 17:34:57 +02:00
badlop 6f99775115 Merge pull request #547 from weiss/fix-account-jid-disco
Fix service discovery handling for account JIDs
2015-04-27 19:39:32 +02:00
Johan Oudinet bd43385415 ejabberdctl: define mnesia options
In addition to factorize how the mnesia dir option is given to erl
commands, it allows one to set extra mnesia options via the
MNESIA_OPTIONS environment variable.
2015-04-27 17:25:07 +02:00
Badlop 987e337c66 Rely on core routine for handling affiliation changes (thanks to Ben Langfeld)
This ensures that all of the usual stanzas and such go out
2015-04-27 17:00:22 +02:00
Holger Weiss dc449687a0 mod_disco: Apply minor readability improvements 2015-04-26 16:36:17 +02:00
Holger Weiss 0edba763fb mod_disco: Omit 'roster_get' call if possible
As a small optimization, avoid running the 'roster_get' hook in the
(common) case where a client requests service discovery information for
its own bare JID.
2015-04-26 16:32:03 +02:00
Holger Weiss 50f35f1b07 Fix service disco handling for bare account JIDs
Don't swap the sending and receiving JIDs while checking whether the
client that requested service discovery information for a bare account
JID is a subscribed contact.
2015-04-26 16:22:09 +02:00
Evgeniy Khramtsov 9c85cb5f25 Fix validating function for iqdisc 2015-04-23 14:59:18 +03:00
Christophe Romain 23aa8598ab Allow bypassing script interraction (#516) 2015-04-23 10:14:08 +02:00
Christophe Romain 38dd44e18f Improve purge_offline filter and speed (#543) 2015-04-22 18:11:39 +02:00
Christophe Romain df3afafb48 Add publish_only to affiliation type spec 2015-04-22 18:10:35 +02:00
Badlop 2e194bd997 Add private and roster local handlers to get listed in disco#info (EJAB-682) 2015-04-22 13:27:25 +02:00
Christophe Romain 43f2064daa Remove obsolete release notes 2015-04-22 12:21:48 +02:00
Badlop e280de8452 Allow to modify host when registering account in web (#291) 2015-04-22 11:01:47 +02:00
Christophe Romain 6e4d6caebf Add support for publish-only (#30) 2015-04-21 17:23:59 +02:00
Christophe Romain cf37f3977a Fix typo, oups... 2015-04-21 16:13:23 +02:00
Christophe Romain 61f80396da remove deferred Collection shim header 2015-04-21 16:11:00 +02:00
Christophe Romain cbd45974e2 Owner can subscribe to its node (#454) 2015-04-21 15:24:31 +02:00
Christophe Romain 747d25b4ad Fixed node type (thanks to saczawap) (#435) 2015-04-21 15:24:24 +02:00
Christophe Romain e0563e3918 PubSub improvements
This commit contains
- code cleanup
- use of db_type instead of old mod_pubsub_odbc
- some minor optimizations
- some minor bugfixes
2015-04-21 15:24:16 +02:00
Christophe Romain 63926efd20 Improve join/leave cluster scripts 2015-04-21 13:32:14 +02:00
Christophe Romain 28090a3958 Merge pull request #540 from weiss/queue-error-stanza
Add privacy error stanza to XEP-0198 queue
2015-04-21 11:19:49 +02:00
Evgeniy Khramtsov ed79a61752 Fix LDAP substrings filter (EJAB-1715) 2015-04-21 11:49:41 +03:00
Holger Weiss 94936b261e Add privacy error stanza to XEP-0198 queue 2015-04-20 22:03:18 +02:00
Alexey Shchepin fd54181435 Fixed error replying on blocked messages 2015-04-20 17:19:09 +03:00
Paweł Chmielowski e8576c23c5 Make s2s port configurable in test runner 2015-04-20 16:16:30 +02:00
Badlop c2e6ce0f04 Remove load_config command because is superseded by reload_config (#532) 2015-04-20 15:57:44 +02:00
Evgeny Khramtsov 837706e9d9 Merge pull request #536 from weiss/fail2ban-whitelist
Add mod_fail2ban option to whitelist IP addresses
2015-04-18 12:28:36 +03:00
Holger Weiss aa36742a40 mod_fail2ban: Add 'access' option for whitelisting
Closes #535.
2015-04-18 11:08:05 +02:00
Holger Weiss c01940f33c cyrsasl_scram: Return user name with error message
Let ejabberd_c2s run the 'c2s_auth_result' hook (which needs the user
name) on SCRAM authentication failure.
2015-04-17 20:21:11 +02:00
Holger Weiss afdc269825 ejabberd_s2s_out: Remove Erlang/OTP version check
The version check won't work for Erlang/OTP >= 17; and it's no longer
needed, as we don't support versions older than R16 anyway.
2015-04-16 23:51:16 +02:00
Holger Weiss b447839592 CSI test: Simplify and improve readability 2015-04-16 23:20:14 +02:00
Holger Weiss 01b3defb86 CSI test: Fix race when slave becomes active again
Make sure the server processed the slave's active request after the
previous test stanzas were received by the slave and before the final
Chat State notification is sent by the master.
2015-04-16 08:45:17 +02:00
Badlop d624753410 Update get_password_s description with SCRAM return values 2015-04-15 11:51:34 +02:00
Badlop a5adaf5798 Revert "Hook on group message"
This reverts commit b81250d667.
2015-04-15 11:51:29 +02:00
Paweł Chmielowski 63d6d68979 Make sure that server processed our inactive request before processing further in testing 2015-04-15 11:21:37 +02:00
badlop 31c5775025 Merge pull request #426 from hairyhum/master
Migration of scram passwords with piefxis (riak and internal only)
2015-04-15 11:04:29 +02:00
Paweł Chmielowski ba69c469b5 Remove http_poll module
For couple years browsers did limit ability to change cookies from js
for different domains, this made http_poll connections practically not
usuable. I don't think this module is used at all so it's time to put it
to rest.
2015-04-15 10:47:10 +02:00
Paweł Chmielowski a1f81057ca Enable websocket connection in default config file 2015-04-15 10:35:17 +02:00
Holger Weiss e408276283 Don't forget gen_tcp:listen/2 options
Fixes #530.
2015-04-14 20:22:34 +02:00
Badlop b67af5e036 Fix nick logging in mod_muc_log plaintext (#522) 2015-04-14 15:46:59 +02:00
Badlop 25449a076f Clean multicast routing code detected by xref 2015-04-10 16:02:45 +02:00
Paweł Chmielowski b9fdcc3985 Add ability to configure parameters used by "make test" with test/config.ctc 2015-04-09 17:14:30 +02:00
Paweł Chmielowski e8701802ee Give better error messages for tests failing on #...{} = recv() lines 2015-04-09 16:39:52 +02:00
Paweł Chmielowski 2797fa16a6 Show received input and expected input in ?recv* macros in case of failure
Throwing catch clause error is not that good for finding out what happened
2015-04-09 16:05:26 +02:00
Paweł Chmielowski 8732817c3c Fix problem with pushing bufferend #xmlel-s to receiver in websocket code 2015-04-09 13:35:37 +02:00
Badlop f129c6530c Fix bug when sorting the list of rooms in WebAdmin 2015-04-08 15:34:08 +02:00
Evgeniy Khramtsov 32b60d4250 Remove hack with binary to integer conversion 2015-04-08 16:11:06 +03:00
Evgeniy Khramtsov 7a89dda816 Merge branch 'master' of github.com:processone/ejabberd 2015-04-08 15:31:41 +03:00
Evgeniy Khramtsov 9b4942890d Add virtual host support for SQLite 2015-04-08 15:31:28 +03:00
Badlop 0cf8d1fa6e Copy multicast code from ejabberd-contrib to provide XEP-0033 (#521) 2015-04-08 14:01:16 +02:00
Evgeniy Khramtsov fb0e82f743 Add SQLite3 library checks at the configure script 2015-04-08 14:49:14 +03:00
Evgeniy Khramtsov 675c428f21 Disable awkward trap_exit flag 2015-04-08 14:40:28 +03:00
Evgeniy Khramtsov bdedcf8d8a Enable FOREIGN KEYS by default 2015-04-08 14:39:47 +03:00
Evgeniy Khramtsov 2a3a2d9804 Make sure SQLite always returns binaries 2015-04-08 14:38:04 +03:00
Evgeny Khramtsov 5a820aca40 Merge pull request #486 from saa/sqlite_support
Add SQLite support
2015-04-08 14:34:56 +03:00
Jerome Sautret c3280e9dad Add mod_muc_admin contrib. 2015-04-07 17:05:43 +02:00
Holger Weiss 0fd4984c23 ejabberd_listener: Remove Erlang/OTP version check
We don't support Erlang/OTP versions older than R16 anyway.
2015-04-07 09:47:05 +02:00
Evgeny Khramtsov b81b0d0be9 Merge pull request #518 from liudanking/master
fix otp version check in ejabberd_listener.erl listen_tcp/5
2015-04-07 10:34:18 +03:00
Mickael Remond c140f98276 Explicitly start crypto with start
This is to please Elixir / Phoenix enviroment
2015-04-07 09:03:37 +02:00
liudan f981a53f9a fix otp version check in listen_tcp/5 2015-04-07 09:28:35 +08:00
Holger Weiss 2a94c68724 Don't call send_element/2 if previous call failed
Be sure not to try sending data over a TCP socket that is no longer
usable.
2015-04-06 22:34:48 +02:00
Paweł Chmielowski 81b0643036 Fix problem with c2s buffering on old style websocket connections
Old style websocket do use binaries for transferring data to C2S, so when
we buffer that data we need to handle it different than list of #xml structs
used by new style connections.

This fixes github issue #515.
2015-04-06 17:54:45 +02:00
Paweł Chmielowski 64978b3d9c Merge pull request #513 from weiss/ignore-header-case
ejabberd_websocket: Ignore case of HTTP header values
2015-04-06 17:49:51 +02:00
Mickael Remond 34f8f6d868 Explicitely start crypto module
Without explicit start, it causes issue when embedding ejabberd into other apps.
2015-04-06 13:46:09 +02:00
Mickael Remond cc247c5510 Fix compilation result for asn1 files 2015-04-06 12:39:21 +02:00
Mickael Remond 1106afb2f6 Remove unused variable 2015-04-06 12:31:32 +02:00
Mickael Remond cf83a75ceb Fix asn1 module compilation with mix
This should solve building ejabberd as an Elixir dependency.
2015-04-06 12:29:11 +02:00
Evgeniy Khramtsov 69bff82301 Fix type spec 2015-04-06 12:38:54 +03:00
Mickael Remond 47537aa901 Make sure Mnesia dir environment and log file are list, not binary
This is useful for Elixir configuration, as binary is the more natural data type.
Closes #514
2015-04-06 11:36:16 +02:00
Holger Weiss 0cd77ab942 ejabberd_websocket: Ignore case of header values
RFC 6455 says that the client's opening handshake includes an Upgrade
header field "containing the value 'websocket', treated as an ASCII
case-insensitive value."

Closes #510.
2015-04-05 14:48:08 +02:00
Mickael Remond ea8db9967f ejabberd can be embedded in an Elixir application 2015-04-04 17:42:12 +02:00
Badlop 7d3b2cad26 Replace crypto calls that will be removed in a future release 2015-04-04 14:09:58 +02:00
Badlop cf40daf663 Replace undefined value with empty one (processone/ejabberd-contrib#92) 2015-04-04 13:48:17 +02:00
Holger Weiss 1fa73fd33f Remove unused case clauses to make dialyzer happy 2015-04-03 20:37:42 +02:00
Badlop 94761ff31e Improve srg_get_info result format (processone/ejabberd-contrib#92) 2015-04-03 12:16:11 +02:00
Paweł Chmielowski 088c5c4672 Fix output formatting in srg_get_info commend from mod_admin_extra 2015-04-02 16:55:51 +02:00
Paweł Chmielowski b580da3547 Fix problems with get_vcard* functions from mod_admin_extra 2015-04-01 16:32:34 +02:00
Paweł Chmielowski cf3b4dbc7b Drop exmpp usage from mod_admin_extra 2015-04-01 15:44:49 +02:00
Evgeny Khramtsov 305b281c15 Merge pull request #493 from weiss/rfc-6121-routing
Update ejabberd_sm's routing rules as per RFC 6121
2015-04-01 11:41:05 +03:00
Evgeniy Khramtsov 821039b7d5 Swap 'mnesia' and 'internal' types correctly 2015-03-30 12:25:25 +03:00
Evgeniy Khramtsov fb1fd50df5 The 'default_db' option should impact ejabberd_auth as well 2015-03-30 12:18:18 +03:00
Evgeniy Khramtsov 4af15df546 Add new 'default_db' option 2015-03-30 12:15:29 +03:00
Sergey Abramyan 15af88a09a Fix lite.sql and convert binary to integer 2015-03-27 22:14:29 +03:00
Badlop 176114d28e Try to fix more Dialyzer warnings 2015-03-27 15:55:57 +01:00
Badlop 9c96d30719 Ensure set_presence changes are kept in state (thanks to Davide Colombo)(EJAB-1184) 2015-03-27 15:03:14 +01:00
Paweł Chmielowski a8f2cbac75 Remove tools/configure.erl as it's not used and can cause problem with make install 2015-03-27 13:22:50 +01:00
Badlop 30dc82a98a Fix even more dialyzer warnings 2015-03-27 12:28:24 +01:00
Badlop 8707c0b045 Fix set_presence command (ejabberd-contrib#61) 2015-03-27 11:43:56 +01:00
Badlop 10dfd182f6 Fix more mod_admin_extra commands 2015-03-26 20:41:16 +01:00
Badlop 9b3dda105d Fix problems in process_rosteritems command 2015-03-26 16:18:39 +01:00
Badlop 392772977f Add mod_admin_extra as a commented module
Previous commits were done with:
for i in `git log --reverse --date-order --format=%h mod_admin_extra.erl`; do git format-patch -1 $i; cat 00* >>patch; rm 00*; done
Then editing patch to remove unneeded files and fix path.
2015-03-26 14:01:01 +01:00
Badlop fbb6b65192 Detect correctly when vCard does not exist (#21) 2015-03-26 14:00:58 +01:00
Badlop 0c30beb93d Fix return error when requesting non-existing vcard value (#21) 2015-03-26 14:00:54 +01:00
Mickaël Rémond c9393bc4f4 Ignore errors when retrieving status if the users just got offline
Fix possible race condition.
2015-03-26 14:00:50 +01:00
Holger Weiss 5103ed1c3b mod_admin_extra: Let send_message omit subject
Let the send_message command omit the subject if the user either
specified an empty subject or a message type of "chat".
2015-03-26 14:00:48 +01:00
Badlop 88cd8c7b12 Update FSF address (solves #73) 2015-03-26 14:00:46 +01:00
HAMANO Tsukasa 00fe68ed06 fix connected_users_info in mod_admin_extra 2015-03-26 14:00:44 +01:00
Holger Weiss 09dd288ac0 mod_admin_extra: Fix private_get/private_set types 2015-03-26 14:00:42 +01:00
Badlop 2186c03a9c Support TEL XXX in set and get_vcard commands 2015-03-26 14:00:40 +01:00
colm 441d48f080 Changed signature of user_sessions_info to take binaries rather than strings as it doesn't match anything in mnesia if it searches it by string 2015-03-26 14:00:38 +01:00
Badlop c3afc3c7c0 Join three send_message_* commands in one (PR #68) 2015-03-26 14:00:36 +01:00
HAMANO Tsukasa 9a64bfe605 add send_message_normal command 2015-03-26 14:00:34 +01:00
HAMANO Tsukasa ca25d44c8b fix mod_admin_extra stats command 2015-03-26 14:00:32 +01:00
Holger Weiss 4e9b4cbc11 mod_admin_extra: Fix stats(_host) argument types 2015-03-26 14:00:30 +01:00
Badlop 46b33b51b4 Update kick_session to work with ejabberd master 2015-03-26 14:00:28 +01:00
Sonny Scroggin 3eebf100f9 Binary conversions 2015-03-26 14:00:24 +01:00
Sonny Scroggin 5c0a1dde1c More binary conversions 2015-03-26 14:00:21 +01:00
Badlop 949705b04a Update add_roster_item and get_roster to ejabberd 13 2015-03-26 14:00:18 +01:00
Badlop f682dfe3a6 Fix get_vcard and set_vcard when using option module_resource (issue #21) 2015-03-26 14:00:16 +01:00
Sonny Scroggin 14a3662ca4 Fix add_rosteritem, delete_rosteritem, and get_roster 2015-03-26 14:00:14 +01:00
Badlop ffea2bf350 Update get_vcard and set_vcard to ejabberd 13 (fixes issue #21) 2015-03-26 14:00:12 +01:00
Rahul Gautam f314da7b1f mod_admin_extra: for support in ejabberd-v13.x changed args from string to binary : all changes tested with ejabberdv13.12 2015-03-26 14:00:10 +01:00
Badlop d72c739630 Fix command change_password (fixes #16) 2015-03-26 14:00:08 +01:00
Badlop 57035b383c Handle error when requesting information of a non-existing shared roster (fixes #14) 2015-03-26 14:00:06 +01:00
Badlop 2746e358b3 Fixes srg_* commands (fixes #147) 2015-03-26 14:00:04 +01:00
Badlop d66f40d94f Fix srg_create when calling ejabberd_regexp (fixes issue #12) 2015-03-26 14:00:01 +01:00
Badlop e6a9c5ccee Add get_last to ejabberdctl for last user activity (thanks to lehrblogger)
The logic for determining the response is borrowed from here:
https://github.com/processone/ejabberd/blob/6d811f5178e000def445e12deaa0d587004efc67/src/web/ejabberd_web_admin.erl#L1583-L1601
2015-03-26 13:59:59 +01:00
Badlop f0cf90c11e Initial import from ejabberd-modules SVN 2015-03-26 13:59:57 +01:00
Paweł Chmielowski de26af3fdb Make sure that we send each time <close> before closing websocket connection 2015-03-25 17:10:08 +01:00
Badlop d9ad26b4ec If command crashes, return restuple with error and explanation (ejabberd-contrib #21) 2015-03-25 13:57:08 +01:00
Holger Weiss f40e6a0421 Don't bother with filtering out PEP error messages
Now that ejabberd_sm won't deliver error messages that were sent to bare
JIDs anymore, PEP error messages should no longer arrive.
2015-03-25 02:02:08 +01:00
Holger Weiss 1b1878409f Route headlines sent to bare JIDs to all resources
As per RFC 6121, deliver headline messages that were sent to a bare JID
to all resources with a non-negative priority, not just to those with
the highest priority.  If no such resource is available, discard them
silently.
2015-03-25 01:17:35 +01:00
Holger Weiss 8f9a2d6df8 Don't route error/groupchat messages to bare JIDs
As per RFC 6121, drop error messages that were sent to bare JIDs, and
return an error if a groupchat message was sent to a bare JID.
2015-03-25 00:52:49 +01:00
Holger Weiss bc008d4041 Update routing for unavailable resources
As per RFC 6121, don't reroute non-chat messages sent to unavailable
resources.
2015-03-25 00:13:05 +01:00
Holger Weiss 33c9f21171 Return error when incoming message is blocked
As per XEP-0016 and XEP-0191, return a service-unavailable error when an
incoming message was blocked by a privacy list.  This lets the user
appear offline to the contact.
2015-03-24 23:10:47 +01:00
Holger Weiss 27a4d783a5 Fix "IP address not available" error message 2015-03-24 17:32:57 +01:00
Alexey Shchepin 736710cc9c Add support for ciphers and protocol_options in ejabberd_http 2015-03-24 18:14:47 +03:00
Christophe Romain 8f46ca48c1 export CONTRIB_MODULES_PATH (thanks to sezuan)(#489) 2015-03-24 16:00:56 +01:00
Christophe Romain b6999b126a Make R16B03-1 the minimal reguired otp version 2015-03-23 14:54:29 +01:00
Holger Weiss 31e356c126 Avoid crypto:hmac/3 call for R15B compatibility 2015-03-21 22:56:23 +01:00
Holger Weiss a5d6044448 Fix compilation on Erlang R15B 2015-03-21 22:06:38 +01:00
Alexey Shchepin 477d27a3dc Remove duplicate CREATE INDEX in mysql.sql 2015-03-21 23:41:43 +03:00
Christophe Romain 8b23727cc6 Start ext_mod before module as it's setup contrib path 2015-03-20 15:06:02 +01:00
Alexey Shchepin 5135e30633 Removed deprecated calls to crypto:sha_mac in scram.erl 2015-03-20 14:09:38 +03:00
Alexey Shchepin f6db84282b Add ejabberd_auth_odbc:convert_to_scram/1 2015-03-20 13:46:17 +03:00
Alexey Shchepin e575c87ea2 Add SCRAM support to ejabberd_auth_odbc 2015-03-20 13:45:24 +03:00
Alexey Shchepin 0eb6b942ff Add a missed SQL index on privacy_list_data table 2015-03-20 10:40:25 +01:00
Jerome Sautret 6b67a66a1b Added MySQL support for delete_old_messages (offline) command. 2015-03-20 10:40:19 +01:00
Evgeniy Khramtsov 4d2924a3ef Fix mod_offline termination 2015-03-20 10:40:13 +01:00
Alexey Shchepin b7726ee392 Explicitly set standard_conforming_strings to off with PostreSQL 2015-03-20 10:39:29 +01:00
Evgeniy Khramtsov 51508a9fc3 Report TLS errors 2015-03-20 10:39:14 +01:00
Sergey Abramyan 5ae01e8bb4 Add SQLite support 2015-03-20 01:10:47 +03:00
Christophe Romain 7976d3eb48 Fix epmd not in PATH (#484) 2015-03-18 22:26:06 +01:00
Holger Weiss 1dd23ecb41 Update 'rsm_in' record element types
The jlib:rsm_decode/1 function sets the 'max' and/or 'index' elements of
the returned 'rsm_in' record to 'error' if the parsed strings cannot be
converted to integer values.
2015-03-18 00:28:10 +01:00
Christophe Romain aa1250a3dd Add missing list_to_binary call 2015-03-13 17:59:19 +01:00
Christophe Romain 5b9635cc07 Add contributed modules code path on start 2015-03-13 12:20:25 +01:00
Christophe Romain 588f98fc3a Rename module function to keep them grouped on help 2015-03-13 11:54:32 +01:00
Christophe Romain 4a58101014 Merge pull request #473 from weiss/escape-space-in-options
ejabberdctl: Escape whitespace in ERL_OPTIONS
2015-03-13 11:41:26 +01:00
Holger Weiss 9bd47fde35 ejabberdctl: Escape whitespace in ERL_OPTIONS
If ERL_OPTIONS="-opt arg" is specified, make sure the space character
between "-opt" and "arg" is retained.

Fixes #143.
2015-03-13 11:40:23 +01:00
Evgeniy Khramtsov f72799b3cc Improve module structure 2015-03-13 13:05:16 +03:00
Evgeniy Khramtsov bbe5c6b74e Do not fail on badly formed SQL results 2015-03-13 12:59:16 +03:00
Evgeniy Khramtsov c7dc56c314 Fix unblock all when Riak is used as a backend 2015-03-13 12:47:08 +03:00
Christophe Romain 6093dedb65 Extra arguments to cluster scripts are not mandatory 2015-03-13 09:56:51 +01:00
Christophe Romain 85a478f7d1 Remove trailing space to get correct arguments
This allows to remove any argument to joincluster/leavecluster scripts
when no parameters has been added after the ctl command.
2015-03-13 09:47:12 +01:00
Holger Weiss 0cc4cad480 ejabberdctl: Escape whitespace in ERL_OPTIONS
If ERL_OPTIONS="-opt arg" is specified, make sure the space character
between "-opt" and "arg" is retained.

Fixes #143.
2015-03-13 09:27:55 +01:00
Holger Weiss 6447aeb726 Replace bashism in ejabberdctl 2015-03-12 19:29:41 +01:00
Paweł Chmielowski bf5c7198fc Update sockmod() type after adding websocket support 2015-03-12 13:15:31 +01:00
Christophe Romain 7209954a5f Remove unused clause 2015-03-12 13:15:07 +01:00
Paweł Chmielowski e855791f16 Update types to fix dialyzer warnings 2015-03-12 10:34:34 +01:00
Holger Weiss b045bd806a mod_offline: Remove a few superfluous newlines 2015-03-11 20:38:22 +01:00
Holger Weiss 0bfde19ebd Don't crash in mod_offline:export/1
(Thanks to Christophe Romain.)
2015-03-11 20:35:08 +01:00
Christophe Romain 2d53f7f83e start ext_mod in later stage at init 2015-03-11 17:39:07 +01:00
Christophe Romain a1a46f7df5 Remove unused code 2015-03-11 17:15:42 +01:00
Christophe Romain c9b82ff1e5 Compile contributed module with lager if enabled in ejabberd 2015-03-11 14:35:01 +01:00
Christophe Romain f77622067b Add packaging support for contributed modules
This is a preliminary version that is tested to work with the packaging
branch of ejabberd-modules repository

This version lacks automatic configuration include at runtime
2015-03-11 14:14:28 +01:00
Evgeniy Khramtsov a0fafc383a Add Redis backend for SM 2015-03-11 14:46:57 +03:00
Holger Weiss d991b92a49 Always specify room JID for MUC <delay/> elements
As per version 1.25 of XEP-0045, use the room JID as the 'from' address
for <delay/> elements also when the room is non-anonymous, and specify
the original JID of the sender as an XEP-0033-style tag instead.

Closes #465.
2015-03-10 00:02:32 +01:00
badlop 0a88255ef6 Merge pull request #467 from hamano/mod_offline_restart
change mod_offline restart type
2015-03-09 19:26:19 +01:00
Evgeniy Khramtsov c0540e1377 Fix R15B compilation 2015-03-09 17:50:14 +03:00
Evgeniy Khramtsov 72d9b099c6 Make it possible to use SQL as an SM backend 2015-03-09 16:41:13 +03:00
Evgeniy Khramtsov 36b7da3ad8 Add forgotten header file 2015-03-09 16:39:29 +03:00
Evgeniy Khramtsov 86e03f3828 Separate db backend from the SM 2015-03-09 14:57:33 +03:00
HAMANO Tsukasa f55de94314 change mod_offline restart type 2015-03-09 20:28:55 +09:00
Mickaël Rémond db9a400279 Merge pull request #466 from mremond/hooks_refactor
Hooks module refactor
2015-03-09 09:34:54 +01:00
Mickaël Rémond 8fef3d1f3f Reorganize / clean ejabberd_hooks header 2015-03-08 19:03:02 +01:00
Mickaël Rémond a339df2d6a More ejabberd_hooks refactor 2015-03-08 18:44:43 +01:00
Mickaël Rémond fd91ee5169 ejabberd_hooks refactor and better types 2015-03-08 18:23:22 +01:00
Mickaël Rémond 6b0bcfa5d7 Suppress warnings in Elixir test 2015-03-08 18:22:14 +01:00
Mickaël Rémond 750fefcd6d Add Elixir test on ejabberd hooks
This is to prepare ejabberd_hooks module refactoring.

I also expanded API to help with testing.
2015-03-08 17:06:43 +01:00
Mickaël Rémond 5be957f23b Merge pull request #462 from mremond/add-meck-tool-dependancy
Add Meck dependency when building for development
2015-03-07 12:53:47 +01:00
Mickaël Rémond 915012766e Add Meck dependency when building for development
This allows writing tests with mock functions.

Fixes #439
2015-03-07 12:44:17 +01:00
Mickaël Rémond e3336ad124 Merge pull request #461 from mremond/fix-r16-tests
Test file can be compiled under R16
2015-03-07 12:41:59 +01:00
Mickaël Rémond d3a2fa1e9a Test file can be compiled under R16
Fixes test failing under R16 due to elixir_suite build syntax error.

The test will never be run under r16 as Elixir requires r17 and map
anyway.
2015-03-07 12:31:11 +01:00
Mickaël Rémond f845299eb2 Merge pull request #460 from mremond/run-elixir-test
Fix Elixir tests failure detection
2015-03-07 11:59:44 +01:00
Mickaël Rémond da468db648 Fix Elixir tests failure detection
We now make sure we have no failure.
Solves #438
2015-03-07 11:49:37 +01:00
Christophe Romain 8cf4ef0aac add mnesia cluster helper scripts 2015-03-06 15:42:41 +01:00
Badlop f18ce9564c Fix: default_host is forgotten between consecutive HTTP requests (#416) 2015-03-06 12:40:48 +01:00
Badlop e0228e9b7a Access list editing broken in web_admin (#252) 2015-03-05 11:34:25 +01:00
Badlop e575f401cd Accept configuration file with .yaml extension (#290) 2015-03-04 17:18:57 +01:00
Mickaël Rémond 8a99287374 Merge branch 'master' of github.com:processone/ejabberd 2015-03-03 22:20:08 +01:00
Mickaël Rémond f0f8301b5e Fix typo on state reuse
It should help with the crash on #453
2015-03-03 22:19:51 +01:00
Mickaël Rémond 02dd3ae0af Merge pull request #441 from mremond/test/#438/run-elixir-tests
Support for running Elixir ExUnit tests from Common Test
2015-03-03 22:15:24 +01:00
Holger Weiss cffe0b0dfe Fix IPv6 loopback address in the guide
Thanks to Erik Huelsmann for spotting this.
2015-03-03 21:23:11 +01:00
badlop 7c4efca361 Merge pull request #448 from hamano/ja
update japanese translation.
2015-03-02 11:09:06 +01:00
Christophe Romain a265ea53f9 Merge pull request #384 from weiss/fix-last-item-type
Use correct message type when sending last published PEP/PubSub items
2015-02-27 11:40:12 +01:00
HAMANO Tsukasa c1f7b30045 additional japanese translation. 2015-02-27 19:21:47 +09:00
Badlop 83c2dd78a7 Update Spanish translation 2015-02-26 17:57:51 +01:00
Badlop 97ae67b8d6 Run "make translations" to update PO and MSG files 2015-02-26 17:16:27 +01:00
badlop a1f4206fbe Merge pull request #445 from hamano/ja
improve japanese translation
2015-02-26 17:13:35 +01:00
HAMANO Tsukasa e8039f3609 improve japanese translation 2015-02-26 23:42:52 +09:00
Badlop 1b67ac0c20 Update remanining old RFC links (EJAB-1728)(#444) 2015-02-26 12:18:51 +01:00
badlop e10d5af303 Merge pull request #443 from mojolingo/feature/muc_admin/affiliation-change-propogate-xmpp
Permit modifying affiliations via an event
2015-02-26 11:48:17 +01:00
Holger Weiss 96025bfc6e set-dep-versions: Cope with branches
Handle the case where a branch name is specified for a rebar dependency,
as we now do for Elixir.
2015-02-26 00:02:11 +01:00
Ben Langfeld a6c5a3593f Permit modifying affiliations via an event
Allows us to implement mod_muc_admin:set_room_addiliation properly
2015-02-25 12:31:27 -03:00
Badlop 5bd8724801 Update FSF address 2015-02-25 15:19:33 +01:00
Paweł Chmielowski ab3d38c9fc Fix processing POST messages after changes from adding websocket handling 2015-02-25 14:36:48 +01:00
Paweł Chmielowski 8e33f31f50 Try not to use c2s:send_text, it causes problem with websocket 2015-02-25 13:57:03 +01:00
Paweł Chmielowski b42b171613 Add support for websocket connections 2015-02-25 13:57:02 +01:00
Holger Weiss 2a15453d98 Fix EJABBERD_OPTS quoting for Elixir 2015-02-24 23:59:39 +01:00
Mickaël Rémond 011099ce43 Merge pull request #442 from weiss/use-stable-elixir
Use Elixir's 'v1.0' branch
2015-02-24 12:46:56 +01:00
Holger Weiss 3dd3044ab8 Use Elixir's 'v1.0' branch
The stable Elixir releases are currently built from the 'v1.0' branch,
so let's use that.
2015-02-24 12:12:22 +01:00
Feotov Daniil b81250d667 Hook on group message 2015-02-24 11:06:41 +03:00
Christophe Romain 6a094f9118 Merge branch 'master' of github.com:processone/ejabberd 2015-02-23 15:52:23 +01:00
Christophe Romain e0ffcbe45d Add script for systemd (Guthub #434) 2015-02-23 15:52:18 +01:00
Mickaël Rémond d4cf42dcc3 Increase common test timeout
This is needed to cope with long launch time on small / slow VM.
Fixes #440
2015-02-23 11:03:15 +01:00
Christophe Romain 0c0947a241 Add compatibility macros for deprecated types (thanks to Alexey) 2015-02-23 09:58:00 +01:00
Mickaël Rémond 17be6a303b Improve comments for running Elixir tests 2015-02-22 17:45:25 +01:00
Mickaël Rémond 510a717dbb Support for running Elixir ExUnit tests from Common Test 2015-02-22 17:41:17 +01:00
Mickaël Rémond d8b048663d Update links 2015-02-19 12:17:39 +01:00
Mickaël Rémond ab5dd79ca2 Display build status 2015-02-19 12:10:25 +01:00
Badlop 725af2de45 Update mod_vcard_ldap Guide documentation from Erlang to YAML format (Github #274 #394) 2015-02-17 13:41:06 +01:00
Holger Weiss e87d332394 mod_carboncopy: Apply small code simplification 2015-02-12 00:14:57 +01:00
Holger Weiss bc7f93ad1e Check availability before carbon copying
Before generating a carbon copy for a resource, make sure it's actually
available.  This handles the case where, for some reason, the
'unset_presence_hook' wasn't called during logout of a resource.  Carbon
copies sent to that resource would otherwise be re-routed to another
resource (which might've received a copy of that message already).
2015-02-11 16:12:08 +01:00
Holger Weiss 9f822dd2b8 Don't crash if 'request_path' has unexpected type 2015-02-11 15:38:55 +01:00
Mickaël Rémond 3cba2cb1ec Fix incorrect Elixir name 2015-02-11 10:19:40 +01:00
Holger Weiss 834c680f97 Remove unused function clause in mod_carboncopy 2015-02-11 00:52:47 +01:00
Holger Weiss f075e92f08 Fix "make install" without Elixir support
Don't bail out during "make install" when ./configure was called without
"--enable-elixir".
2015-02-11 00:23:40 +01:00
Paweł Chmielowski fbb512cb5a Disable elixir support in travis tests 2015-02-10 18:22:54 +01:00
Mickaël Rémond 0f80523736 Merge pull request #429 from mremond/master
Add Elixir support to ejabberd
2015-02-10 18:10:27 +01:00
Mickaël Rémond 01e1f677c7 Add Elixir support to ejabberd 2015-02-10 17:56:44 +01:00
Holger Weiss cf929e730f Document EJABBERD_CONFIG_PATH in ejabberdctl.cfg 2015-02-10 00:15:06 +01:00
Holger Weiss 5c32ba49e2 README: Mention commands in the right order 2015-02-09 14:57:23 +01:00
Holger Weiss 2ccbff3b98 README: Mention how to create "configure" script 2015-02-09 14:31:59 +01:00
Holger Weiss d00f0fb1f4 Don't convert configuration values to strings 2015-02-09 01:08:01 +01:00
Holger Weiss 7fd7e53e4a Fix typo in debug message 2015-02-08 23:49:17 +01:00
Feotov Daniil eb52c118d0 Migration of scram passwords with piefxis (riak and internal only) 2015-02-05 18:44:08 +03:00
Badlop ed502673f4 List all available commands in the guide (EJAB-1735) 2015-01-28 17:54:05 +01:00
Badlop 87d2eb5f9a Support for "> ." in YAML configuration files 2015-01-28 17:16:10 +01:00
Evgeny Khramtsov 0c501b760f Merge pull request #414 from weiss/fix-function-specs
Fix a few jlib function specifications
2015-01-23 16:44:48 +03:00
Holger Weiss 0a047d790f Fix a few function specifications 2015-01-23 00:42:18 +01:00
Christophe Romain c4d17d939d Fix integer parameter which can be set to 0 2015-01-22 12:40:27 +01:00
Evgeny Khramtsov 561025ba32 Merge pull request #413 from weiss/fix-timestamp-overflow
Fix timestamp formatting
2015-01-22 11:00:41 +03:00
Badlop 15e77e9c0f New command to reload config (EJAB-1140) 2015-01-21 15:18:46 +01:00
Christophe Romain 120e581865 Fix missing copyright dates to 2015 (EJAB-1733) 2015-01-21 14:52:37 +01:00
Holger Weiss 528aabf49c Increment number of seconds on timestamp overflow
Increment the number of seconds and set the fractional part to zero if
the latter is too large.
2015-01-21 11:20:26 +01:00
Holger Weiss 18d9f18642 Don't match integer() against float() value 2015-01-21 11:06:06 +01:00
Nathan Bruning a983df4848 Fix overflow in XEP-0203 delay: if microseconds exceeded 999499, *** was put in the formatted timestamp 2015-01-21 01:10:41 +01:00
Christophe Romain 0559edd1cd Merge pull request #410 from weiss/enable-transient-supervisors
Enable transient supervisors by default
2015-01-20 13:16:10 +01:00
Holger Weiss 2683b340ae Cosmetic changes for "./configure --help" output 2015-01-20 12:32:22 +01:00
Holger Weiss cc7b68b7c5 Enable transient supervisors by default
Some features (e.g., "ejabberdctl incoming_s2s_number") don't work with
transient supervisors disabled.
2015-01-20 11:50:11 +01:00
Evgeny Khramtsov 104009b3a9 Merge pull request #409 from hamano/scram-stringprep-checking
Scram stringprep checking(correct fix)
2015-01-19 15:23:47 +03:00
HAMANO Tsukasa e01eb734b4 correct fix for #396 2015-01-19 16:00:18 +09:00
HAMANO Tsukasa cb57cfa1a6 correct fix for #396 2015-01-19 15:25:58 +09:00
Badlop 146adce3d6 Update the Guide about using access_commands in YAML/CFG files 2015-01-15 20:00:35 +01:00
Badlop 2c4647a980 Fix binaries when ejabberd_ctl passes auth details 2015-01-15 20:00:06 +01:00
Badlop 7690320f0f Fix access_commands option in ejabberd_xmlrpc, now it works 2015-01-15 17:39:12 +01:00
Evgeniy Khramtsov 4575649e10 Get rid of asn1rt calls 2015-01-15 14:51:20 +03:00
Evgeniy Khramtsov d53a54d900 Ignore warnings_as_errors everywhere 2015-01-15 13:49:24 +03:00
Evgeny Khramtsov 479da33092 Merge pull request #400 from toopay/patch-clarity-cleanup
Fix spec comment and remove useless case block
2015-01-09 19:14:53 +03:00
Taufan Aditya f650fc83ae Fix spec comment and remove useless case block 2015-01-09 22:19:46 +07:00
Evgeny Khramtsov 17a7844e40 Merge pull request #399 from toopay/patch-cleanup-unused-vars
Fix unused vars warning
2015-01-08 21:47:20 +03:00
Taufan Aditya 864e113256 Fix unused vars warning 2015-01-09 01:00:26 +07:00
Badlop e7e8f2f63a Update some RFC links (EJAB-1728) 2015-01-08 18:18:17 +01:00
Badlop 3063a84fe2 Update compilation from git (github #397) 2015-01-08 17:53:25 +01:00
Badlop 5a35405cd5 Update copyright dates to 2015 (EJAB-1733) 2015-01-08 17:34:43 +01:00
Evgeny Khramtsov 4ef2d08456 Merge pull request #396 from hamano/scram-stringprep-checking
checking stringprep in scram authentication
2015-01-08 11:02:23 +03:00
HAMANO Tsukasa ede5a353e8 checking stringprep in scram authentication 2015-01-08 14:12:05 +09:00
Badlop b88fa6f617 Fix missing presences when adding shared groups (Github PR#99, thanks to Bokner) 2015-01-07 13:11:53 +01:00
Badlop 3882c4d514 Fix binaries in command ejabberdctl stop_kindly 2015-01-07 11:44:04 +01:00
badlop d24dc4e9c8 Merge pull request #383 from weiss/fix-shutdown
Give temporary processes a little time to stop cleanly
2015-01-07 11:42:22 +01:00
badlop afaf68159d Merge pull request #395 from weiss/fix-turn-example
Fix example: turn_ip must be specified as string
2015-01-04 12:06:17 +01:00
Holger Weiss a7f578089a Fix example: turn_ip must be specified as string 2015-01-04 00:55:00 +01:00
Evgeny Khramtsov 173d9761ca Merge pull request #387 from weiss/fix-captcha-without-proto
Fix ejabberd_captcha's listener parsing
2014-12-24 19:16:02 +03:00
Holger Weiss 9dc9d75502 Fix ejabberd_captcha's listener parsing
If the "captcha_host" is specified without "http://" or "https://"
prefix, ejabberd_captcha tries to figure out the protocol automatically.
Fix the code that parses the listener configuration in order to do that.
2014-12-24 00:35:22 +01:00
Holger Weiss 06db65e108 Give temporary processes time to stop cleanly
Allow temporary processes to perform some final actions when shutting
down.  For example, moc_muc_room:terminate/3 fails to send 'unavailable'
presence to the room participants when killed immediately.
2014-12-21 21:03:22 +01:00
Holger Weiss d734f6beca Use correct message type for last published items
When sending last published PubSub/PEP items, set the message type
that was used for broadcasting those items originally.
2014-12-21 20:11:05 +01:00
Holger Weiss e5428c5500 Improve add_message_type/2 function
Let add_message_type/2 accept the type as an atom, and let the function
handle the 'normal' message type.  This doesn't change the behavior, but
avoids some code duplication.
2014-12-21 18:44:53 +01:00
Jerome Sautret cc958f7787 Fix upgrade of PubSub mnesia tables from older ejabberd version. 2014-12-18 11:51:28 +01:00
Evgeny Khramtsov 8781c8346b Merge pull request #379 from weiss/polish-readme
Polish the README file a bit
2014-12-17 18:36:05 +03:00
Holger Weiss ad4b41730e Apply various cosmetic changes to README file 2014-12-16 22:14:36 +01:00
Christophe Romain 5935b4e104 improve readability of links on github page 2014-12-15 10:52:47 +01:00
Christophe Romain d1f09a29b9 improve README adding feature list 2014-12-15 10:26:57 +01:00
Evgeny Khramtsov df88d9f2e5 Merge pull request #377 from weiss/new-timestamps
Add timestamps to stanzas resent from stream management queue
2014-12-13 09:42:30 +03:00
Holger Weiss 466278fde1 Let jlib use "B" instead of "w" to format integers
As a small optimization, use io:format's "B" control sequence to format
integers.  We don't need to let Erlang figure out the data type if we
already know it.
2014-12-12 23:50:03 +01:00
Holger Weiss 0a19dac4fd Add fractions of seconds to <delay/> timestamps
Include fractions of a second with XEP-0203 <delay/> timestamps, as
specified in XEP-0082.

	Old timestamp: 2014-05-19T11:55:00Z
	New timestamp: 2014-05-19T11:55:00.123Z
2014-12-11 23:11:35 +01:00
Christophe Romain 7e6d310fe4 include static versions of deps in rebar.config/script (thanks to Holger Weiß)(EJAB-1730) 2014-12-11 15:21:58 +01:00
Evgeny Khramtsov ffe3ea8917 Merge pull request #374 from weiss/fix-muc-log-config
mod_muc_log: Fix configuration parsing
2014-12-08 22:56:20 +03:00
Holger Weiss 455039ae69 mod_muc_log: Fix configuration parsing
Fix mod_muc_log's parsing of the "file_permissions" option.

Resolves #373.
2014-12-08 15:51:06 +01:00
Holger Weiss a78a0a65fe Let CSI code add timestamp at later point in time
As a small optimization, make sure we won't add timestamps to presence
stanzas which end up being thrown away by the CSI code.
2014-12-07 16:27:51 +01:00
Holger Weiss ba8f38e2eb XEP-0198: Add timestamp to resent stanzas
When an unacknowledged stanza is resent from the Stream Management
queue, add a timestamp so that the receiving client can display the time
at which the stanza was originally sent.
2014-12-07 16:12:06 +01:00
Holger Weiss 9899935e42 Improve interface for adding timestamps
Provide a simpler interface for adding <delay/> and <x/> timestamps to
stanzas.  This also makes sure that only one <delay/> tag and one <x/>
tag is added to a given stanza.
2014-12-07 15:55:18 +01:00
Evgeny Khramtsov 865509757c Merge pull request #366 from weiss/remove-unused-field
Remove unused field from ejabberd_c2s #state
2014-11-26 02:42:00 +03:00
Holger Weiss 2cb16bc509 Remove unused field from c2s #state 2014-11-26 00:15:19 +01:00
Evgeny Khramtsov 00dfcc1e10 Merge pull request #350 from flygoast/master
Used current working home as base directory to config relative path.
2014-11-25 14:24:37 +03:00
Evgeny Khramtsov 4163626844 Merge pull request #365 from weiss/csi-config
Fix mod_client_state's configuration parsing
2014-11-25 14:21:18 +03:00
Evgeny Khramtsov f60c721f84 Merge pull request #364 from weiss/copy-normal-messages
Also carbon-copy messages of type "normal"
2014-11-25 14:21:06 +03:00
Evgeny Khramtsov e97e56d776 Merge pull request #363 from weiss/drop-pep-errors
Don't route PEP error messages to clients
2014-11-25 14:20:11 +03:00
Evgeny Khramtsov 6b916e7a04 Merge pull request #354 from weiss/pep-privacy
Respect privacy lists for incoming PEP messages
2014-11-25 14:20:01 +03:00
Evgeny Khramtsov 6279c3fd8d Merge pull request #352 from weiss/no-last-pep-duplicates
Don't duplicate last published PEP items
2014-11-25 14:19:53 +03:00
Holger Weiss 6900a41e7d Fix mod_client_state's configuration parsing
Don't log an "invalid value" message when "queue_presence" or
"drop_chat_states" is set to "false".
2014-11-25 12:05:09 +01:00
Holger Weiss a456482e2f Also carbon-copy messages of type "normal"
It makes no sense to restrict carbon-copying to "chat" messages.
XEP-0280 is expected to be updated accordingly.
2014-11-24 22:37:14 +01:00
Holger Weiss 30687c40ef Don't route PEP error messages to clients 2014-11-24 21:19:32 +01:00
Holger Weiss 16311b73c8 Add new hook: c2s_filter_packet_in
The c2s_filter_packet_in hook can be used to modify or drop incoming
packets before they are transmitted to the client.
2014-11-24 20:55:18 +01:00
badlop b85357d280 Merge pull request #223 from kaLaJengkinG/patch-1
Update id.msg
2014-11-24 11:49:26 +01:00
Evgeny Khramtsov 946b64e166 Merge pull request #361 from weiss/parse-ldap-dn-filter
Fix parsing of "ldap_dn_filter" option
2014-11-22 10:36:21 +03:00
Holger Weiss 46d035c142 Fix parsing of "ldap_dn_filter" option 2014-11-22 01:33:23 +01:00
Evgeny Khramtsov 982215d644 Merge pull request #360 from lbanders/master
Fix for ejabbed bug #359 - now strings are formatted correctly.
2014-11-20 13:45:27 +03:00
Leif Bredgaard Honore 5afa1f6ade Fix for ejabbed bug #359 - now strings are formatted correctly. 2014-11-20 14:21:51 +04:00
Holger Weiss c566b1d01e Respect privacy lists for incoming PEP messages 2014-11-18 01:25:12 +01:00
Holger Weiss 84c227e6ae Don't duplicate last published PEP items
When a contact becomes available, usually both the 'caps_update' hook
and the 'presence_probe_hook' are called.  For remote contacts, both
hooks triggered PEP notifications, so each item was sent twice.  Fix
this by ignoring the 'presence_probe_hook' for remote contacts.
2014-11-18 01:13:22 +01:00
Evgeny Khramtsov ab12270837 Merge pull request #351 from weiss/floating-muc-intervals
Support floating point message/presence intervals
2014-11-16 12:35:21 +03:00
Holger Weiss 3b96525550 Support floating point message/presence intervals
Let mod_muc support floating point values for "min_message_interval" and
"min_presence_interval", as documented in the guide.
2014-11-15 22:35:56 +01:00
Gu Feng 62ccf1cf0e Used current working home as base directory to config relative path.
When a config relative path specified, get_absolute_path would not
return an absolute path. The patch fixed it using current working
home as base directory.

Signed-off-by: Gu Feng <flygoast@126.com>
2014-11-16 00:09:52 +08:00
Evgeny Khramtsov d5ecd32cec Merge pull request #345 from weiss/last-pep-items
Fix sending of last published PEP items to newly-available resources
2014-11-14 21:27:24 +03:00
Evgeny Khramtsov e770d3174d Merge pull request #346 from weiss/fix-type
Cosmetic fix: Use correct type for initial c2s #state.user value
2014-11-14 21:22:46 +03:00
Holger Weiss 2446b66016 Use correct type for initial c2s #state.user value 2014-11-14 15:32:48 +01:00
Holger Weiss f69d1ca282 Send last PEP items to remote subscribers
When a remote subscriber becomes available, send him the last published
PEP items, as we do for local subscribers.

However, the current implementation depends on a running ejabberd_c2s
process of the publisher to send items to remote subscribers.  So, for
those, the behavior is always like it is for local subscribers when
"ignore_pep_from_offline" is set to "true".
2014-11-14 01:33:11 +01:00
Holger Weiss 830fdccd21 Don't broadcast last published PEP items
When a client becomes available, don't send the last published PEP items
of all his peers to all his other peers, but only to that client.
2014-11-14 01:03:26 +01:00
Holger Weiss 5cc30c3977 Move routing of last PEP items into new function
This doesn't change the behavior, but avoids some code duplication.
2014-11-14 00:16:13 +01:00
Holger Weiss 8efae1f05b ODBC: Sync last item notifications with mod_pubsub
A while back, mod_pubsub was modified to address EJAB-1456.  However,
the change was only partially applied to mod_pubsub_odbc.  This commit
adds the remaining part.
2014-11-14 00:02:59 +01:00
Evgeny Khramtsov de3e1c3508 Merge pull request #341 from sezuan/fix-kick-user-command
Fix kick_user command
2014-11-10 23:14:34 +03:00
Matthias Rieber 8184326eb9 Fix kick_user command 2014-11-10 20:53:00 +01:00
Evgeny Khramtsov f47a59de2f Merge pull request #340 from weiss/disable-mechanisms
New option: disable_sasl_mechanisms
2014-11-10 11:47:10 +03:00
Holger Weiss ee0ecd2419 New option: disable_sasl_mechanisms
The new "disable_sasl_mechanisms" option allows for restricting the list
of SASL mechanisms offered to the client.

Closes #339.
2014-11-10 01:10:04 +01:00
Evgeny Khramtsov 7138cc5633 Merge pull request #337 from weiss/fix-install-without-json
Fix "make install" without JSON support
2014-11-06 21:11:17 +03:00
Holger Weiss f95f22aea0 Fix "make install" without JSON support
Don't bail out during "make install" when ./configure was called without
"--enable-json".
2014-11-06 17:11:15 +01:00
Evgeny Khramtsov 25e5253f33 Merge pull request #335 from weiss/avoid-carbon-dups
Avoid duplicates of carbon copies
2014-11-05 23:17:45 +03:00
Holger Weiss 41dc1efde4 Avoid duplicates of carbon copies
When multiple resources have the same (highest) priority, the session
manager routes messages sent to their bare JID to each of these
resources.  When another resource has a lower priority but receives
carbon copies, make sure it won't receive multiple copies of such
messages.
2014-11-05 19:04:02 +01:00
Jerome Sautret 1d2efcc168 Add xref test to travis.
Conflicts:
	.travis.yml
2014-10-31 11:24:56 +01:00
Evgeniy Khramtsov dfb21e802e Fix race in CSI test case 2014-10-31 00:26:22 +03:00
Evgeniy Khramtsov 9a0b951855 Add tests for mod_vcard_xupdate 2014-10-30 23:57:15 +03:00
Christophe Romain 7819986ec0 Merge branch 'master' of github.com:processone/ejabberd 2014-10-30 17:44:04 +01:00
Christophe Romain 295681283a don't stop on error if jiffy.so symlink exists #309 2014-10-30 17:43:57 +01:00
Jerome Sautret 5b0d8b7776 Merge branch 'master' of github.com:processone/ejabberd 2014-10-30 17:19:37 +01:00
Jerome Sautret 1d2ef85b33 Clean up rebar script. 2014-10-30 16:51:01 +01:00
Christophe Romain b550f247e7 fix invalid path of jiffy.so on install #309 2014-10-30 15:47:33 +01:00
Jerome Sautret 565f064b15 Fix xref check when odbc driver is not used. 2014-10-30 15:21:42 +01:00
Jerome Sautret 7db4587eeb Ignore riak_object module call for xref check.
It's used in map-reduce function called from riak vm.
2014-10-30 15:21:35 +01:00
Jerome Sautret fad0d867fc Add xref Makefile target.
Conflicts:
	rebar.config.script
2014-10-30 15:21:25 +01:00
Evgeny Khramtsov 56dab7ddbe Merge pull request #328 from flygoast/master
Return an empty <vCard/> element in an IQ-result when no vCard exists.
2014-10-29 16:43:49 +03:00
Evgeniy Khramtsov 74b67fa0dc Add new option: store_empty_body 2014-10-27 14:18:09 +03:00
Evgeniy Khramtsov 067958d705 Merge branch 'master' of github.com:processone/ejabberd 2014-10-27 13:44:59 +03:00
Evgeniy Khramtsov dec1e1f67f Revert "fix mod_offline to store only chat messages with body xml element"
This reverts commit 436f0832c1.
2014-10-27 13:44:46 +03:00
Evgeny Khramtsov 76b9098a25 Merge pull request #330 from weiss/accept-newline
Accept trailing newline characters in Base64 strings
2014-10-25 21:17:56 +04:00
Holger Weiss 2399aba67d Accept trailing whitespace in Base64 strings 2014-10-25 02:05:02 +02:00
Gu Feng 94cdcd7b34 Return an empty <vCard/> element in an IQ-result when no vCard exists.
According to XEP-0054, if no vCard exists, the server MUST return a stanza
error (which SHOULD be <item-not-found/>) or an IQ-result containing an
empty <vCard/> element.

Signed-off-by: Gu Feng <flygoast@126.com>
2014-10-25 00:55:49 +08:00
Evgeniy Khramtsov bf33f74ef8 Get rid of a hyphen in VSN 2014-10-24 18:01:42 +04:00
Evgeny Khramtsov 8cf43cf750 Merge pull request #325 from weiss/auth-after-tls
Don't advertise authentication mechanisms too early
2014-10-23 14:56:15 +04:00
Holger Weiss 2d748115ee Don't advertise auth mechanisms too early
If "starttls_required: true" is specified for c2s connections,
authentication mechanisms shouldn't be offered before negotiating the
TLS connection.
2014-10-23 10:04:14 +02:00
Evgeny Khramtsov 0b22277b11 Merge pull request #321 from weiss/fix-http-request-record
Use 'request' record definition from header file
2014-10-21 12:12:55 +04:00
Evgeny Khramtsov c7d9b46b6f Merge pull request #324 from liudanking/master
fix odbc_keepalive_interval configuration bug
2014-10-21 11:03:16 +04:00
liudan d2edcf1288 fix odbc keepalive interval bug 2014-10-21 10:05:44 +08:00
Evgeniy Khramtsov 160c9d7698 Remove append_host_config from ejabberd.yml.example 2014-10-20 12:59:30 +04:00
Evgeny Khramtsov ecd35f7ba8 Merge pull request #322 from weiss/xep-0198
XEP-0198: Abort immediately on stanza queue overflow
2014-10-17 11:56:25 +04:00
Holger Weiss 0c24e18b5e XEP-0198: Abort immediately on queue overflow
Terminate the ejabberd_c2s process immediately once stanza queue
overflow is detected.  This makes sure the FSM won't process additional
stanzas before terminating if the recipient is flooded.
2014-10-17 01:35:30 +02:00
Holger Weiss 96d6aacede Use 'request' record definition from header file
This fixes a 'badrecord' crash in mod_http_fileserver.
2014-10-16 13:51:13 +02:00
Evgeny Khramtsov adaa067333 Merge pull request #317 from weiss/xep-0198
XEP-0198: Set #state.conn field on session resume
2014-10-13 20:38:15 +04:00
Evgeny Khramtsov 724a31fa13 Merge pull request #318 from weiss/remove-xmlrpc-dep
Remove "xmlrpc" dependency for "make rel"
2014-10-13 20:37:28 +04:00
Holger Weiss 1ccc0d8bcb XEP-0198: Set #state.conn field on session resume 2014-10-12 19:44:35 +02:00
Holger Weiss 3f3f64c217 Remove "xmlrpc" dependency for "make rel"
The "xmlrpc" library isn't used anymore.
2014-10-12 17:23:25 +02:00
Evgeny Khramtsov 97fa57c360 Merge pull request #316 from weiss/really-require-tls
Make sure "starttls_required" can't be bypassed
2014-10-12 11:05:49 +04:00
Holger Weiss 7bdc1151b1 Make sure "starttls_required" can't be bypassed
Don't allow clients to circumvent the "starttls_required" option by
enabling XMPP stream compression.
2014-10-12 02:08:08 +02:00
Evgeniy Khramtsov 4bbf16b21a Fix list unblocking when Riak is used as a backend 2014-10-10 11:38:13 +04:00
Evgeniy Khramtsov d87ca9fb7b Fix format of an XML-RPC response 2014-10-04 12:55:59 +04:00
Evgeniy Khramtsov 7b3209cc7f Switch to P1 implementation of XML-RPC 2014-10-04 12:49:33 +04:00
Evgeniy Khramtsov 1d782db84f Process XML-RPC requests via p1_xml and ejabberd_http 2014-10-04 12:49:12 +04:00
Evgeniy Khramtsov e109f352e3 Make directory creation more robust 2014-10-02 14:21:27 +04:00
Evgeny Khramtsov 6e63ee480e Merge pull request #310 from weiss/ignore-rel-dir
Let Git ignore the "rel/ejabberd" directory
2014-09-30 13:50:32 +04:00
Holger Weiss 90fb19797d Let Git ignore the "rel/ejabberd" directory 2014-09-30 11:35:58 +02:00
Evgeny Khramtsov 415936146b Merge pull request #303 from weiss/no-csi-if-unconfigured
Offer CSI stream feature only if mod_client_state is enabled
2014-09-26 13:16:28 +04:00
Holger Weiss 277e1dc3ff Offer CSI stream feature only if configured
Don't offer the CSI stream feature when mod_client_state isn't actually
configured to filter stanzas.  This makes sure clients won't send CSI
tags that end up being ignored.
2014-09-25 18:28:20 +02:00
Holger Weiss 56175fef1b Add new hook: c2s_post_auth_features
The c2s_post_auth_features hook can be used to extend the list of stream
features offered after authentication.
2014-09-25 18:15:33 +02:00
Evgeny Khramtsov ef89497d3f Merge pull request #307 from weiss/remove-invisible-presence
Remove invisible presence fields from c2s #state
2014-09-25 17:20:45 +04:00
Holger Weiss 7aec0337e1 Remove invisible presence fields from c2s #state
Invisible presence isn't supported anymore, so the corresponding
ejabberd_c2s #state fields were unused.
2014-09-25 00:08:56 +02:00
Evgeny Khramtsov e49cf604e9 Merge pull request #302 from weiss/ldap-deref-aliases
Rename deref_aliases back to ldap_deref_aliases
2014-09-23 13:54:22 +04:00
Holger Weiss 61c8836740 Rename deref_aliases back to ldap_deref_aliases
The "ldap_deref_aliases" option has accidentally been renamed to
"deref_aliases".  Revert that change (but accept both names for a
while), so that the option name now matches the documentation again.
2014-09-23 11:31:44 +02:00
Evgeny Khramtsov 57dec40007 Merge pull request #301 from Iperity/master
Fix init script
2014-09-18 01:17:04 +04:00
Nathan Bruning 29a841d8c7 Fix init script: use getent to allow ejabberd user from external authentication sources (LDAP) 2014-09-17 21:28:50 +02:00
Evgeny Khramtsov c18413c52b Merge pull request #300 from weiss/resend-if-offline
XEP-0198: Support "resend_on_timeout: if_offline"
2014-09-17 09:31:09 +04:00
Holger Weiss 0a9212583d XEP-0198: Support "resend_on_timeout: if_offline"
If "resend_on_timeout" is set to "if_offline", resend unacknowledged
stanzas only if no other resource is online when the session times out.
In other words, allow for sending them to offline storage, but nowhere
else.
2014-09-16 22:42:34 +02:00
Evgeny Khramtsov 19446967fa Merge pull request #299 from sjmackenzie/processone
added p1_utils to reltool.config resolving treap:empty() undefined error
2014-09-15 09:31:27 +04:00
stewart 8d9a9228d9 added p1_utils to reltool.config resolving treap:empty() undefined error 2014-09-15 04:06:07 +00:00
Evgeniy Khramtsov 72fd353988 Avoid generation of excessive records 2014-09-13 22:54:07 +04:00
Evgeny Khramtsov c90786527e Merge pull request #298 from weiss/csi
Add support for XEP-0352: Client State Indication (CSI)
2014-09-12 21:55:10 +04:00
Holger Weiss 1a320baad8 Add tests for Client State Indication support 2014-09-11 18:18:20 +02:00
Holger Weiss b8c98232b8 Support XEP-0352: Client State Indication 2014-09-11 17:44:29 +02:00
Evgeny Khramtsov f723c00762 Merge pull request #297 from weiss/remove-configure-flag
Travis CI: Remove unused configure flag
2014-09-11 19:35:50 +04:00
Holger Weiss 4d59f677a9 Travis CI: Remove unused configure flag
The --disable-http flag no longer exists.
2014-09-10 21:04:43 +02:00
Evgeny Khramtsov 7a48e30523 Merge pull request #296 from weiss/remove-unused-clause
XEP-0198: Remove unused function clause
2014-09-07 07:27:17 +04:00
Evgeny Khramtsov f0887e45b8 Merge pull request #295 from weiss/xep-0198
XEP-0198: Change state immediately when gen_tcp:send/2 returns failure
2014-09-07 07:27:07 +04:00
Holger Weiss 2ca563e328 XEP-0198: Remove unused function clause
In the 'wait_for_resume' state, #state.mgmt_pending_since is always
initialized.  fsm_next_state/2 takes care of that.
2014-09-06 20:39:38 +02:00
Holger Weiss 2e169167d4 XEP-0198: Change state on gen_tcp:send/2 failure
When Stream Management is enabled and a gen_tcp:send/2 call fails, go
into the 'wait_for_resume' state immediately.  This makes sure that
gen_tcp:send/2 won't be called again, which might avoid an Erlang issue
where gen_tcp:send/2 apparently hangs despite 'send_timeout' (and
'send_timeout_close') being set.
2014-09-06 20:34:32 +02:00
Holger Weiss 11b2921971 XEP-0198: Let fsm_next_state/2 check timeout value
Don't force the fsm_next_state/2 caller to check for 'mgmt_timeout = 0'.
2014-09-06 20:29:02 +02:00
Christophe Romain 646b445515 allow guide not to be compiled for install 2014-09-05 19:16:13 +04:00
Evgeniy Khramtsov 50d7046517 Test MUC nick registration 2014-09-03 21:30:44 +04:00
Evgeniy Khramtsov c3eaa29f70 Parse x:data in jabber:register 2014-09-03 21:30:27 +04:00
Evgeniy Khramtsov ac2ba399a9 Make sure x:data form possesses 'type' attribute 2014-09-03 21:28:55 +04:00
Evgeniy Khramtsov fda73c3d16 Fix privacy checks of presence probes 2014-09-01 16:39:02 +04:00
Evgeniy Khramtsov a1ce33ebf8 Automatically remove IPs from ban, add the documentation 2014-08-27 13:25:49 +04:00
Evgeniy Khramtsov 9be9949dab Remove useless -include() 2014-08-27 13:18:29 +04:00
Evgeniy Khramtsov 0f1d95a074 Ban the IP if there are too many failed authentications 2014-08-27 13:18:22 +04:00
Evgeniy Khramtsov 2430e6691b Add mod_fail2ban 2014-08-27 13:17:56 +04:00
Evgeniy Khramtsov bfd028beea Recompile the xmpp_codec using updated XML generator 2014-08-27 12:55:31 +04:00
Evgeny Khramtsov 2cb0f92fe6 Merge pull request #293 from weiss/fix-comment
Fix a comment in ejabberd_hooks
2014-08-27 12:48:58 +04:00
Evgeny Khramtsov 2ae7d0a122 Merge pull request #292 from weiss/fix-xep-reference
Fix an XEP reference in the guide
2014-08-27 12:48:34 +04:00
Holger Weiss f1ad6f017b Fix a comment in ejabberd_hooks 2014-08-26 01:04:15 +02:00
Holger Weiss c658984531 Fix an XEP reference in the guide 2014-08-26 01:01:11 +02:00
Evgeny Khramtsov 191eeed7c9 Merge pull request #287 from vesvalo/master
Fix return value of mod_shared_roster:delete_group.
2014-08-21 16:32:31 +04:00
vesvalo 01a3c1c2e1 Fix return value of mod_shared_roster:delete_group. Current one is not compatible with mod_admin_extra. 2014-08-21 15:13:43 +04:00
Evgeny Khramtsov 8e3a49d369 Merge pull request #286 from vesvalo/fix_pep_odbc_publishing
fix 404 on pep first publishing with odbc
2014-08-21 13:29:55 +04:00
vesvalo c48b7f272b fix 404 on pep first publishing with odbc 2014-08-21 11:23:58 +04:00
Evgeny Khramtsov 4a9417c501 Merge pull request #284 from weiss/infinity-vs-unlimited
Guide: For consistency, use 'infinity' everywhere
2014-08-21 01:26:22 +04:00
Holger Weiss 72049e5323 Guide: For consistency, use 'infinity' everywhere 2014-08-20 20:43:38 +02:00
Evgeny Khramtsov 33e0bf1c19 Merge pull request #283 from weiss/allow-unlimited-ack-queue
Support "max_ack_queue: infinity"
2014-08-20 17:47:04 +04:00
Evgeny Khramtsov 5ed7f10153 Merge pull request #282 from weiss/fix-muc-option-docs
Fix MUC option docs: "infinity", not "infinite"
2014-08-20 17:44:06 +04:00
Holger Weiss 2802b6cee2 Allow for "max_ack_queue: infinity", as documented 2014-08-20 12:53:26 +02:00
Holger Weiss 44828c54fe Fix MUC option docs: "infinity", not "infinite" 2014-08-20 12:26:03 +02:00
Evgeny Khramtsov ae0d31a8c9 Merge pull request #280 from weiss/store-persistent-muc-on-init
Store peristent MUC room during creation
2014-08-19 13:28:15 +04:00
Holger Weiss 7274dafe10 Store persistent MUC room during creation
Make sure persistent rooms are stored to the database.  Without this
change, a room got lost if the 'persistent' flag was handed over to
mod_muc:create_room/5 and the server was then restartet before any
activity took place in that room.
2014-08-19 11:12:51 +02:00
Evgeny Khramtsov bc2e26fecd Merge pull request #277 from weiss/xep-0198
XEP-0198: Create shorter session resume IDs
2014-08-15 19:15:32 +04:00
Holger Weiss 2d4c39cd54 XEP-0198: Create shorter resume IDs
Omit the user and server name from the 'previd' value.
2014-08-15 10:56:59 +02:00
Evgeny Khramtsov 9484b11383 Merge pull request #276 from weiss/xep-0198
XEP-0198: Don't crash if the resume ID is incorrect
2014-08-15 10:49:59 +04:00
Holger Weiss 848e1497d1 XEP-0198: Gracefully handle broken 'previd'
Produce a proper error message instead of crashing when the 'previd'
value of a <resume/> request has an unexpected format.
2014-08-15 01:54:41 +02:00
Holger Weiss 2daf95e93f XEP-0198: Gracefully handle wrong credentials
Produce a proper error message instead of crashing when the JID encoded
in the 'previd' value of a <resume/> request is different from the
authenticated JID.
2014-08-15 01:53:47 +02:00
Evgeny Khramtsov 1b1d9b5a73 Merge pull request #269 from Iperity/master
Fix migration of pubsub nodes. Was deleting and re-creating all nodes on...
2014-08-15 03:20:36 +04:00
Evgeny Khramtsov 5836eb5bc2 Merge pull request #268 from benlangfeld/fix/ldap_filter_dnattributes_new_ejabberd
Set dnAttributes on when it's requested by a filter
2014-08-15 03:19:18 +04:00
Evgeniy Khramtsov 5c88f6423a Fix the deprecation warning to reflect YAML format 2014-08-12 14:26:15 +04:00
Evgeniy Khramtsov 56d61c2784 Do not call functions from ejabberd_riak directly 2014-08-12 14:25:54 +04:00
Evgeny Khramtsov 0917209711 Merge pull request #273 from gamenet/master
odb_queries patch return value of functions update and update_t in case of sql insert
2014-08-08 16:03:03 +04:00
vesvalo 8c22b154c9 Merge pull request #2 from vesvalo/master
fix mod_offline to store only chat messages with body xml element
2014-08-08 14:05:35 +04:00
vesvalo 436f0832c1 fix mod_offline to store only chat messages with body xml element 2014-08-08 13:57:27 +04:00
Nikolay Bondarenko 5d0de39127 Merge pull request #1 from vesvalo/master
Fix odbc update_t and update insert case return value
2014-08-08 13:39:44 +04:00
vesvalo 92f89e3d45 Fix odbc update_t and update insert case return value 2014-08-08 13:26:16 +04:00
Evgeny Khramtsov f91caf7108 Merge pull request #270 from weiss/log-s2s-in-auth
Log authentication method for incoming s2s connections
2014-08-05 16:51:51 +04:00
Holger Weiss 38c016a041 Log auth method for incoming s2s connections
Generate an [info] message that logs whether an incoming s2s connection
is authenticated using the SASL EXTERNAL mechanism or via Server
Dialback.  While at it, also mention whether TLS is enabled.
2014-08-05 14:10:32 +02:00
Nathan Bruning 4f63cb21c2 Fix migration of pubsub nodes. Was deleting and re-creating all nodes on each startup. 2014-08-03 21:03:16 +02:00
Evgeny Khramtsov 2e70c59471 Merge pull request #267 from weiss/replace-echo-calls
doc/Makefile: Replace non-portable echo(1) calls
2014-08-01 19:25:01 +04:00
Alexey Shchepin f00725dffb mod_offline now uses gen_server 2014-07-31 14:26:09 +04:00
Christophe Romain 4205108f30 typo fix on roster subscription (EJAB-1711) 2014-07-31 11:50:22 +02:00
Ben Langfeld 651de2ca8e Set dnAttributes on when it's requested by a filter 2014-07-29 15:22:54 -03:00
Holger Weiss e79290fb56 doc/Makefile: Replace non-portable echo(1) calls
The echo(1) behavior is system-dependent, the printf(1) behavior is not.
2014-07-28 22:54:09 +02:00
Evgeniy Khramtsov db3c469d4d Reorganize mod_announce test in order to avoid race 2014-07-28 13:42:50 +04:00
Evgeny Khramtsov 7d93463d31 Merge pull request #266 from weiss/remove-http
Remove "--enable-http" flag
2014-07-28 11:08:13 +04:00
Evgeny Khramtsov 5d79dff4f3 Merge pull request #265 from weiss/mention-starttls-required
Mention "starttls_required" option in sample configuration file
2014-07-28 11:06:59 +04:00
Evgeny Khramtsov 58fd56e6a2 Merge pull request #264 from weiss/su-without-p
ejabberdctl: Omit su(1)'s "-p" flag
2014-07-28 11:06:27 +04:00
Holger Weiss f1e6365ee1 Remove "--enable-http" flag
Specifying the "--enable-http" flag on the ./configure command line had
no effect.
2014-07-27 12:51:25 +02:00
Holger Weiss 4a02df8b6d Mention "starttls_required" option in ejabberd.yml
Closes #258.
2014-07-27 12:44:34 +02:00
Holger Weiss bee9ffd91e Apply minor improvement to ejabberd.yml comment 2014-07-27 11:54:30 +02:00
Holger Weiss 3e232952ea ejabberdctl: Omit su(1)'s "-p" flag
On Linux, su(1)'s "-p" flag makes sure the following environment
variables are preserved: $HOME, $SHELL, $USER, and $LOGNAME.  The flag
isn't portable, and since we don't set HOME=$SPOOLDIR anymore, there's
no reason to preserve these variables anyway.

Without "-p", we also don't need to set HOME=$INSTALLUSER_HOME, as su(1)
now does that for us.
2014-07-27 11:21:55 +02:00
Evgeniy Khramtsov c0001184fd Merge branch 'master' of github.com:processone/ejabberd 2014-07-27 13:06:46 +04:00
Evgeniy Khramtsov abeaac1c11 Add tests for mod_announce 2014-07-27 13:06:20 +04:00
Evgeny Khramtsov 6427d9398a Merge pull request #263 from weiss/fix-ejabberdctl-issues
Fix ejabberdctl issues
2014-07-24 20:56:32 +04:00
Evgeny Khramtsov 677b358a9a Merge pull request #262 from weiss/update-gitignore
Let Git ignore the "configure" script
2014-07-24 20:55:50 +04:00
Holger Weiss b997c4325a Let Git ignore the "configure" script 2014-07-24 17:50:43 +02:00
Holger Weiss 9c279f2e06 ejabberdctl: Remove outdated comment
The home directory is no longer set to $SPOOL_DIR.
2014-07-24 17:20:09 +02:00
Holger Weiss 46f01b962a ejabberdctl: Create home directory as root
If the $INSTALLUSER is not root, he will usually not have the necessary
permissions to create his home directory.
2014-07-24 17:16:47 +02:00
Evgeny Khramtsov 9db39a5e4c Merge pull request #261 from weiss/no-bash
doc/Makefile: Don't insist on using /bin/bash
2014-07-24 17:44:06 +04:00
Holger Weiss 43000d9ce4 ejabberdctl: Use $INSTALLUSER's home directory
Make sure ejabberdctl uses the $INSTALLUSER's .erlang.cookie file even
if the script was executed by root.
2014-07-24 15:25:28 +02:00
Holger Weiss 33368b7e5c doc/Makefile: Don't insist on using /bin/bash
Fix "make doc" for systems that don't have /bin/bash.  There's no
bash-specific code in doc/Makefile anymore.
2014-07-24 15:15:00 +02:00
Evgeniy Khramtsov a087af7060 Re-generate the XMPP codec using updated xml_gen 2014-07-24 10:35:17 +04:00
Evgeniy Khramtsov 3d3a4f7543 Fix events broadcasting via C2S 2014-07-22 19:42:49 +04:00
Evgeny Khramtsov 9ff3ce8bd1 Merge pull request #257 from weiss/fix-option-name
Fix "s2s_access" option name in documentation
2014-07-22 17:47:04 +04:00
Holger Weiss 4efca05149 Fix "s2s_access" option name in documentation 2014-07-22 15:06:19 +02:00
Christophe Romain f19e19e2b6 reflect correct default value un example documentation 2014-07-22 14:35:31 +02:00
Evgeniy Khramtsov 25676b43ed Add tests for session management 2014-07-22 14:00:48 +04:00
Christophe Romain 870d822f08 old release notes are not installed anymore 2014-07-21 17:58:14 +02:00
Christophe Romain 320abee110 apply pull request #250 to pubsub_odbc as well 2014-07-21 17:14:59 +02:00
Christophe Romain 0579fc80ec Merge pull request #250 from Iperity/master
Fix configuraton with custom nodetree plugin
2014-07-21 17:11:29 +02:00
Christophe Romain 08ff969896 html guide is now generated when building source tarball 2014-07-21 16:36:10 +02:00
Christophe Romain 40ef406ec7 remove bash dependency, fix EJABBERD_OPTS use 2014-07-21 15:25:16 +02:00
Christophe Romain 790201afc0 avoid incorrect release version string (EJAB-1695)
to do so, we remove configure script from repository.
it must be generated with autotools.
for developpers not using autotools, we include the configure script in
release source tarball, which in generated with correct version string.
2014-07-21 13:50:35 +02:00
Evgeniy Khramtsov f2003943db Add tests for mod_carboncopy 2014-07-21 09:08:54 +04:00
Evgeniy Khramtsov 014d61955c Move some namespaces definitions into header file 2014-07-21 08:32:26 +04:00
Evgeny Khramtsov c068712373 Merge pull request #254 from weiss/replace-bashism
Replace bash-specific syntax in ejabberdctl
2014-07-20 19:20:00 +04:00
Holger Weiss 467ccdffbd Replace bash-specific syntax in ejabberdctl
Use plain POSIX shell syntax to match ".yml" configuration file names.
This is also slightly more correct, as it matches ".yml" only at the
*end* of the file name.
2014-07-20 13:24:28 +02:00
Evgeny Khramtsov 48d7ec1a92 Merge pull request #253 from weiss/fix-config-comments
Apply small fixes to description of log rotation in ejabberd.yml.example
2014-07-20 12:42:20 +04:00
Holger Weiss 105b421418 Fix ejabberd.yml comment on overload protection 2014-07-20 07:36:24 +02:00
Holger Weiss 277fe5ab25 Fix ejabberd.yml comment on log rotation syntax 2014-07-20 07:29:45 +02:00
Evgeniy Khramtsov 744018425b Improve MUC test cases 2014-07-19 17:30:02 +04:00
Evgeniy Khramtsov 1f4e0c8aea Fix Record-Route signing 2014-07-17 20:30:36 +04:00
Paweł Chmielowski e0c9242dcf treap.erl was moved to p1_utils 2014-07-17 11:57:23 +02:00
Paweł Chmielowski 0456b78d87 Use p1_utils 2014-07-17 10:52:31 +02:00
Evgeniy Khramtsov 568068c79f Get rid of p1_mnesia file 2014-07-17 08:32:13 +04:00
Evgeniy Khramtsov b5c4fe6626 Change return type to reflect recent changes in p1_sip 2014-07-16 15:28:36 +04:00
Evgeniy Khramtsov 64205426bf Fix returned types 2014-07-16 10:33:49 +04:00
Evgeniy Khramtsov 89025eea39 Fix blocklist get 2014-07-16 07:43:24 +04:00
Evgeny Khramtsov 4a918c5b18 Merge pull request #251 from weiss/enable-riak-tests
Travis CI: Enable Riak tests
2014-07-15 22:56:55 +04:00
Holger Weiss 9a7c26eaa8 Travis CI: Enable Riak tests 2014-07-15 20:42:12 +02:00
Evgeniy Khramtsov eb803832b7 Remove unnecessary defaults from the xmpp_codec spec 2014-07-15 20:42:53 +04:00
Evgeniy Khramtsov 4ef0dd6997 Better Riak usage detection 2014-07-15 20:26:45 +04:00
Evgeniy Khramtsov b5f1b17926 Fix broken hooked functions 2014-07-15 19:22:33 +04:00
Evgeniy Khramtsov fd298521e2 Add mod_caps checks to the testing suite 2014-07-15 18:35:23 +04:00
Nathan Bruning 99c28ab4d6 Fix configuraton with custom nodetree plugin 2014-07-15 12:04:06 +02:00
Evgeniy Khramtsov 2d6a838905 Do not check for Erlang apps at configure time as it looks redundant 2014-07-14 08:29:57 +04:00
Evgeniy Khramtsov 792b5a24df Serialize records to proplists before storing then in Riak 2014-07-14 08:24:44 +04:00
Evgeny Khramtsov 19cc687928 Merge pull request #248 from mathiasertl/master
Move warnings inside check for $EJABBERD_BYPASS_WARNINGS, use variable for path
2014-07-11 15:45:29 +04:00
Mathias Ertl 86a6667122 Move warnings inside check for , use variable for path 2014-07-11 12:34:52 +02:00
Evgeniy Khramtsov 07501f8085 Re-generate the HTML documents 2014-07-10 19:07:09 +04:00
Evgeniy Khramtsov dd77236d75 Mention about Riak in yet another place 2014-07-10 15:34:09 +04:00
Evgeniy Khramtsov 926c9193e7 Try to bypass Riak tests by Travis CI 2014-07-10 14:45:54 +04:00
Evgeniy Khramtsov a5987633e0 Fix compile errors introduced by previous cherry picks 2014-07-10 14:16:33 +04:00
Evgeniy Khramtsov aa8dce9804 Re-generate the configure script 2014-07-10 13:59:11 +04:00
Evgeniy Khramtsov edfb5fc2f8 Add --enable-riak configure flag 2014-07-10 13:58:43 +04:00
Evgeniy Khramtsov 91fcdf9f6a Document Riak support 2014-07-10 13:55:49 +04:00
Evgeniy Khramtsov 54cfd5091f Check Riak connection before running the corresponding suite 2014-07-10 13:55:38 +04:00
Evgeniy Khramtsov 2fe8e0dea5 Make it possible to check Riak connection status 2014-07-10 13:55:24 +04:00
Evgeniy Khramtsov 9d62d13492 Don't forget to shutdown rooms before starting the testing suite 2014-07-10 13:55:08 +04:00
Evgeniy Khramtsov f40d5e4a89 Improve test suite explanation 2014-07-10 13:54:51 +04:00
Evgeniy Khramtsov c559c9425a Clear Riak data when initializing the testing suite 2014-07-10 13:54:17 +04:00
Evgeniy Khramtsov 6a73b96459 Fix roster versioning support when Riak backend is enabled 2014-07-10 13:54:06 +04:00
Evgeniy Khramtsov 538d4ffbd0 Fix case clause 2014-07-10 13:53:57 +04:00
Evgeniy Khramtsov c15dc01cff Improve Riak pool management 2014-07-10 13:52:29 +04:00
Evgeniy Khramtsov f1d0b05db5 Fixate Riak client library 2014-07-10 13:44:14 +04:00
Evgeniy Khramtsov a60dd672b7 Add Riak backend to the testing suit 2014-07-10 13:42:31 +04:00
Evgeniy Khramtsov e82219185b Add SQL to Riak converter 2014-07-10 13:29:01 +04:00
Evgeniy Khramtsov 0490c2f139 Improve Riak support 2014-07-10 13:26:37 +04:00
Alexey Shchepin a4b02c38db Updated riak support 2014-07-10 13:15:15 +04:00
Alexey Shchepin 47763c10e3 Preliminary Riak support 2014-07-10 13:04:39 +04:00
Evgeniy Khramtsov fc692ea512 Add start_module/2 2014-07-08 20:58:03 +04:00
Evgeniy Khramtsov 28479321bb Improve documentation of mod_sip 2014-07-07 09:40:20 +04:00
Evgeniy Khramtsov 2b8c4acd57 Rename options 2014-07-07 09:40:08 +04:00
Evgeniy Khramtsov ee40c0e9a7 Add new option support: always_record_route 2014-07-07 09:40:01 +04:00
Evgeny Khramtsov 9a55ffba7a Merge pull request #243 from matwey/master
Use -include_lib instead of -include for esip and p1_xml
2014-07-05 18:09:28 +04:00
Matwey V. Kornilov 50a73d1188 Use -include_lib instead of -include for esip and p1_xml
-include_lib is used in order to find deps. Rebar include magic is not required anymore.
Rebar uses deps as library directory.
2014-07-05 17:57:35 +04:00
Evgeniy Khramtsov 76ebebf2a0 Revert "Fix IQ XML generation."
This reverts commit 26a4d91297.
2014-07-05 17:53:45 +04:00
Jerome Sautret aba7150af1 Return MySQL error messages as binary. 2014-07-04 17:39:28 +02:00
Jerome Sautret 26a4d91297 Fix IQ XML generation. 2014-07-04 15:21:40 +02:00
Christophe Romain 9265720f92 add ability to rotate logs on given date condition 2014-07-02 23:46:54 +02:00
Evgeniy Khramtsov 273631c242 New option support: log_rotate_count 2014-07-02 14:59:05 +02:00
Evgeniy Khramtsov bb8a0f71e6 Support new options: log_rotate_size and log_rate_limit 2014-07-02 14:58:58 +02:00
Evgeniy Khramtsov ffdb39d269 Disable SASL error logger if lager is enabled 2014-07-02 14:58:46 +02:00
Badlop 8fae4748a1 mod_caps doesn't provide Mnesia export feature 2014-06-27 13:49:17 +02:00
Christophe Romain 643a31dcea let ejabberdctl explicitely use bash 2014-06-20 14:34:14 +02:00
Evgeny Khramtsov 31440a586c Merge pull request #238 from weiss/log-node-mismatch
Check for Mnesia node name mismatches on startup
2014-06-12 13:23:17 +04:00
Holger Weiss 1ef2dd45f3 Check for Mnesia node name mismatches
Log a proper error message if the node running ejabberd doesn't own the
Mnesia database.
2014-06-12 11:00:22 +02:00
Evgeniy Khramtsov b29615561c Change default flow timeout as recommended per the RFC 2014-06-12 09:30:10 +04:00
Evgeniy Khramtsov 7892b72bcb Don't forget to close socket of timed out flow 2014-06-12 09:30:04 +04:00
Evgeny Khramtsov 4b82a38cf7 Merge pull request #237 from weiss/log-config-path
Mention configuration file path in error messages
2014-06-11 18:31:41 +04:00
Holger Weiss c20acbf4d8 Mention configuration file path in error messages
If reading or parsing a YAML configuration fails, log the full path to
the configuration file (as we do for old-style ".cfg" files).
2014-06-11 15:03:33 +02:00
Evgeny Khramtsov e66899e68e Merge pull request #231 from hamano/case_clause_error_at_node_hometree_odbc
case_clause_error_at_node_hometree_odbc
2014-06-09 23:50:43 +04:00
Evgeniy Khramtsov 87f8c2ecd8 Don't stop roster table conversion on broken askmessage 2014-06-09 10:55:05 +04:00
Evgeniy Khramtsov 62be3bc111 Fix previous commit 2014-06-09 10:40:52 +04:00
Evgeniy Khramtsov c485aea48b Don't stop irc table conversion on broken JIDs 2014-06-09 10:36:42 +04:00
Evgeniy Khramtsov 6f4b4ad087 Ignore malformed parameters for mod_irc module 2014-06-07 07:45:36 +04:00
Evgeniy Khramtsov 3e8a0af6d1 Fix data convertion 2014-06-07 07:05:24 +04:00
Evgeniy Khramtsov 12ab5a749f Clean up all timers gracefully 2014-06-06 22:29:50 +04:00
Evgeniy Khramtsov ddfbca5830 Use a different timer for flow control 2014-06-06 13:53:13 +04:00
Evgeniy Khramtsov 9e72529544 SIP Outbound (RFC 5626) support 2014-06-06 09:36:45 +04:00
Christophe Romain 11aa51373a add missing format handler 2014-06-05 16:23:17 +02:00
Evgeny Khramtsov 5992582bc5 Merge pull request #232 from weiss/dont-drop-listen-options
Don't "forget" listener options
2014-06-04 23:37:13 +04:00
Holger Weiss e0e74a9d5e Don't "forget" listener options
If a listener is started or stopped via ejabberd_listener:add_listener/3
or ejabberd_listener:delete_listener/3, the configuration for all
listener modules is updated using the Module:transform_listen_option/2
function for each listener module that exports such a function.
However, for listener modules that don't provide that function (such as
ejabberd_stun), all but one option was dropped.  This is now fixed.

The issue could be triggered e.g. by enabling mod_proxy65 in the modules
section.
2014-06-04 20:54:26 +02:00
HAMANO Tsukasa cc228db337 e_clause error at node_hometree_odbc:get_items/3 2014-06-04 18:53:37 +09:00
Evgeniy Khramtsov c546ce2439 Reply to pings 2014-06-03 21:18:30 +04:00
Evgeniy Khramtsov fdda4d506f Always enable STUN at compile time 2014-06-03 20:54:39 +04:00
Evgeny Khramtsov 5de16493d1 Merge pull request #230 from weiss/fix-dependency-list
Fix the list of dependencies
2014-06-03 16:28:13 +04:00
Holger Weiss 2381a8d609 Remove exmpp from the list of dependencies
The XEP-0227 code no longer uses exmpp.

Thanks to Steve Gillespie for noting this.
2014-06-03 14:16:11 +02:00
Holger Weiss 39f1005006 Fix LibYAML version in the list of dependencies
Thanks to Steve Gillespie for reporting the error.
2014-06-03 13:00:17 +02:00
Evgeniy Khramtsov 6441c284e0 Don't add 'rport' paramater to 'Via' header 2014-06-02 20:46:29 +04:00
Evgeniy Khramtsov 0aea9c74bd Rename option 'route' to 'record_route' and add new option 'routes' 2014-06-02 10:16:34 +04:00
Evgeniy Khramtsov 9a0d77571d Add global static shared_key option 2014-06-01 14:20:09 +04:00
Evgeniy Khramtsov f446e7fc0b Sign 'Record-Route' in order to proxy unauthorized ACKs 2014-06-01 13:35:14 +04:00
Evgeniy Khramtsov b75b5ebeb2 Fix 'via' option lookup 2014-05-31 14:22:39 +04:00
Evgeniy Khramtsov d19903877d Add new option: route 2014-05-31 14:22:31 +04:00
Evgeny Khramtsov f271ea6eef Merge pull request #229 from weiss/no-carbons-to-sender
XEP-0280: Don't send v1 carbon copies back to the sender
2014-05-31 12:53:18 +04:00
Evgeniy Khramtsov c76201b6b4 Don't add 'Record-Route' header for mid-dialog requests 2014-05-31 10:00:51 +04:00
Evgeniy Khramtsov 86f2af6fdc Process bindings from multiple UACs correctly 2014-05-31 09:06:53 +04:00
Evgeniy Khramtsov da22da23cd Don't substitute URI in ACK 2014-05-31 07:50:16 +04:00
Holger Weiss f45654a16a Simplify mod_carboncopy:check_and_forward/4
Use the existing is_carbon_copy/1 function, and combine multiple case
clauses into a single one.
2014-05-30 23:44:19 +02:00
Holger Weiss bb952f9ecc Let is_carbon_copy/1 recognize <received/> carbons
The mod_carboncopy:is_carbon_copy/1 function now returns true not only
for <sent/>, but also for <received/> carbon copies.
2014-05-30 23:36:02 +02:00
Holger Weiss ad2d3964ef Don't send XEP-0280 v1 copies back to sender
An earlier version of XEP-0280 specified the <received/> and <sent/>
tags to be siblings of the <forwarded/> element, whereas the current
version mandates them to be parents of <forwarded/>.  The mod_carboncopy
module supports both variants.  However, the check that makes sure
clients won't receive a copy of the messages they sent didn't work for
the old-style schema.  This is now fixed.
2014-05-30 23:32:18 +02:00
Evgeniy Khramtsov 2cd17c7988 Fix previous commit 2014-05-30 23:49:50 +04:00
Evgeniy Khramtsov 32998f7e18 Process 'Contact' headers more accurately (as per RFC3261) 2014-05-30 23:14:52 +04:00
Evgeny Khramtsov 7261cb29ac Merge pull request #228 from weiss/turn-down-carbons-logging
Log just one [info] message on successful XEP-0280 negotiation
2014-05-29 19:19:05 +04:00
Holger Weiss 8fb1bb1f5f Log just one [info] message on Carbons negotiation
Log one instead of three [info] messages when XEP-0280 (Message Carbons)
support is enabled or disabled successfully.  On failure, log an
additional [warning].
2014-05-29 15:21:11 +02:00
Evgeny Khramtsov 5a29d56d94 Merge pull request #227 from weiss/xep-0198
XEP-0198: Cosmetic change: Reuse event handler
2014-05-28 13:43:29 +04:00
Holger Weiss 0cb9ea3643 XEP-0198: Cosmetic change: Reuse event handler
On stanza queue overflow, pass a message to self() using the exclamation
mark operator instead of send_all_state_event/2.  This allows for
reusing the existing handler for 'kick' events.
2014-05-28 11:24:38 +02:00
Evgeny Khramtsov 7d54fdea51 Merge pull request #206 from weiss/xep-0198
XEP-0198: Terminate session if stanza queue becomes too large
2014-05-28 13:18:12 +04:00
Holger Weiss 99ca8281fa XEP-0198: Terminate session on queue overflow
On queue overflow, terminate the c2s session instead of just dropping
items from the queue.  This makes sure all stanzas are either delivered
or bounced.
2014-05-27 22:56:33 +02:00
Evgeny Khramtsov 3a27b1dd0c Merge pull request #226 from weiss/simplify-state-change
XEP-0198: Cosmetic change: Simplify state change
2014-05-27 23:30:30 +04:00
Evgeny Khramtsov f9c5e349fb Merge pull request #225 from weiss/use-fsm-next-state
Let ejabberd_c2s always use fsm_next_state/2
2014-05-27 23:27:16 +04:00
Holger Weiss 50a4c5a6ab XEP-0198: Cosmetic change: Simplify state change
When the FSM goes into the 'wait_for_resume' state, let fsm_next_state/2
take care of updating #state.mgmt_state and of writing the log line.
This doesn't change the behavior, but simplifies the code.
2014-05-27 21:14:49 +02:00
Holger Weiss ed0c89f876 Let ejabberd_c2s always use fsm_next_state/2
Make sure any logic implemented in ejabberd_c2s:fsm_next_state/2 is
always applied.
2014-05-27 21:07:53 +02:00
Evgeny Khramtsov 702cddd4ff Merge pull request #220 from weiss/handle-send-failure
XEP-0198: Don't exit on socket send failure
2014-05-27 15:44:04 +04:00
Evgeny Khramtsov 4d1332c30f Merge pull request #222 from weiss/keep-session-on-failed-resume
XEP-0198: Don't drop session on failed resume
2014-05-27 15:38:26 +04:00
Evgeny Khramtsov 402fb9665d Merge pull request #221 from weiss/omit-redundant-guard
XEP-0198: Cosmetic change: Omit redundant guard
2014-05-27 15:34:34 +04:00
Evgeny Khramtsov b2e84405c1 Merge pull request #218 from weiss/omit-iq-xmlns
Omit XML namespace declaration for <iq/> stanzas
2014-05-27 15:32:02 +04:00
Evgeniy Khramtsov 52221127cc Fix odbc_port option processing 2014-05-27 15:27:42 +04:00
Evgeniy Khramtsov dceab3689d Don't forget to include 'Contact' header field in 2xx registrar responses 2014-05-26 21:34:23 +04:00
Christophe Romain 123b01aaa0 don't stop make install if epam is not compiled 2014-05-25 13:02:25 +02:00
Christophe Romain 572938aa49 install epam binary when available 2014-05-25 02:31:28 +02:00
bLaDe 48600ae71d Update id.msg 2014-05-24 17:53:39 +07:00
Holger Weiss 59f6efeaf7 XEP-0198: Don't drop session on failed resume
The 'previd' value provided by the client during a session resume
request includes the client's JID and ejabberd's session ID.  If there
is a session for the requested JID but with a different session ID,
resumption should fail, but that session shouldn't be closed.  This
commit makes sure the latter won't happen.

In practice, this will only make a difference in odd corner cases.
2014-05-23 23:38:04 +02:00
Holger Weiss 737b0ae5dc XEP-0198: Cosmetic change: Omit redundant guard
The stream management state is never 'pending' when the c2s FSM is in
the 'session_established' state.
2014-05-23 20:46:17 +02:00
Evgeniy Khramtsov 8925975c86 Fix proxying of ACK requests for 2xx responses 2014-05-23 20:14:53 +04:00
Holger Weiss ab9667f917 XEP-0198: Don't exit on socket send failure
If stream management is enabled, don't exit the c2s process when
ejabberd_socket:send/2 fails, but close the socket instead.  This gives
the client a chance to resume the session.

Thanks go to Matthias Rieber for reporting the issue, providing detailed
logs, and testing the fix.
2014-05-23 11:38:54 +02:00
Badlop 6baf3a24de Merge branch 'weiss-check-packet-type' into 3 2014-05-21 18:45:43 +02:00
Badlop 735bd95659 Merge branch 'check-packet-type' of git://github.com/weiss/ejabberd into weiss-check-packet-type
Conflicts:
	src/ejabberd_c2s.erl
2014-05-21 18:45:28 +02:00
badlop 69abb48c90 Merge pull request #217 from weiss/fix-extauth-cache-usage
Don't use cached passwords if "extauth_cache: 0"
2014-05-21 17:35:54 +02:00
badlop 419a98d45a Merge pull request #216 from lavrin/p1-c2s
Cleanup some pieces of ejabberd_c2s
2014-05-21 17:35:24 +02:00
badlop 0dc8429d16 Merge pull request #215 from weiss/fix-url-markup
Fix URL markup in the guide
2014-05-21 17:33:56 +02:00
badlop b9210d491a Merge pull request #208 from weiss/update-travis-config
Travis CI: Remove unnecessary configure flag
2014-05-21 17:31:49 +02:00
badlop 5d855f3723 Merge pull request #207 from weiss/xep-0334
Honor XEP-0334: Message Processing Hints
2014-05-21 17:31:22 +02:00
Holger Weiss 6b996061a2 Omit XML namespace declaration for <iq/> stanzas
Only the child elements of <iq/> stanzas are qualified by the namespaces
in question, not the <iq/> stanzas themselves.

This change just clarifies the code.  It doesn't alter the behaviour, as
those <iq/> stanzas are handed over to jlib:iq_to_xml/1, and that
function ignores the 'xmlns' attribute anyway.
2014-05-21 00:07:57 +02:00
Holger Weiss fca640f50f Don't use cached passwords if "extauth_cache: 0"
Regarding "extauth_cache", the guide says: "The integer 0 (zero) enables
caching for statistics, but doesn't use that cached information to
authenticate users."  Make sure the cached password isn't used even if
the user is currently logged in with another resource.
2014-05-20 23:00:28 +02:00
Badlop 5010cea1a4 If log uses file:write, no need to double escape ~ in messages (EJAB-1696) 2014-05-20 14:49:52 +02:00
Radosław Szymczyszyn 5726636053 Fix check_from/2 formatting 2014-05-20 12:31:28 +01:00
Radosław Szymczyszyn b7a542e074 Sanitize copy-pasted get_statustag/1 2014-05-20 12:28:14 +01:00
Radosław Szymczyszyn 9c37450fe4 Fix formatting 2014-05-20 12:26:33 +01:00
Radosław Szymczyszyn c39ce133de Build proceed/compressed elements in a sane way 2014-05-20 11:52:02 +01:00
Holger Weiss dd543af2f6 Fix URL markup in the guide 2014-05-20 00:24:34 +02:00
Badlop 6d06f22f64 MUC messages with ~ were not logged (EJAB-1696) 2014-05-19 19:07:46 +02:00
badlop 862166511c Merge pull request #213 from weiss/fix-xmlrcp-doc-url
Update ejabberd_xmlrpc documentation URL in the guide
2014-05-19 11:46:37 +02:00
Holger Weiss 4e54c53abb Update ejabberd_xmlrpc documentation URL 2014-05-14 22:39:19 +02:00
Badlop a6ddab1e9d Fix bug when joining empty path 2014-05-14 13:28:39 +02:00
Evgeny Khramtsov 3c045ba8aa Merge pull request #212 from weiss/fix-presence-updates
Don't miss incoming presence updates
2014-05-14 08:06:40 +04:00
Holger Weiss 6e8dd5bdff Don't miss incoming presence updates 2014-05-14 01:04:38 +02:00
Holger Weiss f6da708b02 XEP-0198: Check whether routed packets are stanzas
Only stanzas are subject to stream management, so when XEP-0198 support
is enabled, we must distinguish them from non-stanza elements.  This
commit adds a send_packet/2 function that can be used in place of
send_stanza/2 or send_element/2 whenever a packet is delivered that
might or might not be a stanza.
2014-05-12 19:20:25 +02:00
badlop 23fdf0e889 Merge pull request #209 from weiss/rename-disconnect-user
Rename disconnect_user/2 command
2014-05-12 12:55:15 +02:00
Holger Weiss 9121ca14de Rename disconnect_user/2 command
The mod_admin_extra module provides a kick_session/4 command.  Rename
the disconnect_user/2 command to kick_user/2 for consistency.
2014-05-12 12:44:40 +02:00
Holger Weiss f4a3dbea70 Travis CI: Remove unnecessary configure flag
The test suite no longer fails without --enable-transient_supervisors.
2014-05-12 10:28:02 +02:00
Holger Weiss 47efe4e6a9 Don't log MUC messages with <no-store/> hint
Honor the <no-store/> and <no-permanent-store/> hints defined in
XEP-0334.
2014-05-12 00:27:20 +02:00
Holger Weiss 03fd88e4ec Don't store messages with <no-store/> hint
Honor the <no-store/> hint defined in XEP-0334.
2014-05-12 00:00:34 +02:00
Holger Weiss 9b16d09261 Don't carbon copy messages with <no-copy/> hint
Honor the <no-copy/> hint defined in XEP-0334.
2014-05-11 23:52:20 +02:00
Evgeny Khramtsov 5d22159e9a Merge pull request #205 from weiss/xep-0198
XEP-0198: Improve handling of incorrect stanza counts reported by client
2014-05-10 00:05:17 +04:00
Evgeniy Khramtsov 003fd321ee Do not try to retreive vCards via local SM for foreign JIDs 2014-05-09 21:26:55 +04:00
Holger Weiss 6d5bfcfe9b XEP-0198: Improve handling of too large 'h' values
If the client says that it handled more stanzas than we sent (due to a
bug in the client's or in our code), increase our outgoing stanza count
accordingly.  There's no point in sticking to the old value even if it
was correct, as the client surely won't fix its count during the current
session.
2014-05-09 18:28:14 +02:00
Holger Weiss 15369ff9d7 XEP-0198: Reject <resume/> with negative 'h' value
Make sure the 'h' attribute sent with a <resume/> request is
nonnegative, as mandated by XEP-0198.

We already have this check for <a/> elements.
2014-05-09 18:01:31 +02:00
Holger Weiss a60fda7df4 XEP-0198: Don't warn on invalid ACK elements
Do not log a warning (but only a debug message) if the client sends an
invalid </a> packet.  Some clients do that occasionally, and there's
nothing server admininistrators could do about that.
2014-05-09 17:54:12 +02:00
Evgeniy Khramtsov 318b0f2208 Fix previous commit (C2S session close on server shutdown) 2014-05-08 21:47:50 +04:00
Evgeniy Khramtsov b995178e30 Merge branch 'master' of github.com:processone/ejabberd 2014-05-08 21:40:14 +04:00
Evgeniy Khramtsov 181e7a823e Fix C2S session close on server shutdown 2014-05-08 21:39:53 +04:00
Badlop 0716a8cdae Recompile the Guide 2014-05-08 17:58:25 +02:00
Evgeniy Khramtsov 90a5c054d4 TURN support (EJAB-1017) 2014-05-08 16:14:21 +04:00
Evgeny Khramtsov 115da54557 Merge pull request #203 from hamano/added_get_random_pid_error_handling
improve error handling when sql calling with (empty|unknown) host.
2014-05-08 10:02:27 +04:00
Evgeny Khramtsov e88a5c6b3c Merge pull request #180 from hamano/mysql_table
added privacy_list_data index for mysql database.
2014-05-07 20:57:59 +04:00
Badlop 79a49b1175 Webadmin with extauth requires internal to run at least once (issue #201) 2014-05-07 17:13:51 +02:00
badlop c511194c2e Merge pull request #200 from hamano/mod_offline_bug
fix mod_offline:count_offline_messages/2
2014-05-07 16:49:31 +02:00
HAMANO Tsukasa d3ed12d4ba fix mod_offline:count_offline_messages/2 2014-05-07 15:38:18 +09:00
Evgeniy Khramtsov e7c94975eb Revert "Document that ejabberd compilation requires pkg-config"
This reverts commit bd0060715e.
2014-05-07 01:05:07 +04:00
Evgeny Khramtsov 47f627e605 Merge pull request #166 from weiss/xep-0198
Add support for XEP-0198: Stream Management
2014-05-06 23:50:49 +04:00
Holger Weiss d343447cc9 Merge remote-tracking branch 'processone/master' into xep-0198
Conflicts:
	doc/guide.tex
	src/ejabberd_c2s.erl
2014-05-06 21:41:29 +02:00
Christophe Romain cc1f93d7a0 Fix PEP broadcasting issue on ODBC (EJAB-1680) 2014-05-06 13:29:35 +02:00
Christophe Romain 58717923eb Fix PEP broadcasting issue (EJAB-1680) 2014-05-06 12:37:44 +02:00
Evgeny Khramtsov 1aa56af541 Merge pull request #198 from weiss/add-travis-support
Add Travis CI configuration file
2014-05-06 13:13:56 +04:00
Holger Weiss 8b1f92575a XEP-0198: Use "mgmt_" prefix for all #state fields
Prefix all ejabberd_c2s #state fields that are used for stream
management with "mgmt_".
2014-05-06 07:27:10 +02:00
Holger Weiss 66437c5e4d Add Travis CI configuration 2014-05-05 22:42:15 +02:00
Christophe Romain 52f3acbdb1 Merge branch 'master' of github.com:processone/ejabberd 2014-05-05 18:42:49 +02:00
Christophe Romain a6244275b7 remove compilation warnings 2014-05-05 18:16:48 +02:00
Badlop 402dec8354 Recompile the ejabberd Guide html 2014-05-05 17:55:45 +02:00
Christophe Romain 4bdf1bc7a6 avoid sending duplicated events 2014-05-05 17:53:50 +02:00
Christophe Romain faa6ad26a0 avoid sending empty events 2014-05-05 17:53:44 +02:00
Badlop bd0060715e Document that ejabberd compilation requires pkg-config 2014-05-05 17:46:52 +02:00
Christophe Romain 530ac43758 store item when persist_item=false and cache_last_item=false but need last_item 2014-05-05 17:40:42 +02:00
Evgeny Khramtsov 2723056fae Merge pull request #195 from Iperity/master
Fix small bug in presence_based_delivery implementation
2014-05-05 16:38:16 +04:00
Nathan Bruning f3aa74a043 Fix small bug in presence_based_delivery implementation 2014-05-05 14:14:03 +02:00
Badlop 872cc12dd8 Temporary room not destroyed when the last participant is expulsed (EJAB-520) 2014-05-05 13:50:52 +02:00
Badlop 70f00a1b1f extauth_cache can have value 0 2014-05-05 13:13:35 +02:00
Holger Weiss 3b3f3b9131 XEP-0198: Don't log protocol issues
There are corner cases where certain clients acknowledge more stanzas
than they received.  Nothing really bad will happen in those cases, and
server administrators can't do anything about such issues anyway.
2014-05-05 01:11:14 +02:00
Holger Weiss 32abcbca6c XEP-0198: Accept stream elements in pending state
Due to timing issues, ejabberd_c2s might receive stream elements from
the client while the session is waiting for stream resumption.  Those
elements are now accepted.
2014-05-05 00:02:55 +02:00
Holger Weiss a0917a8e9b XEP-0198: Log message when waiting for resumption
Log an informational message when a session goes into the pending state
(waiting for resumption) after the connection was lost.  Administrators
may well be interested in this state change when looking into issues.
2014-05-04 23:08:42 +02:00
Evgeniy Khramtsov fafec77e56 Make it possible to get/set vCards for MUC rooms 2014-05-04 23:23:17 +04:00
Evgeny Khramtsov 478b4f19bd Merge pull request #194 from weiss/mysql-user-at-localhost
test/README: Create MySQL test user on localhost
2014-05-04 12:00:59 +04:00
Holger Weiss b73b139f24 test/README: Create MySQL test user on 'localhost'
Suggest specifying 'localhost' as host name part of the MySQL test
account name.  Otherwise, the anonymous user that is usually created by
default for 'localhost' would take precedence for local connections due
to the more specific host name.
2014-05-04 01:02:22 +02:00
Evgeniy Khramtsov 806c0e56e1 Do not crash on version downgrade 2014-05-03 17:55:03 +04:00
Evgeniy Khramtsov d0ffcb7fd4 Assume udp_recv/5 now returns new options 2014-05-03 17:48:26 +04:00
Evgeniy Khramtsov 955487391d Assume tcp_init/2 and udp_init/2 now return new options 2014-05-03 17:48:17 +04:00
Evgeniy Khramtsov e00215a12f Always enable SIP at compile time 2014-05-02 17:46:24 +04:00
Evgeniy Khramtsov 47a39ce738 Remove unused function 2014-05-02 17:43:23 +04:00
Evgeniy Khramtsov ebd760b7c9 Forking support 2014-05-02 17:43:17 +04:00
Evgeniy Khramtsov f8417f7c1f Remove empty line 2014-05-02 17:43:09 +04:00
Evgeniy Khramtsov 3c98de69dc Some cleanup 2014-05-02 17:43:03 +04:00
Evgeniy Khramtsov ab6774d93d Fix CSeq comparison 2014-05-02 17:42:57 +04:00
Evgeniy Khramtsov 58aa200297 Optimize request processing 2014-05-02 17:42:51 +04:00
Evgeniy Khramtsov a1337cb73f Do not proxy stray responses statelessly (as per RFC 6026) 2014-05-02 17:42:45 +04:00
Evgeniy Khramtsov e7e4055cbb Don't use erlang:integer_to_binary/1 2014-05-02 17:42:37 +04:00
Evgeniy Khramtsov 1d771fe646 Rewrite 'Contact' headers in REGISTER requests 2014-05-02 17:42:31 +04:00
Evgeniy Khramtsov 8e2bc8d19e Check for 'max_user_sessions' option 2014-05-02 17:42:13 +04:00
Evgeniy Khramtsov 0117787317 Process gen_server timeouts correctly 2014-05-02 17:40:25 +04:00
Evgeniy Khramtsov 16e5d66572 Move some code in a separate function 2014-05-02 17:38:47 +04:00
Evgeniy Khramtsov 6a95422af8 Multiple REGISTER bindings support 2014-05-02 17:38:28 +04:00
Evgeniy Khramtsov 35faffe7da Locate sessions by proxy processes directly 2014-05-02 17:31:17 +04:00
Evgeny Khramtsov a6fe7425dd Merge pull request #192 from hamano/fix_ejabberd_system_monitor_error
fix ejabberd_system_monitor:s2s_out_info/1 error
2014-05-01 10:44:49 +04:00
HAMANO Tsukasa d83368d73d fix ejabberd_system_monitor:s2s_out_info/1 error 2014-05-01 15:12:04 +09:00
Evgeny Khramtsov c545b3de6d Merge pull request #178 from hamano/devel
undefined ejabberd_socket:get_conn_type/1
2014-04-30 21:49:54 +04:00
Evgeniy Khramtsov 02e0649d18 SIP support
Conflicts:
	configure
	configure.ac
	doc/guide.tex
2014-04-30 19:38:15 +04:00
HAMANO Tsukasa 0904b8b8ff improve error handling when sql calling with (empty|unknown) host.
see #191
2014-05-01 00:20:58 +09:00
Badlop ec6c58a21c Fix error reporting in previous commit 2014-04-30 16:02:20 +02:00
Badlop b3714a1b2e Fix formatting string argument (thanks to Locojay)(github #129) 2014-04-30 15:59:44 +02:00
Evgeny Khramtsov 81a906af01 Merge pull request #191 from hamano/added_get_random_pid_error_handling
fix error handling when sql calling with unknown host.
2014-04-30 17:02:39 +04:00
badlop 65519cf262 Merge pull request #190 from hamano/mod_register_web_response_404
mod_register_web should response 404 instead of process crash.
2014-04-30 12:42:43 +02:00
badlop a1b8c54c16 Merge pull request #187 from weiss/fix-ejabberdctl-output
Let ejabberdctl accept binary string arguments
2014-04-30 12:41:12 +02:00
HAMANO Tsukasa a6408e9281 fix error handling when sql calling with unknown host. 2014-04-30 15:32:07 +09:00
HAMANO Tsukasa 0e0bd3329d mod_register_web should response 404 instead of process crash. 2014-04-30 13:39:17 +09:00
Evgeny Khramtsov ce22239d85 Merge pull request #189 from weiss/markdown-readme
Convert README to Markdown
2014-04-30 07:55:27 +04:00
Holger Weiss 375a1dd759 Convert README to Markdown
Use Markdown syntax for the README file and add a README.md symlink, so
that a certain popular Git hosting site renders it nicely.
2014-04-29 23:54:14 +02:00
Evgeny Khramtsov 9563b0228f Merge pull request #177 from weiss/log-tls-sasl-external
Log TLS status for outgoing s2s with SASL EXTERNAL
2014-04-30 00:38:18 +04:00
Evgeny Khramtsov 8419322884 Merge pull request #181 from weiss/check-tls-before-auth
Check TLS state before requesting SASL EXTERNAL for outgoing s2s connections
2014-04-30 00:36:08 +04:00
Evgeny Khramtsov c37aa1b46d Merge pull request #185 from weiss/verify-cert-for-s2s-out
Support certificate verification for outgoing s2s connections
2014-04-30 00:08:24 +04:00
Evgeny Khramtsov 599fdb9ac2 Merge pull request #186 from weiss/add-disconnect-command
New ejabberd command: disconnect_user/2
2014-04-29 15:41:41 +04:00
Holger Weiss ebbceab93f Translate disconnect_user/2 string sent to client 2014-04-29 11:56:28 +02:00
Holger Weiss bb2c8b59f8 Avoid #state.lang type errors in corner cases
If #state.lang is used before being initialized to some binary string,
the translation code would crash.
2014-04-29 11:41:24 +02:00
Evgeny Khramtsov 0af3f9388f Merge pull request #188 from weiss/update-readme
Update README: XEP-0227 code no longer uses exmpp
2014-04-29 13:12:08 +04:00
Evgeny Khramtsov 4073394e7a Merge pull request #182 from hamano/register_account_acl
fix checking acl in mod_register_web
2014-04-29 13:06:53 +04:00
Evgeny Khramtsov 29aead19d9 Merge pull request #179 from hamano/added_get_random_pid_error_handling
added get_random_pid/1 error handling
2014-04-29 13:05:58 +04:00
Holger Weiss 16dd6b03c6 Update README: XEP-0227 code no longer uses exmpp 2014-04-29 10:17:00 +02:00
Holger Weiss d09c268b20 Let ejabberdctl accept binary string arguments
Don't print the following message if an ejabberd command expects binary
string arguments: "This command cannot be executed using ejabberdctl.
Try ejabberd_xmlrpc."
2014-04-29 01:11:08 +02:00
Holger Weiss 6d1055abec New ejabberd command: disconnect_user/2 2014-04-29 00:50:43 +02:00
Evgeny Khramtsov 68e62d7442 Merge pull request #184 from weiss/properly-abort-s2s-in
Fix handling of certificate verification errors for incoming s2s connections
2014-04-28 09:58:44 +04:00
Holger Weiss 49bdbf2895 Support certificate verification for outgoing s2s
Handle "s2s_use_starttls: required_trusted" the same way for outgoing
s2s connections as for incoming connections.  That is, check the remote
server's certificate (including the host name) and abort the connection
if verification fails.
2014-04-28 01:42:02 +02:00
Holger Weiss a21d2298af XEP-0198: Turn some warnings into info messages
Don't log warnings on events that will happen during normal operation.
2014-04-28 01:01:30 +02:00
Holger Weiss 1aa4ed3f35 Don't mess with s2s out when aborting s2s in
Don't try to look up and close outgoing connections to a given server
when aborting incoming connections from that server due to certificate
verification errors.  The ejabberd_s2s:find_connection/2 call actually
created one or more *new* connections if less than 'max_s2s_connections'
connections were found.  Then, no more than one of those possibly new
connections were stopped by the ejabberd_s2s_out:stop_connection/1 call.

It's not really necessary to bother with outgoing connections at all,
here.
2014-04-28 00:17:05 +02:00
Holger Weiss eabca82765 Send stream trailer before closing s2s connection
When aborting an incoming s2s connection due to certificate verification
errors, send a stream trailer before closing the socket.
2014-04-27 00:28:42 +02:00
HAMANO Tsukasa 71dba66330 fix checking acl in mod_register_web 2014-04-24 18:15:39 +09:00
Holger Weiss d805d198ac Check TLS state before requesting SASL EXTERNAL
Make sure a remote server can't circumvent "s2s_use_starttls: required"
by offering SASL EXTERNAL authentication over a non-TLS connection.
2014-04-24 11:04:10 +02:00
HAMANO Tsukasa 0734562ded added privacy_list_data index for mysql database. 2014-04-24 16:04:40 +09:00
HAMANO Tsukasa ffe9f3c192 added get_random_pid/1 error handling 2014-04-24 15:34:41 +09:00
HAMANO Tsukasa 219f9276d1 undefined ejabberd_socket:get_conn_type/1 2014-04-24 12:42:22 +09:00
Holger Weiss f988aad940 Log TLS status for outgoing s2s with SASL EXTERNAL 2014-04-23 23:28:13 +02:00
badlop 3a3f8240c1 Merge pull request #176 from hamano/devel
added error handling in mod_pubsub_odbc.
2014-04-23 17:06:46 +02:00
HAMANO Tsukasa 9ec014c184 added error handling in mod_pubsub_odbc. 2014-04-23 23:35:34 +09:00
badlop e9d104ec47 Merge pull request #174 from weiss/fix-s2s-in-auth
Fix certificate authentication for incoming s2s connections
2014-04-23 15:10:20 +02:00
Holger Weiss 86e17c379c Verify host name before offering SASL EXTERNAL
Prior to this commit, ejabberd handled certificate authentication for
incoming s2s connections like this:

1. Verify the certificate without checking the host name.  On failure,
   behave according to 's2s_use_starttls'.  On success:
2. Offer SASL EXTERNAL.
3. If the remote server chooses SASL EXTERNAL, compare the authorization
   identity against the certificate host name(s).  On failure, abort the
   connection unconditionally.

ejabberd now does this instead:

1. Verify the certificate and compare the certificate host name(s)
   against the 'from' attribute of the stream header.  On failure,
   behave according to 's2s_use_starttls'.  On success:
2. Offer SASL EXTERNAL.
3. If the remote server chooses SASL EXTERNAL, ignore the authorization
   identity (if any) and consider the peer authenticated.

The old behavior was suggested by previous versions of XEP-0178, the new
behavior is suggested by the current version 1.1.
2014-04-23 11:45:17 +02:00
Holger Weiss 4bc8b6bc9f Fix extraction of host names from certificates 2014-04-22 22:12:04 +02:00
badlop 9497dbff17 Merge pull request #162 from weiss/enable-carbons
Enable mod_carboncopy in example configuration
2014-04-22 13:53:23 +02:00
badlop 37d4109e8a Merge pull request #161 from weiss/fix-carbons
Let mod_carboncopy take care of messages sent to bare/unavailable JIDs
2014-04-22 13:52:11 +02:00
badlop b73f28c93e Merge pull request #173 from weiss/force-configure-regeneration
Always regenerate the configure script when running ./autogen.sh
2014-04-22 12:52:22 +02:00
Holger Weiss c98d539bb3 Force regeneration of configure script
As the version string is auto-generated from the git-describe(1) output,
the configure script may need to be regenerated even if configure.ac
wasn't modified.
2014-04-18 12:13:17 +02:00
badlop 4b52a8e4e3 Merge pull request #172 from weiss/accept-extauth-cache-false
Don't log an error when "extauth_cache: false" is specified
2014-04-17 19:55:51 +02:00
Holger Weiss d350cc6361 Accept "extauth_cache: false"
Don't log a "configuration problem" message if "extauth_cache: false" is
explicitly specified, as that's a valid configuration setting as per the
documentation.
2014-04-16 14:15:14 +02:00
badlop 727197613a Merge pull request #171 from weiss/update-doc-url
Update a URL in the guide
2014-04-16 10:03:07 +02:00
badlop cc6a4787af Merge pull request #170 from weiss/fix-doc-typos
Fix two small typos in the guide
2014-04-16 10:02:12 +02:00
Holger Weiss 27a7b38dee Update a URL in the guide 2014-04-16 00:31:15 +02:00
Holger Weiss 45687c52dc Fix two small typos in the guide 2014-04-16 00:25:11 +02:00
Paweł Chmielowski 7af7b7d3f0 Fix compilation on pre-R17 2014-04-15 17:05:25 +02:00
Paweł Chmielowski d97b4fd9ca Fix loading translation files on R17 2014-04-15 17:05:22 +02:00
Alexey Shchepin f93758a3cd Merge pull request #160 from runcom/protocol_options
Add option to specify openssl options
2014-04-15 19:01:21 +04:00
badlop 77d6d36a9d Merge pull request #167 from weiss/fix-modules-doc
Remove outdated comment from guide
2014-04-15 16:41:48 +02:00
badlop 57ba57b908 Merge pull request #168 from weiss/carbons-doc
Mention mod_carboncopy in documentation
2014-04-15 16:40:48 +02:00
Holger Weiss c9d4f2146c Mention mod_carboncopy in documentation 2014-04-15 01:29:00 +02:00
Holger Weiss 46001aafaa Remove outdated comment from guide 2014-04-15 01:21:41 +02:00
badlop ad680c508e Merge pull request #165 from weiss/fix-access-doc
Fix the description of the access rules syntax in the Guide
2014-04-12 16:42:05 +02:00
Holger Weiss be43aa85f4 Fix description of access rules syntax 2014-04-11 14:00:10 +02:00
badlop 285c4c17cf Merge pull request #146 from jamielinux/master
Update FSF address
2014-04-11 13:35:46 +02:00
Evgeniy Khramtsov a21edc2f3a Pretty print accepted transport address 2014-04-11 12:30:58 +02:00
Holger Weiss 515331baad Enable mod_carboncopy in example configuration
XEP-0280 seems to be quite popular these days.
2014-04-08 23:38:04 +02:00
Holger Weiss b3b12effbc Carbons: Handle unavailable resource like bare JID
As the session manager handles messages sent to unavailable resources
just like messages sent to bare JIDs, mod_carboncopy must do that, too.
That is, forward them only to those carbon-copy-enabled resources that
don't have a top priority, in order to avoid duplicates.
2014-04-08 23:32:30 +02:00
Antonio Murdaca fbf71f86f3 Add option to specify openssl options 2014-04-08 18:46:52 +02:00
Holger Weiss 9d5426315f Carbons: Also forward messages sent to bare JIDs
Don't ignore messages sent to bare JIDs, but forward them to all
carbon-copy-enabled resources that don't have the highest priority.
2014-04-07 22:10:08 +02:00
Holger Weiss c114eb3736 XEP-0198: Don't bounce/resend forwarded messages
On connection timeout, drop any messages that were forwarded by some
encapsulating protocol, such as XEP-0280 carbon copies or XEP-0313
archive messages.  Bouncing or resending them could easily lead to
unexpected results.
2014-04-07 21:21:11 +02:00
Badlop 66006ba017 Update Hebrew translation (thanks to Isratine Citizen) 2014-04-07 16:26:50 +02:00
badlop f3bbfb1c66 Merge pull request #159 from weiss/update-gitignore
Update the gitignore(5) file
2014-04-07 13:29:37 +02:00
badlop 766ab1eb46 Merge pull request #158 from weiss/fix-lang-type
Fix a type error
2014-04-07 13:28:41 +02:00
badlop 76fb7d284a Merge pull request #157 from weiss/fix-mod-update
Fix badarg issue on module update web site
2014-04-07 13:27:31 +02:00
badlop 2d441b3305 Merge pull request #156 from hamano/devel
mod_register_web: check same acl as mod_register.
2014-04-07 12:39:22 +02:00
Holger Weiss 0befeb7d93 Let Git ignore the "ebin" directory 2014-04-06 00:56:36 +02:00
Holger Weiss a2679e9d51 Let Git ignore files generated by "make install" 2014-04-06 00:56:09 +02:00
Holger Weiss 37f409d254 Fix a type error 2014-04-06 00:39:51 +02:00
Holger Weiss e02a4913d2 Fix badarg issue on module update web site 2014-04-05 23:23:44 +02:00
HAMANO Tsukasa 1250ee5d77 mod_register_web: check same acl as mod_register. 2014-04-04 04:07:29 +09:00
Badlop 8b9c49440a Fix user_resources command, and ejabberd_xmlrpc parsing auth details in call 2014-03-31 16:51:47 +02:00
Badlop 5bf3c784da New Bash completion script for ejabberdctl, experimental (EJAB-1042) 2014-03-26 16:43:56 +01:00
Badlop a5a065290b Small change in ejabberd_ctl output format to support bash completion 2014-03-26 16:43:53 +01:00
Badlop ac0e199d36 Provide meaningful text to user when admin kicks session (EJAB-1455) 2014-03-26 16:01:37 +01:00
Holger Weiss a97c716352 XEP-0198: Bounce unacked stanzas by default
If the new "resend_on_timeout" option is set to false (which it is by
default), bounce any unacknowledged stanzas instead of re-routing them.
2014-03-25 23:23:38 +01:00
Evgeniy Khramtsov 2150b10901 Fix service_info options processing 2014-03-25 09:52:57 +04:00
Evgeniy Khramtsov 5c36c44689 Remove annyoing warnings 2014-03-25 09:42:12 +04:00
Badlop d5f90965d7 Fix ACLs syntax change (thanks to jokker23)(issue #140) 2014-03-24 19:40:55 +01:00
Holger Weiss 2da6933bb7 Remove "fun" element from c2s #state
Memory consumption wise, local "fun" references are quite expensive.
2014-03-22 20:25:43 +01:00
Holger Weiss e360c56f87 Support XEP-0198 session resumption
Implement the optional session resumption feature described in XEP-0198.
A client that supports this feature may now resume the previous session
(within a configurable number of seconds) if the connection was lost.
During resumption, ejabberd will retransmit any stanzas that hadn't been
acknowledged by the client.
2014-03-19 00:51:33 +01:00
badlop 2b527f5e9a Merge pull request #149 from iulianlaz/carboncopy-fix-msg-back-to-original-sender
#148 Carbon copy sends message back to original sender solved
2014-03-16 20:59:49 +01:00
Holger Weiss 88a200e100 Remove some commented out code
The code that had been commented out at some earlier point in time would
now break XEP-0198.
2014-03-16 00:12:47 +01:00
Badlop 633d47f784 Update copyright dates to 2014 (EJAB-1679) 2014-03-13 12:30:57 +01:00
Holger Weiss 7d594086c3 Add initial XEP-0198 support (EJAB-532)
Implement partial support for XEP-0198: Stream Management.  After
successful negotiation of this feature, the server requests an ACK for
each stanza transmitted to the client and responds to ACK requests
issued by the client.  On session termination, the server re-routes any
unacknowledged stanzas.  The length of the pending queue can be limited
by setting the "max_ack_queue" option to some integer value (default:
500).  XEP-0198 support can be disabled entirely by setting the
"stream_management" option to false (default: true).

So far, stream management is implemented only for c2s connections, and
the optional stream resumption feature also described in XEP-0198 is not
(yet) supported.

This addition was originally based on a patch provided by Magnus Henoch
and updated by Grzegorz Grasza.  Their code implements an early draft of
XEP-0198 for some previous version of ejabberd.  It has since been
rewritten almost entirely.
2014-03-12 23:34:14 +01:00
Badlop 0f0e99ccd3 Provide header with latin-1 encoding in translations to work with Erlang/OTP R17 2014-03-12 17:26:27 +01:00
iulianlaz 9ef1ad0b6e #148 Carbon copy sends message back to original sender solved 2014-03-06 08:40:38 +00:00
Evgeniy Khramtsov afba5bc5f5 Merge branch 'master' of github.com:processone/ejabberd 2014-02-28 15:36:46 +04:00
Evgeniy Khramtsov 4a02893dac Regenerate XMPP codec 2014-02-28 15:36:34 +04:00
Badlop e211bf522e Support XEP-0321: Remote Roster Management (EJAB-1381) 2014-02-26 18:02:37 +01:00
Badlop 46b2d91105 Convert DB details to string when calling odbc:connect/2 (EJAB-1681) 2014-02-26 17:26:46 +01:00
Badlop c29ba14dbf Don't provide current password in webinterface (github issue #137) 2014-02-26 17:19:07 +01:00
badlop 4c8aeefa7f Merge pull request #145 from weiss/fix-configure-flag
Fix --enable-transient_supervisors flag
2014-02-24 12:46:09 +01:00
badlop 8e628fdad3 Merge pull request #144 from weiss/fix-supervisor-start
Add missing parenthesis
2014-02-24 12:40:10 +01:00
Jamie Nguyen 8538997d61 Update FSF address 2014-02-22 10:27:40 +00:00
Holger Weiss 26dee37268 Fix --{enable,disable}-transient_supervisors flag
Fix configure's --{enable,disable}-transient_supervisors option: Make
sure it's enabled with --enable and disabled with --disable, not the
other way round.  This also makes --disable the default setting, as
documented.
2014-02-21 23:34:48 +01:00
Holger Weiss e82a79efd5 Add missing parenthesis 2014-02-21 23:33:13 +01:00
Badlop 63a7011c38 When occupant changes nick, include status 110 in stanzas sent to him 2014-02-14 16:22:14 +01:00
Badlop 4c8b6fe16b Fixing mod_carboncopy sends carbons of carbons (fixes #107) 2014-01-23 17:29:24 +01:00
badlop 565b8bf7e6 Merge pull request #134 from mrjameshamilton/patch-1
Fixed parameter order in call to restore_room/3
2014-01-23 06:56:18 -08:00
mrjameshamilton 5ccc6db093 Fixed parameter order in call to restore_room/3 2014-01-23 14:39:52 +00:00
Alexey Shchepin 9422164dda Clear SASL state after finishing auth 2014-01-21 13:44:29 +02:00
Alexey Shchepin cbbfd921b4 Fix for the previous commit 2014-01-21 11:54:18 +02:00
Alexey Shchepin d63be79df9 Use 'to' field only in the first client stream initialization 2014-01-20 16:06:05 +02:00
Badlop 155c8bb29a Add some ejabberd_xmlrpc documentation, and link to full details 2014-01-02 16:31:28 +01:00
Badlop e107e78773 Fix auth verification in ejabberd_xmlrpc (thanks to Vicis) 2014-01-02 16:10:19 +01:00
Badlop 27302fb7ac Fix example configuration option 'add' to 'append_host_config' 2014-01-02 15:03:05 +01:00
Evgeniy Khramtsov d03de1bb43 Fix some type specs and errors 2013-12-10 21:44:46 +10:00
Evgeniy Khramtsov 33764bb931 Add ejabberd_xmlrpc 2013-12-10 21:25:12 +10:00
Christophe Romain eadc899046 remove version.tex file which is auto-generated 2013-12-05 14:19:55 +01:00
Badlop 5a1300bc70 Add access rule to mod_roster (EJAB-72) 2013-12-04 14:57:44 +01:00
Christophe Romain 9c17163b55 bind values for get_parentnodes_tree 2013-12-03 10:51:01 +01:00
Christophe Romain e11c835bd3 fix use of virtual nodetree 2013-12-03 10:34:59 +01:00
badlop 5ecd832e81 Merge pull request #119 from Mikhail-D/patch-1
Create mssql2012.sql
2013-12-02 02:02:44 -08:00
Mikhail-D a95aa46fe5 Create mssql2012.sql
replace sp_dboption with new instructions
2013-12-02 00:29:52 -08:00
Alexey Shchepin 1dd94ac0d0 Support for OpenSSL ciphers list in ejabberd_c2s, ejabberd_s2s_in and ejabberd_s2s_out 2013-11-28 19:39:11 +02:00
Badlop a6b0e18bde add Pubsub data migration from mnesia to odbc (EJAB-1126)
By calling:
  ejd2odbc:export_pubsub("localhost","/tmp/aa.txt").
it will generate SQL files like these:
  /tmp/pubsub_item.txt
  /tmp/pubsub_node.txt
  /tmp/pubsub_state.txt

Conflicts:
	src/ejabberd_admin.erl
	src/ejd2odbc.erl
2013-11-14 19:29:16 +01:00
Evgeniy Khramtsov 89a17ba84a Correctly convert ACLs into YAML representation 2013-11-07 02:43:43 +10:00
Evgeniy Khramtsov a87b475361 Do not use functions from crypto module wherever possible 2013-11-05 20:07:38 +10:00
Evgeniy Khramtsov b7c7d2747b Fix some type errors 2013-11-05 19:49:30 +10:00
Evgeniy Khramtsov c0240e7249 Do not try to start STUN application during config checks 2013-11-02 10:30:19 +10:00
Evgeniy Khramtsov 6dd31299cf Avoid case clause crash when loading permanent rooms 2013-10-23 12:23:00 +10:00
Evgeniy Khramtsov 2846a2978b Get rid of deprecated MySQL variable 'table_type' 2013-10-23 11:58:26 +10:00
Evgeniy Khramtsov 6df09f5ad6 Check libyaml presence at configure time 2013-10-22 20:12:39 +10:00
Badlop d9da6b77de Enumerate convert_to_yaml command in list of commands 2013-10-09 16:05:45 +02:00
Badlop cd0381bab5 Fix display ACLs in WebAdmin 2013-10-01 23:23:01 +02:00
Christophe Romain f2f2f64161 update default version to 13.10 2013-09-27 11:19:22 +02:00
Badlop 2c09d7c8a7 Fix handling of format_status arguments (thanks to Nbaronov) 2013-09-26 17:19:56 +02:00
Badlop 389a99b2db Fix bypass for tls-required (thanks to Zeha) 2013-09-26 16:41:57 +02:00
Evgeniy Khramtsov 07c8bf5064 Fix roster version support 2013-09-24 18:59:20 +10:00
Evgeniy Khramtsov 7fd91a4b12 Better web-handlers detection 2013-09-22 21:47:59 +10:00
Evgeniy Khramtsov ae4356265f Merge branch 'master' of github.com:processone/ejabberd 2013-09-19 19:00:08 +10:00
Evgeniy Khramtsov a0396620f2 Reflect modules name changes in p1_mysql 2013-09-19 18:59:32 +10:00
Paweł Chmielowski 7e73ed88f7 Fix problem with decoding http headers over tls connections
This fixed GitHub issue 96.
2013-09-16 16:32:02 +02:00
Evgeniy Khramtsov 150a5392e5 Fix the template: do not use 'global' keyword 2013-08-30 20:44:12 +10:00
Jerome Sautret 8cbbe4a3eb Fix release version number. 2013-08-30 09:12:33 +02:00
Christophe Romain 4b82cb9953 update default version number 2013-08-27 17:14:58 +02:00
Christophe Romain 63b2d21b13 clean subscriptions handling and avoid function_clause 2013-08-27 14:46:54 +02:00
Christophe Romain 1b8876bf55 fix build of Parents list in #pubsub_node 2013-08-27 14:46:35 +02:00
Christophe Romain b82eeeeec9 fix call to get_session_pid with binary arguments 2013-08-27 14:46:22 +02:00
Evgeniy Khramtsov dd26398a02 Fix the ACL rule 2013-08-27 20:12:26 +10:00
Evgeniy Khramtsov 11292c809f Remove non-existent module from the testing config 2013-08-27 20:08:22 +10:00
Evgeniy Khramtsov a62fb69e20 Remove multiple host_config sections 2013-08-27 20:05:12 +10:00
Evgeniy Khramtsov e3483ef9e1 Do not rely on p1_logger_h module when lager is enabled 2013-08-27 17:45:07 +10:00
Evgeniy Khramtsov 0fe3de6b30 Fix ejabberdctl config name 2013-08-24 22:10:10 +10:00
Evgeniy Khramtsov 91a74e3e27 Change configuration file format to YAML 2013-08-21 22:17:59 +10:00
Evgeniy Khramtsov f68dfacbbf Do not try to read/write the deprecated "config" table 2013-08-21 19:37:22 +10:00
Evgeniy Khramtsov 0b9754884e Do not distribute the ACL table 2013-08-21 19:37:08 +10:00
Evgeniy Khramtsov cc6dcd161c Get rid of global configuration options 2013-08-21 19:36:35 +10:00
Badlop 7a77186fbe Enumerate in guide.tex what processes are started for ejabberd (EJAB-1082) 2013-08-05 19:22:22 +02:00
Evgeny Khramtsov 06bb10a032 Merge pull request #85 from imtal/patch-1
Fix version check
2013-07-24 06:01:45 -07:00
tjeerd 3e2f9dc6b0 Fix version check
Not all Erlang versions are of equal length. Added clauses to handle this.
2013-07-24 14:47:32 +02:00
Evgeniy Khramtsov 807a1fe164 Fix timestamp processing 2013-07-23 15:27:18 +10:00
Evgeniy Khramtsov 8ce22b790d Fix some type errors 2013-07-22 19:24:09 +10:00
Evgeniy Khramtsov f75d78d3f5 Make it possible to import without cursor usage 2013-07-22 10:46:47 +10:00
Evgeniy Khramtsov ca6463ed78 Typo fix 2013-07-22 00:22:05 +10:00
Evgeniy Khramtsov d58148fa8d Add SQL to Mnesia converter 2013-07-21 23:10:38 +10:00
Evgeniy Khramtsov a2ead99c83 Make it possible to enable/disable TLS compression 2013-07-17 22:46:18 +10:00
Evgeny Khramtsov 33f09c7a78 Merge pull request #83 from tagged/makefile
make deps/.built depend on deps/.got
2013-07-15 20:06:35 -07:00
Christopher A. Stelma 2d43b035d7 make deps/.built depend on deps/.got
fixes race condition when running make with simultaneous jobs
2013-07-15 10:52:34 -07:00
Evgeniy Khramtsov 986f4d1a7f Do not forget to re-define the crash.log path 2013-07-15 11:51:09 +10:00
Evgeniy Khramtsov 8482641b4e Increase the timetrap timeout 2013-07-15 11:51:02 +10:00
Evgeny Khramtsov 8fc5d86704 Merge pull request #82 from tuncer/rebar-debug_info
rebar.config.script: fix debug_info handling
2013-07-14 04:07:39 -07:00
Tuncer Ayaz 47994806f0 rebar.config.script: fix debug_info handling
debug_info is enabled by default and can be disabled by passing
'no_debug_info' in erl_opts.
2013-07-13 21:33:50 +02:00
Badlop 0d7a5476c0 Allow room member to get members list using XEP 2013-07-11 12:11:48 +02:00
Christophe Romain 4e72dd6751 fix badmatch in send_loop (EJAB-1650) 2013-07-10 09:47:49 +02:00
Christophe Romain 48819d163a fix badmatch on remove_user on PEP nodes (EJAB-1649) 2013-07-09 21:50:56 +02:00
Christophe Romain 8621a8f006 fix invalid response on get_options when no options set (EJAB-1648) 2013-07-09 18:11:27 +02:00
Badlop b66e4fbdc4 Apparently configure.erl is not needed anymore 2013-07-08 15:58:38 +02:00
Alexey Shchepin b5623d6bee gen_iq_handler:check_type was missing 2013-07-08 10:40:39 +03:00
Evgeniy Khramtsov e89f0f6461 Cleanup the test suite (just a little) 2013-07-07 04:47:47 +10:00
Evgeniy Khramtsov 2b24e97936 Use error_logger directly in the LDAP test server 2013-07-07 03:48:16 +10:00
Evgeniy Khramtsov a302af7770 Do not build p1_logger if lager is enabled 2013-07-07 03:10:51 +10:00
Evgeniy Khramtsov 0aca3a4585 Improve the applications start-up
* Check if all modules present for every application loaded.
* Get rid of now obsoleted 'ejabberd_check' module.
2013-07-07 02:19:51 +10:00
Evgeniy Khramtsov c262c08513 Improve the XMPP codec, fix the test suite accordingly 2013-07-07 02:19:10 +10:00
Christophe Romain 0266207e9d fix pubsub unsubscription without SubId on odbc 2013-07-04 15:13:21 +02:00
Christophe Romain 60600c341e improve pubsub odbc use of i2l 2013-07-04 10:07:53 +02:00
Evgeniy Khramtsov 02c59422cf Re-generate the XMPP codec 2013-07-03 01:55:00 +10:00
Evgeniy Khramtsov 97810b4cc3 Update the rebar script 2013-07-01 02:22:18 +10:00
Evgeniy Khramtsov 1a9f0ab084 Update the rebar script 2013-06-30 23:41:24 +10:00
Evgeniy Khramtsov fa7fe73a0e Improve the rebar script. Keep the build graph by default. 2013-06-30 23:41:18 +10:00
Evgeniy Khramtsov 49e17922a3 Remove stupid slow code from rebar, regenerate the script 2013-06-30 23:41:09 +10:00
Evgeniy Khramtsov 09c450062a Update XMPP codec spec to reflect
the changes in xml_gen
2013-06-29 18:41:00 +10:00
Christophe Romain ac3cd2ebaa ip_adresse() does not need binary representation in config 2013-06-28 18:32:22 +02:00
Evgeniy Khramtsov 2636da0d98 Fix IDNA conversion 2013-06-28 02:45:42 +10:00
Badlop 91744733c1 Store only messages with body or subject (EJABS-2034) 2013-06-27 11:58:31 +02:00
Evgeniy Khramtsov 295ea0633e Re-create the configure script 2013-06-27 19:46:38 +10:00
Evgeniy Khramtsov bc2ea224eb Fix a typo 2013-06-27 19:45:45 +10:00
Evgeniy Khramtsov 9f4d12bd0a Add --enable-tools to --enable-all 2013-06-27 19:45:28 +10:00
Evgeniy Khramtsov 653e23c0e7 Re-create the configure script 2013-06-27 19:31:33 +10:00
Evgeniy Khramtsov c7e2128dab Enable lager support by default 2013-06-27 19:31:05 +10:00
Evgeniy Khramtsov 8a9743ab3b Avoid custom loglevels processing for lager 2013-06-27 19:27:56 +10:00
Evgeniy Khramtsov 597934637c Logger improvements.
lager:
	* It is now possible to change the loglevel.
	* Log rotation is now supported as well.
p1_logger:
	* When rotating a log file, add suffix ".0" to the renamed file.
	  This is needed in order to be consistent with lager
	  rotation mechanism.
2013-06-27 19:03:33 +10:00
Evgeniy Khramtsov 2ea397e476 Pre-load applications before setting the environment variables 2013-06-27 19:03:25 +10:00
Evgeniy Khramtsov 9094169440 Do not forget to remove testing beams on "clean" 2013-06-27 15:36:39 +10:00
Evgeniy Khramtsov 3631301304 Do not check the second SASL challenge 2013-06-27 15:36:31 +10:00
Evgeniy Khramtsov 42a9e4f4cf Split the test suite into modules 2013-06-27 15:36:23 +10:00
Evgeniy Khramtsov aab70fc066 Fix external authentication 2013-06-26 12:30:32 +10:00
Evgeniy Khramtsov 167f02ab72 Do not fetch disco#info multiple times 2013-06-26 03:32:38 +10:00
Evgeniy Khramtsov 1b0c02cb2e Start the LDAP server before ejabberd application 2013-06-26 03:06:19 +10:00
Evgeniy Khramtsov c05edabe58 Add more pubsub test cases 2013-06-26 03:06:11 +10:00
569 changed files with 161145 additions and 145524 deletions
+3
View File
@@ -0,0 +1,3 @@
.git
.win32
.examples
+15
View File
@@ -0,0 +1,15 @@
> What version of ejabberd are you using?
> What operating system (version) are you using?
> How did you install ejabberd (source, package, distribution)?
> What did not work as expected? Are there error messages in the log? What
> was the unexpected behavior? What was the expected result?
+20
View File
@@ -0,0 +1,20 @@
We are open to contributions for ejabberd, as GitHub pull requests (PR).
Here are a few points to consider before submitting your PR. (You can
remove the whole text after reading.)
1. Does this PR address an issue? Please reference it in the PR
description.
2. Have you properly described the proposed change?
3. Please make sure the change is atomic and does only touch the needed
modules. If you have other changes/fixes to provide, please submit
them as separate PRs.
4. If your change or new feature involves storage backends, did you make
sure your change works with all backends?
5. Do you provide tests? How can we check the behavior of the code?
6. Did you consider documentation changes in the
processone/docs.ejabberd.im repository?
+18 -3
View File
@@ -4,9 +4,12 @@
*~
\#*#
.#*
.edts
*.dump
/Makefile
/config.log
/config.status
/configure
/aclocal.m4
/contrib/extract_translations/extract_translations.beam
/*.cache
@@ -24,11 +27,23 @@
/doc/*.toc
/doc/contributed_modules.tex
/doc/version.tex
/ebin/*.beam
/ebin/ejabberd.app
/include/XmppAddr.hrl
/ebin/
/ejabberd.init
/ejabberd.service
/ejabberdctl.example
XmppAddr.hrl
/rel/ejabberd/
/src/XmppAddr.asn1db
/src/XmppAddr.erl
/src/ejabberd.app.src
/src/eldap_filter_yecc.erl
/vars.config
/dialyzer/
/test/*.beam
/test/*.ctc
/logs/
/priv/sql
/rel/ejabberd
/_build
/mnesiadb
/.rebar
+65
View File
@@ -0,0 +1,65 @@
language: erlang
otp_release:
- 17.5
- 18.3
- 19.2
services:
- redis-server
before_install:
#
# We need MySQL 5.6 or newer in order to get support for FULLTEXT indexes
# with InnoDB. As soon as Travis ships that version, the following lines
# (except for the "apt-get update" call) can go away.
#
# See: https://github.com/travis-ci/travis-ci/issues/1986
#
- sudo sed -i -e s/table_cache/table_open_cache/ -e /log_slow_queries/d /etc/mysql/my.cnf
- sudo apt-key adv --import .travis/mysql_repo_key.asc
- sudo add-apt-repository 'deb http://repo.mysql.com/apt/ubuntu/ precise mysql-5.6'
- sudo apt-get -qq update
- sudo apt-get -qq -o Dpkg::Options::=--force-confold install mysql-server
- sudo mysql_upgrade
# /END MYSQL 5.6
- pip install --user coveralls-merge
install:
- sudo apt-get -qq install libexpat1-dev libyaml-dev libpam0g-dev libsqlite3-dev libgd-dev libwebp-dev
before_script:
# Ulimit: See Travis-CI issue report: https://github.com/travis-ci/travis-ci/issues/3328
- mysql -u root -e "CREATE USER 'ejabberd_test'@'localhost' IDENTIFIED BY 'ejabberd_test';"
- mysql -u root -e "CREATE DATABASE ejabberd_test;"
- mysql -u root -e "GRANT ALL ON ejabberd_test.* TO 'ejabberd_test'@'localhost';"
- psql -U postgres -c "CREATE USER ejabberd_test WITH PASSWORD 'ejabberd_test';"
- psql -U postgres -c "CREATE DATABASE ejabberd_test;"
- psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE ejabberd_test TO ejabberd_test;"
script:
- ./autogen.sh
- ./configure --prefix=/tmp/ejabberd --enable-all --disable-odbc --disable-riak
- make
- make install -s
- make xref
- sed -i -e 's/ct:pal/ct:log/' test/suite.erl
- ln -sf ../sql priv/
- echo "" >> rebar.config
- echo '{ct_extra_params, "-verbosity 20"}.' >> rebar.config
- escript ./rebar skip_deps=true ct -v
- grep -q 'TEST COMPLETE,.* 0 failed' logs/raw.log
after_script:
- find logs -name suite.log -exec cat '{}' ';'
after_failure:
- find logs -name exunit.log -exec cat '{}' ';'
- find logs -name ejabberd.log -exec cat '{}' ';'
- find logs -name suite.log -exec cat '{}' ';' | awk 'BEGIN{RS="\n=case";FS="\n"} /=result\s*failed/ {print "=case" $0}
after_success:
- coveralls-merge erlang.json
notifications:
email: false
+432
View File
@@ -0,0 +1,432 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (GNU/Linux)
mQGiBD4+owwRBAC14GIfUfCyEDSIePvEW3SAFUdJBtoQHH/nJKZyQT7h9bPlUWC3
RODjQReyCITRrdwyrKUGku2FmeVGwn2u2WmDMNABLnpprWPkBdCk96+OmSLN9brZ
fw2vOUgCmYv2hW0hyDHuvYlQA/BThQoADgj8AW6/0Lo7V1W9/8VuHP0gQwCgvzV3
BqOxRznNCRCRxAuAuVztHRcEAJooQK1+iSiunZMYD1WufeXfshc57S/+yeJkegNW
hxwR9pRWVArNYJdDRT+rf2RUe3vpquKNQU/hnEIUHJRQqYHo8gTxvxXNQc7fJYLV
K2HtkrPbP72vwsEKMYhhr0eKCbtLGfls9krjJ6sBgACyP/Vb7hiPwxh6rDZ7ITnE
kYpXBACmWpP8NJTkamEnPCia2ZoOHODANwpUkP43I7jsDmgtobZX9qnrAXw+uNDI
QJEXM6FSbi0LLtZciNlYsafwAPEOMDKpMqAK6IyisNtPvaLd8lH0bPAnWqcyefep
rv0sxxqUEMcM3o7wwgfN83POkDasDbs3pjwPhxvhz6//62zQJ7Q2TXlTUUwgUmVs
ZWFzZSBFbmdpbmVlcmluZyA8bXlzcWwtYnVpbGRAb3NzLm9yYWNsZS5jb20+iGwE
ExECACwCGyMCHgECF4ACGQEGCwkIBwMCBhUKCQgCAwUWAgMBAAUCWKcFIAUJHirJ
FAAKCRCMcY07UHLh9VcFAJ46pUyVd8BZ2r5CppMC1tmyQ3ceRgCfVPwuVsiS0VER
5WUqtAQDt+DoetCIaQQTEQIAKQIbIwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAhkB
BQJTAdRmBQkaZsvLAAoJEIxxjTtQcuH1X4MAoKNLWAbCBUj96637kv6Xa/fJuX5m
AJwPtmgDfjUe2iuhXdTrFEPT19SB6ohmBBMRAgAmAhsjBgsJCAcDAgQVAggDBBYC
AwECHgECF4AFAk53PioFCRP7AhUACgkQjHGNO1By4fUmzACeJdfqgc9gWTUhgmcM
AOmG4RjwuxcAoKfM+U8yMOGELi+TRif7MtKEms6piGkEExECACkCGyMGCwkIBwMC
BBUCCAMEFgIDAQIeAQIXgAIZAQUCUZSROgUJFTchqgAKCRCMcY07UHLh9YtAAJ9X
rA/ymlmozPZn+A9ls8/uwMcTsQCfaQMNq1dNkhH2kyByc3Rx9/W2xfqJARwEEAEC
AAYFAlAS6+UACgkQ8aIC+GoXHivrWwf/dtLk/x+NC2VMDlg+vOeM0qgG1IlhXZfi
NsEisvvGaz4m8fSFRGe+1bvvfDoKRhxiGXU48RusjixzvBb6KTMuY6JpOVfz9Dj3
H9spYriHa+i6rYySXZIpOhfLiMnTy7NH2OvYCyNzSS/ciIUACIfH/2NH8zNT5CNF
1uPNRs7HsHzzz7pOlTjtTWiF4cq/Ij6Z6CNrmdj+SiMvjYN9u6sdEKGtoNtpycgD
5HGKR+I7Nd/7v56yhaUe4FpuvsNXig86K9tI6MUFS8CUyy7Hj3kVBZOUWVBM053k
nGdALSygQr50DA3jMGKVl4ZnHje2RVWRmFTr5YWoRTMxUSQPMLpBNIkBHAQQAQIA
BgUCU1B+vQAKCRAohbcD0zcc8dWwCACWXXWDXIcAWRUw+j3ph8dr9u3SItljn3wB
c7clpclKWPuLvTz7lGgzlVB0s8hH4xgkSA+zLzl6u56mpUzskFl7f1I3Ac9GGpM4
0M5vmmR9hwlD1HdZtGfbD+wkjlqgitNLoRcGdRf/+U7x09GhSS7Bf339sunIX6sM
gXSC4L32D3zDjF5icGdb0kj+3lCrRmp853dGyA3ff9yUiBkxcKNawpi7Vz3D2ddU
pOF3BP+8NKPg4P2+srKgkFbd4HidcISQCt3rY4vaTkEkLKg0nNA6U4r0YgOa7wIT
SsxFlntMMzaRg53QtK0+YkH0KuZR3GY8B7pi+tlgycyVR7mIFo7riQEcBBABCAAG
BQJWgVd0AAoJEEZu4b/gk4UKk9MH/Rnt7EccPjSJC5CrB2AU5LY2Dsr+PePI2ubP
WsEdG82qSjjGpbhIH8LSg/PzQoGHiFWMmmZWJktRT+dcgLbs3b2VwCNAwCE8jOHd
UkQhEowgomdNvHiBHKHjP4/lF68KOPiO/2mxYYkmpM7BWf3kB57DJ5CTi3/JLoN7
zF40qIs/p09ePvnwStpglbbtUn7XPO+1/Ee8VHzimABom52PkQIuxNiVUzLVn3bS
Wqrd5ecuqLk6yzjPXd2XhDHWC9Twpl68GePru6EzQtusi0m6S/sHgEXqh/IxrFZV
JlljF75JvosZq5zeulr0i6kOij+Y1p6MFffihITZ1gTmk+CLvK2JASIEEAECAAwF
Ak53QS4FAwASdQAACgkQlxC4m8pXrXwJ8Qf/be/UO9mqfoc2sMyhwMpN4/fdBWwf
LkA12FXQDOQMvwH9HsmEjnfUgYKXschZRi+DuHXe1P7l8G2aQLubhBsQf9ejKvRF
TzuWMQkdIq+6Koulxv6ofkCcv3d1xtO2W7nb5yxcpVBPrRfGFGebJvZa58DymCNg
yGtAU6AOz4veavNmI2+GIDQsY66+tYDvZ+CxwzdYu+HDV9HmrJfc6deM0mnBn7SR
jqzxJPgoTQhihTav6q/R5/2p5NvQ/H84OgS6GjosfGc2duUDzCP/kheMRKfzuyKC
OHQPtJuIj8++gfpHtEU7IDUX1So3c9n0PdpeBvclsDbpRnCNxQWU4mBot4kBIgQQ
AQIADAUCToi2GQUDABJ1AAAKCRCXELibyletfLZAB/9oRqx+NC98UQD/wlxCRytz
vi/MuPnbgQUPLHEap10tvEi33S/H/xDR/tcGofY4cjAvo5skZXXeWq93Av7PACUb
zkg0X0eSr2oL6wy66xfov72AwSuX+iUK68qtKaLqRLitM02y8aNRV/ggKvt7UMvG
mOvs5yLaYlobyvGaFC2ClfkNOt2MlVnQZCmnYBCwOktPGkExiu2yZMifcYGxQcpH
KVFG59KeF2cM2d4xYM8HJqkSGGW306LFVSyeRwG+wbttgLpD5bM/T2b3fF/J35ra
CSMLZearRTq8aygPl+XM7MM2eR946aw6jmOsgNBErbvvIdQj6LudAZj+8imcXV2K
iQEiBBABAgAMBQJOmdnRBQMAEnUAAAoJEJcQuJvKV618AvIIAIEF1ZJ+Ry7WOdKF
5oeQ/ynaYUigzN92fW/9zB8yuQlngkFJGidYMbci1tR1siziIVJFusR3ZonqAPGK
/SUta9Y6KWLhmc7c5UnEHklq/NfdMZ2WVSIykXlctqw0sbb+z1ecEd4G8u9j5ill
MO1B36rQayYAPoeXLX8dY4VyFLVGaQ00rWQBYFZrpw16ATWbWGJP332NSfCk4zZq
6kXEW07q0st3YBgAAGdNQyEeZCa4d4pBRSX6189Kjg6GDnIcaiOF6HO6PLr9fRlL
r5ObCgU+G9gEhfiVwDEV9E+7/Bq2pYZ9whhkBqWQzdpXTNTM24uaEhE01EPO5zeC
O214q6mJASIEEAECAAwFAk6rpgEFAwASdQAACgkQlxC4m8pXrXzAhwf/f9O99z16
3Y5FZVIxexyqXQ/Mct9uKHuXEVnRFYbA49dQLD4S73N+zN7gn9jFeQcBo4w8qVUV
94U/ta/VbLkdtNREyplPM4XY8YE5Wfd9bfyg3q1PbEiVjk995sBF+2+To99YYKst
gXPqjlH0jUfEyDmexOj+hsp8Rc63kvkIx36VBa4ONRYFefGAhKDMigL2YAhc1UkG
tkGTuLmlCGwIV6lviDZD3RJf5375VFnaHv7eXfwQxCwE+BxG3CURrjfxjaxMTmMP
yAG2rhDp5oTUEvqDYNbko5UxYOmrSjvF4FzXwqerElXJUkUzSh0pp7RxHB/1lCxD
s7D1F1hlgFQuNIkBIgQQAQIADAUCTrzZHAUDABJ1AAAKCRCXELibyletfMUpB/4s
07dREULIBnA1D6qr3fHsQJNZqbAuyDlvgGGLWzoyEDs+1JMFFlaa+EeLIo1386GU
2DammDC23p3IB79uQhJeD2Z1TcVg4cA64SfF/CHca5coeRSrdAiudzU/cgLGtXIP
/OaFamXgdMxAhloLFbSHPCZkyb00phVa8+xeIVDrK1HByZsNIXy/SSK8U26S2PVZ
2o14fWvKbJ1Aga8N6DuWY/D8P2mi3RAbiuZgfzkmKL5idH/wSKfnFKdTgJzssdCc
1jZEGVk5rFYcWOrJARHeP/tsnb/UxKBEsNtO7e3N2e/rLVnEykVIO066hz7xZK/V
NBSpx3k3qj4XPK41IHy2iQEiBBABAgAMBQJOzqO8BQMAEnUAAAoJEJcQuJvKV618
2twH/0IzjXLxN45nvIfEjC75a+i9ZSLlqR8lsHL4GpEScFKI0a0lT4IVAIY2RKG+
MAs2eHm0UfKuwGs5jluRZ9RqKrc61sY0XQV9/7znY9Db16ghX04JjknOKs/fPi87
rvKkB/QxJWS8qbb/erRmW+cPNjbRxTFPS5JIwFWHA16ieFEpvdAgKV6nfvJVTq1r
jPDcnIA9CJN2SmUFx9Qx3SRc6ITbam1hjFnY6sCh6AUhxLI2f1mq1xH9PqEy42Um
68prRqTyJ7Iox1g/UDDkeeUcAg7T1viTz7uXpS3Wrq4zzo4yOpaJfLDR3pI5g2Zk
SNGTMo6aySE4OABt8i1Pc1Pm6AmJASIEEAECAAwFAk7yPFYFAwASdQAACgkQlxC4
m8pXrXzXiAf9FrXe0lgcPM+tYOWMLhv5gXJi2VUBaLxpyRXm/kJcmxInKq1GCd3y
D4/FLHNu3ZcCz/uklPAbZXWI0O6ewq0LWsRtklmJjWiedH+hGyaTv95VklojRIBd
8nBaJ6M98rljMBHTFwWvjQFVf4FLRJQZqHlvjcCkq2Dd9BWJpGXvr/gpKkmMJYNK
/ftfZRcChb35NI19WRpOhj9u808OPcqKVvZBcPwFGV5cEBzmAC94J7JcD8+S8Ik8
iUJMQGGL3QcmZOBozovh86hj7KTSEBHlLXl832z89H1hLeuLbnXoGLv3zeUFSxkv
1h35LhZLqIMDQRXLuUzxGHMBpLhPyGWRJ4kBIgQQAQIADAUCTwQJFwUDABJ1AAAK
CRCXELibyletfABvB/9Cy69cjOqLGywITs3Cpg//40jmdhSAVxilJivP6J5bubFH
DJlVTx541Dv5h4hTG2BQuueQ4q1VCpSGW+rHcdhPyvmZGRz1rxdQQGh1Dv0Bod2c
3PJVSYPSrRSwCZJkJHOtVRBdjK4mkZb5aFTza+Tor9kxzj4FcXVd4KAS+hHQHYHc
Ar8tt2eOLzqdEFTULeGiSoNn+PVzvzdfhndphK+8F2jfQ2UKuc01O7k0Yn9xZVx0
OG6fE1gStzLv7C5amWLRd8+xh+MN0G8MgNglpBoExsEMMlPBYSUHa6lxpdMNMuib
rIyVncE9X8QOhImt8K0sNn/EdbuldJNGYbDLt7O4iQEiBBABAgAMBQJPFdTcBQMA
EnUAAAoJEJcQuJvKV6184owH+wZ/uLpezXnSxigeH1sig72QEXMrNd5DVHCJdig3
bo+K5YmmN710/m5z+63XKUEWpd6/knajObgckThzWftNeK1SSFQGPmoYZP9EZnSU
7L+/dSUpExbj842G5LYagrCyMGtlxRywWEmbi72TKS/JOK0jLiOdvVy+PHrZSu0D
TVQ7cJh1BmPsbz7zzxjmcI5l+7B7K7RHZHq45nDLoIabwDacj7BXvBK0Ajqz4QyJ
GQUjXC7q+88I+ptPvOXlE5nI/NbiCJOMI6d/bWN1KwYrC80fZuFaznfQFcPyUaDw
yRaun+K3kEji2wXecq+yMmLUEp01TKsUeOL50HD6hHH07W+JASIEEAECAAwFAk85
bQsFAwASdQAACgkQlxC4m8pXrXwKPQgAlkbUsTr7nkq+haOk0jKpaHWEbRMEGMrB
I3F7E+RDO6V/8y4Jtn04EYDc8GgZMBah+mOgeINq3y8jRMYV5jVtZXv2MWYFUcjM
kVBKeqhi/pGEjmUdmdt3DlPv3Z+fMTMRmAocI981iY/go8PVPg/+nrR6cFK2xxnO
R8TacikJBFeSfkkORg1tDzjjYv1B5ZIEkpplepl5ahJBBq7cpYhTdY6Yk0Sz0J8w
EdffLSaNxrRuWLrRhWzZU7p9bFzfb/7OHc21dJnB7wKv5VvtgE+jiQw9tOKaf5hc
SgRYuF6heu+B25gc5Uu88lo409mZ7oxQ6hDCn7JHvzh0rhmSN+Kid4kBIgQQAQIA
DAUCT0qQrQUDABJ1AAAKCRCXELibyletfC9UB/4o2ggJYM0CLxEpP0GU8UKOh3+/
zm1DN7Qe4kY2iCtF1plKHQaTgt5FlgRCFaiXcVv7WzGz/FnmxonR1leLl+kfRlwy
PPnoI/AWPCy/NO4Cl5KnjsSmsdDUpObwZ4KYsdilZR7ViJu2swdAIgnXBUwrlRJR
7CK4TAKrTeonRgVSrVx8Vt//8/cYj73CLq8oY/KK0iHiQrSwo44uyhdiFIAssjyX
n6/2E+w0zgvPexNSNNROHQ8pjbq+NTY6GwKIGsaej3UTRwQ7psvKXz8y7xdzmOAr
/khGvxB5gjkx02pimjeia8v66aH6rbnojJMAovNUS4EHdHnulv4rovC8Kf9iiQEi
BBABAgAMBQJPVdsaBQMAEnUAAAoJEJcQuJvKV618vVEIALFXPBzcAO1SnQarBLzy
YMVZZumPvSXKnUHAO+6kjApXPJ+qFRdUaSNshZxVKY9Zryblu4ol/fLUTt0CliSD
IxD6L4GXEm4VYYCl4lPO3bVsJnGITLFwQGHM27EmjVoTiD8Ch7kPq2EXr3dMRgzj
pdz+6aHGSUfOdLTPXufDvW83bEWGaRVuTJKw+wIrcuRqQ+ucWJgJGwcE4zeHjZad
Jx1XUm1X+BbI73uiQussyjhhQVVNU7QEdrjyuscaZ/H38wjUwNbylxDPB4I8quC1
knQ0wSHr7gKpM+E9nhiS14poRqU18u78/sJ2MUPXnQA6533IC238/LP8JgqB+BiQ
BTSJASIEEAECAAwFAk9ng3cFAwASdQAACgkQlxC4m8pXrXxQRAf/UZlkkpFJj1om
9hIRz7gS+l7YvTaKSzpo+TBcx3C7aqKJpir6TlMK9cb9HGTHo2Xp1N3FtQL72NvO
6CcJpBURbvSyb4i0hrm/YcbUC4Y3eajWhkRS3iVfGNFbc/rHthViz0r6Y5lhXX16
aVkDv5CIFWaF3BiUK0FnHrZiy4FPacUXCwEjv3uf8MpxV5oEmo8Vs1h4TL3obyUz
qrImFrEMYE/12lkE8iR5KWCaF8eFyl56HL3PPl90JMQBXzhwsFoWCPuwjfM5w6sW
Ll//zynwxtlJ9CRz9c2vK6aJ8DRu3OfBKN1iiEcNEynksDnNXErn5xXKz3p5pYdq
e9BLzUQCDYkBIgQQAQIADAUCT3inRgUDABJ1AAAKCRCXELibyletfGMKCADJ97qk
geBntQ+tZtKSFyXznAugYQmbzJld8U6eGSQnQkM40Vd62UZLdA8MjlWKS8y4A4L2
0cI14zs5tKG9Q72BxQOw5xkxlLASw1/8WeYEbw7ZA+sPG//q9v3kIkru3sv64mMA
enZtxsykexRGyCumxLjzlAcL1drWJGUYE2Kl6uzQS7jb+3PNBloQvz6nb3YRZ+Cg
Ly9D41SIK+fpnV8r4iqhu7r4LmAQ7Q1DF9aoGaYvn2+xLGyWHxJAUet4xkMNOLp6
k9RF1nbNe4I/sqeCB25CZhCTEvHdjSGTD2yJR5jfoWkwO9w8DZG1Q9WrWqki4hSB
l0cmcvO34pC1SJYziQEiBBABAgAMBQJPinQFBQMAEnUAAAoJEJcQuJvKV618CFEI
AJp5BbcV7+JBMRSvkoUcAWDoJSP2ug9zGw5FB8J90PDefKWCKs5Tjayf2TvM5ntq
5DE9SGaXbloIwa74FoZlgqlhMZ4AtY9Br+oyPJ5S844wpAmWMFc6NnEPFaHQkQ+b
dJYpRVNd9lzagJP261P3S+S9T2UeHVdOJBgWIq9Mbs4lnZzWsnZfQ4Lsz0aPqe48
tkU8hw+nflby994qIwNOlk/u+I/lJbNz5zDY91oscXTRl2jV1qBgKYwwCXxyB3j9
fyVpRl+7QnqbTWcCICVFL+uuYpP0HjdoKNqhzEguAUQQLOB9msPTXfa2hG+32ZYg
5pzI5V7GCHq0KO6u5Ctj3TGJASIEEAECAAwFAk+cQEEFAwASdQAACgkQlxC4m8pX
rXzi7AgAx8wJzNdD7UlgdKmrAK//YqH7arSssb33Xf45sVHDpUVA454DXeBrZpi+
zEuo03o5BhAuf38cwfbkV6jN1mC2N0FZfpy4v7RxHKLYr7tr6r+DRn1L1giX5ybx
CgY0fLAxkwscWUKGKABWxkz9b/beEXaO2rMt+7DBUdpAOP5FNRQ8WLRWBcMGQiaT
S4YcNDAiNkrSP8CMLQP+04hQjahxwCgBnksylciqz3Y5/MreybNnTOrdjVDsF0Oe
t0uLOiWXUZV1FfaGIdb/oBQLg+e1B74p5+q3aF8YI97qAZpPa1qiQzWIDX8LX9QX
EFyZ3mvqzGrxkFoocXleNPgWT8fRuokBIgQQAQIADAUCT64N/QUDABJ1AAAKCRCX
ELibyletfDOGCACKfcjQlSxrWlEUrYYZpoBP7DE+YdlIGumt5l6vBmxmt/5OEhqr
+dWwuoiyC5tm9CvJbuZup8anWfFzTTJmPRPsmE4z7Ek+3CNMVM2wIynsLOt1pRFK
4/5RNjRLbwI6EtoCQfpLcZJ//SB56sK4DoFKH28Ok4cplESPnoMqA3QafdSEA/FL
qvZV/iPgtTz7vjQkMgrXAIUM4fvKe3iXkAExGXtmgdXHVFoKmHrxJ2DTSvM7/19z
jGJeu2MhIKHyqEmCk6hLjxyCE5pAH59KlbAQOP1bS28xlRskBApm2wN+LOZWzC62
HhEReQ50inCGuuubK0PqUQnyYc+lUFxrFpcliQEiBBABAgAMBQJPv9lVBQMAEnUA
AAoJEJcQuJvKV618AzgH/iRFFCi4qjvoqji1fi7yNPZVOMMO2H13Ks+AfcjRtHuV
aa30u50ND7TH+XQe6yerTapLh3aAm/sNP99aTxIuwRSlyKEoDs93+XVSgRqPBgbF
/vxv0ykok3p6L9DxFO/w5cL8JrBhMZoJrEkIBFkwN8tWlcXPRFQvcdBYv3M3DTZU
qY+UHnOxHvSzsl+LJ0S9Xcd9C5bvYfabmYJvG5eRS3pj1L/y3a6yw6hvY+JtnQAk
t05TdeHMIgQH/zb8V9wxDzmE0un8LyoC2Jx5TpikQsJSejwK6b3coxVBlngku6+C
qDAimObZLw6H9xYYIK0FoJs7j5bQZEwUO7OLBgjcMOqJASIEEAECAAwFAk/Rpc8F
AwASdQAACgkQlxC4m8pXrXw49Qf/TdNbun2htQ+cRWarszOx8BLEiW/x6PVyUQpZ
nV/0qvhKzlJUjM9hQPcA0AsOjhqtCN6Cy8KXbK/TvPm9D/Nk6HWwD1PomzrJVFk2
ywGFIuTR+lluKSp7mzm5ym0wJs5cPq731Im31RUQU8ndjLrq9YOf5FVL8NqmcOAU
4E8d68BbmVCQC5MMr0901FKwKznShfpy7VYN25/BASj8dhnynBYQErqToOJB6Cnd
JhdTlbfR4SirqAYZZg3XeqGhByytEHE1x7FMWWFYhdNtsnAVhYBbWqAzBs8lF9Jd
Mhaf0VQU/4z10gVrRtXLR/ixrCi+P4cM/fOQkqd6pwqWkaXt6okBIgQQAQIADAUC
T+NxIAUDABJ1AAAKCRCXELibyletfFBBCAC6+0TUJDcNaqOxOG1KViY6KYg9NCL8
pwNK+RKNK/N1V+WGJQH7qDMwRoOn3yogrHax4xIeOWiILrvHK0O6drS1DjsymIhR
Sm2XbE/8pYmEbuJ9vHh3b/FTChmSAO7dDjSKdWD3dvaY8lSsuDDqPdTX8FzOfrXC
M22C/YPg7oUG2A5svE1b+yismP4KmVNWAepEuPZcnEMPFgop3haHg9X2+mj/btDB
Yr6p9kAgIY17nigtNTNjtI0dMLu43aIzedCYHqOlNHiB049jkJs54fMGBjF9qPtc
m0k44xyKd1/JXWMdNUmtwKsChAXJS3YOciMgIx6tqYUTndrP4I6q1rfriQEiBBAB
AgAMBQJP9T1VBQMAEnUAAAoJEJcQuJvKV618J9wIAI1lId9SMbEHF6PKXRe154lE
pap5imMU/lGTj+9ZcXmlf8o2PoMMmb3/E1k+EZUaeSBoOmjS8C2gwd5XFwRrlwAD
RlK/pG5XsL4h5wmN2fj1ororrJXvqH427PLRQK9yzdwG4+9HTBOxjoS8qZT9plyK
AJZzAydAMqyseRHgNo0vMwlgrs4ojo+GcFGQHrF3IaUjvVfUPOmIj7afopFdIZmI
GaSF0TXBzqcZ1chFv/eTBcIuIKRvlaDee5FgV7+nLH2nKOARCLvV/+8uDi2zbr83
Ip5x2tD3XuUZ0ZWxD0AQWcrLdmGb4lkxbGxvCtsaJHaLXWQ2m760RjIUcwVMEBKJ
ASIEEAECAAwFAlAGYWsFAwASdQAACgkQlxC4m8pXrXwyVAgAvuvEl6yuGkniWOlv
uHEusUv/+2GCBg6qV+IEpVtbTCCgiFjYR5GasSp1gpZ5r4BocOlbGdjdJGHTpyK8
xD1i+6qZWUYhNRg2POXUVzcNEl2hhouwPLOifcmTwAKU76TEv3L5STviL3hWgUR2
yEUZ3Ut0IGVV6uPER9jpR3qd6O3PeuFkwf+NaGTye4jioLAy3aYwtZCUXzvYmNLP
90K4y+5yauZteLmNeq26miKC/NQu4snNFClPbGRjHD1ex9KDiAMttOgN4WEq7srT
rYgtT531WY4deHpNgoPlHPuAfC0H+S6YWuMbgfcb6dV+Rrd8Ij6zM3B/PcjmsYUf
OPdPtIkBIgQQAQIADAUCUBgtfQUDABJ1AAAKCRCXELibyletfAm3CACQlw21Lfeg
d8RmIITsfnFG/sfM3MvZcjVfEAtsY3fTK9NiyU0B3yX0PU3ei37qEW+50BzqiStf
5VhNvLfbZR+yPou7o2MAP31mq3Uc6grpTV64BRIkCmRWg40WMjNI1hv7AN/0atgj
ATYQXgnEw7mfFb0XZtMTD6cmrz/A9nTPVgZDxzopOMgCCC1ZK4Vpq9FKdCYUaHpX
3sqnDf+gpVIHkTCMgWLYQOeX5Nl+fgnq6JppaQ3ySZRUDr+uFUs0uvDRvI/cn+ur
ri92wdDnczjFumKvz/cLJAg5TG2Jv1Jx3wecALsVqQ3gL7f7vr1OMaqhI5FEBqdN
29L9cZe/ZmkriQEiBBIBCgAMBQJVoNxyBYMHhh+AAAoJEEoz7NUmyPxLD1EH/2eh
7a4+8A1lPLy2L9xcNt2bifLfFP2pEjcG6ulBoMKpHvuTCgtX6ZPdHpM7uUOje/F1
CCN0IPB533U1NIoWIKndwNUJjughtoRM+caMUdYyc4kQm29Se6hMPDfyswXE5Bwe
PmoOm4xWPVOH/cVN04zyLuxdlQZNQF/nJg6PMsz4w5z+K6NGGm24NEPcc72iv+6R
Uc/ry/7v5cVu4hO5+r104mmNV5yLecQF13cHy2JlngIHXPSlxTZbeJX7qqxE7TQh
5nviSPgdk89oB5jFSx4g1efXiwtLlP7lbDlxHduomyQuH9yqmPZMbkJt9uZDc8Zz
MYsDDwlc7BIe5bGKfjqJAhwEEAECAAYFAlSanFIACgkQdzHqU52lcqLdvg//cAEP
qdN5VTKWEoDFjDS4I6t8+0KzdDWDacVFwKJ8RAo1M2SklDxnIvnzysZd2VHp5Pq7
i4LYCZo5lDkertQ6LwaQxc4X6myKY4LTA652ObFqsSfgh9kW+aJBBAyeahPQ8CDD
+Yl23+MY5wTsj4qt7KffNzy78vLbYnVnvRQ3/CboVix0SRzg0I3Oi7n3B0lihvXy
5goy9ikjzZevejMEfjfeRCgoryy9j5RvHH9PF3fJVtUtHCS4f+kxLmbQJ1XqNDVD
hlFzjz8oUzz/8YXy3im5MY7Zuq4P4wWiI7rkIFMjTYSpz/evxkVlkR74qOngT2pY
VHLyJkqwh56i0aXcjMZiuu2cymUt2LB9IsaMyWBNJjXr2doRGMAfjuR5ZaittmML
yZwix9mWVk7tkwlIxmT/IW6Np0qMhDZcWYqPRpf7+MqY3ZYMK4552b8aDMjhXrnO
OwLsz+UI4bZa1r9dguIWIt2C2b5C1RQ9AsQBPwg7h5P+HhRuFAuDKK+vgV8FRuzR
JeKkFqwB4y0Nv7BzKbFKmP+V+/krRv+/Dyz9Bz/jyAQgw02u1tPupH9BGhlRyluN
yCJFTSNj7G+OLU0/l4XNph5OOC7sy+AMZcsL/gsT/TXCizRcCuApNTPDaenACpbv
g8OoIzmNWhh4LXbAUHCKmY//hEw9PvTZA1xKHgyJAhwEEgECAAYFAlJYsKQACgkQ
oirk60MpxUV2XQ//b2/uvThkkbeOegusDC4AZfjnL/V3mgk4iYy4AC9hum0R9oNl
XDR51P1TEw9mC1btHj+7m7Iq1a5ke5wIC7ENZiilr0yPqeWgL5+LC98dz/L85hqA
wIoGeOfMhrlaVbAZEj4yQTAJDA35vZHVsQmp87il0m+fZX04OBLXBzw86EoAAZ7Q
EoH4qFcT9k1T363tvNnIm3mEvkQ5WjE1R9uchJa1g7hdlNQlVkjFmPZrJK9fl4z5
6Dto89Po4Sge48jDH0pias4HATYHsxW819nz5jZzGcxLnFRRR5iITVZi9qzsHP7N
bUh3qxuWCHS9xziXpOcSZY848xXw63Y5jDJfpzupzu/KHj6CzXYJUEEqp9MluoGb
/BCCEPzdZ0ovyxFutM/BRcc6DvE6sTDF/UES21ROqfuwtJ6qJYWX+lBIgyCJvj4o
RdbzxUleePuzqCzmwrIXtoOKW0Rlj4SCeF9yCwUMBTGW5/nCLmN4dwf1KW2RP2Eg
4ERbuUy7QnwRP5UCl+0ISZJyYUISfg8fmPIdQsetUK9Cj+Q5jpB2GXwELXWnIK6h
K/6jXp+EGEXSqdIE53vAFe7LwfHiP/D5M71D2h62sdIOmUm3lm7xMOnM5tKlBiV+
4jJSUmriCT62zo710+6iLGqmUUYlEll6Ppvo8yuanXkYRCFJpSSP7VP0bBqIZgQT
EQIAJgUCTnc9dgIbIwUJEPPzpwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEIxx
jTtQcuH1Ut4AoIKjhdf70899d+7JFq3LD7zeeyI0AJ9Z+YyE1HZSnzYi73brScil
bIV6sbQ7TXlTUUwgUGFja2FnZSBzaWduaW5nIGtleSAod3d3Lm15c3FsLmNvbSkg
PGJ1aWxkQG15c3FsLmNvbT6IbwQwEQIALwUCTnc9rSgdIGJ1aWxkQG15c3FsLmNv
bSB3aWxsIHN0b3Agd29ya2luZyBzb29uAAoJEIxxjTtQcuH1tT0An3EMrSjEkUv2
9OX05JkLiVfQr0DPAJwKtL1ycnLPv15pGMvSzav8JyWN3IhlBBMRAgAdBQJHrJS0
BQkNMFioBQsHCgMEAxUDAgMWAgECF4AAEgkQjHGNO1By4fUHZUdQRwABAa6SAJ9/
PgZQSPNeQ6LvVVzCALEBJOBt7QCffgs+vWP18JutdZc7XiawgAN9vmmITAQTEQIA
DAUCPj6j0QWDCWYAuwAKCRBJUOEqsnKR8iThAJ9ZsR4o37dNGyl77nEqP6RAlJqa
YgCeNTPTEVY+VXHR/yjfyo0bVurRxT2ITAQTEQIADAUCPkKCAwWDCWIiiQAKCRC2
9c1NxrokP5aRAKCIaaegaMyiPKenmmm8xeTJSR+fKQCgrv0TqHyvCRINmi6LPucx
GKwfy7KIRgQQEQIABgUCP6zjrwAKCRCvxSNIeIN0D/aWAKDbUiEgwwAFNh2n8gGJ
Sw/8lAuISgCdHMzLAS26NDP8T2iejsfUOR5sNriIRgQQEQIABgUCP7RDdwAKCRCF
lq+rMHNOZsbDAJ0WoPV+tWILtZG3wYqg5LuHM03faQCeKuVvCmdPtro06xDzeeTX
VrZ14+GIRgQQEQIABgUCQ1uz6gAKCRCL2C5vMLlLXH90AJ0QsqhdAqTAk3SBnO2w
zuSOwiDIUwCdFExsdDtXf1cL3Q4ilo+OTdrTW2CIRgQTEQIABgUCRPEzJgAKCRD2
ScT0YJNTDApxAKCJtqT9LCHFYfWKNGGBgKjka0zi9wCcCG3MvnvBzDUqDVebudUZ
61Sont+ITAQQEQIADAUCQYHLAQWDBiLZiwAKCRAYWdAfZ3uh7EKNAJwPywk0Nz+Z
Lybw4YNQ7H1UxZycaQCePVhY4P5CHGjeYj9SX2gQCE2SNx+ITAQQEQIADAUCQYHL
NAWDBiLZWAAKCRCBwvfr4hO2kiIjAJ0VU1VQHzF7yYVeg+bh31nng9OOkwCeJI8D
9mx8neg4wspqvgXRA8+t2saITAQQEQIADAUCQYHLYgWDBiLZKgAKCRBrcOzZXcP0
cwmqAJsFjOvkY9c5eA/zyMrOZ1uPB6pd4QCdGyzgbYb/eoPu6FMvVI9PVIeNZReI
TAQQEQIADAUCQdCTJAWDBdQRaAAKCRB9JcoKwSmnwmJVAKCG9a+Q+qjCzDzDtZKx
5NzDW1+W+QCeL68seX8OoiXLQuRlifmPMrV2m9+ITAQQEQIADAUCQitbugWDBXlI
0gAKCRDmG6SJFeu5q/MTAKCTMvlCQtLKlzD0sYdwVLHXJrRUvgCffmdeS6aDpwIn
U0/yvYjg1xlYiuqITAQSEQIADAUCQCpZOgWDB3pLUgAKCRA8oR80lPr4YSZcAJwP
4DncDk4YzvDvnRbXW6SriJn1yQCdEy+d0CqfdhM7HGUs+PZQ9mJKBKqITAQSEQIA
DAUCQD36ugWDB2ap0gAKCRDy11xj45xlnLLfAKC0NzCVqrbTDRw25cUss14RRoUV
PACeLpEc3zSahJUB0NNGTNlpwlTczlCITAQSEQIADAUCQQ4KhAWDBpaaCAAKCRA5
yiv0PWqKX/zdAJ4hNn3AijtcAyMLrLhlZQvib551mwCgw6FEhGLjZ+as0W681luc
wZ6PzW+ITAQSEQIADAUCQoClNAWDBSP/WAAKCRAEDcCFfIOfqOMkAJwPUDhS1eTz
gnXclDKgf353LbjvXgCeLCWyyj/2d0gIk6SqzaPl2UcWrqiITAQTEQIADAUCPk1N
hAWDCVdXCAAKCRAtu3a/rdTJMwUMAKCVPkbk1Up/kyPrlsVKU/Nv3bOTZACfW5za
HX38jDCuxsjIr/084n4kw/uITAQTEQIADAUCQdeAdgWDBc0kFgAKCRBm79vIzYL9
Pj+8AJ9d7rvGJIcHzTCSYVnaStv6jP+AEACeNHa5yltqieRBCCcLcacGqYK81omI
TAQTEQIADAUCQhiBDgWDBYwjfgAKCRB2wQMcojFuoaDuAJ9CLYdysef7IsW42UfW
hI6HjxkzSgCfeEpXS4hEmmGicdpRiJQ/W21aB0GIZQQTEQIAHQULBwoDBAMVAwID
FgIBAheABQJLcC/KBQkQ8/OnABIHZUdQRwABAQkQjHGNO1By4fWw2wCeJilgEarL
8eEyfDdYTyRdqE45HkoAnjFSZY8Zg/iXeErHI0r04BRukNVgiHsEMBECADsFAkJ3
NfU0HQBPb3BzLi4uIHNob3VsZCBoYXZlIGJlZW4gbG9jYWwhIEknbSAqc28qIHN0
dXBpZC4uLgAKCRA5yiv0PWqKX+9HAJ0WjTx/rqgouK4QCrOV/2IOU+jMQQCfYSC8
JgsIIeN8aiyuStTdYrk0VWCIjwQwEQIATwUCRW8Av0gdAFNob3VsZCBoYXZlIGJl
ZW4gYSBsb2NhbCBzaWduYXR1cmUsIG9yIHNvbWV0aGluZyAtIFdURiB3YXMgSSB0
aGlua2luZz8ACgkQOcor9D1qil+g+wCfcFWoo5qUl4XTE9K8tH3Q+xGWeYYAnjii
KxjtOXc0ls+BlqXxbfZ9uqBsiQIiBBABAgAMBQJBgcuFBYMGItkHAAoJEKrj5s5m
oURoqC8QAIISudocbJRhrTAROOPoMsReyp46Jdp3iL1oFDGcPfkZSBwWh8L+cJjh
dycIwwSeZ1D2h9S5Tc4EnoE0khsS6wBpuAuih5s//coRqIIiLKEdhTmNqulkCH5m
imCzc5zXWZDW0hpLr2InGsZMuh2QCwAkB4RTBM+r18cUXMLV4YHKyjIVaDhsiPP/
MKUj6rJNsUDmDq1GiJdOjySjtCFjYADlQYSD7zcd1vpqQLThnZBESvEoCqumEfOP
xemNU6xAB0CL+pUpB40pE6Un6Krr5h6yZxYZ/N5vzt0Y3B5UUMkgYDSpjbulNvaU
TFiOxEU3gJvXc1+h0BsxM7FwBZnuMA8LEA+UdQb76YcyuFBcROhmcEUTiducLu84
E2BZ2NSBdymRQKSinhvXsEWlH6Txm1gtJLynYsvPi4B4JxKbb+awnFPusL8W+gfz
jbygeKdyqzYgKj3M79R3geaY7Q75Kxl1UogiOKcbI5VZvg47OQCWeeERnejqEAdx
EQiwGA/ARhVOP/1l0LQA7jg2P1xTtrBqqC2ufDB+v+jhXaCXxstKSW1lTbv/b0d6
454UaOUV7RisN39pE2zFvJvY7bwfiwbUJVmYLm4rWJAEOJLIDtDRtt2h8JahDObm
3CWkpadjw57S5v1c/mn+xV9yTgVx5YUfC/788L1HNKXfeVDq8zbAiQIiBBMBAgAM
BQJCnwocBYMFBZpwAAoJENjCCglaJFfPIT4P/25zvPp8ixqV85igs3rRqMBtBsj+
5EoEW6DJnlGhoi26yf1nasC2frVasWG7i4JIm0U3WfLZERGDjR/nqlOCEqsP5gS3
43N7r4UpDkBsYh0WxH/ZtST5llFK3zd7XgtxvqKL98l/OSgijH2W2SJ9DGpjtO+T
iegq7igtJzw7Vax9z/LQH2xhRQKZR9yernwMSYaJ72i9SyWbK3k0+e95fGnlR5pF
zlGq320rYHgD7v9yoQ2t1klsAxK6e3b7Z+RiJG6cAU8o8F0kGxjWzF4v8D1op7S+
IoRdB0Bap01ko0KLyt3+g4/33/2UxsW50BtfqcvYNJvU4bZns1YSqAgDOOanBhg8
Ip5XPlDxH6J/3997n5JNj/nk5ojfd8nYfe/5TjflWNiput6tZ7frEki1wl6pTNbv
V9C1eLUJMSXfDZyHtUXmiP9DKNpsucCUeBKWRKLqnsHLkLYydsIeUJ8+ciKc+EWh
FxEY+Ml72cXAaz5BuW9L8KHNzZZfez/ZJabiARQpFfjOwAnmhzJ9r++TEKRLEr96
taUI9/8nVPvT6LnBpcM38Td6dJ639YvuH3ilAqmPPw50YvglIEe4BUYD5r52Seqc
8XQowouGOuBX4vs7zgWFuYA/s9ebfGaIw+uJd/56Xl9ll6q5CghqB/yt1EceFEnF
CAjQc2SeRo6qzx22iEYEEBECAAYFAkSAbycACgkQCywYeUxD5vWDcACfQsVk/XGi
ITFyFVQ3IR/3Wt7zqBMAoNhso/cX8VUfs2BzxPvvGS3y+5Q9iEYEEBECAAYFAkUw
ntcACgkQOI4l6LNBlYkyFgCbBcw5gIii0RTDJsdNiuJDcu/NPqEAniSq9iTaLjgF
HZbaizUU8arsVCB5iEYEEBECAAYFAkWho2sACgkQu9u2hBuwKr6bjwCfa7ZK6O+X
mT08Sysg4DEoZnK4L9UAoLWgHuYg35wbZYx+ZUTh98diGU/miF0EExECAB0FAj4+
owwFCQlmAYAFCwcKAwQDFQMCAxYCAQIXgAAKCRCMcY07UHLh9XGOAJ4pVME15/DG
rUDohtGv2z8a7yv4AgCeKIp0jWUWE525QocBWms7ezxd6syIXQQTEQIAHQUCR6yU
zwUJDTBYqAULBwoDBAMVAwIDFgIBAheAAAoJEIxxjTtQcuH1dCoAoLC6RtsD9K3N
7NOxcp3PYOzH2oqzAKCFHn0jSqxk7E8by3sh+Ay8yVv0BYhdBBMRAgAdBQsHCgME
AxUDAgMWAgECF4AFAkequSEFCQ0ufRUACgkQjHGNO1By4fUdtwCfRNcueXikBMy7
tE2BbfwEyTLBTFAAnifQGbkmcARVS7nqauGhe1ED/vdgiF0EExECAB0FCwcKAwQD
FQMCAxYCAQIXgAUCS3AuZQUJEPPyWQAKCRCMcY07UHLh9aA+AKCHDkOBKBrGb8tO
g9BIub3LFhMvHQCeIOOot1hHHUlsTIXAUrD8+ubIeZaJARwEEgECAAYFAkvCIgMA
CgkQ3PTrHsNvDi8eQgf/dSx0R9Klozz8iK79w00NOsdoJY0Na0NTFmTbqHg30XJo
G62cXYgc3+TJnd+pYhYi5gyBixF/L8k/kPVPzX9W0YfwChZDsfTw0iDVmGxOswiN
jzSo0lhWq86/nEL30Khl9AhCC1XFNRw8WZYq9Z1qUXHHJ2rDARaedvpKHOjzRY0N
dx6R2zNyHDx2mlfCQ9wDchWEuJdAv0uHrQ0HV9+xq7lW/Q3L/V5AuU0tiowyAbBL
PPYrB6x9vt2ZcXS7BOy8SfQ1i8W2QDQ/Toork4YwBiv6WCW/ociy7paAoPOWV/Nf
2S6hDispeecbk7wqpbUj5klDmwrlgB/jmoAXWEnbsYkBIgQQAQIADAUCSSpooAUD
ABJ1AAAKCRCXELibyletfFOMCACpP+OVZ7lH/cNY+373c4FnSI0/S5PXS0ABgdd4
BFWRFWKrWBeXBGc8sZfHOzVEwkzV96iyHbpddeAOAkEA4OVPW1MMFCmlHxi2s9/N
JrSrTPVfQOH5fR9hn7Hbpq/ETw0IoX1FKo7vndMnHZnFEnI+PDXLcdMYQgljYzhT
xER4vYY0UKu8ekSshUy4zOX7XSJxwqPUvps8qs/TvojIF+vDJvgFYHVkgvS+shp8
Oh/exg9vKETBlgU87Jgsqn/SN2LrR/Jhl0aLd0G0iQ+/wHmVYdQUMFaCZwk/BKNa
XPzmGZEUZ3RNbYa19Mo7hcE3js76nh5YMxFvxbTggVu4kdFkiQEiBBABAgAMBQJK
M06IBQMAEnUAAAoJEJcQuJvKV618F4gH/innejIHffGMk8jYix4ZZT7pW6ApyoI+
N9Iy85H4L+8rVQrtcTHyq0VkcN3wPSwtfZszUF/0qP6P8sLJNJ1BtrHxLORYjJPm
gveeyHPzA2oJl6imqWUTiW822fyjY/azwhvZFzxmvbFJ+r5N/Z57+Ia4t9LTSqTN
HzMUYaXKDaAqzZeK7P0E6XUaaeygbjWjBLQ1O0ezozAy+Kk/gXApmDCGFuHSFe7Z
mgtFcbXLM2XFQpMUooETD2R8MUsd+xnQsff/k6pQOLxi+jUEsWSr/iqmvlk6gZ4D
pemBjuhcXYlxJYjUaX9Zmn5s+ofF4GFxRqXoY7l9Z+tCM9AX37lm6S+JASIEEAEC
AAwFAkpEcgoFAwASdQAACgkQlxC4m8pXrXz2mgf/RQkpmMM+5r8znx2TpRAGHi5w
ktvdFxlvPaOBWE28NDwTrpcoMqo9kzAiuvEQjVNihbP21wR3kvnQ84rTAH0mlC2I
uyybggpqwzOUl+Wi0o+vk8ZA0A0dStWRN8uqneCsd1XnqDe1rvqC4/9yY223tLmA
kPvz54ka2vX9GdJ3kxMWewhrVQSLCktQpygU0dujGTDqJtnk0WcBhVF9T87lv3W2
eGdPielzHU5trXezmGFj21d56G5ZFK8co7RrTt4qdznt80glh1BTGmhLlzjMPLTe
dcMusm3D1QB9ITogcG94ghSf9tEKmmRJ6OnnWM5Kn9KcL63E5oj2/lY9H54wSYkB
IgQQAQIADAUCSlY+RwUDABJ1AAAKCRCXELibyletfOOQB/0dyJBiBjgf+8d3yNID
pDktLhZYw8crIjPBVdOgX12xaUYBTGcQITRVHSggzffDA5BQXeUuWhpL4QB0uz1c
EPPwSMiWiXlBtwF5q6RVf3PZGJ9fmFuTkPRO7SruZeVDo9WP8HjbQtOLukYf566e
grzAYR9p74UgWftpDtmrqrRTobiuvsFBxosbeRCvEQCrN0n+p5D9hCVB88tUPHnO
WA4mlduAFZDxQWTApKQ92frHiBqy+M1JFezz2OM3fYN+Dqo/Cb7ZwOAA/2dbwS7o
y4sXEHbfWonjskgPQwFYB23tsFUuM4uZwVEbJg+bveglDsDStbDlfgArXSL/0+ak
lFcHiQEiBBABAgAMBQJKaAqEBQMAEnUAAAoJEJcQuJvKV618rH0H/iCciD4U6YZN
JBj0GN7/Xt851t9FWocmcaC+qtuXnkFhplXkxZVOCU4VBMs4GBoqfIvagbBTyfV4
Di+W8Uxr+/1jiu3l/HvoFxwdwNkGG6zNBhWSjdwQpGwPvh5ryV1OfLX/mgQgdDmx
vqz5+kFDUj4m7uLaeuU2j1T0lR4zU0yAsbt7J3hwfqJCXHOc9bm5nvJwMrSm+sdC
TP5HjUlwHr9mTe8xuZvj6sO/w0P4AqIMxjC9W7pT9q0ofG2KSTwt7wFbh05sbG4U
QYOJe4+Soh3+KjAa1c0cvmIh4cKX9qfCWwhhdeNfh1A9VTHhnl5zTv/UjvnQtjhl
H/Fq1eBSKcSJASIEEAECAAwFAkp5LgoFAwASdQAACgkQlxC4m8pXrXwY6wgAg3f8
76L3qDZTYlFAWs3pXBl8GsUr1DEkTlEDZMZKDM3wPmhaWBR1hMA3y6p3aaCUyJIJ
BEneXzgyU9uqCxXpC78d5qc3xs/Jd/SswzNYuvuzLYOw5wN5L31SLmQTQ8KqE0uo
RynBmtDCQ4M2UKifSnv+0+3mPh85LVAS481GNpL+VVfCYtKesWNu40+98Yg6L9NG
WwRTfsQbcdokZo44Jz7Y7f81ObC4r/X1DgPj2+d4AU/plzDcdrbINOyprs+7340e
cnaGO4Lsgd19b1CvcgJgltRquu3kRvd+Ero2RYpDv6GVK8Ea0Lto4+b/Ae8cLXAh
QnaWQCEWmw+AU4Jbz4kBIgQQAQIADAUCSo5fvQUDABJ1AAAKCRCXELibyletfA08
B/9w8yJdc8K+k07U30wR/RUg3Yb2lBDygmy091mVsyB0RGixBDXEPOXBqGKAXiV1
QSMAXM2VKRsuKahY2HFkPbyhZtjbdTa7Pr/bSnPvRhAh9GNWvvRg2Kp3qXDdjv9x
ywEghKVxcEIVXtNRvpbqRoKmHzIExvUQck5DM1VwfREeYIoxgs4035WADhVMdngQ
S2Gt8P2WaU/p8EZhFGg6X8KtOlD68zGboaJe0hj2VDc+Jc+KdjRfE3fW5IToid/o
DkUaIW6tB3WkXb0g6D/2hrEJbX3headChHKSB8eQdOR9bcCJDhhU8csd501qmrhC
ctmvlpeWQZdIQdk6sABPWeeCiQEiBBABAgAMBQJKoBJHBQMAEnUAAAoJEJcQuJvK
V618Ml8H/1D88/g/p9fSVor4Wu5WlMbg8zEAik3BIxQruEFWda6nART6M9E7e+P1
++UHZsWYs6l9ROpWxRLG1Yy9jLec2Y3nUtb20m65p+IVeKR2a9PHW35WZDV9dOYP
GZabKkO1clLeWLVgp9LRjZ+AeRG+ljHqsULXro1dwewLTB/gg9I2vgNv6dKxyKak
nM/GrqZLATAq2KoaE/u/6lzRFZIzZnLtjZh8X7+nS+V8v9IiY4ntrpkrbvFk30U6
WJp79oBIWwnW/84RbxutRoEwSar/TLwVRkcZyRXeJTapbnLGnQ/lDO1o1d7+Vbjd
q/Sg/cKHHf7NthCwkQNsCnHL0f51gZCJASIEEAECAAwFAkqoEAAFAwASdQAACgkQ
lxC4m8pXrXwE/Af/XD4R/A5R6Ir/nCvKwCTKJmalajssuAcLEa2pMnFZYO/8rzLO
+Gp8p0qFH9C4LFwA0NvR5q6X/swuROf4zxljSvNcdlQVaAfJ2ZDEgJ5GXzsPplrv
SAI9jS3LL7fSWDZgKuUe0a4qx7A0NgyGMUYGhP+QlRFa8vWEBI9fANd/0mMqAeBV
qQyOH0X1FiW1Ca2Jn4NKfuMy9GEvRddVIbB1LvoNVtXPNzeeKMyNb9Jdx1MFWssy
COBP2DayJKTmjvqPEc/YOjOowoN5sJ/jn4mVSTvvlTooLiReSs6GSCAjMVxN7eYS
/Oyq6Iu1JDcJvmB8N2WixAZtAVgF8OA7CWXKVYkBIgQQAQIADAUCSrnHiQUDABJ1
AAAKCRCXELibyletfPChB/9uECti1dZeNuFsd0/RuGyRUVlrrhJE6WCcOrLO9par
rPbewbKBmjSzB0MygJXGvcC06mPNuquJ7/WpxKsFmfg4vJBPlADFKtgRUy9BLzjC
eotWchPHFBVW9ftPbaQViSUu7d89NLjDDM5xrh80puDIApxoQLDoIrh3T1kpZx56
jSWv0gelFUMbXAzmqkJSyL4Xdh1aqzgUbREd7Xf2ICzuh0sV6V7c/AwWtjWEGEsA
HZaiQDywZwbC18GwrMLiAzGWb/AScFDQRCZKJDjL+Ql8YT6z+ZMVr8gb7CIU5PKY
dhiIf2UVTQwLAoW7lNRCQQAqcGjK3IMIz7SO/yk4HmVUiQEiBBABAgAMBQJK3gjG
BQMAEnUAAAoJEJcQuJvKV618jkEH+wb0Zv9z7xQgpLMowVuBFQVu8/z7P5ASumyB
PUO3+0JVxSHBhlCKQK7n11m1fhuGt2fCxXhSU6LzXj36rsKRY53lGZ9QhvqFUtQH
3Xb2IQLIJC4UKjG2jSSCdcuA/x98bwp2v7O03rn7ndCS16CwXnRV3geQoNipRKMS
DajKPpZv1RiZm8pMKqEb8WSw352xWoOcxuffjlsOEwvJ85SEGCAZ9tmIlkZOc7Ai
QONDvii9b8AYhQ60RIQC0HP2ASSmK0V92VeFPxHmAygdDQgZNVtbVxgnnt7oTNEu
VRXNY+z4OfBArp7R+cTsvijDRZY4kML1n22hUybwoxUEvjqZV2+JASIEEAECAAwF
AkrvOlQFAwASdQAACgkQlxC4m8pXrXxrPAgArXiNgZirNuBhfNCXlkzkCHLx5wnV
e4SmTpbWzTwWw7+qk7d4l9hlWtdImISORINzo7f4ShSUzJX2GciNaXhaHRo7+y5O
Zbu82jQb09aQQj/nibKYuqxqUrobTEm+DuYz3JUQZm2PsPcHLS8mX9cxvrJUncPG
nXEV0DRaq71SGWDprtkvBbp6i38aY3sIhYgz8wM5m1szKDtjywmBYcFehIdozt9z
hm7wZshzRWQX1+Rf/pIsnk+OzBIa34crSemTnacbV/B7278z2XAyziPNFuqz0xu+
iltOmYmayfNWAmumuw9NcuwWMlth6Mc2HLrpo0ZBheJ6iuDMPsHnwqdB/4kBIgQQ
AQIADAUCSwBd2gUDABJ1AAAKCRCXELibyletfP6tB/4m1w0BtlkJgtS6E+B/ns14
z4A4PGors+n+MYm05qzvi+EnDF/sytCmVcKeimrtvDcfoDtKAFFvJjcYXfnJdGWm
Pu0SJMRL5KKCirAKwZmU/saxOgoB5QLNw+DHPteJ3w9GmWlGxIqG1r15WC5duzBC
y3FsnjJYG3jaLnHOO9yXXb5h0kUTORfUKdvAr1gxF2KoatZWqGoaPPnHoqb88rjt
zk8I7gDqoXnzh8wLxa0ZYvfTC/McxdWTrwXLft+krmMQ18iIZEne2hvVLNJVuluU
oiWLeHA8iNCQ4W4WTdLc1mCnCjGTMX/MN41uLH0C9Ka4R6wEaqj4lPDk1B/1TV+Q
iQEiBBABAgAMBQJLEYGrBQMAEnUAAAoJEJcQuJvKV618naIH/2t9aH5mBTKBN6fU
qhrf79vIsjtI/QNS5qisBISZMX3/1/0Gu6WnxkPSfdCUJMWCjMcnVj7KU2wxTHHG
VpAStd9r2afUNxRyqZwzwyytktuZok0XngAEDYDDBS3ssu2R4uWLCsC2ysXEqO/5
tI5YrTWJZrfeIphTaYP5hxrMujvqy3kEwKKbiMz91cDeiLS+YCBcalj5n/1dMYf7
8U8C6ieurxAg/L8h6x25VM4Ilx4MmG2T8QGtkkUXd+Fd/KYWmf0LE5LLPknf0Hhw
oVslPXeinp4FsHK/5wzviv4YZpzuTqs9NlKcMsa4IuuPOB0FDf0pn+OFQbEg9QwY
2gCozK+JASIEEAECAAwFAksjTdQFAwASdQAACgkQlxC4m8pXrXwlogf/XBGbXRVX
LMaRN4SczOjwT3/tUCriTkb3v+zKjRG90zFhYAccjn7w+7jKQicjq6quQG1EH2X4
/Su6ps1lDLqGHHhiJW3ZhxQScLZmhdAYsh2qG4GP/UW3QjXG7c61t+H3olvWg2cr
wqCxxFZAgkAAkr9xcHWFZJEQeXoob6cCZObaUnHSANdmC6s5lUxXYa2bmL7Q3UB4
4KCzDvAfbPZKJOw9k0qb3lc11zx+vGdyZFbm4R0+3LPp/vT0b3GlSbbF9lU1GOXh
VaphrgFFa76dmjfHCkPplXAkK1VSIU/aPGAefduTFMdlSZpdMtJ5AULjGcszBDlR
pLlPxvqVa0ZpgIkBIgQQAQIADAUCSycmkgUDABJ1AAAKCRCXELibyletfHlNCACp
1YespiHfQt2alcscE5zgfETEHHic8Ai6pNkU9HT4TeWcFHEDe5QqfYcpjLrQvBXS
kSvxEittbyRdv+e+j5Z+HyHjiG8nAQBL6qy9eHqQE4+d7gYs6DTk7sG9ZMYphREb
ltzD+F4hVCQdLT8LNr0eVFN7ehqECScDaCG8/Qyti+l/0M902/Yn+mz0ilOiUdWJ
9x6LPaIINtb1gsYDEylLjwGIZmI0r5Kh9wYoV4vnNezFbxO1uRiW0B7iaPjIEsbt
OOKp7wx2aX+DM3N9F3BtaIY8XnzcnomNm83SNsgmgrZljpQltUnNqIhNM8DupQ+I
WOV5gtl6pTC7CgeVTVyRiQEiBBABAgAMBQJLOGXuBQMAEnUAAAoJEJcQuJvKV618
ll4IAKJ9mm4jb0c8fe9+uDI8eCJRbzNbVXm8zWzpA8GUtQAakwxoKv332QP1Wa1P
odni/e3EMhsSREOZJJv79YqGxGRBTE9Kb/VjM34nas4XSnXKW28XWhKyIw+XwQAi
nY2swFHh+83Htr/mwTdJfS2aEYl2zboBvd/JZCdhOGU2GH737S/3uEczoKkfVQ/w
OTM8X1xWwlYWqx23k/DsGcuDs9lA2g7Mx7DSqBtVjaTkn9h0zATzXLDkmP4SAUVj
cZ83WDpFre5WnizZjdXlBMM5OCexp5WpmzyHLTnaBFK4jEmnsk5C2Rnoyp8Ivz6g
Ecg1tRbEXijRw++d2TFYlJwLKtiJASIEEAECAAwFAktKMicFAwASdQAACgkQlxC4
m8pXrXxqHQgAuYY5scKrh0m/GS9EYnyC9494lOlO6iytU0CpE6oBC31M3hfX/Dbj
UbcS5szZNU+2CPYo4ujQLZ7suN7+tTjG6pZFfMevajT9+jsL+NPMF8RLdLOVYmbl
TmSQGNO+XGEYaKYH5oZIeIW5AKCgi2ozkdFlBBLAx7Kqo/FyybhkURFEcvEyVmgf
3KLV7IIiX/fYLfoCMCJ/Lcm9/llSFB1n8Nvg66Xd533DKoHjueD3jyaNAVlo2mq/
sIAv++kntvOiB3GDK5pfwHZ78WWiCpsWZpE5gzAnzJ1Y0WEigRo0PVLu3cLO0jLG
23d+H/CbfZ8rkajHJeCDQF7YVmP0t0nYpYkBIgQQAQIADAUCS1v+ZgUDABJ1AAAK
CRCXELibyletfNS/CACqt2TkB86mjqM+cJ74+dWBvJ2aFuURuxzm95i9Q/W/hU08
2iMbC3+0k2oD8CrTOe61P+3oRyLjv/UEDUNzLncNe2YsA9JeV+4hvPwH5Vp3Om13
089fCKZUbqslXNKkHiWYU+zAaZJXEuGRmRz0HbQIeAMOWF4oa226uo1e4ws1Jhc+
F3E/ApCRyFBqBUdL05hapQLditYpsBjIdiBGpjzidMLE2wX2W4ZpAdN0U6BIyIqR
mTPjbSkvzS9kSWFmfhQgnBDKEYJpVZgE1sN52rYC1sDeGeiuKxlzjVov9MMhYMWa
Zo3R5o3F2iIM/BK6FbC252lf/Mhu3ICuXujNBZNYiQEiBBABAgAMBQJLbSH4BQMA
EnUAAAoJEJcQuJvKV618kd0IAJLLwDH6gvgAlBFklQJXqQxUdcSOOVMAWtlHgWOy
ozjgomZZBkRL8dtCDr9YBMcj5czcQ3qpmLJdppXhKB+kJV2iUXfDMSFXwJ4wLfIs
8FNnXw8H5U01oBkGH/Ku6ngL9Vwt+MjYHtCWkw9QueUKZnDudX9qIzLAIt+mwSTu
A6+fY4VWIg40AA0v3exaQM55YR/UhlKunpGG9o8Qkq77dMEbTMpOmBoLbOMRB3Dd
MAvVU6G2l6Pcb7KobVCuOBnb6batXARV/G8sw+nzfJ16fr/KobZT2A6m+Jrqk4dl
F14ljLbz16O5JGUPAryN2G2ddBdSAy7dtFSVhWWiWC9n88q5Ag0EPj6jHRAIAO/h
iX8WzHWOMLJT54x/axeDdqn1rBDf5cWmaCWHN2ujNNlgpx5emoU9v7QStsNUCOGB
bXkeO4Ar7YG+jtSR33zqNh3y5kQ0YkY3dQ0wh6nsl+wh4XIIY/3TUZVtmdJeUBRH
JlfVNFYad2hX1guFI37Ny1PoZAFsxO82g+XB/Se8r/+sbmVcONdcdIeFKrE3FjLt
IjNQcxC6l9Q2Oy8KDxG/zvUZG3+H5i3tdRMyGgmuD6gEV0GXOHYUopzLeit1+Aa0
bCk36Mwbu+BeOw/CJW3+b0mB27hOaf9aCA855IP6fJFvtxcblq8nHIqhU3Dc9tec
sl9/S1xZ5S8ylG/xeRsAAwUH/i8KqmvAhq0X7DgCcYputwh37cuZlHOa1Ep07JRm
BCDgkdQXkGrsj2Wzw7Aw/TGdWWkmn2pxb8BRui5cfcZFO7c6vryi6FpJuLucX975
+eVY50ndWkPXkJ1HF4i+HJwRqE2zliN/RHMs4LJcwXQvvjD43EE3AO6eiVFbD+qA
AdxUFoOeLblKNBHPG7DPG9xL+Ni5rkE+TXShxsB7F0z7ZdJJZOG0JODmox7IstQT
GoaU9u41oyZTIiXPiFidJoIZCh7fdurP8pn3X+R5HUNXMr7M+ba8lSNxce/F3kmH
0L7rsKqdh9d/aVxhJINJ+inVDnrXWVoXu9GBjT8Nco1iU9SIVAQYEQIADAUCTnc9
7QUJE/sBuAASB2VHUEcAAQEJEIxxjTtQcuH1FJsAmwWK9vmwRJ/y9gTnJ8PWf0BV
roUTAKClYAhZuX2nUNwH4vlEJQHDqYa5yQ==
=HfUN
-----END PGP PUBLIC KEY BLOCK-----
+46
View File
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at conduct@process-one.net. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
+5 -5
View File
@@ -4,8 +4,8 @@ with the OpenSSL library and distribute the resulting binary.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -306,9 +306,9 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
+145 -59
View File
@@ -11,9 +11,15 @@ DESTDIR =
# /etc/ejabberd/
ETCDIR = $(DESTDIR)@sysconfdir@/ejabberd
# /bin/
BINDIR = $(DESTDIR)@bindir@
# /sbin/
SBINDIR = $(DESTDIR)@sbindir@
# /lib/
LIBDIR = $(DESTDIR)@libdir@
# /lib/ejabberd/
EJABBERDDIR = $(DESTDIR)@libdir@/ejabberd
@@ -40,6 +46,18 @@ SODIR = $(PRIVDIR)/lib
# /usr/lib/ejabberd/priv/msgs
MSGSDIR = $(PRIVDIR)/msgs
# /usr/lib/ejabberd/priv/css
CSSDIR = $(PRIVDIR)/css
# /usr/lib/ejabberd/priv/img
IMGDIR = $(PRIVDIR)/img
# /usr/lib/ejabberd/priv/js
JSDIR = $(PRIVDIR)/js
# /usr/lib/ejabberd/priv/sql
SQLDIR = $(PRIVDIR)/sql
# /var/lib/ejabberd/
SPOOLDIR = $(DESTDIR)@localstatedir@/lib/ejabberd
@@ -67,6 +85,11 @@ else
CHOWN_OUTPUT=&1
INIT_USER=$(INSTALLUSER)
endif
# if no group was enabled, don't set privileges or ownership
INSTALLGROUP=@INSTALLGROUP@
ifneq ($(INSTALLGROUP),)
G_USER=-g $(INSTALLGROUP)
endif
all: deps src
@@ -75,9 +98,11 @@ deps: deps/.got
deps/.got:
rm -rf deps/.got
rm -rf deps/.built
mkdir -p deps
$(REBAR) get-deps && :> deps/.got
deps/.built:
deps/.built: deps/.got
$(REBAR) configure-deps
$(REBAR) compile && :> deps/.built
src: deps/.built
@@ -88,37 +113,101 @@ update:
rm -rf deps/.built
$(REBAR) update-deps && :> deps/.got
translations:
contrib/extract_translations/prepare-translation.sh -updateall
xref: all
$(REBAR) skip_deps=true xref
doc:
echo making $$target in doc; \
(cd doc && $(MAKE) $$target) || exit 1
translations:
tools/prepare-tr.sh
edoc:
$(ERL) -noinput +B -eval \
'case edoc:application(ejabberd, ".", []) of ok -> halt(0); error -> halt(1) end.'
spec:
$(ERL) -noinput +B -pa ebin -pa deps/*/ebin -eval \
'case xml_gen:compile("tools/xmpp_codec.spec") of ok -> halt(0); _ -> halt(1) end.'
JOIN_PATHS=$(if $(wordlist 2,1000,$(1)),$(firstword $(1))/$(call JOIN_PATHS,$(wordlist 2,1000,$(1))),$(1))
DLLs := $(wildcard deps/*/priv/*.so) $(wildcard deps/*/priv/lib/*.so)
VERSIONED_DEP=$(if $(DEP_$(1)_VERSION),$(DEP_$(1)_VERSION),$(1))
install: all
ELIXIR_TO_DEST=$(LIBDIR) $(call VERSIONED_DEP,$(word 2,$(1))) $(wordlist 5,1000,$(1))
DEPS_TO_DEST=$(LIBDIR) $(call VERSIONED_DEP,$(word 2,$(1))) $(wordlist 3,1000,$(1))
MAIN_TO_DEST=$(LIBDIR) $(call VERSIONED_DEP,ejabberd) $(1)
TO_DEST_SINGLE=$(if $(subst XdepsX,,X$(word 1,$(1))X),$(call MAIN_TO_DEST,$(1)),$(if $(subst XlibX,,X$(word 3,$(1))X),$(call DEPS_TO_DEST,$(1)),$(call ELIXIR_TO_DEST,$(1))))
TO_DEST=$(foreach path,$(1),$(call JOIN_PATHS,$(call TO_DEST_SINGLE,$(subst /, ,$(path)))))
FILTER_DIRS=$(foreach path,$(1),$(if $(wildcard $(path)/*),,$(path)))
FILES_WILDCARD=$(call FILTER_DIRS,$(foreach w,$(1),$(wildcard $(w))))
ifeq ($(MAKECMDGOALS),copy-files-sub)
DEPS:=$(sort $(shell $(REBAR) -q list-deps|$(SED) -ne '/ TAG / s/ .*// p; / REV / s/ .*// p; / BRANCH / s/ .*// p'))
DEPS_FILES=$(call FILES_WILDCARD,$(foreach DEP,$(DEPS),deps/$(DEP)/ebin/*.beam deps/$(DEP)/ebin/*.app deps/$(DEP)/priv/* deps/$(DEP)/priv/lib/* deps/$(DEP)/priv/bin/* deps/$(DEP)/include/*.hrl deps/$(DEP)/COPY* deps/$(DEP)/LICENSE* deps/$(DEP)/lib/*/ebin/*.beam deps/$(DEP)/lib/*/ebin/*.app))
BINARIES=deps/epam/priv/bin/epam deps/eimp/priv/bin/eimp deps/fs/priv/mac_listener
DEPS_FILES_FILTERED=$(filter-out $(BINARIES) deps/elixir/ebin/elixir.app,$(DEPS_FILES))
DEPS_DIRS=$(sort deps/ $(foreach DEP,$(DEPS),deps/$(DEP)/) $(dir $(DEPS_FILES)))
MAIN_FILES=$(filter-out %/configure.beam,$(call FILES_WILDCARD,ebin/*.beam ebin/*.app priv/msgs/*.msg priv/css/*.css priv/img/*.png priv/js/*.js priv/lib/* include/*.hrl COPYING))
MAIN_DIRS=$(sort $(dir $(MAIN_FILES)) priv/bin priv/sql)
define DEP_VERSION_template
DEP_$(1)_VERSION:=$(shell $(SED) -e '/vsn/!d;s/.*, *"/$(1)-/;s/".*//' $(2) 2>/dev/null)
endef
DELETE_TARGET_SO=$(if $(subst X.soX,,X$(suffix $(1))X),,rm -f $(call TO_DEST,$(1));)
$(foreach DEP,$(DEPS),$(eval $(call DEP_VERSION_template,$(DEP),deps/$(DEP)/ebin/$(DEP).app)))
$(eval $(call DEP_VERSION_template,ejabberd,ebin/ejabberd.app))
define COPY_template
$(call TO_DEST,$(1)): $(1) $(call TO_DEST,$(dir $(1))) ; $(call DELETE_TARGET_SO, $(1)) $$(INSTALL) -m 644 $(1) $(call TO_DEST,$(1))
endef
define COPY_BINARY_template
$(call TO_DEST,$(1)): $(1) $(call TO_DEST,$(dir $(1))) ; rm -f $(call TO_DEST,$(1)); $$(INSTALL) -m 755 $$(O_USER) $(1) $(call TO_DEST,$(1))
endef
$(foreach file,$(DEPS_FILES_FILTERED) $(MAIN_FILES),$(eval $(call COPY_template,$(file))))
$(foreach file,$(BINARIES),$(eval $(call COPY_BINARY_template,$(file))))
$(sort $(call TO_DEST,$(MAIN_DIRS) $(DEPS_DIRS))):
$(INSTALL) -d $@
$(call TO_DEST,priv/sql/lite.sql): sql/lite.sql $(call TO_DEST,priv/sql)
$(INSTALL) -m 644 $< $@
$(call TO_DEST,priv/bin/captcha.sh): tools/captcha.sh $(call TO_DEST,priv/bin)
$(INSTALL) -m 755 $(O_USER) $< $@
copy-files-sub2: $(call TO_DEST,$(DEPS_FILES) $(MAIN_FILES) priv/bin/captcha.sh priv/sql/lite.sql)
.PHONY: $(call TO_DEST,$(DEPS_FILES) $(MAIN_DIRS) $(DEPS_DIRS))
endif
copy-files:
$(MAKE) copy-files-sub
copy-files-sub: copy-files-sub2
install: all copy-files
#
# Configuration files
$(INSTALL) -d -m 750 $(G_USER) $(ETCDIR)
[ -f $(ETCDIR)/ejabberd.cfg ] \
&& $(INSTALL) -b -m 640 $(G_USER) ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg-new \
|| $(INSTALL) -b -m 640 $(G_USER) ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg
$(SED) -e "s*{{rootdir}}*@prefix@*" \
-e "s*{{installuser}}*@INSTALLUSER@*" \
-e "s*{{libdir}}*@libdir@*" \
-e "s*{{sysconfdir}}*@sysconfdir@*" \
-e "s*{{localstatedir}}*@localstatedir@*" \
-e "s*{{docdir}}*@docdir@*" \
-e "s*{{erl}}*@ERL@*" ejabberdctl.template \
[ -f $(ETCDIR)/ejabberd.yml ] \
&& $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml-new \
|| $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml
$(SED) -e "s*{{rootdir}}*@prefix@*g" \
-e "s*{{installuser}}*@INSTALLUSER@*g" \
-e "s*{{bindir}}*@bindir@*g" \
-e "s*{{libdir}}*@libdir@*g" \
-e "s*{{sysconfdir}}*@sysconfdir@*g" \
-e "s*{{localstatedir}}*@localstatedir@*g" \
-e "s*{{docdir}}*@docdir@*g" \
-e "s*{{erl}}*@ERL@*g" \
-e "s*{{epmd}}*@EPMD@*g" ejabberdctl.template \
> ejabberdctl.example
[ -f $(ETCDIR)/ejabberdctl.cfg ] \
&& $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \
@@ -128,37 +217,22 @@ install: all
# Administration script
[ -d $(SBINDIR) ] || $(INSTALL) -d -m 755 $(SBINDIR)
$(INSTALL) -m 550 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl
# Elixir binaries
[ -d $(BINDIR) ] || $(INSTALL) -d -m 755 $(BINDIR)
[ -f deps/elixir/bin/iex ] && $(INSTALL) -m 550 $(G_USER) deps/elixir/bin/iex $(BINDIR)/iex || true
[ -f deps/elixir/bin/elixir ] && $(INSTALL) -m 550 $(G_USER) deps/elixir/bin/elixir $(BINDIR)/elixir || true
[ -f deps/elixir/bin/mix ] && $(INSTALL) -m 550 $(G_USER) deps/elixir/bin/mix $(BINDIR)/mix || true
#
# Init script
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*" \
-e "s*@installuser@*$(INIT_USER)*" ejabberd.init.template \
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
-e "s*@installuser@*$(INIT_USER)*g" ejabberd.init.template \
> ejabberd.init
chmod 755 ejabberd.init
#
# Binary Erlang files
$(INSTALL) -d $(BEAMDIR)
$(INSTALL) -m 644 ebin/*.app $(BEAMDIR)
$(INSTALL) -m 644 ebin/*.beam $(BEAMDIR)
$(INSTALL) -m 644 deps/*/ebin/*.app $(BEAMDIR)
$(INSTALL) -m 644 deps/*/ebin/*.beam $(BEAMDIR)
rm -f $(BEAMDIR)/configure.beam
#
# ejabberd header files
$(INSTALL) -d $(INCLUDEDIR)
$(INSTALL) -m 644 include/*.hrl $(INCLUDEDIR)
$(INSTALL) -m 644 deps/*/include/*.hrl $(INCLUDEDIR)
#
# Binary C programs
$(INSTALL) -d $(PBINDIR)
$(INSTALL) -m 750 $(O_USER) tools/captcha.sh $(PBINDIR)
#
# Binary system libraries
$(INSTALL) -d $(SODIR)
$(INSTALL) -m 644 $(DLLs) $(SODIR)
#
# Translated strings
$(INSTALL) -d $(MSGSDIR)
$(INSTALL) -m 644 priv/msgs/*.msg $(MSGSDIR)
# Service script
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" ejabberd.service.template \
> ejabberd.service
chmod 644 ejabberd.service
#
# Spool directory
$(INSTALL) -d -m 750 $(O_USER) $(SPOOLDIR)
@@ -178,19 +252,18 @@ install: all
#
# Documentation
$(INSTALL) -d $(DOCDIR)
$(INSTALL) -m 644 doc/dev.html $(DOCDIR)
$(INSTALL) -m 644 doc/guide.html $(DOCDIR)
$(INSTALL) -m 644 doc/*.png $(DOCDIR)
$(INSTALL) -m 644 doc/*.txt $(DOCDIR)
[ -f doc/guide.pdf ] \
&& $(INSTALL) -m 644 doc/guide.pdf $(DOCDIR) \
|| echo "No doc/guide.pdf was built"
[ -f doc/guide.html ] \
&& $(INSTALL) -m 644 doc/guide.html $(DOCDIR) \
|| echo "Documentation not included in sources"
$(INSTALL) -m 644 COPYING $(DOCDIR)
uninstall: uninstall-binary
uninstall-binary:
rm -f $(SBINDIR)/ejabberdctl
rm -f $(BINDIR)/iex
rm -f $(BINDIR)/elixir
rm -f $(BINDIR)/mix
rm -fr $(DOCDIR)
rm -f $(BEAMDIR)/*.beam
rm -f $(BEAMDIR)/*.app
@@ -200,8 +273,16 @@ uninstall-binary:
rm -fr $(PBINDIR)
rm -f $(SODIR)/*.so
rm -fr $(SODIR)
rm -f $(MSGSDIR)/*.msgs
rm -f $(MSGSDIR)/*.msg
rm -fr $(MSGSDIR)
rm -f $(CSSDIR)/*.css
rm -fr $(CSSDIR)
rm -f $(IMGDIR)/*.png
rm -fr $(IMGDIR)
rm -f $(JSDIR)/*.js
rm -fr $(JSDIR)
rm -f $(SQLDIR)/*.sql
rm -fr $(SQLDIR)
rm -fr $(PRIVDIR)
rm -fr $(EJABBERDDIR)
@@ -215,6 +296,7 @@ uninstall-all: uninstall-binary
clean:
rm -rf deps/.got
rm -rf deps/.built
rm -rf test/*.beam
$(REBAR) clean
clean-rel:
@@ -245,7 +327,7 @@ dialyzer/erlang.plt:
@mkdir -p dialyzer
@dialyzer --build_plt --output_plt dialyzer/erlang.plt \
-o dialyzer/erlang.log --apps kernel stdlib sasl crypto \
public_key ssl mnesia inets odbc tools compiler erts webtool \
public_key ssl mnesia inets odbc tools compiler erts \
runtime_tools asn1 observer xmerl et gs wx syntax_tools; \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
@@ -282,8 +364,12 @@ test:
@echo "************************** NOTICE ***************************************"
@cat test/README
@echo "*************************************************************************"
@cd priv && ln -sf ../sql
$(REBAR) skip_deps=true ct
.PHONY: src doc edoc dialyzer Makefile TAGS clean clean-rel distclean rel \
install uninstall uninstall-binary uninstall-all translations deps test spec \
erlang_plt deps_plt ejabberd_plt
quicktest:
$(REBAR) skip_deps=true ct suites=elixir
.PHONY: src edoc dialyzer Makefile TAGS clean clean-rel distclean rel \
install uninstall uninstall-binary uninstall-all translations deps test \
quicktest erlang_plt deps_plt ejabberd_plt
-176
View File
@@ -1,176 +0,0 @@
include Makefile.inc
ALL : build
REL=..\release
EREL=$(REL)\ejabberd-$(EJABBERD_VERSION)
EBIN_DIR=$(EREL)\ebin
SRC_DIR=$(EREL)\src
PRIV_DIR=$(EREL)\priv
SO_DIR=$(EREL)
MSGS_DIR=$(EREL)\msgs
WIN32_DIR=$(EREL)\win32
DOC_DIR=$(EREL)\doc
NSIS_SCRIPT=win32\ejabberd.nsi
NSIS_HEADER=win32\ejabberd.nsh
installer : $(NSIS_SCRIPT) $(NSIS_HEADER)
makensis $(NSIS_SCRIPT)
$(NSIS_HEADER) : Makefile.inc
echo !define OUTFILEDIR "..\$(REL)" >$(NSIS_HEADER)
echo !define TESTDIR "..\$(REL)\ejabberd-$(EJABBERD_VERSION)" >>$(NSIS_HEADER)
echo !define VERSION "$(EJABBERD_VERSION)" >>$(NSIS_HEADER)
release_clean :
if exist $(REL) rd /s /q $(REL)
release : build release_clean
mkdir $(REL)
mkdir $(EREL)
mkdir $(EBIN_DIR)
copy *.beam $(EBIN_DIR)
@erase $(EBIN_DIR)\configure.beam
copy *.app $(EBIN_DIR)
copy *.dll $(SO_DIR)
mkdir $(MSGS_DIR)
copy msgs\*.msg $(MSGS_DIR)
mkdir $(WIN32_DIR)
copy win32\ejabberd.cfg $(EREL)
copy win32\inetrc $(EREL)
copy $(SYSTEMROOT)\system32\libeay32.dll $(EREL)
copy $(SYSTEMROOT)\system32\ssleay32.dll $(EREL)
copy win32\ejabberd.ico $(WIN32_DIR)
mkdir $(SRC_DIR)
copy *.app $(SRC_DIR)
copy *.erl $(SRC_DIR)
copy *.hrl $(SRC_DIR)
copy *.c $(SRC_DIR)
mkdir $(SRC_DIR)\eldap
copy eldap\eldap.* $(SRC_DIR)\eldap
copy eldap\ELDAPv3.asn $(SRC_DIR)\eldap
mkdir $(SRC_DIR)\mod_irc
copy mod_irc\*.erl $(SRC_DIR)\mod_irc
copy mod_irc\*.c $(SRC_DIR)\mod_irc
mkdir $(SRC_DIR)\mod_muc
copy mod_muc\*.erl $(SRC_DIR)\mod_muc
mkdir $(SRC_DIR)\mod_pubsub
copy mod_pubsub\*.erl $(SRC_DIR)\mod_pubsub
mkdir $(SRC_DIR)\mod_proxy65
copy mod_proxy65\*.erl $(SRC_DIR)\mod_proxy65
copy mod_proxy65\*.hrl $(SRC_DIR)\mod_proxy65
mkdir $(SRC_DIR)\stringprep
copy stringprep\*.erl $(SRC_DIR)\stringprep
copy stringprep\*.c $(SRC_DIR)\stringprep
copy stringprep\*.tcl $(SRC_DIR)\stringprep
mkdir $(SRC_DIR)\stun
copy stun\*.erl $(SRC_DIR)\stun
copy stun\*.hrl $(SRC_DIR)\stun
mkdir $(SRC_DIR)\tls
copy tls\*.erl $(SRC_DIR)\tls
copy tls\*.c $(SRC_DIR)\tls
mkdir $(SRC_DIR)\ejabberd_zlib
copy ejabberd_zlib\*.erl $(SRC_DIR)\ejabberd_zlib
copy ejabberd_zlib\*.c $(SRC_DIR)\ejabberd_zlib
mkdir $(SRC_DIR)\web
copy web\*.erl $(SRC_DIR)\web
mkdir $(SRC_DIR)\odbc
copy odbc\*.erl $(SRC_DIR)\odbc
copy odbc\*.sql $(EREL)
mkdir $(DOC_DIR)
copy ..\doc\*.txt $(DOC_DIR)
copy ..\doc\*.html $(DOC_DIR)
copy ..\doc\*.png $(DOC_DIR)
SOURCE = expat_erl.c
OBJECT = expat_erl.o
DLL = expat_erl.dll
build : $(DLL) compile-beam all-recursive
all-recursive :
cd eldap
nmake -nologo -f Makefile.win32
cd ..\mod_irc
nmake -nologo -f Makefile.win32
cd ..\mod_muc
nmake -nologo -f Makefile.win32
cd ..\mod_pubsub
nmake -nologo -f Makefile.win32
cd ..\mod_proxy65
nmake -nologo -f Makefile.win32
cd ..\stringprep
nmake -nologo -f Makefile.win32
cd ..\stun
nmake -nologo -f Makefile.win32
cd ..\tls
nmake -nologo -f Makefile.win32
cd ..\ejabberd_zlib
nmake -nologo -f Makefile.win32
cd ..\web
nmake -nologo -f Makefile.win32
cd ..\odbc
nmake -nologo -f Makefile.win32
cd ..
compile-beam : XmppAddr.hrl
erl -s make all report -noinput -s erlang halt
XmppAddr.hrl : XmppAddr.asn1
erlc -bber_bin +der +compact_bit_string +optimize +noobj XmppAddr.asn1
CLEAN : clean-recursive clean-local
clean-local :
-@erase $(OBJECT)
-@erase $(DLL)
-@erase expat_erl.exp
-@erase expat_erl.lib
-@erase *.beam
-@erase XmppAddr.asn1db
-@erase XmppAddr.erl
-@erase XmppAddr.hrl
clean-recursive :
cd eldap
nmake -nologo -f Makefile.win32 clean
cd ..\mod_irc
nmake -nologo -f Makefile.win32 clean
cd ..\mod_muc
nmake -nologo -f Makefile.win32 clean
cd ..\mod_pubsub
nmake -nologo -f Makefile.win32 clean
cd ..\mod_proxy65
nmake -nologo -f Makefile.win32 clean
cd ..\stringprep
nmake -nologo -f Makefile.win32 clean
cd ..\stun
nmake -nologo -f Makefile.win32 clean
cd ..\tls
nmake -nologo -f Makefile.win32 clean
cd ..\ejabberd_zlib
nmake -nologo -f Makefile.win32 clean
cd ..\web
nmake -nologo -f Makefile.win32 clean
cd ..\odbc
nmake -nologo -f Makefile.win32 clean
cd ..
distclean : release_clean clean
-@erase $(NSIS_HEADER)
-@erase Makefile.inc
CC=cl.exe
CC_FLAGS=-nologo -D__WIN32__ -DWIN32 -DWINDOWS -D_WIN32 -DNT $(EXPAT_FLAG) -MD -Ox -I"$(ERLANG_DIR)\usr\include" -I"$(EI_DIR)\include" -I"$(EXPAT_DIR)\source\lib"
LD=link.exe
LD_FLAGS=-release -nologo -incremental:no -dll "$(EI_DIR)\lib\ei_md.lib" "$(EI_DIR)\lib\erl_interface_md.lib" "$(EXPAT_LIB)" MSVCRT.LIB kernel32.lib advapi32.lib gdi32.lib user32.lib comctl32.lib comdlg32.lib shell32.lib
$(DLL) : $(OBJECT)
$(LD) $(LD_FLAGS) -out:$@ $<
$(OBJECT) : $(SOURCE)
$(CC) $(CC_FLAGS) -c -Fo$@ $<
+154 -31
View File
@@ -1,51 +1,174 @@
ejabberd - High-Performance Enterprise Instant Messaging Server
ejabberd Community Edition
==========================
[![Build Status](https://travis-ci.org/processone/ejabberd.svg?branch=master)](https://travis-ci.org/processone/ejabberd) [![Hex version](https://img.shields.io/hexpm/v/ejabberd.svg "Hex version")](https://hex.pm/packages/ejabberd)
ejabberd is a distributed, fault-tolerant technology that allows the creation
of large-scale instant messaging applications. The server can reliably support
thousands of simultaneous users on a single node and has been designed to
provide exceptional standards of fault tolerance. As an open source
technology, based on industry-standards, ejabberd can be used to build bespoke
solutions very cost effectively.
Key Features
------------
- **Cross-platform**
ejabberd runs under Microsoft Windows and Unix-derived systems such as
Linux, FreeBSD and NetBSD.
- **Distributed**
You can run ejabberd on a cluster of machines and all of them will serve the
same XMPP domain(s). When you need more capacity you can simply add a new
cheap node to your cluster. Accordingly, you do not need to buy an expensive
high-end machine to support tens of thousands concurrent users.
- **Fault-tolerant**
You can deploy an ejabberd cluster so that all the information required for
a properly working service will be replicated permanently on all nodes. This
means that if one of the nodes crashes, the others will continue working
without disruption. In addition, nodes also can be added or replaced on
the fly.
- **Administrator-friendly**
ejabberd is built on top of the Open Source Erlang. As a result you do not
need to install an external database, an external web server, amongst others
because everything is already included, and ready to run out of the box.
Other administrator benefits include:
- Comprehensive documentation.
- Straightforward installers for Linux and Mac OS X.
- Web administration.
- Shared roster groups.
- Command line administration tool.
- Can integrate with existing authentication mechanisms.
- Capability to send announce messages.
- **Internationalized**
ejabberd leads in internationalization. Hence it is very well suited in a
globalized world. Related features are:
- Translated to 25 languages.
- Support for IDNA.
- **Open Standards**
ejabberd is the first Open Source Jabber server claiming to fully comply to
the XMPP standard.
- Fully XMPP-compliant.
- XML-based protocol.
- Many protocols supported.
Additional Features
-------------------
Moreover, ejabberd comes with a wide range of other state-of-the-art features:
- **Modularity**
- Load only the modules you want.
- Extend ejabberd with your own custom modules.
- **Security**
- SASL and STARTTLS for c2s and s2s connections.
- STARTTLS and Dialback s2s connections.
- Web Admin accessible via HTTPS secure access.
- **Databases**
- Internal database for fast deployment (Mnesia).
- Native MySQL support.
- Native PostgreSQL support.
- ODBC data storage support.
- Microsoft SQL Server support.
- **Authentication**
- Internal authentication.
- PAM, LDAP and ODBC.
- External authentication script.
- **Others**
- Support for virtual hosting.
- Compressing XML streams with Stream Compression (XEP-0138).
- Statistics via Statistics Gathering (XEP-0039).
- IPv6 support both for c2s and s2s connections.
- Multi-User Chat module with support for clustering and HTML logging.
- Users Directory based on users vCards.
- Publish-Subscribe component with support for Personal Eventing.
- Support for web clients: HTTP Polling and HTTP Binding (BOSH).
- Component support: interface with networks such as AIM, ICQ and MSN.
Quickstart guide
----------------
0. Requirements
### 0. Requirements
To compile ejabberd you need:
- GNU Make
- GCC
- Libexpat 1.95 or higher
- Erlang/OTP R15B or higher.
- OpenSSL 0.9.8 or higher, for STARTTLS, SASL and SSL encryption.
- Zlib 1.2.3 or higher, for Stream Compression support
(XEP-0138). Optional.
- GNU Make.
- GCC.
- Libexpat 1.95 or higher.
- Libyaml 0.1.4 or higher.
- Erlang/OTP 17.5 or higher.
- OpenSSL 1.0.0 or higher, for STARTTLS, SASL and SSL encryption.
- Zlib 1.2.3 or higher, for Stream Compression support (XEP-0138). Optional.
- PAM library. Optional. For Pluggable Authentication Modules (PAM).
- GNU Iconv 1.8 or higher, for the IRC Transport
(mod_irc). Optional. Not needed on systems with GNU Libc.
- ImageMagick's Convert program. Optional. For CAPTCHA challenges.
- exmpp 0.9.6 or higher. Optional. For import/export XEP-0227 files.
If your system splits packages in libraries and development headers, you must
install the development packages also.
1. Compile and install on *nix systems
### 1. Compile and install on *nix systems
To compile ejabberd execute the commands:
./configure
make
To compile ejabberd, execute the following commands. The first one is only
necessary if your source tree didn't come with a `configure` script (In this
case you need autoconf installed).
To install ejabberd, run this command with system administrator rights
(root user):
./autogen.sh
./configure
make
sudo make install
To install ejabberd, run this command with system administrator rights (root
user):
sudo make install
These commands will:
- Install the configuration files in /etc/ejabberd/
- Install ejabberd binary, header and runtime files in /lib/ejabberd/
- Install the administration script: /sbin/ejabberdctl
- Install ejabberd documentation in /share/doc/ejabberd/
- Create a spool directory: /var/lib/ejabberd/
- Create a directory for log files: /var/log/ejabberd/
- Install the configuration files in `/etc/ejabberd/`
- Install ejabberd binary, header and runtime files in `/lib/ejabberd/`
- Install the administration script: `/sbin/ejabberdctl`
- Install ejabberd documentation in `/share/doc/ejabberd/`
- Create a spool directory: `/var/lib/ejabberd/`
- Create a directory for log files: `/var/log/ejabberd/`
2. Start ejabberd
### 2. Start ejabberd
You can use the ejabberdctl command line administration script to
You can use the `ejabberdctl` command line administration script to
start and stop ejabberd. For example:
ejabberdctl start
ejabberdctl start
For detailed information please refer to the
ejabberd Installation and Operation Guide
For detailed information please refer to the ejabberd Installation and
Operation Guide available online and in the `doc` directory of the source
tarball.
Development
-----------
In order to assist in the development of ejabberd, and particularly the
execution of the test suite, a Vagrant environment is available at
https://github.com/processone/ejabberd-vagrant-dev.
To start ejabberd in development mode from the repository directory, you can
type a command like:
EJABBERD_CONFIG_PATH=ejabberd.yml erl -pa ebin -pa deps/*/ebin -pa test -pa deps/elixir/lib/*/ebin/ -s ejabberd
Links
-----
- Documentation: http://docs.ejabberd.im
- Community site: https://www.ejabberd.im
- ejabberd commercial offering and support: https://www.process-one.net/en/ejabberd
Symlink
+1
View File
@@ -0,0 +1 @@
README
-301
View File
@@ -1,301 +0,0 @@
-- LDAPv3 ASN.1 specification, taken from RFC 2251
-- Lightweight-Directory-Access-Protocol-V3 DEFINITIONS
ELDAPv3 DEFINITIONS
IMPLICIT TAGS ::=
BEGIN
LDAPMessage ::= SEQUENCE {
messageID MessageID,
protocolOp CHOICE {
bindRequest BindRequest,
bindResponse BindResponse,
unbindRequest UnbindRequest,
searchRequest SearchRequest,
searchResEntry SearchResultEntry,
searchResDone SearchResultDone,
searchResRef SearchResultReference,
modifyRequest ModifyRequest,
modifyResponse ModifyResponse,
addRequest AddRequest,
addResponse AddResponse,
delRequest DelRequest,
delResponse DelResponse,
modDNRequest ModifyDNRequest,
modDNResponse ModifyDNResponse,
compareRequest CompareRequest,
compareResponse CompareResponse,
abandonRequest AbandonRequest,
extendedReq ExtendedRequest,
extendedResp ExtendedResponse },
controls [0] Controls OPTIONAL }
MessageID ::= INTEGER (0 .. maxInt)
maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) --
LDAPString ::= OCTET STRING
LDAPOID ::= OCTET STRING
LDAPDN ::= LDAPString
RelativeLDAPDN ::= LDAPString
AttributeType ::= LDAPString
AttributeDescription ::= LDAPString
-- Wahl, et. al. Standards Track [Page 44]
--
-- RFC 2251 LDAPv3 December 1997
AttributeDescriptionList ::= SEQUENCE OF
AttributeDescription
AttributeValue ::= OCTET STRING
AttributeValueAssertion ::= SEQUENCE {
attributeDesc AttributeDescription,
assertionValue AssertionValue }
AssertionValue ::= OCTET STRING
Attribute ::= SEQUENCE {
type AttributeDescription,
vals SET OF AttributeValue }
MatchingRuleId ::= LDAPString
LDAPResult ::= SEQUENCE {
resultCode ENUMERATED {
success (0),
operationsError (1),
protocolError (2),
timeLimitExceeded (3),
sizeLimitExceeded (4),
compareFalse (5),
compareTrue (6),
authMethodNotSupported (7),
strongAuthRequired (8),
-- 9 reserved --
referral (10), -- new
adminLimitExceeded (11), -- new
unavailableCriticalExtension (12), -- new
confidentialityRequired (13), -- new
saslBindInProgress (14), -- new
noSuchAttribute (16),
undefinedAttributeType (17),
inappropriateMatching (18),
constraintViolation (19),
attributeOrValueExists (20),
invalidAttributeSyntax (21),
-- 22-31 unused --
noSuchObject (32),
aliasProblem (33),
invalidDNSyntax (34),
-- 35 reserved for undefined isLeaf --
aliasDereferencingProblem (36),
-- 37-47 unused --
inappropriateAuthentication (48),
-- Wahl, et. al. Standards Track [Page 45]
--
-- RFC 2251 LDAPv3 December 1997
invalidCredentials (49),
insufficientAccessRights (50),
busy (51),
unavailable (52),
unwillingToPerform (53),
loopDetect (54),
-- 55-63 unused --
namingViolation (64),
objectClassViolation (65),
notAllowedOnNonLeaf (66),
notAllowedOnRDN (67),
entryAlreadyExists (68),
objectClassModsProhibited (69),
-- 70 reserved for CLDAP --
affectsMultipleDSAs (71), -- new
-- 72-79 unused --
other (80) },
-- 81-90 reserved for APIs --
matchedDN LDAPDN,
errorMessage LDAPString,
referral [3] Referral OPTIONAL }
Referral ::= SEQUENCE OF LDAPURL
LDAPURL ::= LDAPString -- limited to characters permitted in URLs
Controls ::= SEQUENCE OF Control
Control ::= SEQUENCE {
controlType LDAPOID,
criticality BOOLEAN DEFAULT FALSE,
controlValue OCTET STRING OPTIONAL }
BindRequest ::= [APPLICATION 0] SEQUENCE {
version INTEGER (1 .. 127),
name LDAPDN,
authentication AuthenticationChoice }
AuthenticationChoice ::= CHOICE {
simple [0] OCTET STRING,
-- 1 and 2 reserved
sasl [3] SaslCredentials }
SaslCredentials ::= SEQUENCE {
mechanism LDAPString,
credentials OCTET STRING OPTIONAL }
BindResponse ::= [APPLICATION 1] SEQUENCE {
-- Wahl, et. al. Standards Track [Page 46]
--
-- RFC 2251 LDAPv3 December 1997
COMPONENTS OF LDAPResult,
serverSaslCreds [7] OCTET STRING OPTIONAL }
UnbindRequest ::= [APPLICATION 2] NULL
SearchRequest ::= [APPLICATION 3] SEQUENCE {
baseObject LDAPDN,
scope ENUMERATED {
baseObject (0),
singleLevel (1),
wholeSubtree (2) },
derefAliases ENUMERATED {
neverDerefAliases (0),
derefInSearching (1),
derefFindingBaseObj (2),
derefAlways (3) },
sizeLimit INTEGER (0 .. maxInt),
timeLimit INTEGER (0 .. maxInt),
typesOnly BOOLEAN,
filter Filter,
attributes AttributeDescriptionList }
Filter ::= CHOICE {
and [0] SET OF Filter,
or [1] SET OF Filter,
not [2] Filter,
equalityMatch [3] AttributeValueAssertion,
substrings [4] SubstringFilter,
greaterOrEqual [5] AttributeValueAssertion,
lessOrEqual [6] AttributeValueAssertion,
present [7] AttributeDescription,
approxMatch [8] AttributeValueAssertion,
extensibleMatch [9] MatchingRuleAssertion }
SubstringFilter ::= SEQUENCE {
type AttributeDescription,
-- at least one must be present
substrings SEQUENCE OF CHOICE {
initial [0] LDAPString,
any [1] LDAPString,
final [2] LDAPString } }
MatchingRuleAssertion ::= SEQUENCE {
matchingRule [1] MatchingRuleId OPTIONAL,
type [2] AttributeDescription OPTIONAL,
matchValue [3] AssertionValue,
dnAttributes [4] BOOLEAN DEFAULT FALSE }
-- Wahl, et. al. Standards Track [Page 47]
--
-- RFC 2251 LDAPv3 December 1997
SearchResultEntry ::= [APPLICATION 4] SEQUENCE {
objectName LDAPDN,
attributes PartialAttributeList }
PartialAttributeList ::= SEQUENCE OF SEQUENCE {
type AttributeDescription,
vals SET OF AttributeValue }
SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL
SearchResultDone ::= [APPLICATION 5] LDAPResult
ModifyRequest ::= [APPLICATION 6] SEQUENCE {
object LDAPDN,
modification SEQUENCE OF SEQUENCE {
operation ENUMERATED {
add (0),
delete (1),
replace (2) },
modification AttributeTypeAndValues } }
AttributeTypeAndValues ::= SEQUENCE {
type AttributeDescription,
vals SET OF AttributeValue }
ModifyResponse ::= [APPLICATION 7] LDAPResult
AddRequest ::= [APPLICATION 8] SEQUENCE {
entry LDAPDN,
attributes AttributeList }
AttributeList ::= SEQUENCE OF SEQUENCE {
type AttributeDescription,
vals SET OF AttributeValue }
AddResponse ::= [APPLICATION 9] LDAPResult
DelRequest ::= [APPLICATION 10] LDAPDN
DelResponse ::= [APPLICATION 11] LDAPResult
ModifyDNRequest ::= [APPLICATION 12] SEQUENCE {
entry LDAPDN,
newrdn RelativeLDAPDN,
deleteoldrdn BOOLEAN,
newSuperior [0] LDAPDN OPTIONAL }
ModifyDNResponse ::= [APPLICATION 13] LDAPResult
-- Wahl, et. al. Standards Track [Page 48]
--
-- RFC 2251 LDAPv3 December 1997
CompareRequest ::= [APPLICATION 14] SEQUENCE {
entry LDAPDN,
ava AttributeValueAssertion }
CompareResponse ::= [APPLICATION 15] LDAPResult
AbandonRequest ::= [APPLICATION 16] MessageID
ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
requestName [0] LDAPOID,
requestValue [1] OCTET STRING OPTIONAL }
ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
COMPONENTS OF LDAPResult,
responseName [10] LDAPOID OPTIONAL,
response [11] OCTET STRING OPTIONAL }
passwdModifyOID LDAPOID ::= "1.3.6.1.4.1.4203.1.11.1"
PasswdModifyRequestValue ::= SEQUENCE {
userIdentity [0] OCTET STRING OPTIONAL,
oldPasswd [1] OCTET STRING OPTIONAL,
newPasswd [2] OCTET STRING OPTIONAL }
PasswdModifyResponseValue ::= SEQUENCE {
genPasswd [0] OCTET STRING OPTIONAL }
END
+1 -1
View File
@@ -1,3 +1,3 @@
# generate a new autoconf
aclocal -I m4
autoconf
autoconf -f
+10
View File
@@ -0,0 +1,10 @@
use Mix.Config
# This is standard path in the context of ejabberd release
config :ejabberd,
file: "config/ejabberd.yml",
log_path: 'log/ejabberd.log'
# Customize Mnesia directory:
config :mnesia,
dir: 'database/'
+166
View File
@@ -0,0 +1,166 @@
defmodule Ejabberd.ConfigFile do
use Ejabberd.Config
def start do
[loglevel: 4,
log_rotate_size: 10485760,
log_rotate_date: "",
log_rotate_count: 1,
log_rate_limit: 100,
auth_method: :internal,
max_fsm_queue: 1000,
language: "en",
allow_contrib_modules: true,
hosts: ["localhost"],
shaper: shaper,
acl: acl,
access: access]
end
defp shaper do
[normal: 1000,
fast: 50000,
max_fsm_queue: 1000]
end
defp acl do
[local:
[user_regexp: "", loopback: [ip: "127.0.0.0/8"]]]
end
defp access do
[max_user_sessions: [all: 10],
max_user_offline_messages: [admin: 5000, all: 100],
local: [local: :allow],
c2s: [blocked: :deny, all: :allow],
c2s_shaper: [admin: :none, all: :normal],
s2s_shaper: [all: :fast],
announce: [admin: :allow],
configure: [admin: :allow],
muc_admin: [admin: :allow],
muc_create: [local: :allow],
muc: [all: :allow],
pubsub_createnode: [local: :allow],
register: [all: :allow],
trusted_network: [loopback: :allow]]
end
listen :ejabberd_c2s do
@opts [
port: 5222,
max_stanza_size: 65536,
shaper: :c2s_shaper,
access: :c2s]
end
listen :ejabberd_s2s_in do
@opts [port: 5269]
end
listen :ejabberd_http do
@opts [
port: 5280,
web_admin: true,
http_poll: true,
http_bind: true,
captcha: true]
end
module :mod_adhoc do
end
module :mod_announce do
@opts [access: :announce]
end
module :mod_blocking do
end
module :mod_caps do
end
module :mod_carboncopy do
end
module :mod_client_state do
@opts [
queue_chat_states: true,
queue_presence: false]
end
module :mod_configure do
end
module :mod_disco do
end
module :mod_http_bind do
end
module :mod_last do
end
module :mod_muc do
@opts [
access: :muc,
access_create: :muc_create,
access_persistent: :muc_create,
access_admin: :muc_admin]
end
module :mod_offline do
@opts [access_max_user_messages: :max_user_offline_messages]
end
module :mod_ping do
end
module :mod_privacy do
end
module :mod_private do
end
module :mod_pubsub do
@opts [
access_createnode: :pubsub_createnode,
ignore_pep_from_offline: true,
last_item_cache: true,
plugins: ["flat", "hometree", "pep"]]
end
module :mod_register do
@opts [welcome_message: [
subject: "Welcome!",
body: "Hi.\nWelcome to this XMPP Server",
ip_access: :trusted_network,
access: :register]]
end
module :mod_roster do
end
module :mod_shared_roster do
end
module :mod_stats do
end
module :mod_time do
end
module :mod_version do
end
# Example of how to define a hook, called when the event
# specified is triggered.
#
# @event: Name of the event
# @opts: Params are optional. Available: :host and :priority.
# If missing, defaults are used. (host: :global | priority: 50)
# @callback Could be an anonymous function or a callback from a module,
# use the &ModuleName.function/arity format for that.
hook :register_user, [host: "localhost"], fn(user, server) ->
info("User registered: #{user} on #{server}")
end
end
+666
View File
@@ -0,0 +1,666 @@
###
### ejabberd configuration file
###
###
### The parameters used in this configuration file are explained in more detail
### in the ejabberd Installation and Operation Guide.
### Please consult the Guide in case of doubts, it is included with
### your copy of ejabberd, and is also available online at
### http://www.process-one.net/en/ejabberd/docs/
### The configuration file is written in YAML.
### Refer to http://en.wikipedia.org/wiki/YAML for the brief description.
### However, ejabberd treats different literals as different types:
###
### - unquoted or single-quoted strings. They are called "atoms".
### Example: dog, 'Jupiter', '3.14159', YELLOW
###
### - numeric literals. Example: 3, -45.0, .0
###
### - quoted or folded strings.
### Examples of quoted string: "Lizzard", "orange".
### Example of folded string:
### > Art thou not Romeo,
### and a Montague?
### =======
### LOGGING
##
## loglevel: Verbosity of log files generated by ejabberd.
## 0: No ejabberd log at all (not recommended)
## 1: Critical
## 2: Error
## 3: Warning
## 4: Info
## 5: Debug
##
loglevel: 4
##
## rotation: Describe how to rotate logs. Either size and/or date can trigger
## log rotation. Setting count to N keeps N rotated logs. Setting count to 0
## does not disable rotation, it instead rotates the file and keeps no previous
## versions around. Setting size to X rotate log when it reaches X bytes.
## To disable rotation set the size to 0 and the date to ""
## Date syntax is taken from the syntax newsyslog uses in newsyslog.conf.
## Some examples:
## $D0 rotate every night at midnight
## $D23 rotate every day at 23:00 hr
## $W0D23 rotate every week on Sunday at 23:00 hr
## $W5D16 rotate every week on Friday at 16:00 hr
## $M1D0 rotate on the first day of every month at midnight
## $M5D6 rotate on every 5th day of the month at 6:00 hr
##
log_rotate_size: 10485760
log_rotate_date: ""
log_rotate_count: 1
##
## overload protection: If you want to limit the number of messages per second
## allowed from error_logger, which is a good idea if you want to avoid a flood
## of messages when system is overloaded, you can set a limit.
## 100 is ejabberd's default.
log_rate_limit: 100
##
## watchdog_admins: Only useful for developers: if an ejabberd process
## consumes a lot of memory, send live notifications to these XMPP
## accounts.
##
## watchdog_admins:
## - "bob@example.com"
### ================
### SERVED HOSTNAMES
##
## hosts: Domains served by ejabberd.
## You can define one or several, for example:
## hosts:
## - "example.net"
## - "example.com"
## - "example.org"
##
hosts:
- "localhost"
##
## route_subdomains: Delegate subdomains to other XMPP servers.
## For example, if this ejabberd serves example.org and you want
## to allow communication with an XMPP server called im.example.org.
##
## route_subdomains: s2s
### ===============
### LISTENING PORTS
##
## listen: The ports ejabberd will listen on, which service each is handled
## by and what options to start it with.
##
listen:
-
port: 5222
module: ejabberd_c2s
##
## If TLS is compiled in and you installed a SSL
## certificate, specify the full path to the
## file and uncomment these lines:
##
## certfile: "/path/to/ssl.pem"
## starttls: true
##
## To enforce TLS encryption for client connections,
## use this instead of the "starttls" option:
##
## starttls_required: true
##
## Custom OpenSSL options
##
## protocol_options:
## - "no_sslv3"
## - "no_tlsv1"
max_stanza_size: 65536
shaper: c2s_shaper
access: c2s
-
port: 5269
module: ejabberd_s2s_in
##
## ejabberd_service: Interact with external components (transports, ...)
##
## -
## port: 8888
## module: ejabberd_service
## access: all
## shaper_rule: fast
## ip: "127.0.0.1"
## hosts:
## "icq.example.org":
## password: "secret"
## "sms.example.org":
## password: "secret"
##
## ejabberd_stun: Handles STUN Binding requests
##
## -
## port: 3478
## transport: udp
## module: ejabberd_stun
##
## To handle XML-RPC requests that provide admin credentials:
##
## -
## port: 4560
## module: ejabberd_xmlrpc
-
port: 5280
module: ejabberd_http
## request_handlers:
## "/pub/archive": mod_http_fileserver
web_admin: true
http_poll: true
http_bind: true
## register: true
captcha: true
##
## s2s_use_starttls: Enable STARTTLS + Dialback for S2S connections.
## Allowed values are: false optional required required_trusted
## You must specify a certificate file.
##
## s2s_use_starttls: optional
##
## s2s_certfile: Specify a certificate file.
##
## s2s_certfile: "/path/to/ssl.pem"
## Custom OpenSSL options
##
## s2s_protocol_options:
## - "no_sslv3"
## - "no_tlsv1"
##
## domain_certfile: Specify a different certificate for each served hostname.
##
## host_config:
## "example.org":
## domain_certfile: "/path/to/example_org.pem"
## "example.com":
## domain_certfile: "/path/to/example_com.pem"
##
## S2S whitelist or blacklist
##
## Default s2s policy for undefined hosts.
##
## s2s_access: s2s
##
## Outgoing S2S options
##
## Preferred address families (which to try first) and connect timeout
## in milliseconds.
##
## outgoing_s2s_families:
## - ipv4
## - ipv6
## outgoing_s2s_timeout: 10000
### ==============
### AUTHENTICATION
##
## auth_method: Method used to authenticate the users.
## The default method is the internal.
## If you want to use a different method,
## comment this line and enable the correct ones.
##
auth_method: internal
##
## Store the plain passwords or hashed for SCRAM:
## auth_password_format: plain
## auth_password_format: scram
##
## Define the FQDN if ejabberd doesn't detect it:
## fqdn: "server3.example.com"
##
## Authentication using external script
## Make sure the script is executable by ejabberd.
##
## auth_method: external
## extauth_program: "/path/to/authentication/script"
##
## Authentication using ODBC
## Remember to setup a database in the next section.
##
## auth_method: odbc
##
## Authentication using PAM
##
## auth_method: pam
## pam_service: "pamservicename"
##
## Authentication using LDAP
##
## auth_method: ldap
##
## List of LDAP servers:
## ldap_servers:
## - "localhost"
##
## Encryption of connection to LDAP servers:
## ldap_encrypt: none
## ldap_encrypt: tls
##
## Port to connect to on LDAP servers:
## ldap_port: 389
## ldap_port: 636
##
## LDAP manager:
## ldap_rootdn: "dc=example,dc=com"
##
## Password of LDAP manager:
## ldap_password: "******"
##
## Search base of LDAP directory:
## ldap_base: "dc=example,dc=com"
##
## LDAP attribute that holds user ID:
## ldap_uids:
## - "mail": "%u@mail.example.org"
##
## LDAP filter:
## ldap_filter: "(objectClass=shadowAccount)"
##
## Anonymous login support:
## auth_method: anonymous
## anonymous_protocol: sasl_anon | login_anon | both
## allow_multiple_connections: true | false
##
## host_config:
## "public.example.org":
## auth_method: anonymous
## allow_multiple_connections: false
## anonymous_protocol: sasl_anon
##
## To use both anonymous and internal authentication:
##
## host_config:
## "public.example.org":
## auth_method:
## - internal
## - anonymous
### ==============
### DATABASE SETUP
## ejabberd by default uses the internal Mnesia database,
## so you do not necessarily need this section.
## This section provides configuration examples in case
## you want to use other database backends.
## Please consult the ejabberd Guide for details on database creation.
##
## MySQL server:
##
## odbc_type: mysql
## odbc_server: "server"
## odbc_database: "database"
## odbc_username: "username"
## odbc_password: "password"
##
## If you want to specify the port:
## odbc_port: 1234
##
## PostgreSQL server:
##
## odbc_type: pgsql
## odbc_server: "server"
## odbc_database: "database"
## odbc_username: "username"
## odbc_password: "password"
##
## If you want to specify the port:
## odbc_port: 1234
##
## If you use PostgreSQL, have a large database, and need a
## faster but inexact replacement for "select count(*) from users"
##
## pgsql_users_number_estimate: true
##
## ODBC compatible or MSSQL server:
##
## odbc_type: odbc
## odbc_server: "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"
##
## Number of connections to open to the database for each virtual host
##
## odbc_pool_size: 10
##
## Interval to make a dummy SQL request to keep the connections to the
## database alive. Specify in seconds: for example 28800 means 8 hours
##
## odbc_keepalive_interval: undefined
### ===============
### TRAFFIC SHAPERS
shaper:
##
## The "normal" shaper limits traffic speed to 1000 B/s
##
normal: 1000
##
## The "fast" shaper limits traffic speed to 50000 B/s
##
fast: 50000
##
## This option specifies the maximum number of elements in the queue
## of the FSM. Refer to the documentation for details.
##
max_fsm_queue: 1000
###. ====================
###' ACCESS CONTROL LISTS
acl:
##
## The 'admin' ACL grants administrative privileges to XMPP accounts.
## You can put here as many accounts as you want.
##
## admin:
## user:
## - "aleksey": "localhost"
## - "ermine": "example.org"
##
## Blocked users
##
## blocked:
## user:
## - "baduser": "example.org"
## - "test"
## Local users: don't modify this.
##
local:
user_regexp: ""
##
## More examples of ACLs
##
## jabberorg:
## server:
## - "jabber.org"
## aleksey:
## user:
## - "aleksey": "jabber.ru"
## test:
## user_regexp: "^test"
## user_glob: "test*"
##
## Loopback network
##
loopback:
ip:
- "127.0.0.0/8"
##
## Bad XMPP servers
##
## bad_servers:
## server:
## - "xmpp.zombie.org"
## - "xmpp.spam.com"
##
## Define specific ACLs in a virtual host.
##
## host_config:
## "localhost":
## acl:
## admin:
## user:
## - "bob-local": "localhost"
### ============
### ACCESS RULES
access:
## Maximum number of simultaneous sessions allowed for a single user:
max_user_sessions:
all: 10
## Maximum number of offline messages that users can have:
max_user_offline_messages:
admin: 5000
all: 100
## This rule allows access only for local users:
local:
local: allow
## Only non-blocked users can use c2s connections:
c2s:
blocked: deny
all: allow
## For C2S connections, all users except admins use the "normal" shaper
c2s_shaper:
admin: none
all: normal
## All S2S connections use the "fast" shaper
s2s_shaper:
all: fast
## Only admins can send announcement messages:
announce:
admin: allow
## Only admins can use the configuration interface:
configure:
admin: allow
## Admins of this server are also admins of the MUC service:
muc_admin:
admin: allow
## Only accounts of the local ejabberd server can create rooms:
muc_create:
local: allow
## All users are allowed to use the MUC service:
muc:
all: allow
## Only accounts on the local ejabberd server can create Pubsub nodes:
pubsub_createnode:
local: allow
## In-band registration allows registration of any possible username.
## To disable in-band registration, replace 'allow' with 'deny'.
register:
all: allow
## Only allow to register from localhost
trusted_network:
loopback: allow
## Do not establish S2S connections with bad servers
## s2s:
## bad_servers: deny
## all: allow
## By default the frequency of account registrations from the same IP
## is limited to 1 account every 10 minutes. To disable, specify: infinity
## registration_timeout: 600
##
## Define specific Access Rules in a virtual host.
##
## host_config:
## "localhost":
## access:
## c2s:
## admin: allow
## all: deny
## register:
## all: deny
### ================
### DEFAULT LANGUAGE
##
## language: Default language used for server messages.
##
language: "en"
##
## Set a different default language in a virtual host.
##
## host_config:
## "localhost":
## language: "ru"
### =======
### CAPTCHA
##
## Full path to a script that generates the image.
##
## captcha_cmd: "/lib/ejabberd/priv/bin/captcha.sh"
##
## Host for the URL and port where ejabberd listens for CAPTCHA requests.
##
## captcha_host: "example.org:5280"
##
## Limit CAPTCHA calls per minute for JID/IP to avoid DoS.
##
## captcha_limit: 5
### =======
### MODULES
##
## Modules enabled in all ejabberd virtual hosts.
##
modules:
mod_adhoc: {}
## mod_admin_extra: {}
mod_announce: # recommends mod_adhoc
access: announce
mod_blocking: {} # requires mod_privacy
mod_caps: {}
mod_carboncopy: {}
mod_client_state:
queue_chat_states: true
queue_presence: false
mod_configure: {} # requires mod_adhoc
mod_disco: {}
## mod_echo: {}
mod_http_bind: {}
## mod_http_fileserver:
## docroot: "/var/www"
## accesslog: "/var/log/ejabberd/access.log"
mod_last: {}
mod_muc:
## host: "conference.@HOST@"
access: muc
access_create: muc_create
access_persistent: muc_create
access_admin: muc_admin
## mod_muc_log: {}
mod_offline:
access_max_user_messages: max_user_offline_messages
mod_ping: {}
## mod_pres_counter:
## count: 5
## interval: 60
mod_privacy: {}
mod_private: {}
## mod_proxy65: {}
mod_pubsub:
access_createnode: pubsub_createnode
## reduces resource comsumption, but XEP incompliant
ignore_pep_from_offline: true
## XEP compliant, but increases resource comsumption
## ignore_pep_from_offline: false
last_item_cache: false
plugins:
- "flat"
- "hometree"
- "pep" # pep requires mod_caps
mod_register:
##
## Protect In-Band account registrations with CAPTCHA.
##
## captcha_protected: true
##
## Set the minimum informational entropy for passwords.
##
## password_strength: 32
##
## After successful registration, the user receives
## a message with this subject and body.
##
welcome_message:
subject: "Welcome!"
body: |-
Hi.
Welcome to this XMPP server.
##
## When a user registers, send a notification to
## these XMPP accounts.
##
## registration_watchers:
## - "admin1@example.org"
##
## Only clients in the server machine can register accounts
##
ip_access: trusted_network
##
## Local c2s or remote s2s users cannot register accounts
##
## access_from: deny
access: register
mod_roster: {}
mod_shared_roster: {}
mod_stats: {}
mod_time: {}
mod_vcard: {}
mod_version: {}
##
## Enable modules with custom options in a specific virtual host
##
## host_config:
## "localhost":
## modules:
## mod_echo:
## host: "mirror.localhost"
##
## Enable modules management via ejabberdctl for installation and
## uninstallation of public/private contributed modules
## (enabled by default)
##
allow_contrib_modules: true
### Local Variables:
### mode: yaml
### End:
### vim: set filetype=yaml tabstop=8
Vendored
-5045
View File
File diff suppressed because it is too large Load Diff
+124 -84
View File
@@ -2,9 +2,11 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
AC_INIT(ejabberd, community, [ejabberd@process-one.net], [ejabberd])
REQUIRE_ERLANG_MIN="5.9.1 (Erlang/OTP R15B01)"
REQUIRE_ERLANG_MAX="9.0.0 (No Max)"
AC_INIT(ejabberd, m4_esyscmd([echo `git describe --tags 2>/dev/null || echo 0.0` | sed 's/-g.*//;s/-/./' | tr -d '\012']), [ejabberd@process-one.net], [ejabberd])
REQUIRE_ERLANG_MIN="6.4 (Erlang/OTP 17.5)"
REQUIRE_ERLANG_MAX="100.0.0 (No Max)"
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_MAKE_SET
@@ -28,6 +30,7 @@ fi
AC_PATH_TOOL(ERL, erl, , [${extra_erl_path}$PATH])
AC_PATH_TOOL(ERLC, erlc, , [${extra_erl_path}$PATH])
AC_PATH_TOOL(EPMD, epmd, , [${extra_erl_path}$PATH])
AC_ERLANG_NEED_ERL
AC_ERLANG_NEED_ERLC
@@ -35,7 +38,7 @@ AC_ERLANG_NEED_ERLC
AC_ARG_ENABLE(erlang-version-check,
[AC_HELP_STRING([--enable-erlang-version-check],
[Check Erlang/OTP version @<:@default=yes@:>@])])
case "$enable_erlang_version_check" in
case "$enable_erlang_version_check" in
yes|'')
ERLANG_VERSION_CHECK([$REQUIRE_ERLANG_MIN],[$REQUIRE_ERLANG_MAX])
;;
@@ -63,7 +66,7 @@ if test "x$MAKE" = "x"; then
fi
# Change default prefix
AC_PREFIX_DEFAULT(/)
AC_PREFIX_DEFAULT(/usr/local)
AC_ARG_ENABLE(hipe,
[AC_HELP_STRING([--enable-hipe], [compile natively with HiPE, not recommended (default: no)])],
@@ -81,13 +84,13 @@ AC_ARG_ENABLE(roster_gateway_workaround,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-roster-gateway-workaround) ;;
esac],[roster_gateway_workaround=false])
AC_ARG_ENABLE(transient_supervisors,
[AC_HELP_STRING([--enable-transient_supervisors], [use Erlang supervision for transient process (default: no)])],
AC_ARG_ENABLE(new_sql_schema,
[AC_HELP_STRING([--enable-new-sql-schema], [use new SQL schema (default: no)])],
[case "${enableval}" in
yes) transient_supervisors=true ;;
no) transient_supervisors=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-transient_supervisors) ;;
esac],[transient_supervisors=false])
yes) new_sql_schema=true ;;
no) new_sql_schema=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-new-sql-schema) ;;
esac],[new_sql_schema=false])
AC_ARG_ENABLE(full_xml,
[AC_HELP_STRING([--enable-full-xml], [use XML features in XMPP stream (ex: CDATA) (default: no, requires XML compliant clients)])],
@@ -105,29 +108,21 @@ AC_ARG_ENABLE(mssql,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-mssql) ;;
esac],[db_type=generic])
AC_ARG_ENABLE(all,
[AC_HELP_STRING([--enable-all], [same as --enable-odbc --enable-mysql --enable-pgsql --enable-sqlite --enable-pam --enable-zlib --enable-riak --enable-redis --enable-elixir --enable-iconv --enable-stun --enable-sip --enable-debug --enable-tools (useful for Dialyzer checks, default: no)])],
[case "${enableval}" in
yes) odbc=true mysql=true pgsql=true sqlite=true pam=true zlib=true riak=true redis=true elixir=true iconv=true stun=true sip=true debug=true tools=true ;;
no) odbc=false mysql=false pgsql=false sqlite=false pam=false zlib=false riak=false redis=false elixir=false iconv=false stun=false sip=false debug=false tools=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-all) ;;
esac],[])
AC_ARG_ENABLE(tools,
[AC_HELP_STRING([--enable-tools], [build development tools (currently the ejabberd profiler only, default: no)])],
[AC_HELP_STRING([--enable-tools], [build development tools (default: no)])],
[case "${enableval}" in
yes) tools=true ;;
no) tools=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-tools) ;;
esac],[tools=false])
AC_ARG_ENABLE(all,
[AC_HELP_STRING([--enable-all], [same as --enable-nif --enable-odbc --enable-mysql --enable-pgsql --enable-pam --enable-zlib --enable-stun --enable-json --enable-iconv --enable-debug --enable-http (useful for Dialyzer checks, default: no)])],
[case "${enableval}" in
yes) nif=true odbc=true mysql=true pgsql=true pam=true zlib=true stun=true json=true iconv=true debug=true http=true ;;
no) nif=false odbc=false mysql=false pgsql=false pam=false zlib=false stun=false json=false iconv=false debug=false http=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-all) ;;
esac],[])
AC_ARG_ENABLE(nif,
[AC_HELP_STRING([--enable-nif], [replace some functions with C equivalents. Requires Erlang R13B04 or higher (default: no)])],
[case "${enableval}" in
yes) nif=true ;;
no) nif=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-nif) ;;
esac],[if test "x$nif" = "x"; then nif=false; fi])
esac],[if test "x$tools" = "x"; then tools=false; fi])
AC_ARG_ENABLE(odbc,
[AC_HELP_STRING([--enable-odbc], [enable pure ODBC support (default: no)])],
@@ -153,6 +148,14 @@ AC_ARG_ENABLE(pgsql,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pgsql) ;;
esac],[if test "x$pgsql" = "x"; then pgsql=false; fi])
AC_ARG_ENABLE(sqlite,
[AC_HELP_STRING([--enable-sqlite], [enable SQLite support (default: no)])],
[case "${enableval}" in
yes) sqlite=true ;;
no) sqlite=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-sqlite) ;;
esac],[if test "x$sqlite" = "x"; then sqlite=false; fi])
AC_ARG_ENABLE(pam,
[AC_HELP_STRING([--enable-pam], [enable PAM support (default: no)])],
[case "${enableval}" in
@@ -169,29 +172,37 @@ AC_ARG_ENABLE(zlib,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-zlib) ;;
esac],[if test "x$zlib" = "x"; then zlib=true; fi])
AC_ARG_ENABLE(stun,
[AC_HELP_STRING([--enable-stun], [enable STUN support (default: no)])],
AC_ARG_ENABLE(riak,
[AC_HELP_STRING([--enable-riak], [enable Riak support (default: no)])],
[case "${enableval}" in
yes) stun=true ;;
no) stun=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-stun) ;;
esac],[if test "x$stun" = "x"; then stun=false; fi])
yes) riak=true ;;
no) riak=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-riak) ;;
esac],[if test "x$riak" = "x"; then riak=false; fi])
AC_ARG_ENABLE(json,
[AC_HELP_STRING([--enable-json], [enable JSON support for mod_bosh (default: no)])],
AC_ARG_ENABLE(redis,
[AC_HELP_STRING([--enable-redis], [enable Redis support (default: no)])],
[case "${enableval}" in
yes) json=true ;;
no) json=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-json) ;;
esac],[if test "x$json" = "x"; then json=false; fi])
yes) redis=true ;;
no) redis=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-redis) ;;
esac],[if test "x$redis" = "x"; then redis=false; fi])
AC_ARG_ENABLE(elixir,
[AC_HELP_STRING([--enable-elixir], [enable Elixir support (default: no)])],
[case "${enableval}" in
yes) elixir=true ;;
no) elixir=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-elixir) ;;
esac],[if test "x$elixir" = "x"; then elixir=false; fi])
AC_ARG_ENABLE(iconv,
[AC_HELP_STRING([--enable-iconv], [enable iconv support (default: yes)])],
[AC_HELP_STRING([--enable-iconv], [enable iconv support (default: no)])],
[case "${enableval}" in
yes) iconv=true ;;
no) iconv=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-iconv) ;;
esac],[if test "x$iconv" = "x"; then iconv=true; fi])
esac],[if test "x$iconv" = "x"; then iconv=false; fi])
AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-debug], [enable debug information (default: yes)])],
@@ -201,21 +212,37 @@ AC_ARG_ENABLE(debug,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],[if test "x$debug" = "x"; then debug=true; fi])
AC_ARG_ENABLE(http,
[AC_HELP_STRING([--enable-http], [build external HTTP libraries ('ibrowse' and 'lhttpc', default: no)])],
AC_ARG_ENABLE(latest_deps,
[AC_HELP_STRING([--enable-latest-deps], [makes rebar use latest commits for dependences instead of tagged versions (default: no)])],
[case "${enableval}" in
yes) http=true ;;
no) http=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-http) ;;
esac],[if test "x$http" = "x"; then http=false; fi])
yes) latest_deps=true ;;
no) latest_deps=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-latest-deps) ;;
esac],[if test "x$latest_deps" = "x"; then latest_deps=false; fi])
AC_ARG_ENABLE(lager,
[AC_HELP_STRING([--enable-lager], [enable lager support (default: no)])],
AC_ARG_ENABLE(system_deps,
[AC_HELP_STRING([--enable-system-deps], [makes rebar use localy installed dependences instead of downloading them (default: no)])],
[case "${enableval}" in
yes) lager=true ;;
no) lager=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-lager) ;;
esac],[if test "x$lager" = "x"; then lager=false; fi])
yes) system_deps=true ;;
no) system_deps=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-system-deps) ;;
esac],[if test "x$system_deps" = "x"; then system_deps=false; fi])
AC_ARG_ENABLE(stun,
[AC_HELP_STRING([--enable-stun], [enable STUN/TURN support (default: no)])],
[case "${enableval}" in
yes) stun=true ;;
no) stun=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-stun) ;;
esac],[if test "x$stun" = "x"; then stun=false; fi])
AC_ARG_ENABLE(sip,
[AC_HELP_STRING([--enable-sip], [enable SIP support (default: no)])],
[case "${enableval}" in
yes) sip=true ;;
no) sip=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-sip) ;;
esac],[if test "x$sip" = "x"; then sip=false; fi])
AC_CONFIG_FILES([Makefile
vars.config
@@ -234,49 +261,62 @@ if test "$ENABLEUSER" != ""; then
echo "allow this system user to start ejabberd: $ENABLEUSER"
AC_SUBST([INSTALLUSER], [$ENABLEUSER])
fi
ENABLEGROUP=""
AC_ARG_ENABLE(group,
[AS_HELP_STRING([--enable-group[[[[=GROUP]]]]], [allow this system group to start ejabberd (default: no)])],
[case "${enableval}" in
yes) ENABLEGROUP=`groups |head -n 1` ;;
no) ENABLEGROUP="" ;;
*) ENABLEGROUP=$enableval
esac],
[])
if test "$ENABLEGROUP" != ""; then
echo "allow this system group to start ejabberd: $ENABLEGROUP"
AC_SUBST([INSTALLGROUP], [$ENABLEGROUP])
fi
AC_ERLANG_CHECK_LIB([sasl], [],
[AC_MSG_ERROR([Erlang application 'sasl' was not found])])
AC_ERLANG_CHECK_LIB([crypto], [],
[AC_MSG_ERROR([Erlang application 'crypto' was not found])])
AC_ERLANG_CHECK_LIB([public_key], [],
[AC_MSG_ERROR([Erlang application 'public_key' was not found])])
AC_ERLANG_CHECK_LIB([ssl], [],
[AC_MSG_ERROR([Erlang application 'ssl' was not found])])
AC_ERLANG_CHECK_LIB([mnesia], [],
[AC_MSG_ERROR([Erlang application 'mnesia' was not found])])
AC_ERLANG_CHECK_LIB([inets], [],
[AC_MSG_ERROR([Erlang application 'inets' was not found])])
AC_ERLANG_CHECK_LIB([compiler], [],
[AC_MSG_ERROR([Erlang application 'compiler' was not found])])
if test "x$odbc" = "xtrue"; then
AC_ERLANG_CHECK_LIB([odbc], [],
[AC_MSG_ERROR([Erlang application 'odbc' was not found])])
fi
if test "x$tools" = "xtrue"; then
AC_ERLANG_CHECK_LIB([tools], [],
[AC_MSG_ERROR([Erlang application 'tools' was not found])])
AC_ERLANG_CHECK_LIB([runtime_tools], [],
[AC_MSG_ERROR([Erlang application 'runtime_tools' was not found])])
if test "$sqlite" = "true"; then
AX_LIB_SQLITE3([3.6.19])
if test "x$SQLITE3_VERSION" = "x"; then
AC_MSG_ERROR(SQLite3 library >= 3.6.19 was not found)
fi
fi
enabled_backends=""
for backend in odbc mysql pgsql sqlite riak redis; do
if eval test x\${$backend} = xtrue; then
if test "x$enabled_backends" = "x"; then
enabled_backends=$backend
else
enabled_backends="$enabled_backends, $backend"
fi
fi
done
AC_SUBST(hipe)
AC_SUBST(roster_gateway_workaround)
AC_SUBST(transient_supervisors)
AC_SUBST(new_sql_schema)
AC_SUBST(full_xml)
AC_SUBST(nif)
AC_SUBST(db_type)
AC_SUBST(odbc)
AC_SUBST(mysql)
AC_SUBST(pgsql)
AC_SUBST(sqlite)
AC_SUBST(pam)
AC_SUBST(zlib)
AC_SUBST(stun)
AC_SUBST(json)
AC_SUBST(riak)
AC_SUBST(redis)
AC_SUBST(elixir)
AC_SUBST(iconv)
AC_SUBST(stun)
AC_SUBST(sip)
AC_SUBST(debug)
AC_SUBST(http)
AC_SUBST(lager)
AC_SUBST(tools)
AC_SUBST(latest_deps)
AC_SUBST(system_deps)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(enabled_backends)
AC_OUTPUT
-21
View File
@@ -1,21 +0,0 @@
extract_translations - auxiliary tool that extracts lines to be translated
from ejabberd source tree.
Building:
erlc extract_translations.erl
Invoking 1:
erl -noinput -s extract_translations -extra dirname message_file
where dirname is the directory "src" in ejabberd's source tree root,
message_file is a file with translated messages (src/msgs/*.msg).
Result is a list of messages from source files which aren't contained in
message file.
Invoking 2:
erl -noinput -s extract_translations -extra -unused dirname message_file
Result is a list of messages from message file which aren't in source
files anymore.
@@ -1,304 +0,0 @@
%%%----------------------------------------------------------------------
%%% File : extract_translations.erl
%%% Author : Sergei Golovan <sgolovan@nes.ru>
%%% Purpose : Auxiliary tool for interface/messages translators
%%% Created : 23 Apr 2005 by Sergei Golovan <sgolovan@nes.ru>
%%% Id : $Id$
%%%----------------------------------------------------------------------
-module(extract_translations).
-author('sgolovan@nes.ru').
-export([start/0]).
-define(STATUS_SUCCESS, 0).
-define(STATUS_ERROR, 1).
-define(STATUS_USAGE, 2).
-include_lib("kernel/include/file.hrl").
start() ->
ets:new(translations, [named_table, public]),
ets:new(translations_obsolete, [named_table, public]),
ets:new(files, [named_table, public]),
ets:new(vars, [named_table, public]),
case init:get_plain_arguments() of
["-srcmsg2po", Dir, File] ->
print_po_header(File),
Status = process(Dir, File, srcmsg2po),
halt(Status);
["-unused", Dir, File] ->
Status = process(Dir, File, unused),
halt(Status);
[Dir, File] ->
Status = process(Dir, File, used),
halt(Status);
_ ->
print_usage(),
halt(?STATUS_USAGE)
end.
process(Dir, File, Used) ->
case load_file(File) of
{error, Reason} ->
io:format("~s: ~s~n", [File, file:format_error(Reason)]),
?STATUS_ERROR;
_ ->
FileList = find_src_files(Dir),
lists:foreach(
fun(F) ->
parse_file(Dir, F, Used)
end, FileList),
case Used of
unused ->
ets:foldl(fun({Key, _}, _) ->
io:format("~p~n", [Key])
end, ok, translations);
srcmsg2po ->
ets:foldl(fun({Key, Trans}, _) ->
print_translation_obsolete(Key, Trans)
end, ok, translations_obsolete);
_ ->
ok
end,
?STATUS_SUCCESS
end.
parse_file(Dir, File, Used) ->
ets:delete_all_objects(vars),
case epp:parse_file(File, [Dir, filename:dirname(File) | code:get_path()], []) of
{ok, Forms} ->
lists:foreach(
fun(F) ->
parse_form(Dir, File, F, Used)
end, Forms);
_ ->
ok
end.
parse_form(Dir, File, Form, Used) ->
case Form of
%%{undefined, Something} ->
%% io:format("Undefined: ~p~n", [Something]);
{call,
_,
{remote, _, {atom, _, translate}, {atom, _, translate}},
[_, {string, Line, Str}]
} ->
process_string(Dir, File, Line, Str, Used);
{call,
_,
{remote, _, {atom, _, translate}, {atom, _, translate}},
[_,
{bin,_,
[{bin_element,_,
{string,Line,Str},
default,default}]}]
} ->
process_string(Dir, File, Line, Str, Used);
{call,
_,
{remote, _, {atom, _, translate}, {atom, _, translate}},
[_, {var, _, Name}]
} ->
case ets:lookup(vars, Name) of
[{_Name, Value, Line}] ->
process_string(Dir, File, Line, Value, Used);
_ ->
ok
end;
{match,
_,
{var, _, Name},
{string, Line, Value}
} ->
ets:insert(vars, {Name, Value, Line});
L when is_list(L) ->
lists:foreach(
fun(F) ->
parse_form(Dir, File, F, Used)
end, L);
T when is_tuple(T) ->
lists:foreach(
fun(F) ->
parse_form(Dir, File, F, Used)
end, tuple_to_list(T));
_ ->
ok
end.
process_string(_Dir, _File, _Line, "", _Used) ->
ok;
process_string(_Dir, File, Line, Str, Used) ->
case {ets:lookup(translations, Str), Used} of
{[{_Key, _Trans}], unused} ->
ets:delete(translations, Str);
{[{_Key, _Trans}], used} ->
ok;
{[{_Key, Trans}], srcmsg2po} ->
ets:delete(translations_obsolete, Str),
print_translation(File, Line, Str, Trans);
{_, used} ->
case ets:lookup(files, File) of
[{_}] ->
ok;
_ ->
io:format("~n% ~s~n", [File]),
ets:insert(files, {File})
end,
case Str of
[] -> ok;
_ -> io:format("{~p, \"\"}.~n", [Str])
end,
ets:insert(translations, {Str, ""});
{_, srcmsg2po} ->
case ets:lookup(files, File) of
[{_}] ->
ok;
_ ->
ets:insert(files, {File})
end,
ets:insert(translations, {Str, ""}),
print_translation(File, Line, Str, "");
_ ->
ok
end.
load_file(File) ->
case file:consult(File) of
{ok, Terms} ->
lists:foreach(
fun({Orig, Trans}) ->
case Trans of
"" ->
ok;
_ ->
ets:insert(translations, {Orig, Trans}),
ets:insert(translations_obsolete, {Orig, Trans})
end
end, Terms);
Err ->
Err
end.
find_src_files(Dir) ->
case file:list_dir(Dir) of
{ok, FileList} ->
recurse_filelist(
lists:map(
fun(F) ->
filename:join(Dir, F)
end, FileList));
_ ->
[]
end.
recurse_filelist(FileList) ->
recurse_filelist(FileList, []).
recurse_filelist([], Acc) ->
lists:reverse(Acc);
recurse_filelist([H | T], Acc) ->
case file:read_file_info(H) of
{ok, #file_info{type = directory}} ->
recurse_filelist(T, lists:reverse(find_src_files(H)) ++ Acc);
{ok, #file_info{type = regular}} ->
case string:substr(H, string:len(H) - 3) of
".erl" ->
recurse_filelist(T, [H | Acc]);
".hrl" ->
recurse_filelist(T, [H | Acc]);
_ ->
recurse_filelist(T, Acc)
end;
_ ->
recurse_filelist(T, Acc)
end.
print_usage() ->
io:format(
"Usage: extract_translations [-unused] dir file~n"
"~n"
"Example:~n"
" extract_translations . ./msgs/ru.msg~n"
).
%%%
%%% Gettext
%%%
print_po_header(File) ->
MsgProps = get_msg_header_props(File),
{Language, [LastT | AddT]} = prepare_props(MsgProps),
application:load(ejabberd),
{ok, Version} = application:get_key(ejabberd, vsn),
print_po_header(Version, Language, LastT, AddT).
get_msg_header_props(File) ->
{ok, F} = file:open(File, [read]),
Lines = get_msg_header_props(F, []),
file:close(F),
Lines.
get_msg_header_props(F, Lines) ->
String = io:get_line(F, ""),
case io_lib:fread("% ", String) of
{ok, [], RemString} ->
case io_lib:fread("~s", RemString) of
{ok, [Key], Value} when Value /= "\n" ->
%% The first character in Value is a blankspace:
%% And the last characters are 'slash n'
ValueClean = string:substr(Value, 2, string:len(Value)-2),
get_msg_header_props(F, Lines ++ [{Key, ValueClean}]);
_ ->
get_msg_header_props(F, Lines)
end;
_ ->
Lines
end.
prepare_props(MsgProps) ->
Language = proplists:get_value("Language:", MsgProps),
Authors = proplists:get_all_values("Author:", MsgProps),
{Language, Authors}.
print_po_header(Version, Language, LastTranslator, AdditionalTranslatorsList) ->
AdditionalTranslatorsString = build_additional_translators(AdditionalTranslatorsList),
HeaderString =
"msgid \"\"\n"
"msgstr \"\"\n"
"\"Project-Id-Version: " ++ Version ++ "\\n\"\n"
++ "\"X-Language: " ++ Language ++ "\\n\"\n"
"\"Last-Translator: " ++ LastTranslator ++ "\\n\"\n"
++ AdditionalTranslatorsString ++
"\"MIME-Version: 1.0\\n\"\n"
"\"Content-Type: text/plain; charset=UTF-8\\n\"\n"
"\"Content-Transfer-Encoding: 8bit\\n\"\n",
io:format("~s~n", [HeaderString]).
build_additional_translators(List) ->
lists:foldl(
fun(T, Str) ->
Str ++ "\"X-Additional-Translator: " ++ T ++ "\\n\"\n"
end,
"",
List).
print_translation(File, Line, Str, StrT) ->
StrQ = ejabberd_regexp:greplace(list_to_binary(Str), <<"\\\"">>, <<"\\\\\"">>),
StrTQ = ejabberd_regexp:greplace(list_to_binary(StrT), <<"\\\"">>, <<"\\\\\"">>),
io:format("#: ~s:~p~nmsgid \"~s\"~nmsgstr \"~s\"~n~n", [File, Line, StrQ, StrTQ]).
print_translation_obsolete(Str, StrT) ->
File = "unknown.erl",
Line = 1,
StrQ = ejabberd_regexp:greplace(Str, "\\\"", "\\\\\""),
StrTQ = ejabberd_regexp:greplace(StrT, "\\\"", "\\\\\""),
io:format("#: ~s:~p~n#~~ msgid \"~s\"~n#~~ msgstr \"~s\"~n~n", [File, Line, StrQ, StrTQ]).
@@ -1,365 +0,0 @@
#!/bin/bash
# Frontend for ejabberd's extract_translations.erl
# by Badlop
# How to create template files for a new language:
# NEWLANG=zh
# cp msgs/ejabberd.pot msgs/$NEWLANG.po
# echo \{\"\",\"\"\}. > msgs/$NEWLANG.msg
# ../../extract_translations/prepare-translation.sh -updateall
prepare_dirs ()
{
# Where is Erlang binary
ERL=`which erl`
EJA_SRC_DIR=$EJA_DIR/src/
EJA_MSGS_DIR=$EJA_DIR/priv/msgs/
EXTRACT_DIR=$EJA_DIR/contrib/extract_translations/
EXTRACT_ERL=$EXTRACT_DIR/extract_translations.erl
EXTRACT_BEAM=$EXTRACT_DIR/extract_translations.beam
SRC_DIR=$RUN_DIR/src
EBIN_DIR=$RUN_DIR/ebin
MSGS_DIR=$EJA_DIR/priv/msgs
if !([[ -n $EJA_DIR ]])
then
echo "ejabberd dir does not exist: $EJA_DIR"
fi
if !([[ -x $EXTRACT_BEAM ]])
then
sh -c "cd $EXTRACT_DIR; $ERL -compile $EXTRACT_ERL"
fi
}
extract_lang ()
{
MSGS_FILE=$1
MSGS_FILE2=$MSGS_FILE.translate
MSGS_PATH=$MSGS_DIR/$MSGS_FILE
MSGS_PATH2=$MSGS_DIR/$MSGS_FILE2
echo -n "Extracting language strings for '$MSGS_FILE':"
echo -n " new..."
cd $SRC_DIR
$ERL -pa $EXTRACT_DIR -noinput -noshell -s extract_translations -s init stop -extra . $MSGS_PATH >$MSGS_PATH.new
sed -e 's/^% \.\//% /g;' $MSGS_PATH.new > $MSGS_PATH.new2
mv $MSGS_PATH.new2 $MSGS_PATH.new
echo -n " old..."
$ERL -pa $EXTRACT_DIR -noinput -noshell -s extract_translations -s init stop -extra -unused . $MSGS_PATH >$MSGS_PATH.unused
find_unused_full $MSGS_FILE $MSGS_FILE.unused
echo "" >$MSGS_PATH2
echo " ***** Translation file for ejabberd ***** " >>$MSGS_PATH2
echo "" >>$MSGS_PATH2
echo "" >>$MSGS_PATH2
echo " *** New strings: Can you please translate them? *** " >>$MSGS_PATH2
cat $MSGS_PATH.new >>$MSGS_PATH2
echo "" >>$MSGS_PATH2
echo "" >>$MSGS_PATH2
echo " *** Unused strings: They will be removed automatically *** " >>$MSGS_PATH2
cat $MSGS_PATH.unused.full >>$MSGS_PATH2
echo "" >>$MSGS_PATH2
echo "" >>$MSGS_PATH2
echo " *** Already translated strings: you can also modify any of them if you want *** " >>$MSGS_PATH2
echo "" >>$MSGS_PATH2
cat $MSGS_PATH.old_cleaned >>$MSGS_PATH2
echo " ok"
rm $MSGS_PATH.new
rm $MSGS_PATH.old_cleaned
rm $MSGS_PATH.unused.full
}
extract_lang_all ()
{
cd $MSGS_DIR
for i in $( ls *.msg ) ; do
extract_lang $i;
done
echo -e "File\tMissing\tLanguage\t\tLast translator"
echo -e "----\t-------\t--------\t\t---------------"
cd $MSGS_DIR
for i in $( ls *.msg ) ; do
MISSING=`cat $i.translate | grep "\", \"\"}." | wc -l`
LANGUAGE=`grep "X-Language:" $i.translate | sed 's/% Language: //g'`
LASTAUTH=`grep "Author:" $i.translate | head -n 1 | sed 's/% Author: //g'`
echo -e "$i\t$MISSING\t$LANGUAGE\t$LASTAUTH"
done
cd $MSGS_DIR
REVISION=`git describe --always`
zip $HOME/ejabberd-langs-$REVISION.zip *.translate;
rm *.translate
}
find_unused_full ()
{
DATFILE=$1
DATFILEI=$1.old_cleaned
DELFILE=$2
cd msgs
DATFILE1=$DATFILE.t1
DATFILE2=$DATFILE.t2
DELFILE1=$DELFILE.t1
DELFILE2=$DELFILE.t2
DELFILEF=$DATFILE.unused.full
echo "" >$DELFILEF
grep -v "\\\\" $DELFILE >$DELFILE2
echo ENDFILEMARK >>$DELFILE2
cp $DATFILE $DATFILEI
cp $DATFILE $DATFILE2
cp $DELFILE2 $DELFILE1
STRING=`head -1 $DELFILE1`
until [[ $STRING == ENDFILEMARK ]]; do
cp $DELFILE2 $DELFILE1
cp $DATFILE2 $DATFILE1
STRING=`head -1 $DELFILE1`
cat $DATFILE1 | grep "$STRING" >>$DELFILEF
cat $DATFILE1 | grep -v "$STRING" >$DATFILE2
cat $DELFILE1 | grep -v "$STRING" >$DELFILE2
done
mv $DATFILE2 $DATFILEI
rm -f $MSGS_PATH.t1
rm $MSGS_PATH.unused
rm -f $MSGS_PATH.unused.t1
rm $MSGS_PATH.unused.t2
cd ..
}
extract_lang_srcmsg2po ()
{
LANG=$1
LANG_CODE=$LANG.$PROJECT
MSGS_PATH=$MSGS_DIR/$LANG_CODE.msg
PO_PATH=$MSGS_DIR/$LANG_CODE.po
echo $MSGS_PATH
cd $SRC_DIR
$ERL -pa $EXTRACT_DIR -pa $EBIN_DIR -pa $EJA_SRC_DIR -pa /lib/ejabberd/include -noinput -noshell -s extract_translations -s init stop -extra -srcmsg2po . $MSGS_PATH >$PO_PATH.1
sed -e 's/ \[\]$/ \"\"/g;' $PO_PATH.1 > $PO_PATH.2
msguniq --sort-by-file $PO_PATH.2 --output-file=$PO_PATH
rm $PO_PATH.*
}
extract_lang_src2pot ()
{
LANG_CODE=$PROJECT
MSGS_PATH=$MSGS_DIR/$LANG_CODE.msg
POT_PATH=$MSGS_DIR/$LANG_CODE.pot
echo -n "" >$MSGS_PATH
echo "% Language: Language Name" >>$MSGS_PATH
echo "% Author: Translator name and contact method" >>$MSGS_PATH
echo "" >>$MSGS_PATH
cd $SRC_DIR
$ERL -pa $EXTRACT_DIR -pa $EBIN_DIR -pa $EJA_SRC_DIR -pa /lib/ejabberd/include -noinput -noshell -s extract_translations -s init stop -extra -srcmsg2po . $MSGS_PATH >$POT_PATH.1
sed -e 's/ \[\]$/ \"\"/g;' $POT_PATH.1 > $POT_PATH.2
#msguniq --sort-by-file $POT_PATH.2 $EJA_MSGS_DIR --output-file=$POT_PATH
msguniq --sort-by-file $POT_PATH.2 --output-file=$POT_PATH
rm $POT_PATH.*
rm $MSGS_PATH
# If the project is a specific module, not the main ejabberd
if [[ $PROJECT != ejabberd ]] ; then
# Remove from project.pot the strings that are already present in the general ejabberd
EJABBERD_MSG_FILE=$EJA_MSGS_DIR/es.po # This is just some file with translated strings
POT_PATH_TEMP=$POT_PATH.temp
msgattrib --set-obsolete --only-file=$EJABBERD_MSG_FILE -o $POT_PATH_TEMP $POT_PATH
mv $POT_PATH_TEMP $POT_PATH
fi
}
extract_lang_popot2po ()
{
LANG_CODE=$1
PO_PATH=$MSGS_DIR/$LANG_CODE.po
POT_PATH=$MSGS_DIR/$PROJECT.pot
msgmerge $PO_PATH $POT_PATH >$PO_PATH.translate 2>/dev/null
mv $PO_PATH.translate $PO_PATH
}
extract_lang_po2msg ()
{
LANG_CODE=$1
PO_PATH=$LANG_CODE.po
MS_PATH=$PO_PATH.ms
MSGID_PATH=$PO_PATH.msgid
MSGSTR_PATH=$PO_PATH.msgstr
MSGS_PATH=$LANG_CODE.msg
cd $MSGS_DIR
# Check PO has correct ~
# Let's convert to C format so we can use msgfmt
PO_TEMP=$LANG_CODE.po.temp
cat $PO_PATH | sed 's/%/perc/g' | sed 's/~/%/g' | sed 's/#:.*/#, c-format/g' >$PO_TEMP
msgfmt $PO_TEMP --check-format
result=$?
rm $PO_TEMP
if [ $result -ne 0 ] ; then
exit 1
fi
msgattrib $PO_PATH --translated --no-fuzzy --no-obsolete --no-location --no-wrap | grep "^msg" | tail --lines=+3 >$MS_PATH
grep "^msgid" $PO_PATH.ms | sed 's/^msgid //g' >$MSGID_PATH
grep "^msgstr" $PO_PATH.ms | sed 's/^msgstr //g' >$MSGSTR_PATH
paste $MSGID_PATH $MSGSTR_PATH --delimiter=, | awk '{print "{" $0 "}."}' | sort -g >$MSGS_PATH
rm $MS_PATH
rm $MSGID_PATH
rm $MSGSTR_PATH
}
extract_lang_updateall ()
{
echo "Generating POT"
extract_lang_src2pot
cd $MSGS_DIR
echo ""
echo -e "File Missing Language Last translator"
echo -e "---- ------- -------- ---------------"
for i in $( ls *.msg ) ; do
LANG_CODE=${i%.msg}
echo -n $LANG_CODE | awk '{printf "%-6s", $1 }'
# Convert old MSG file to PO
PO=$LANG_CODE.po
[ -f $PO ] || extract_lang_srcmsg2po $LANG_CODE
extract_lang_popot2po $LANG_CODE
extract_lang_po2msg $LANG_CODE
MISSING=`msgfmt --statistics $PO 2>&1 | awk '{printf "%5s", $4 }'`
echo -n " $MISSING"
LANGUAGE=`grep "X-Language:" $PO | sed 's/\"X-Language: //g' | sed 's/\\\\n\"//g' | awk '{printf "%-12s", $1}'`
echo -n " $LANGUAGE"
LASTAUTH=`grep "Last-Translator" $PO | sed 's/\"Last-Translator: //g' | sed 's/\\\\n\"//g'`
echo " $LASTAUTH"
done
echo ""
rm messages.mo
cd ..
}
translation_instructions ()
{
echo ""
echo " A new file has been created for you, with the current, the new and the deprecated strings:"
echo " $MSGS_PATH2"
echo ""
echo " At the end of that file you will find the strings you must update:"
echo " - Untranslated strings are like this: {"March", ""}."
echo " To translate the string, add the text inside the commas. Example:"
echo " {"March", "Marzo"}."
echo " - Old strings that are not used: "Woowoa""
echo " Search the entire file for those strings and remove them"
echo ""
echo " Once you have translated all the strings and removed all the old ones,"
echo " rename the file to overwrite the previous one:"
echo " $MSGS_PATH"
}
EJA_DIR=`pwd`
RUN_DIR=`pwd`
PROJECT=ejabberd
while [ $# -ne 0 ] ; do
PARAM=$1
shift
case $PARAM in
--) break ;;
-project)
PROJECT=$1
shift
;;
-ejadir)
EJA_DIR=$1
shift
;;
-rundir)
RUN_DIR=$1
shift
;;
-lang)
LANGU=$1
prepare_dirs
extract_lang $LANGU
shift
;;
-langall)
prepare_dirs
extract_lang_all
;;
-srcmsg2po)
LANG_CODE=$1
prepare_dirs
extract_lang_srcmsg2po $LANG_CODE
shift
;;
-popot2po)
LANG_CODE=$1
prepare_dirs
extract_lang_popot2po $LANG_CODE
shift
;;
-src2pot)
prepare_dirs
extract_lang_src2pot
;;
-po2msg)
LANG_CODE=$1
prepare_dirs
extract_lang_po2msg $LANG_CODE
shift
;;
-updateall)
prepare_dirs
extract_lang_updateall
;;
*)
echo "Options:"
echo " -langall"
echo " -lang LANGUAGE_FILE"
echo " -srcmsg2po LANGUAGE Construct .msg file using source code to PO file"
echo " -src2pot Generate template POT file from source code"
echo " -popot2po LANGUAGE Update PO file with template POT file"
echo " -po2msg LANGUAGE Export PO file to MSG file"
echo " -updateall Generate POT and update all PO"
echo ""
echo "Example:"
echo " ./prepare-translation.sh -lang es.msg"
exit 0
;;
esac
done
+5
View File
@@ -0,0 +1,5 @@
{level, details}.
{incl_dirs, ["src", "ebin"]}.
{excl_mods, [eldap, 'ELDAPv3']}.
{export, "logs/all.coverdata"}.
-62
View File
@@ -1,62 +0,0 @@
# $Id$
SHELL = /bin/bash
CONTRIBUTED_MODULES = ""
#ifeq ($(shell ls mod_http_bind.tex),mod_http_bind.tex)
# CONTRIBUTED_MODULES += "\\n\\setboolean{modhttpbind}{true}"
#endif
all: release pdf html
release:
@echo "Notes for the releaser:"
@echo "* Do not forget to add a link to the release notes in guide.tex"
@echo "* Do not forget to update the version number in src/ejabberd.app!"
@echo "* Do not forget to update the features in introduction.tex (including \new{} and \improved{} tags)."
@echo "Press any key to continue"
##@read foo
@echo "% ejabberd version (automatically generated)." > version.tex
@echo "\newcommand{\version}{"`sed '/vsn/!d;s/\(.*\)"\(.*\)"\(.*\)/\2/' ../src/ejabberd.app`"}" >> version.tex
@echo -n "% Contributed modules (automatically generated)." > contributed_modules.tex
@echo -e "$(CONTRIBUTED_MODULES)" >> contributed_modules.tex
html: guide.html dev.html features.html
pdf: guide.pdf features.pdf
clean:
rm -f *.aux
rm -f *.haux
rm -f *.htoc
rm -f *.idx
rm -f *.ilg
rm -f *.ind
rm -f *.log
rm -f *.out
rm -f *.pdf
rm -f *.toc
[ ! -f contributed_modules.tex ] || rm contributed_modules.tex
distclean: clean
rm -f *.html
guide.html: guide.tex
hevea -fix -pedantic guide.tex
dev.html: dev.tex
hevea -fix -pedantic dev.tex
features.html: features.tex
hevea -fix -pedantic features.tex
guide.pdf: guide.tex
pdflatex guide.tex
pdflatex guide.tex
pdflatex guide.tex
makeindex guide.idx
pdflatex guide.tex
features.pdf: features.tex
pdflatex features.tex
-18
View File
@@ -1,18 +0,0 @@
APPNAME = ejabberd
VSN = $(shell sed '/vsn/!d;s/\(.*\)"\(.*\)"\(.*\)/\2/' ../../src/ejabberd.app)
DOCDIR=.
SRCDIR=../../src
.PHONY = all
all: docs
clean:
rm -f *.html
rm edoc-info
rm erlang.png
docs:
erl -noshell -run edoc_run application \
"'$(APPNAME)'" '"$(SRCDIR)"' '[{dir,"$(DOCDIR)"},{packages, false},{todo,true},{private,true},{def,{vsn,"$(VSN)"}},{stylesheet,"process-one.css"},{overview,"$(DOCDIR)/overview.edoc"}]' -s init stop
-10
View File
@@ -1,10 +0,0 @@
@author Mickael Remond <mickael.remond@process-one.net>
[http://www.process-one.net/]
@copyright 2013 ProcessOne
@version {@vsn}, {@date} {@time}
@title ejabberd Development API Documentation
@doc
== Introduction ==
TODO: Insert content from Jerome documentation.
-92
View File
@@ -1,92 +0,0 @@
html, body {
font-family: Verdana, sans-serif;
color: #000;
background-color: #fff;
}
h1 {
color: #4a5389;
border-bottom: solid 1px #000;
}
h2 {
font-size: 24px;
text-align: right;
color: #4a5389;
border-bottom: 1px solid #000;
}
h3 {
font-size: 18px;
color: #900;
}
h4 {
font-size: 14px;
color: #000;
}
a[href] {
color: #4a5389;
}
a[href]:hover {
background-color: #ecefff;
}
p, li, dd {
text-align: justify;
}
li {
margin-top: 0.3em;
}
li:first-child {
margin-top: 0px;
}
blockquote {
color: #555;
}
caption {
font-style: italic;
color: #009;
text-align: left;
margin-left: 20px;
}
table[border="1"] {
border-collapse: collapse;
margin-bottom: 1em;
}
table[border="1"] td {
border: 1px solid #ddd;
}
pre, tt, code {
color: #461b7e;
}
pre {
margin:1ex 2ex;
border:1px dashed lightgrey;
background-color:#f9f9f9;
padding:0.5ex;
}
pre em {
font-style: normal;
font-weight: bold;
}
dt {
margin:0ex 2ex;
font-weight:bold;
}
dd {
margin:0ex 0ex 1ex 4ex;
}
-413
View File
@@ -1,413 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>Ejabberd 2.1.12 Developers Guide
</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<META name="GENERATOR" content="hevea 1.10">
<STYLE type="text/css">
.li-itemize{margin:1ex 0ex;}
.li-enumerate{margin:1ex 0ex;}
.dd-description{margin:0ex 0ex 1ex 4ex;}
.dt-description{margin:0ex;}
.toc{list-style:none;}
.thefootnotes{text-align:left;margin:0ex;}
.dt-thefootnotes{margin:0em;}
.dd-thefootnotes{margin:0em 0em 0em 2em;}
.footnoterule{margin:1em auto 1em 0px;width:50%;}
.caption{padding-left:2ex; padding-right:2ex; margin-left:auto; margin-right:auto}
.title{margin:2ex auto;text-align:center}
.center{text-align:center;margin-left:auto;margin-right:auto;}
.flushleft{text-align:left;margin-left:0ex;margin-right:auto;}
.flushright{text-align:right;margin-left:auto;margin-right:0ex;}
DIV TABLE{margin-left:inherit;margin-right:inherit;}
PRE{text-align:left;margin-left:0ex;margin-right:auto;}
BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;}
TD P{margin:0px;}
.boxed{border:1px solid black}
.textboxed{border:1px solid black}
.vbar{border:none;width:2px;background-color:black;}
.hbar{border:none;height:2px;width:100%;background-color:black;}
.hfill{border:none;height:1px;width:200%;background-color:black;}
.vdisplay{border-collapse:separate;border-spacing:2px;width:auto; empty-cells:show; border:2px solid red;}
.vdcell{white-space:nowrap;padding:0px;width:auto; border:2px solid green;}
.display{border-collapse:separate;border-spacing:2px;width:auto; border:none;}
.dcell{white-space:nowrap;padding:0px;width:auto; border:none;}
.dcenter{margin:0ex auto;}
.vdcenter{border:solid #FF8000 2px; margin:0ex auto;}
.minipage{text-align:left; margin-left:0em; margin-right:auto;}
.marginpar{border:solid thin black; width:20%; text-align:left;}
.marginparleft{float:left; margin-left:0ex; margin-right:1ex;}
.marginparright{float:right; margin-left:1ex; margin-right:0ex;}
.theorem{text-align:left;margin:1ex auto 1ex 0ex;}
.part{margin:2ex auto;text-align:center}
</STYLE>
</HEAD>
<BODY >
<!--HEVEA command line is: /usr/bin/hevea -fix -pedantic dev.tex -->
<!--CUT DEF section 1 --><P><A NAME="titlepage"></A>
</P><TABLE CLASS="title"><TR><TD><H1 CLASS="titlemain">Ejabberd 2.1.12 Developers Guide</H1><H3 CLASS="titlerest">Alexey Shchepin<BR>
<A HREF="mailto:alexey@sevcom.net"><TT>mailto:alexey@sevcom.net</TT></A><BR>
<A HREF="xmpp:aleksey@jabber.ru"><TT>xmpp:aleksey@jabber.ru</TT></A></H3></TD></TR>
</TABLE><DIV CLASS="center">
<IMG SRC="logo.png" ALT="logo.png">
</DIV><BLOCKQUOTE CLASS="quotation"><I>I can thoroughly recommend ejabberd for ease of setup &#X2013;
Kevin Smith, Current maintainer of the Psi project</I></BLOCKQUOTE><!--TOC section Contents-->
<H2 CLASS="section"><!--SEC ANCHOR -->Contents</H2><!--SEC END --><UL CLASS="toc"><LI CLASS="li-toc">
<A HREF="#htoc1">1&#XA0;&#XA0;Key Features</A>
</LI><LI CLASS="li-toc"><A HREF="#htoc2">2&#XA0;&#XA0;Additional Features</A>
</LI><LI CLASS="li-toc"><A HREF="#htoc3">3&#XA0;&#XA0;How it Works</A>
<UL CLASS="toc"><LI CLASS="li-toc">
<A HREF="#htoc4">3.1&#XA0;&#XA0;Router</A>
</LI><LI CLASS="li-toc"><A HREF="#htoc5">3.2&#XA0;&#XA0;Local Router</A>
</LI><LI CLASS="li-toc"><A HREF="#htoc6">3.3&#XA0;&#XA0;Session Manager</A>
</LI><LI CLASS="li-toc"><A HREF="#htoc7">3.4&#XA0;&#XA0;S2S Manager</A>
</LI></UL>
</LI><LI CLASS="li-toc"><A HREF="#htoc8">4&#XA0;&#XA0;Authentication</A>
<UL CLASS="toc">
<UL CLASS="toc"><LI CLASS="li-toc">
<A HREF="#htoc9">4.0.1&#XA0;&#XA0;External</A>
</LI></UL>
</UL>
</LI><LI CLASS="li-toc"><A HREF="#htoc10">5&#XA0;&#XA0;XML Representation</A>
</LI><LI CLASS="li-toc"><A HREF="#htoc11">6&#XA0;&#XA0;Module <TT>xml</TT></A>
</LI><LI CLASS="li-toc"><A HREF="#htoc12">7&#XA0;&#XA0;Module <TT>xml_stream</TT></A>
</LI><LI CLASS="li-toc"><A HREF="#htoc13">8&#XA0;&#XA0;Modules</A>
<UL CLASS="toc"><LI CLASS="li-toc">
<A HREF="#htoc14">8.1&#XA0;&#XA0;Module gen_iq_handler</A>
</LI><LI CLASS="li-toc"><A HREF="#htoc15">8.2&#XA0;&#XA0;Services</A>
</LI></UL>
</LI></UL><P>Introduction
<A NAME="intro"></A></P><P><TT>ejabberd</TT> is a free and open source instant messaging server written in <A HREF="http://www.erlang.org/">Erlang/OTP</A>.</P><P><TT>ejabberd</TT> is cross-platform, distributed, fault-tolerant, and based on open standards to achieve real-time communication.</P><P><TT>ejabberd</TT> is designed to be a rock-solid and feature rich XMPP server.</P><P><TT>ejabberd</TT> is suitable for small deployments, whether they need to be scalable or not, as well as extremely big deployments.</P><!--TOC section Key Features-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc1">1</A>&#XA0;&#XA0;Key Features</H2><!--SEC END --><P>
<A NAME="keyfeatures"></A>
</P><P><TT>ejabberd</TT> is:
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
Cross-platform: <TT>ejabberd</TT> runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.</LI><LI CLASS="li-itemize">Distributed: You can run <TT>ejabberd</TT> on a cluster of machines and all of them will serve the same Jabber domain(s). When you need more capacity you can simply add a new cheap node to your cluster. Accordingly, you do not need to buy an expensive high-end machine to support tens of thousands concurrent users.</LI><LI CLASS="li-itemize">Fault-tolerant: You can deploy an <TT>ejabberd</TT> cluster so that all the information required for a properly working service will be replicated permanently on all nodes. This means that if one of the nodes crashes, the others will continue working without disruption. In addition, nodes also can be added or replaced &#X2018;on the fly&#X2019;.</LI><LI CLASS="li-itemize">Administrator Friendly: <TT>ejabberd</TT> is built on top of the Open Source Erlang. As a result you do not need to install an external database, an external web server, amongst others because everything is already included, and ready to run out of the box. Other administrator benefits include:
<UL CLASS="itemize"><LI CLASS="li-itemize">
Comprehensive documentation.
</LI><LI CLASS="li-itemize">Straightforward installers for Linux, Mac OS X, and Windows. </LI><LI CLASS="li-itemize">Web Administration.
</LI><LI CLASS="li-itemize">Shared Roster Groups.
</LI><LI CLASS="li-itemize">Command line administration tool. </LI><LI CLASS="li-itemize">Can integrate with existing authentication mechanisms.
</LI><LI CLASS="li-itemize">Capability to send announce messages.
</LI></UL></LI><LI CLASS="li-itemize">Internationalized: <TT>ejabberd</TT> leads in internationalization. Hence it is very well suited in a globalized world. Related features are:
<UL CLASS="itemize"><LI CLASS="li-itemize">
Translated to 25 languages. </LI><LI CLASS="li-itemize">Support for <A HREF="http://www.ietf.org/rfc/rfc3490.txt">IDNA</A>.
</LI></UL></LI><LI CLASS="li-itemize">Open Standards: <TT>ejabberd</TT> is the first Open Source Jabber server claiming to fully comply to the XMPP standard.
<UL CLASS="itemize"><LI CLASS="li-itemize">
Fully XMPP compliant.
</LI><LI CLASS="li-itemize">XML-based protocol.
</LI><LI CLASS="li-itemize"><A HREF="http://www.ejabberd.im/protocols">Many protocols supported</A>.
</LI></UL></LI></UL><!--TOC section Additional Features-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc2">2</A>&#XA0;&#XA0;Additional Features</H2><!--SEC END --><P>
<A NAME="addfeatures"></A>
</P><P>Moreover, <TT>ejabberd</TT> comes with a wide range of other state-of-the-art features:
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
Modular
<UL CLASS="itemize"><LI CLASS="li-itemize">
Load only the modules you want.
</LI><LI CLASS="li-itemize">Extend <TT>ejabberd</TT> with your own custom modules.
</LI></UL>
</LI><LI CLASS="li-itemize">Security
<UL CLASS="itemize"><LI CLASS="li-itemize">
SASL and STARTTLS for c2s and s2s connections.
</LI><LI CLASS="li-itemize">STARTTLS and Dialback s2s connections.
</LI><LI CLASS="li-itemize">Web Admin accessible via HTTPS secure access.
</LI></UL>
</LI><LI CLASS="li-itemize">Databases
<UL CLASS="itemize"><LI CLASS="li-itemize">
Internal database for fast deployment (Mnesia).
</LI><LI CLASS="li-itemize">Native MySQL support.
</LI><LI CLASS="li-itemize">Native PostgreSQL support.
</LI><LI CLASS="li-itemize">ODBC data storage support.
</LI><LI CLASS="li-itemize">Microsoft SQL Server support. </LI></UL>
</LI><LI CLASS="li-itemize">Authentication
<UL CLASS="itemize"><LI CLASS="li-itemize">
Internal Authentication.
</LI><LI CLASS="li-itemize">PAM, LDAP and ODBC. </LI><LI CLASS="li-itemize">External Authentication script.
</LI></UL>
</LI><LI CLASS="li-itemize">Others
<UL CLASS="itemize"><LI CLASS="li-itemize">
Support for virtual hosting.
</LI><LI CLASS="li-itemize">Compressing XML streams with Stream Compression (<A HREF="http://www.xmpp.org/extensions/xep-0138.html">XEP-0138</A>).
</LI><LI CLASS="li-itemize">Statistics via Statistics Gathering (<A HREF="http://www.xmpp.org/extensions/xep-0039.html">XEP-0039</A>).
</LI><LI CLASS="li-itemize">IPv6 support both for c2s and s2s connections.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0045.html">Multi-User Chat</A> module with support for clustering and HTML logging. </LI><LI CLASS="li-itemize">Users Directory based on users vCards.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0060.html">Publish-Subscribe</A> component with support for <A HREF="http://www.xmpp.org/extensions/xep-0163.html">Personal Eventing via Pubsub</A>.
</LI><LI CLASS="li-itemize">Support for web clients: <A HREF="http://www.xmpp.org/extensions/xep-0025.html">HTTP Polling</A> and <A HREF="http://www.xmpp.org/extensions/xep-0206.html">HTTP Binding (BOSH)</A> services.
</LI><LI CLASS="li-itemize">IRC transport.
</LI><LI CLASS="li-itemize">Component support: interface with networks such as AIM, ICQ and MSN installing special tranports.
</LI></UL>
</LI></UL><!--TOC section How it Works-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc3">3</A>&#XA0;&#XA0;How it Works</H2><!--SEC END --><P>
<A NAME="howitworks"></A></P><P>A XMPP domain is served by one or more <TT>ejabberd</TT> nodes. These nodes can
be run on different machines that are connected via a network. They all must
have the ability to connect to port 4369 of all another nodes, and must have
the same magic cookie (see Erlang/OTP documentation, in other words the file
<TT>~ejabberd/.erlang.cookie</TT> must be the same on all nodes). This is
needed because all nodes exchange information about connected users, S2S
connections, registered services, etc&#X2026;</P><P>Each <TT>ejabberd</TT> node have following modules:
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
router;
</LI><LI CLASS="li-itemize">local router.
</LI><LI CLASS="li-itemize">session manager;
</LI><LI CLASS="li-itemize">S2S manager;
</LI></UL><!--TOC subsection Router-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc4">3.1</A>&#XA0;&#XA0;Router</H3><!--SEC END --><P>This module is the main router of XMPP packets on each node. It routes
them based on their destinations domains. It has two tables: local and global
routes. First, domain of packet destination searched in local table, and if it
found, then the packet is routed to appropriate process. If no, then it
searches in global table, and is routed to the appropriate <TT>ejabberd</TT> node or
process. If it does not exists in either tables, then it sent to the S2S
manager.</P><!--TOC subsection Local Router-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc5">3.2</A>&#XA0;&#XA0;Local Router</H3><!--SEC END --><P>This module routes packets which have a destination domain equal to this server
name. If destination JID has a non-empty user part, then it routed to the
session manager, else it is processed depending on it&#X2019;s content.</P><!--TOC subsection Session Manager-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc6">3.3</A>&#XA0;&#XA0;Session Manager</H3><!--SEC END --><P>This module routes packets to local users. It searches for what user resource
packet must be sent via presence table. If this resource is connected to
this node, it is routed to C2S process, if it connected via another node, then
the packet is sent to session manager on that node.</P><!--TOC subsection S2S Manager-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc7">3.4</A>&#XA0;&#XA0;S2S Manager</H3><!--SEC END --><P>This module routes packets to other XMPP servers. First, it checks if an
open S2S connection from the domain of the packet source to the domain of
packet destination already exists. If it is open on another node, then it
routes the packet to S2S manager on that node, if it is open on this node, then
it is routed to the process that serves this connection, and if a connection
does not exist, then it is opened and registered.</P><!--TOC section Authentication-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc8">4</A>&#XA0;&#XA0;Authentication</H2><!--SEC END --><!--TOC subsubsection External-->
<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc9">4.0.1</A>&#XA0;&#XA0;External</H4><!--SEC END --><P>
<A NAME="externalauth"></A>
</P><P>The external authentication script follows
<A HREF="http://www.erlang.org/doc/tutorial/c_portdriver.html">the erlang port driver API</A>.</P><P>That script is supposed to do theses actions, in an infinite loop:
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
read from stdin: AABBBBBBBBB.....
<UL CLASS="itemize"><LI CLASS="li-itemize">
A: 2 bytes of length data (a short in network byte order)
</LI><LI CLASS="li-itemize">B: a string of length found in A that contains operation in plain text
operation are as follows:
<UL CLASS="itemize"><LI CLASS="li-itemize">
auth:User:Server:Password (check if a username/password pair is correct)
</LI><LI CLASS="li-itemize">isuser:User:Server (check if it&#X2019;s a valid user)
</LI><LI CLASS="li-itemize">setpass:User:Server:Password (set user&#X2019;s password)
</LI><LI CLASS="li-itemize">tryregister:User:Server:Password (try to register an account)
</LI><LI CLASS="li-itemize">removeuser:User:Server (remove this account)
</LI><LI CLASS="li-itemize">removeuser3:User:Server:Password (remove this account if the password is correct)
</LI></UL>
</LI></UL>
</LI><LI CLASS="li-itemize">write to stdout: AABB
<UL CLASS="itemize"><LI CLASS="li-itemize">
A: the number 2 (coded as a short, which is bytes length of following result)
</LI><LI CLASS="li-itemize">B: the result code (coded as a short), should be 1 for success/valid, or 0 for failure/invalid
</LI></UL>
</LI></UL><P>Example python script
</P><PRE CLASS="verbatim">#!/usr/bin/python
import sys
from struct import *
def from_ejabberd():
input_length = sys.stdin.read(2)
(size,) = unpack('&gt;h', input_length)
return sys.stdin.read(size).split(':')
def to_ejabberd(bool):
answer = 0
if bool:
answer = 1
token = pack('&gt;hh', 2, answer)
sys.stdout.write(token)
sys.stdout.flush()
def auth(username, server, password):
return True
def isuser(username, server):
return True
def setpass(username, server, password):
return True
while True:
data = from_ejabberd()
success = False
if data[0] == "auth":
success = auth(data[1], data[2], data[3])
elif data[0] == "isuser":
success = isuser(data[1], data[2])
elif data[0] == "setpass":
success = setpass(data[1], data[2], data[3])
to_ejabberd(success)
</PRE><!--TOC section XML Representation-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc10">5</A>&#XA0;&#XA0;XML Representation</H2><!--SEC END --><P>
<A NAME="xmlrepr"></A></P><P>Each XML stanza is represented as the following tuple:
</P><PRE CLASS="verbatim">XMLElement = {xmlelement, Name, Attrs, [ElementOrCDATA]}
Name = string()
Attrs = [Attr]
Attr = {Key, Val}
Key = string()
Val = string()
ElementOrCDATA = XMLElement | CDATA
CDATA = {xmlcdata, string()}
</PRE><P>E.&#XA0;g. this stanza:
</P><PRE CLASS="verbatim">&lt;message to='test@conference.example.org' type='groupchat'&gt;
&lt;body&gt;test&lt;/body&gt;
&lt;/message&gt;
</PRE><P>is represented as the following structure:
</P><PRE CLASS="verbatim">{xmlelement, "message",
[{"to", "test@conference.example.org"},
{"type", "groupchat"}],
[{xmlelement, "body",
[],
[{xmlcdata, "test"}]}]}}
</PRE><!--TOC section Module <TT>xml</TT>-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc11">6</A>&#XA0;&#XA0;Module <TT>xml</TT></H2><!--SEC END --><P>
<A NAME="xmlmod"></A></P><DL CLASS="description"><DT CLASS="dt-description">
</DT><DD CLASS="dd-description"><CODE>element_to_string(El) -&gt; string()</CODE>
<PRE CLASS="verbatim">El = XMLElement
</PRE>Returns string representation of XML stanza <TT>El</TT>.</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>crypt(S) -&gt; string()</CODE>
<PRE CLASS="verbatim">S = string()
</PRE>Returns string which correspond to <TT>S</TT> with encoded XML special
characters.</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>remove_cdata(ECList) -&gt; EList</CODE>
<PRE CLASS="verbatim">ECList = [ElementOrCDATA]
EList = [XMLElement]
</PRE><TT>EList</TT> is a list of all non-CDATA elements of ECList.</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>get_path_s(El, Path) -&gt; Res</CODE>
<PRE CLASS="verbatim">El = XMLElement
Path = [PathItem]
PathItem = PathElem | PathAttr | PathCDATA
PathElem = {elem, Name}
PathAttr = {attr, Name}
PathCDATA = cdata
Name = string()
Res = string() | XMLElement
</PRE>If <TT>Path</TT> is empty, then returns <TT>El</TT>. Else sequentially
consider elements of <TT>Path</TT>. Each element is one of:
<DL CLASS="description"><DT CLASS="dt-description">
</DT><DD CLASS="dd-description"><CODE>{elem, Name}</CODE> <TT>Name</TT> is name of subelement of
<TT>El</TT>, if such element exists, then this element considered in
following steps, else returns empty string.
</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>{attr, Name}</CODE> If <TT>El</TT> have attribute <TT>Name</TT>, then
returns value of this attribute, else returns empty string.
</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>cdata</CODE> Returns CDATA of <TT>El</TT>.
</DD></DL></DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description">TODO:
<PRE CLASS="verbatim"> get_cdata/1, get_tag_cdata/1
get_attr/2, get_attr_s/2
get_tag_attr/2, get_tag_attr_s/2
get_subtag/2
</PRE></DD></DL><!--TOC section Module <TT>xml_stream</TT>-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc12">7</A>&#XA0;&#XA0;Module <TT>xml_stream</TT></H2><!--SEC END --><P>
<A NAME="xmlstreammod"></A></P><DL CLASS="description"><DT CLASS="dt-description">
</DT><DD CLASS="dd-description"><CODE>parse_element(Str) -&gt; XMLElement | {error, Err}</CODE>
<PRE CLASS="verbatim">Str = string()
Err = term()
</PRE>Parses <TT>Str</TT> using XML parser, returns either parsed element or error
tuple.
</DD></DL><!--TOC section Modules-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc13">8</A>&#XA0;&#XA0;Modules</H2><!--SEC END --><P>
<A NAME="emods"></A></P><!--TOC subsection Module gen_iq_handler-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc14">8.1</A>&#XA0;&#XA0;Module gen_iq_handler</H3><!--SEC END --><P>
<A NAME="geniqhandl"></A></P><P>The module <CODE>gen_iq_handler</CODE> allows to easily write handlers for IQ packets
of particular XML namespaces that addressed to server or to users bare JIDs.</P><P>In this module the following functions are defined:
</P><DL CLASS="description"><DT CLASS="dt-description">
</DT><DD CLASS="dd-description"><CODE>add_iq_handler(Component, Host, NS, Module, Function, Type)</CODE>
<PRE CLASS="verbatim">Component = Module = Function = atom()
Host = NS = string()
Type = no_queue | one_queue | parallel
</PRE>Registers function <CODE>Module:Function</CODE> as handler for IQ packets on
virtual host <CODE>Host</CODE> that contain child of namespace <CODE>NS</CODE> in
<CODE>Component</CODE>. Queueing discipline is <CODE>Type</CODE>. There are at least
two components defined:
<DL CLASS="description"><DT CLASS="dt-description">
</DT><DD CLASS="dd-description"><CODE>ejabberd_local</CODE> Handles packets that addressed to server JID;
</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>ejabberd_sm</CODE> Handles packets that addressed to users bare JIDs.
</DD></DL>
</DD><DT CLASS="dt-description"></DT><DD CLASS="dd-description"><CODE>remove_iq_handler(Component, Host, NS)</CODE>
<PRE CLASS="verbatim">Component = atom()
Host = NS = string()
</PRE>Removes IQ handler on virtual host <CODE>Host</CODE> for namespace <CODE>NS</CODE> from
<CODE>Component</CODE>.
</DD></DL><P>Handler function must have the following type:
</P><DL CLASS="description"><DT CLASS="dt-description">
</DT><DD CLASS="dd-description"><CODE>Module:Function(From, To, IQ)</CODE>
<PRE CLASS="verbatim">From = To = jid()
</PRE></DD></DL><PRE CLASS="verbatim">-module(mod_cputime).
-behaviour(gen_mod).
-export([start/2,
stop/1,
process_local_iq/3]).
-include("ejabberd.hrl").
-include("jlib.hrl").
-define(NS_CPUTIME, "ejabberd:cputime").
start(Host, Opts) -&gt;
IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue),
gen_iq_handler:add_iq_handler(ejabberd_local, Host, ?NS_CPUTIME,
?MODULE, process_local_iq, IQDisc).
stop(Host) -&gt;
gen_iq_handler:remove_iq_handler(ejabberd_local, Host, ?NS_CPUTIME).
process_local_iq(From, To, {iq, ID, Type, XMLNS, SubEl}) -&gt;
case Type of
set -&gt;
{iq, ID, error, XMLNS,
[SubEl, ?ERR_NOT_ALLOWED]};
get -&gt;
CPUTime = element(1, erlang:statistics(runtime))/1000,
SCPUTime = lists:flatten(io_lib:format("~.3f", CPUTime)),
{iq, ID, result, XMLNS,
[{xmlelement, "query",
[{"xmlns", ?NS_CPUTIME}],
[{xmlelement, "cputime", [], [{xmlcdata, SCPUTime}]}]}]}
end.
</PRE><!--TOC subsection Services-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc15">8.2</A>&#XA0;&#XA0;Services</H3><!--SEC END --><P>
<A NAME="services"></A></P><PRE CLASS="verbatim">-module(mod_echo).
-behaviour(gen_mod).
-export([start/2, init/1, stop/1]).
-include("ejabberd.hrl").
-include("jlib.hrl").
start(Host, Opts) -&gt;
MyHost = gen_mod:get_opt(host, Opts, "echo." ++ Host),
register(gen_mod:get_module_proc(Host, ?PROCNAME),
spawn(?MODULE, init, [MyHost])).
init(Host) -&gt;
ejabberd_router:register_local_route(Host),
loop(Host).
loop(Host) -&gt;
receive
{route, From, To, Packet} -&gt;
ejabberd_router:route(To, From, Packet),
loop(Host);
stop -&gt;
ejabberd_router:unregister_route(Host),
ok;
_ -&gt;
loop(Host)
end.
stop(Host) -&gt;
Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
Proc ! stop,
{wait, Proc}.
</PRE><!--CUT END -->
<!--HTMLFOOT-->
<!--ENDHTML-->
<!--FOOTER-->
<HR SIZE=2><BLOCKQUOTE CLASS="quote"><EM>This document was translated from L<sup>A</sup>T<sub>E</sub>X by
</EM><A HREF="http://hevea.inria.fr/index.html"><EM>H</EM><EM><FONT SIZE=2><sup>E</sup></FONT></EM><EM>V</EM><EM><FONT SIZE=2><sup>E</sup></FONT></EM><EM>A</EM></A><EM>.</EM></BLOCKQUOTE></BODY>
</HTML>
-470
View File
@@ -1,470 +0,0 @@
\documentclass[a4paper,10pt]{article}
%% Packages
\usepackage{graphics}
\usepackage{hevea}
\usepackage{makeidx}
\usepackage{verbatim}
%% Index
\makeindex
% Remove the index anchors from the HTML version to save size and bandwith.
\newcommand{\ind}[1]{\begin{latexonly}\index{#1}\end{latexonly}}
%% Images
\newcommand{\logoscale}{0.7}
\newcommand{\imgscale}{0.58}
\newcommand{\insimg}[1]{\insscaleimg{\imgscale}{#1}}
\newcommand{\insscaleimg}[2]{
\imgsrc{#2}{}
\begin{latexonly}
\scalebox{#1}{\includegraphics{#2}}
\end{latexonly}
}
%% Various
\newcommand{\ns}[1]{\texttt{#1}}
\newcommand{\ejabberd}{\texttt{ejabberd}}
\newcommand{\Jabber}{Jabber}
\newcommand{\XMPP}{XMPP}
%% Modules
\newcommand{\module}[1]{\texttt{#1}}
\newcommand{\modadhoc}{\module{mod\_adhoc}}
\newcommand{\modannounce}{\module{mod\_announce}}
\newcommand{\modconfigure}{\module{mod\_configure}}
\newcommand{\moddisco}{\module{mod\_disco}}
\newcommand{\modecho}{\module{mod\_echo}}
\newcommand{\modirc}{\module{mod\_irc}}
\newcommand{\modlast}{\module{mod\_last}}
\newcommand{\modlastodbc}{\module{mod\_last\_odbc}}
\newcommand{\modmuc}{\module{mod\_muc}}
\newcommand{\modmuclog}{\module{mod\_muc\_log}}
\newcommand{\modoffline}{\module{mod\_offline}}
\newcommand{\modofflineodbc}{\module{mod\_offline\_odbc}}
\newcommand{\modprivacy}{\module{mod\_privacy}}
\newcommand{\modprivate}{\module{mod\_private}}
\newcommand{\modpubsub}{\module{mod\_pubsub}}
\newcommand{\modregister}{\module{mod\_register}}
\newcommand{\modroster}{\module{mod\_roster}}
\newcommand{\modrosterodbc}{\module{mod\_roster\_odbc}}
\newcommand{\modservicelog}{\module{mod\_service\_log}}
\newcommand{\modsharedroster}{\module{mod\_shared\_roster}}
\newcommand{\modstats}{\module{mod\_stats}}
\newcommand{\modtime}{\module{mod\_time}}
\newcommand{\modvcard}{\module{mod\_vcard}}
\newcommand{\modvcardldap}{\module{mod\_vcard\_ldap}}
\newcommand{\modvcardodbc}{\module{mod\_vcard\_odbc}}
\newcommand{\modversion}{\module{mod\_version}}
%% Title page
\include{version}
\title{Ejabberd \version\ Developers Guide}
\author{Alexey Shchepin \\
\ahrefurl{mailto:alexey@sevcom.net} \\
\ahrefurl{xmpp:aleksey@jabber.ru}}
%% Options
\newcommand{\marking}[1]{#1} % Marking disabled
\newcommand{\quoting}[2][yozhik]{} % Quotes disabled
\newcommand{\new}{\begin{latexonly}\marginpar{\textsc{new}}\end{latexonly}} % Highlight new features
\newcommand{\improved}{\begin{latexonly}\marginpar{\textsc{improved}}\end{latexonly}} % Highlight improved features
\newcommand{\moreinfo}[1]{} % Hide details
%% Footnotes
\newcommand{\txepref}[2]{\footahref{http://www.xmpp.org/extensions/xep-#1.html}{#2}}
\newcommand{\xepref}[1]{\txepref{#1}{XEP-#1}}
\begin{document}
\label{titlepage}
\begin{titlepage}
\maketitle{}
\begin{center}
{\insscaleimg{\logoscale}{logo.png}
\par
}
\end{center}
\begin{quotation}\textit{I can thoroughly recommend ejabberd for ease of setup --
Kevin Smith, Current maintainer of the Psi project}\end{quotation}
\end{titlepage}
\tableofcontents{}
% Input introduction.tex
\input{introduction}
\section{How it Works}
\label{howitworks}
A \XMPP{} domain is served by one or more \ejabberd{} nodes. These nodes can
be run on different machines that are connected via a network. They all must
have the ability to connect to port 4369 of all another nodes, and must have
the same magic cookie (see Erlang/OTP documentation, in other words the file
\texttt{\~{}ejabberd/.erlang.cookie} must be the same on all nodes). This is
needed because all nodes exchange information about connected users, S2S
connections, registered services, etc\ldots
Each \ejabberd{} node have following modules:
\begin{itemize}
\item router;
\item local router.
\item session manager;
\item S2S manager;
\end{itemize}
\subsection{Router}
This module is the main router of \XMPP{} packets on each node. It routes
them based on their destinations domains. It has two tables: local and global
routes. First, domain of packet destination searched in local table, and if it
found, then the packet is routed to appropriate process. If no, then it
searches in global table, and is routed to the appropriate \ejabberd{} node or
process. If it does not exists in either tables, then it sent to the S2S
manager.
\subsection{Local Router}
This module routes packets which have a destination domain equal to this server
name. If destination JID has a non-empty user part, then it routed to the
session manager, else it is processed depending on it's content.
\subsection{Session Manager}
This module routes packets to local users. It searches for what user resource
packet must be sent via presence table. If this resource is connected to
this node, it is routed to C2S process, if it connected via another node, then
the packet is sent to session manager on that node.
\subsection{S2S Manager}
This module routes packets to other \XMPP{} servers. First, it checks if an
open S2S connection from the domain of the packet source to the domain of
packet destination already exists. If it is open on another node, then it
routes the packet to S2S manager on that node, if it is open on this node, then
it is routed to the process that serves this connection, and if a connection
does not exist, then it is opened and registered.
\section{Authentication}
\subsubsection{External}
\label{externalauth}
\ind{external authentication}
The external authentication script follows
\footahref{http://www.erlang.org/doc/tutorial/c_portdriver.html}{the erlang port driver API}.
That script is supposed to do theses actions, in an infinite loop:
\begin{itemize}
\item read from stdin: AABBBBBBBBB.....
\begin{itemize}
\item A: 2 bytes of length data (a short in network byte order)
\item B: a string of length found in A that contains operation in plain text
operation are as follows:
\begin{itemize}
\item auth:User:Server:Password (check if a username/password pair is correct)
\item isuser:User:Server (check if it's a valid user)
\item setpass:User:Server:Password (set user's password)
\item tryregister:User:Server:Password (try to register an account)
\item removeuser:User:Server (remove this account)
\item removeuser3:User:Server:Password (remove this account if the password is correct)
\end{itemize}
\end{itemize}
\item write to stdout: AABB
\begin{itemize}
\item A: the number 2 (coded as a short, which is bytes length of following result)
\item B: the result code (coded as a short), should be 1 for success/valid, or 0 for failure/invalid
\end{itemize}
\end{itemize}
Example python script
\begin{verbatim}
#!/usr/bin/python
import sys
from struct import *
def from_ejabberd():
input_length = sys.stdin.read(2)
(size,) = unpack('>h', input_length)
return sys.stdin.read(size).split(':')
def to_ejabberd(bool):
answer = 0
if bool:
answer = 1
token = pack('>hh', 2, answer)
sys.stdout.write(token)
sys.stdout.flush()
def auth(username, server, password):
return True
def isuser(username, server):
return True
def setpass(username, server, password):
return True
while True:
data = from_ejabberd()
success = False
if data[0] == "auth":
success = auth(data[1], data[2], data[3])
elif data[0] == "isuser":
success = isuser(data[1], data[2])
elif data[0] == "setpass":
success = setpass(data[1], data[2], data[3])
to_ejabberd(success)
\end{verbatim}
\section{XML Representation}
\label{xmlrepr}
Each XML stanza is represented as the following tuple:
\begin{verbatim}
XMLElement = {xmlelement, Name, Attrs, [ElementOrCDATA]}
Name = string()
Attrs = [Attr]
Attr = {Key, Val}
Key = string()
Val = string()
ElementOrCDATA = XMLElement | CDATA
CDATA = {xmlcdata, string()}
\end{verbatim}
E.\,g. this stanza:
\begin{verbatim}
<message to='test@conference.example.org' type='groupchat'>
<body>test</body>
</message>
\end{verbatim}
is represented as the following structure:
\begin{verbatim}
{xmlelement, "message",
[{"to", "test@conference.example.org"},
{"type", "groupchat"}],
[{xmlelement, "body",
[],
[{xmlcdata, "test"}]}]}}
\end{verbatim}
\section{Module \texttt{xml}}
\label{xmlmod}
\begin{description}
\item{\verb|element_to_string(El) -> string()|}
\begin{verbatim}
El = XMLElement
\end{verbatim}
Returns string representation of XML stanza \texttt{El}.
\item{\verb|crypt(S) -> string()|}
\begin{verbatim}
S = string()
\end{verbatim}
Returns string which correspond to \texttt{S} with encoded XML special
characters.
\item{\verb|remove_cdata(ECList) -> EList|}
\begin{verbatim}
ECList = [ElementOrCDATA]
EList = [XMLElement]
\end{verbatim}
\texttt{EList} is a list of all non-CDATA elements of ECList.
\item{\verb|get_path_s(El, Path) -> Res|}
\begin{verbatim}
El = XMLElement
Path = [PathItem]
PathItem = PathElem | PathAttr | PathCDATA
PathElem = {elem, Name}
PathAttr = {attr, Name}
PathCDATA = cdata
Name = string()
Res = string() | XMLElement
\end{verbatim}
If \texttt{Path} is empty, then returns \texttt{El}. Else sequentially
consider elements of \texttt{Path}. Each element is one of:
\begin{description}
\item{\verb|{elem, Name}|} \texttt{Name} is name of subelement of
\texttt{El}, if such element exists, then this element considered in
following steps, else returns empty string.
\item{\verb|{attr, Name}|} If \texttt{El} have attribute \texttt{Name}, then
returns value of this attribute, else returns empty string.
\item{\verb|cdata|} Returns CDATA of \texttt{El}.
\end{description}
\item{TODO:}
\begin{verbatim}
get_cdata/1, get_tag_cdata/1
get_attr/2, get_attr_s/2
get_tag_attr/2, get_tag_attr_s/2
get_subtag/2
\end{verbatim}
\end{description}
\section{Module \texttt{xml\_stream}}
\label{xmlstreammod}
\begin{description}
\item{\verb!parse_element(Str) -> XMLElement | {error, Err}!}
\begin{verbatim}
Str = string()
Err = term()
\end{verbatim}
Parses \texttt{Str} using XML parser, returns either parsed element or error
tuple.
\end{description}
\section{Modules}
\label{emods}
%\subsection{gen\_mod behaviour}
%\label{genmod}
%TBD
\subsection{Module gen\_iq\_handler}
\label{geniqhandl}
The module \verb|gen_iq_handler| allows to easily write handlers for IQ packets
of particular XML namespaces that addressed to server or to users bare JIDs.
In this module the following functions are defined:
\begin{description}
\item{\verb|add_iq_handler(Component, Host, NS, Module, Function, Type)|}
\begin{verbatim}
Component = Module = Function = atom()
Host = NS = string()
Type = no_queue | one_queue | parallel
\end{verbatim}
Registers function \verb|Module:Function| as handler for IQ packets on
virtual host \verb|Host| that contain child of namespace \verb|NS| in
\verb|Component|. Queueing discipline is \verb|Type|. There are at least
two components defined:
\begin{description}
\item{\verb|ejabberd_local|} Handles packets that addressed to server JID;
\item{\verb|ejabberd_sm|} Handles packets that addressed to users bare JIDs.
\end{description}
\item{\verb|remove_iq_handler(Component, Host, NS)|}
\begin{verbatim}
Component = atom()
Host = NS = string()
\end{verbatim}
Removes IQ handler on virtual host \verb|Host| for namespace \verb|NS| from
\verb|Component|.
\end{description}
Handler function must have the following type:
\begin{description}
\item{\verb|Module:Function(From, To, IQ)|}
\begin{verbatim}
From = To = jid()
\end{verbatim}
\end{description}
\begin{verbatim}
-module(mod_cputime).
-behaviour(gen_mod).
-export([start/2,
stop/1,
process_local_iq/3]).
-include("ejabberd.hrl").
-include("jlib.hrl").
-define(NS_CPUTIME, "ejabberd:cputime").
start(Host, Opts) ->
IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue),
gen_iq_handler:add_iq_handler(ejabberd_local, Host, ?NS_CPUTIME,
?MODULE, process_local_iq, IQDisc).
stop(Host) ->
gen_iq_handler:remove_iq_handler(ejabberd_local, Host, ?NS_CPUTIME).
process_local_iq(From, To, {iq, ID, Type, XMLNS, SubEl}) ->
case Type of
set ->
{iq, ID, error, XMLNS,
[SubEl, ?ERR_NOT_ALLOWED]};
get ->
CPUTime = element(1, erlang:statistics(runtime))/1000,
SCPUTime = lists:flatten(io_lib:format("~.3f", CPUTime)),
{iq, ID, result, XMLNS,
[{xmlelement, "query",
[{"xmlns", ?NS_CPUTIME}],
[{xmlelement, "cputime", [], [{xmlcdata, SCPUTime}]}]}]}
end.
\end{verbatim}
\subsection{Services}
\label{services}
%TBD
%TODO: use \verb|proc_lib|
\begin{verbatim}
-module(mod_echo).
-behaviour(gen_mod).
-export([start/2, init/1, stop/1]).
-include("ejabberd.hrl").
-include("jlib.hrl").
start(Host, Opts) ->
MyHost = gen_mod:get_opt(host, Opts, "echo." ++ Host),
register(gen_mod:get_module_proc(Host, ?PROCNAME),
spawn(?MODULE, init, [MyHost])).
init(Host) ->
ejabberd_router:register_local_route(Host),
loop(Host).
loop(Host) ->
receive
{route, From, To, Packet} ->
ejabberd_router:route(To, From, Packet),
loop(Host);
stop ->
ejabberd_router:unregister_route(Host),
ok;
_ ->
loop(Host)
end.
stop(Host) ->
Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
Proc ! stop,
{wait, Proc}.
\end{verbatim}
\end{document}
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

-132
View File
@@ -1,132 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>Ejabberd 2.1.12 Feature Sheet
</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<META name="GENERATOR" content="hevea 1.10">
<STYLE type="text/css">
.li-itemize{margin:1ex 0ex;}
.li-enumerate{margin:1ex 0ex;}
.dd-description{margin:0ex 0ex 1ex 4ex;}
.dt-description{margin:0ex;}
.toc{list-style:none;}
.thefootnotes{text-align:left;margin:0ex;}
.dt-thefootnotes{margin:0em;}
.dd-thefootnotes{margin:0em 0em 0em 2em;}
.footnoterule{margin:1em auto 1em 0px;width:50%;}
.caption{padding-left:2ex; padding-right:2ex; margin-left:auto; margin-right:auto}
.title{margin:2ex auto;text-align:center}
.center{text-align:center;margin-left:auto;margin-right:auto;}
.flushleft{text-align:left;margin-left:0ex;margin-right:auto;}
.flushright{text-align:right;margin-left:auto;margin-right:0ex;}
DIV TABLE{margin-left:inherit;margin-right:inherit;}
PRE{text-align:left;margin-left:0ex;margin-right:auto;}
BLOCKQUOTE{margin-left:4ex;margin-right:4ex;text-align:left;}
TD P{margin:0px;}
.boxed{border:1px solid black}
.textboxed{border:1px solid black}
.vbar{border:none;width:2px;background-color:black;}
.hbar{border:none;height:2px;width:100%;background-color:black;}
.hfill{border:none;height:1px;width:200%;background-color:black;}
.vdisplay{border-collapse:separate;border-spacing:2px;width:auto; empty-cells:show; border:2px solid red;}
.vdcell{white-space:nowrap;padding:0px;width:auto; border:2px solid green;}
.display{border-collapse:separate;border-spacing:2px;width:auto; border:none;}
.dcell{white-space:nowrap;padding:0px;width:auto; border:none;}
.dcenter{margin:0ex auto;}
.vdcenter{border:solid #FF8000 2px; margin:0ex auto;}
.minipage{text-align:left; margin-left:0em; margin-right:auto;}
.marginpar{border:solid thin black; width:20%; text-align:left;}
.marginparleft{float:left; margin-left:0ex; margin-right:1ex;}
.marginparright{float:right; margin-left:1ex; margin-right:0ex;}
.theorem{text-align:left;margin:1ex auto 1ex 0ex;}
.part{margin:2ex auto;text-align:center}
SPAN{width:20%; float:right; text-align:left; margin-left:auto;}
</STYLE>
</HEAD>
<BODY >
<!--HEVEA command line is: /usr/bin/hevea -fix -pedantic features.tex -->
<!--CUT DEF section 1 --><P><A NAME="titlepage"></A>
</P><TABLE CLASS="title"><TR><TD><H1 CLASS="titlemain">Ejabberd 2.1.12 Feature Sheet</H1><H3 CLASS="titlerest">Sander Devrieze<BR>
<A HREF="mailto:s.devrieze@pandora.be"><TT>mailto:s.devrieze@pandora.be</TT></A><BR>
<A HREF="xmpp:sander@devrieze.dyndns.org"><TT>xmpp:sander@devrieze.dyndns.org</TT></A></H3></TD></TR>
</TABLE><DIV CLASS="center">
<IMG SRC="logo.png" ALT="logo.png">
</DIV><BLOCKQUOTE CLASS="quotation"><FONT COLOR="#921700"><I>I can thoroughly recommend ejabberd for ease of setup &#X2013;
Kevin Smith, Current maintainer of the Psi project</I></FONT></BLOCKQUOTE><P>Introduction
<A NAME="intro"></A></P><BLOCKQUOTE CLASS="quotation"><FONT COLOR="#921700"><I>I just tried out ejabberd and was impressed both by ejabberd itself and the language it is written in, Erlang. &#X2014;
Joeri</I></FONT></BLOCKQUOTE><P><TT>ejabberd</TT> is a <B><FONT SIZE=4><FONT COLOR="#001376">free and open source</FONT></FONT></B> instant messaging server written in <A HREF="http://www.erlang.org/">Erlang/OTP</A>.</P><P><TT>ejabberd</TT> is <B><FONT SIZE=4><FONT COLOR="#001376">cross-platform</FONT></FONT></B>, distributed, fault-tolerant, and based on open standards to achieve real-time communication.</P><P><TT>ejabberd</TT> is designed to be a <B><FONT SIZE=4><FONT COLOR="#001376">rock-solid and feature rich</FONT></FONT></B> XMPP server.</P><P><TT>ejabberd</TT> is suitable for small deployments, whether they need to be <B><FONT SIZE=4><FONT COLOR="#001376">scalable</FONT></FONT></B> or not, as well as extremely big deployments.</P><!--TOC section Key Features-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc1"></A>Key Features</H2><!--SEC END --><P>
<A NAME="keyfeatures"></A>
</P><BLOCKQUOTE CLASS="quotation"><FONT COLOR="#921700"><I>Erlang seems to be tailor-made for writing stable, robust servers. &#X2014;
Peter Saint-Andr&#XE9;, Executive Director of the Jabber Software Foundation</I></FONT></BLOCKQUOTE><P><TT>ejabberd</TT> is:
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
<B><FONT SIZE=4><FONT COLOR="#001376">Cross-platform:</FONT></FONT></B> <TT>ejabberd</TT> runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.</LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Distributed:</FONT></FONT></B> You can run <TT>ejabberd</TT> on a cluster of machines and all of them will serve the same Jabber domain(s). When you need more capacity you can simply add a new cheap node to your cluster. Accordingly, you do not need to buy an expensive high-end machine to support tens of thousands concurrent users.</LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Fault-tolerant:</FONT></FONT></B> You can deploy an <TT>ejabberd</TT> cluster so that all the information required for a properly working service will be replicated permanently on all nodes. This means that if one of the nodes crashes, the others will continue working without disruption. In addition, nodes also can be added or replaced &#X2018;on the fly&#X2019;.</LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Administrator Friendly:</FONT></FONT></B> <TT>ejabberd</TT> is built on top of the Open Source Erlang. As a result you do not need to install an external database, an external web server, amongst others because everything is already included, and ready to run out of the box. Other administrator benefits include:
<UL CLASS="itemize"><LI CLASS="li-itemize">
Comprehensive documentation.
</LI><LI CLASS="li-itemize">Straightforward installers for Linux, Mac OS X, and Windows. </LI><LI CLASS="li-itemize">Web Administration.
</LI><LI CLASS="li-itemize">Shared Roster Groups.
</LI><LI CLASS="li-itemize">Command line administration tool. </LI><LI CLASS="li-itemize">Can integrate with existing authentication mechanisms.
</LI><LI CLASS="li-itemize">Capability to send announce messages.
</LI></UL></LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Internationalized:</FONT></FONT></B> <TT>ejabberd</TT> leads in internationalization. Hence it is very well suited in a globalized world. Related features are:
<UL CLASS="itemize"><LI CLASS="li-itemize">
Translated to 25 languages. </LI><LI CLASS="li-itemize">Support for <A HREF="http://www.ietf.org/rfc/rfc3490.txt">IDNA</A>.
</LI></UL></LI><LI CLASS="li-itemize"><B><FONT SIZE=4><FONT COLOR="#001376">Open Standards:</FONT></FONT></B> <TT>ejabberd</TT> is the first Open Source Jabber server claiming to fully comply to the XMPP standard.
<UL CLASS="itemize"><LI CLASS="li-itemize">
Fully XMPP compliant.
</LI><LI CLASS="li-itemize">XML-based protocol.
</LI><LI CLASS="li-itemize"><A HREF="http://www.ejabberd.im/protocols">Many protocols supported</A>.
</LI></UL></LI></UL><!--TOC section Additional Features-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc2"></A>Additional Features</H2><!--SEC END --><P>
<A NAME="addfeatures"></A>
</P><BLOCKQUOTE CLASS="quotation"><FONT COLOR="#921700"><I>ejabberd is making inroads to solving the "buggy incomplete server" problem &#X2014;
Justin Karneges, Founder of the Psi and the Delta projects</I></FONT></BLOCKQUOTE><P>Moreover, <TT>ejabberd</TT> comes with a wide range of other state-of-the-art features:
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
Modular
<UL CLASS="itemize"><LI CLASS="li-itemize">
Load only the modules you want.
</LI><LI CLASS="li-itemize">Extend <TT>ejabberd</TT> with your own custom modules.
</LI></UL>
</LI><LI CLASS="li-itemize">Security
<UL CLASS="itemize"><LI CLASS="li-itemize">
SASL and STARTTLS for c2s and s2s connections.
</LI><LI CLASS="li-itemize">STARTTLS and Dialback s2s connections.
</LI><LI CLASS="li-itemize">Web Admin accessible via HTTPS secure access.
</LI></UL>
</LI><LI CLASS="li-itemize">Databases
<UL CLASS="itemize"><LI CLASS="li-itemize">
Internal database for fast deployment (Mnesia).
</LI><LI CLASS="li-itemize">Native MySQL support.
</LI><LI CLASS="li-itemize">Native PostgreSQL support.
</LI><LI CLASS="li-itemize">ODBC data storage support.
</LI><LI CLASS="li-itemize">Microsoft SQL Server support. </LI></UL>
</LI><LI CLASS="li-itemize">Authentication
<UL CLASS="itemize"><LI CLASS="li-itemize">
Internal Authentication.
</LI><LI CLASS="li-itemize">PAM, LDAP and ODBC. </LI><LI CLASS="li-itemize">External Authentication script.
</LI></UL>
</LI><LI CLASS="li-itemize">Others
<UL CLASS="itemize"><LI CLASS="li-itemize">
Support for virtual hosting.
</LI><LI CLASS="li-itemize">Compressing XML streams with Stream Compression (<A HREF="http://www.xmpp.org/extensions/xep-0138.html">XEP-0138</A>).
</LI><LI CLASS="li-itemize">Statistics via Statistics Gathering (<A HREF="http://www.xmpp.org/extensions/xep-0039.html">XEP-0039</A>).
</LI><LI CLASS="li-itemize">IPv6 support both for c2s and s2s connections.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0045.html">Multi-User Chat</A> module with support for clustering and HTML logging. </LI><LI CLASS="li-itemize">Users Directory based on users vCards.
</LI><LI CLASS="li-itemize"><A HREF="http://www.xmpp.org/extensions/xep-0060.html">Publish-Subscribe</A> component with support for <A HREF="http://www.xmpp.org/extensions/xep-0163.html">Personal Eventing via Pubsub</A>.
</LI><LI CLASS="li-itemize">Support for web clients: <A HREF="http://www.xmpp.org/extensions/xep-0025.html">HTTP Polling</A> and <A HREF="http://www.xmpp.org/extensions/xep-0206.html">HTTP Binding (BOSH)</A> services.
</LI><LI CLASS="li-itemize">IRC transport.
</LI><LI CLASS="li-itemize">Component support: interface with networks such as AIM, ICQ and MSN installing special tranports.
</LI></UL>
</LI></UL><!--CUT END -->
<!--HTMLFOOT-->
<!--ENDHTML-->
<!--FOOTER-->
<HR SIZE=2><BLOCKQUOTE CLASS="quote"><EM>This document was translated from L<sup>A</sup>T<sub>E</sub>X by
</EM><A HREF="http://hevea.inria.fr/index.html"><EM>H</EM><EM><FONT SIZE=2><sup>E</sup></FONT></EM><EM>V</EM><EM><FONT SIZE=2><sup>E</sup></FONT></EM><EM>A</EM></A><EM>.</EM></BLOCKQUOTE></BODY>
</HTML>
-136
View File
@@ -1,136 +0,0 @@
\documentclass[a4paper,10pt]{article}
%% Packages
\usepackage{epsfig}
\usepackage{fancyhdr}
\usepackage{graphics}
\usepackage{hevea}
\usepackage[pdftex,colorlinks,unicode,urlcolor=blue,linkcolor=blue,pdftitle=Ejabberd\
Feature\ Sheet,pdfauthor=Sander\
Devrieze,pdfsubject=ejabberd,pdfkeywords=ejabberd]{hyperref}
\usepackage{verbatim}
\usepackage{color}
%% Index
% Remove the index anchors from the HTML version to save size and bandwith.
\newcommand{\ind}[1]{\begin{latexonly}\index{#1}\end{latexonly}}
%% Images
\newcommand{\logoscale}{0.7}
\newcommand{\imgscale}{0.58}
\newcommand{\insimg}[1]{\insscaleimg{\imgscale}{#1}}
\newcommand{\insscaleimg}[2]{
\imgsrc{#2}{}
\begin{latexonly}
\scalebox{#1}{\includegraphics{#2}}
\end{latexonly}
}
%% Various
\newcommand{\bracehack}{\def\{{\char"7B}\def\}{\char"7D}}
\newcommand{\titem}[1]{\item[\bracehack\texttt{#1}]}
\newcommand{\ns}[1]{\texttt{#1}}
\newcommand{\jid}[1]{\texttt{#1}}
\newcommand{\option}[1]{\texttt{#1}}
\newcommand{\poption}[1]{{\bracehack\texttt{#1}}}
\newcommand{\node}[1]{\texttt{#1}}
\newcommand{\term}[1]{\texttt{#1}}
\newcommand{\shell}[1]{\texttt{#1}}
\newcommand{\ejabberd}{\texttt{ejabberd}}
\newcommand{\Jabber}{Jabber}
%% Title page
\include{version}
\title{Ejabberd \version\ Feature Sheet}
\author{Sander Devrieze \\
\ahrefurl{mailto:s.devrieze@pandora.be} \\
\ahrefurl{xmpp:sander@devrieze.dyndns.org}}
% Options
\newcommand{\marking}[1]{\textbf{\begin{large}\textcolor{ejblue}{#1}\end{large}}} % Marking enabled
\newcommand{\quoting}[2][yozhik]{\begin{quotation}\textcolor{#1}{\textit{#2}}\end{quotation}} % Quotes enabled
\newcommand{\new}{\marginpar{\textcolor{red}{\textsc{new}}}} % Highlight new features
\newcommand{\improved}{\marginpar{\textcolor{orange}{\textsc{improved}}}} % Highlight improved features
\setcounter{secnumdepth}{-1} % Disable section numbering
%% To by-pass errors in the HTML version.
\newstyle{SPAN}{width:20\%; float:right; text-align:left; margin-left:auto;}
\definecolor{orange} {cmyk}{0.000,0.333,1.000,0.000}
%% Footnotes
\begin{latexonly}
\global\parskip=9pt plus 3pt minus 1pt
\global\parindent=0pt
\gdef\ahrefurl#1{\href{#1}{\texttt{#1}}}
\gdef\footahref#1#2{#2\footnote{\href{#1}{\texttt{#1}}}}
\end{latexonly}
\newcommand{\txepref}[2]{\footahref{http://www.xmpp.org/extensions/xep-#1.html}{#2}}
\newcommand{\xepref}[1]{\txepref{#1}{XEP-#1}}
%% Fancy header
\fancyhf{}
\pagestyle{fancy}
\rhead{\textcolor{ejblue}{The Expandable Jabber/XMPP Daemon.}}
\renewcommand{\headrule}{{\color{ejblue}%
\hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}
\lhead{\setlength{\unitlength}{-6mm}
\begin{picture}(0,0)
\put(5.8,3.25){\includegraphics[width=1.3\textwidth]{yozhikheader.png}}
\end{picture}}
% Official ejabberd colours
\definecolor{ejblue} {cmyk}{1.000,0.831,0.000,0.537} %RGB: 0,0,118 HTML: 000076
\definecolor{ejgreenyellow}{cmyk}{0.079,0.000,0.275,0.102} %RGB: 209,229,159 HTML: d1e59f
\definecolor{ejgreendark} {cmyk}{0.131,0.000,0.146,0.220} %RGB: 166,199,162 HTML: a6c7a2
\definecolor{ejgreen} {cmyk}{0.077,0.000,0.081,0.078} %RGB: 216,236,215 HTML: d8ecd7
\definecolor{ejgreenwhite} {cmyk}{0.044,0.000,0.048,0.020} %RGB: 239,250,238 HTML: effaee
\definecolor{yozhik} {cmyk}{0.000,0.837,1.000,0.424} %RGB: 147,0,0 HTML: 930000
\begin{document}
\label{titlepage}
\begin{titlepage}
\maketitle{}
\thispagestyle{empty}
\begin{center}
{\insscaleimg{\logoscale}{logo.png}
\par
}
\end{center}
\quoting{I can thoroughly recommend ejabberd for ease of setup --
Kevin Smith, Current maintainer of the Psi project}
\end{titlepage}
\newpage
% Set the page counter to 2 so that the titlepage and the second page do not
% have the same page number. This fixes the PDFLaTeX warning "destination with
% the same identifier".
\begin{latexonly}
\setcounter{page}{2}
\pagecolor{ejgreenwhite}
\end{latexonly}
% Input introduction.tex
\input{introduction}
\end{document}
%% TODO
% * illustrations (e.g. screenshot from web interface)
% * commented parts
% * slides, guide and html version
% * cleaning and improving LaTeX code
% * key features: something like this (shorter)? (more focussed on Erlang now): "To reach the goal of high
% availability, performance and clustering, ejabberd is written in Erlang, a programming language perfectly
% suited for this. Besides that, some parts are written in C to also incude the advantages of this language. In
% short, ejabberd is a perfect mix of mainly Erlang code, peppered with some C code to get the final touch!"
% <picture of a cocktail>
% * key features: saying that ejabberd the only XMPP server is that can do real clustering:
% http://www.jivesoftware.org/forums/thread.jspa?threadID=14602
% "What I find interesting is that *no* XMPP servers truly provide clustering. This includes all the commercial
% servers. The one partial exception appears to be ejabberd, which can cluster certain data such as sessions,
% but not all services such as MUC."
% * try it today: links to migration tutorials
-105
View File
@@ -1,105 +0,0 @@
digraph messages {
//concentrate=true;
subgraph clusterclients {
client1 [shape = box];
client2 [shape = box];
client3 [shape = box];
style = dashed;
label = "Clients";
}
subgraph clusternode1 {
subgraph clusterc2s1 {
c2s11;
c2s12;
style = invis;
}
subgraph clusterservices1 {
service11;
service12;
service13;
style = invis;
}
//subgraph clusters2s1 {
//s2s11;
//s2s12;
//style = invis;
//}
c2s11 -> auth1;
c2s12 -> auth1;
auth1 -> c2s11;
auth1 -> c2s12;
c2s11 -> sm1;
c2s11 -> router1;
c2s12 -> sm1;
c2s12 -> router1;
router1 -> local1;
router1 -> service11;
router1 -> service12;
router1 -> service13;
router1 -> s2s11;
router1 -> s2s12;
service11 -> router1;
service12 -> router1;
service13 -> router1;
s2s11 -> router1;
s2s12 -> router1;
local1 -> sm1;
sm1 -> c2s11;
sm1 -> c2s12;
style = dashed;
label = "Node1";
}
subgraph clusternode2 {
c2s2 -> auth2;
auth2 -> c2s2;
c2s2 -> sm2;
c2s2 -> router2;
router2 -> local2;
router2 -> service21;
router2 -> s2s21;
service21 -> router2;
s2s21 -> router2;
local2 -> sm2;
sm2 -> c2s2;
style = dashed;
label = "Node2";
}
subgraph clusterservers {
server1 [shape = box];
server2 [shape = box];
server3 [shape = box];
style = dashed;
label = "Servers";
}
client1 -> c2s11;
client2 -> c2s12;
client3 -> c2s2;
c2s11 -> client1 [constraint=false];
c2s12 -> client2 [constraint=false];
c2s2 -> client3 [constraint=false];
s2s11 -> server1 [minlen = 2];
s2s12 -> server2 [minlen = 2];
s2s21 -> server3 [minlen = 2];
server1 -> s2s11 [constraint=false];
server2 -> s2s12 [constraint=false];
server3 -> s2s21 [constraint=false];
router1 -> router2;
router2 -> router1;
sm1 -> sm2;
sm2 -> sm1;
label = "Data Flows";
}
-4523
View File
File diff suppressed because it is too large Load Diff
-6020
View File
File diff suppressed because it is too large Load Diff
-133
View File
@@ -1,133 +0,0 @@
\chapter{Introduction}
\label{intro}
%% TODO: improve the feature sheet with a nice table to highlight new features.
\quoting{I just tried out ejabberd and was impressed both by ejabberd itself and the language it is written in, Erlang. ---
Joeri}
%ejabberd is a free and open source instant messaging server written in Erlang. ejabberd is cross-platform, distributed, fault-tolerant, and based on open standards to achieve real-time communication (Jabber/XMPP).
\ejabberd{} is a \marking{free and open source} instant messaging server written in \footahref{http://www.erlang.org/}{Erlang/OTP}.
\ejabberd{} is \marking{cross-platform}, distributed, fault-tolerant, and based on open standards to achieve real-time communication.
\ejabberd{} is designed to be a \marking{rock-solid and feature rich} XMPP server.
\ejabberd{} is suitable for small deployments, whether they need to be \marking{scalable} or not, as well as extremely big deployments.
%\subsection{Layout with example deployment (title needs a better name)}
%\label{layout}
%In this section there will be a graphical overview like these:\\
%\verb|http://www.tipic.com/var/timp/timp_dep.gif| \\
%\verb|http://www.jabber.com/images/jabber_Com_Platform.jpg| \\
%\verb|http://www.antepo.com/files/OPN45systemdatasheet.pdf| \\
%A page full with names of Jabber client that are known to work with ejabberd. \begin{tiny}tiny font\end{tiny}
%\subsection{Try It Today}
%\label{trytoday}
%(Not sure if I will include/finish this section for the next version.)
%\begin{itemize}
%\item Erlang REPOS
%\item Packages in distributions
%\item Windows binary
%\item source tar.gz
%\item Migration from Jabberd14 (and so also Jabberd2 because you can migrate from version 2 back to 14) and Jabber Inc. XCP possible.
%\end{itemize}
\newpage
\section{Key Features}
\label{keyfeatures}
\ind{features!key features}
\quoting{Erlang seems to be tailor-made for writing stable, robust servers. ---
Peter Saint-Andr\'e, Executive Director of the Jabber Software Foundation}
\ejabberd{} is:
\begin{itemize}
\item \marking{Cross-platform:} \ejabberd{} runs under Microsoft Windows and Unix derived systems such as Linux, FreeBSD and NetBSD.
\item \marking{Distributed:} You can run \ejabberd{} on a cluster of machines and all of them will serve the same \Jabber{} domain(s). When you need more capacity you can simply add a new cheap node to your cluster. Accordingly, you do not need to buy an expensive high-end machine to support tens of thousands concurrent users.
\item \marking{Fault-tolerant:} You can deploy an \ejabberd{} cluster so that all the information required for a properly working service will be replicated permanently on all nodes. This means that if one of the nodes crashes, the others will continue working without disruption. In addition, nodes also can be added or replaced `on the fly'.
\item \marking{Administrator Friendly:} \ejabberd{} is built on top of the Open Source Erlang. As a result you do not need to install an external database, an external web server, amongst others because everything is already included, and ready to run out of the box. Other administrator benefits include:
\begin{itemize}
\item Comprehensive documentation.
\item Straightforward installers for Linux, Mac OS X, and Windows. %%\improved{}
\item Web Administration.
\item Shared Roster Groups.
\item Command line administration tool. %%\improved{}
\item Can integrate with existing authentication mechanisms.
\item Capability to send announce messages.
\end{itemize}
\item \marking{Internationalized:} \ejabberd{} leads in internationalization. Hence it is very well suited in a globalized world. Related features are:
\begin{itemize}
\item Translated to 25 languages. %%\improved{}
\item Support for \footahref{http://www.ietf.org/rfc/rfc3490.txt}{IDNA}.
\end{itemize}
\item \marking{Open Standards:} \ejabberd{} is the first Open Source Jabber server claiming to fully comply to the XMPP standard.
\begin{itemize}
\item Fully XMPP compliant.
\item XML-based protocol.
\item \footahref{http://www.ejabberd.im/protocols}{Many protocols supported}.
\end{itemize}
\end{itemize}
\newpage
\section{Additional Features}
\label{addfeatures}
\ind{features!additional features}
\quoting{ejabberd is making inroads to solving the "buggy incomplete server" problem ---
Justin Karneges, Founder of the Psi and the Delta projects}
Moreover, \ejabberd{} comes with a wide range of other state-of-the-art features:
\begin{itemize}
\item Modular
\begin{itemize}
\item Load only the modules you want.
\item Extend \ejabberd{} with your own custom modules.
\end{itemize}
\item Security
\begin{itemize}
\item SASL and STARTTLS for c2s and s2s connections.
\item STARTTLS and Dialback s2s connections.
\item Web Admin accessible via HTTPS secure access.
\end{itemize}
\item Databases
\begin{itemize}
\item Internal database for fast deployment (Mnesia).
\item Native MySQL support.
\item Native PostgreSQL support.
\item ODBC data storage support.
\item Microsoft SQL Server support. %%\new{}
\end{itemize}
\item Authentication
\begin{itemize}
\item Internal Authentication.
\item PAM, LDAP and ODBC. %%\improved{}
\item External Authentication script.
\end{itemize}
\item Others
\begin{itemize}
\item Support for virtual hosting.
\item Compressing XML streams with Stream Compression (\xepref{0138}).
\item Statistics via Statistics Gathering (\xepref{0039}).
\item IPv6 support both for c2s and s2s connections.
\item \txepref{0045}{Multi-User Chat} module with support for clustering and HTML logging. %%\improved{}
\item Users Directory based on users vCards.
\item \txepref{0060}{Publish-Subscribe} component with support for \txepref{0163}{Personal Eventing via Pubsub}.
\item Support for web clients: \txepref{0025}{HTTP Polling} and \txepref{0206}{HTTP Binding (BOSH)} services.
\item IRC transport.
\item Component support: interface with networks such as AIM, ICQ and MSN installing special tranports.
\end{itemize}
\end{itemize}
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

-62
View File
@@ -1,62 +0,0 @@
Release notes
ejabberd 0.9.1
This document describes the main changes from [25]ejabberd 0.9.
The code can be downloaded from the [26]download page.
For more detailed information, please refer to ejabberd [27]User Guide.
Groupchat (Multi-user chat and IRC) improvements
The multi-user chat code has been improved to comply with the latest version
of Jabber Enhancement Proposal 0045.
The IRC (Internet Relay Chat) features now support WHOIS and USERINFO
requests.
Web interface
ejabberd modules management features have been added to the web interface.
They now allow to start or stop extension module without restarting the
ejabberd server.
Publish and subscribe
It is now possible to a subscribe node with a JabberID that includes a
resource.
Translations
A new script has been included to help translate ejabberd into new languages
and maintain existing translations.
As a result, ejabberd is now translating into 10 languages:
* Dutch
* English
* French
* German
* Polish
* Portuguese
* Russian
* Spanish
* Swedish
* Ukrainian
Migration
No changes have been made to the database. No particular conversion steps
are needed. However, you should backup your database before upgrading to a
new ejabberd version.
Bugfixes
This release contains several bugfixes and architectural changes. Please
refer to the Changelog file supplied with this release for details of all
improvements in the ejabberd code.
-99
View File
@@ -1,99 +0,0 @@
Release notes
ejabberd 0.9.8
2005-08-01
This document describes the main changes in ejabberd 0.9.8. This
version prepares the way for the release of ejabberd 1.0, which
is due later this year.
The code can be downloaded from the Process-one website:
http://www.process-one.net/en/projects/ejabberd/
For more detailed information, please refer to ejabberd User Guide
on the Process-one website:
http://www.process-one.net/en/projects/ejabberd/docs.html
Recent changes include....
Enhanced virtual hosting
Virtual hosting applies to many more setting options and
features and is transparent. Virtual hosting accepts different
parameters for different virtual hosts regarding the following
features: authentication method, access control lists and access
rules, users management, statistics, and shared roster. The web
interface gives access to each virtual host's parameters.
Enhanced Publish-Subscribe module
ejabberd's Publish-Subscribe module integrates enhancements
coming from J-EAI, an XMPP-based integration server built on
ejabberd. ejabberd thus supports Publish-Subscribe node
configuration. It is possible to define nodes that should be
persistent, and the number of items to persist. Besides that, it
is also possible to define various notification parameters, such
as the delivery of the payload with the notifications, and the
notification of subscribers when some changes occur on items.
Other examples are: the maximum size of the items payload, the
subscription approvers, the limitation of the notification to
online users only, etc.
Code reorganisation and update
- The mod_register module has been cleaned up.
- ODBC support has been updated and several bugs have been fixed.
Development API
To ease the work of Jabber/XMPP developers, a filter_packet hook
has been added. As a result it is possible to develop plugins to
filter or modify packets flowing through ejabberd.
Translations
- Translations have been updated to support the new Publish-Subscribe features.
- A new Brazilian Portuguese translation has been contributed.
Web interface
- The CSS stylesheet from the web interface is W3C compliant.
Installers
Installers are provided for Microsoft Windows and Linux/x86. The
Linux installer includes Erlang ASN.1 modules for LDAP
authentication support.
Bugfixes
- This release contains several bugfixes and architectural
changes. Among other bugfixes include improvements in LDAP
authentication. Please refer to the ChangeLog file supplied
with this release regarding all improvements in ejabberd.
References
The ejabberd feature sheet helps comparing with other Jabber/XMPP
servers:
http://www.process-one.net/en/projects/ejabberd/docs/features.pdf
Contributed tutorials of interest are:
- Migration from Jabberd1.4 to ejabberd:
http://ejabberd.jabber.ru/jabberd1-to-ejabberd
- Migration from Jabberd2 to ejabberd:
http://ejabberd.jabber.ru/jabberd2-to-ejabberd
- Transport configuration for connecting to other networks:
http://ejabberd.jabber.ru/tutorials-transports
END
-88
View File
@@ -1,88 +0,0 @@
Release notes
ejabberd 0.9
This document describes the major new features of and changes to
ejabberd 0.9, compared to latest public release ejabber 0.7.5.
For more detailed information, please refer to ejabberd User
Guide.
Virtual Hosting
ejabberd now can host several domain on the same instance.
This option is enabled by using:
{hosts, ["erlang-projects.org", "erlang-fr.org"]}.
instead of the previous host directive.
Note that you are now using a list of hosts. The main one should
be the first listed. See migration section further in this release
note for details.
Shared Roster
Shared roster is a new feature that allow the ejabberd
administrator to add jabber user that will be present in the
roster of every users on the server.
Shared roster are enabled by adding:
{mod_shared_roster, []}
at the end of your module list in your ejabberd.cfg file.
PostgreSQL (ODBC) support
This feature is experimental and not yet properly documented. This
feature is released for testing purpose.
You need to have Erlang/OTP R10 to compile with ODBC on various
flavour of *nix. You should use Erlang/OTP R10B-4, as this task
has became easier with this release. It comes already build in
Erlang/OTP Microsoft Windows binary.
PostgreSQL support is enabled by using the following module in
ejabberd.cfg instead of their standard counterpart:
mod_last_odbc.erl
mod_offline_odbc.erl
mod_roster_odbc.erl
The database schema is located in the src/odbc/pq.sql file.
Look at the src/ejabberd.cfg.example file for more information on
how to configure ejabberd with odbc support. You can get support
on how to configure ejabberd with a relational database.
Migration from ejabberd 0.7.5
Migration is pretty straightforward as Mnesia database schema
conversions is handled automatically. Remember however that you
must backup your ejabberd database before migration.
Here are the following steps to proceed:
1. Stop your instance of ejabberd.
2. In ejabberd.cfg, define the host lists. Change the host
directive to the hosts one:
Before:
{host, "erlang-projects.org"}.
After:
{hosts, ["erlang-projects.org", "erlang-fr.org"]}.
Note that when you restart the server the existing users will be
affected to the first virtual host, so the order is important. You
should keep the previous hostname as the first virtual host.
3. Restart ejabberd.
Bugfixes
This release contains several bugfixes and architectural changes.
Please refer to the Changelog file supplied with this release for
details of all improvements in the ejabberd code.
-120
View File
@@ -1,120 +0,0 @@
Release Notes
ejabberd 1.0.0
14 December 2005
This document describes the main changes in ejabberd 1.0.0. Unique in this
version is the compliancy with the XMPP (eXtensible Messaging and Presence
Protocol) standard. ejabberd is the first Open Source Jabber server claiming
to fully comply to the XMPP standard.
ejabberd can be downloaded from the Process-one website:
http://www.process-one.net/en/projects/ejabberd/
Detailed information can be found in the ejabberd Feature Sheet and User
Guide which are available on the Process-one website:
http://www.process-one.net/en/projects/ejabberd/docs.html
Recent changes include:
Server-to-server Encryption for Enhanced Security
- Support for STARTTLS and SASL EXTERNAL to secure server-to-server traffic
has been added.
- Also, STARTTLS and Dialback has been implemented for server-to-server (s2s)
connections. Detailed information about these new features can be found on
http://ejabberd.jabber.ru/s2s-encryption
- commonName and dNSName fields matching were introduced to ease the process
of retrieving certificates.
- Different certificates can be defined for each virtual host.
ODBC Support
- ODBC support has been improved to allow production use of ejabberd with
relational databases.
- Support for vCard storage in ODBC has been added.
- ejd2odbc.erl is a tool to convert an installation from Erlang's database
Mnesia to an ODBC compatible relational database.
Native PostgreSQL Support
- Native PostgreSQL support gives you a better performance when you use
PostgreSQL.
Shared Roster groups
- Shared Roster groups support has been enhanced. New is the ability to add
all registered users to everyone's roster. Detailed information about this
new feature can be found on http://ejabberd.jabber.ru/shared-roster-all
Web Interface
- The web interface internal code has been modified for better integration
and compliancy with J-EAI, an ejabberd-based Enterprise Application
Integration platform.
- More XHTML 1.0 Transitional compliancy work was done.
Transports
- A transport workaround can be enabled during compilation. To do this, you
can pass the "--enable-roster-gateway-workaround" option to the configure
script. (./configure --enable-roster-gateway-workaround)
This option allows transports to add items with subscription "to" in the
roster by sending <presence type='subscribed'/> stanza to user. This option
is only needed for JIT ICQ transport.
Warning: by enabling this option, ejabberd will not be fully XMPP compliant
anymore.
Documentation and Internationalization
- Documentation has been extended to cover more topics.
- Translations have been updated.
Bugfixes
- This release contains several bugfixes.
- Among other bugfixes include improvements to the client-to-server (c2s)
connection management module.
- Please refer to the ChangeLog file supplied
with this release regarding all improvements in ejabberd.
Installation Notes
Supported Erlang Version
- You need at least Erlang/OTP R9C to run ejabberd 1.0.0.
Installation
Installers are provided for Microsoft Windows and Linux/x86.
Installers can be retrieved from:
http://www.process-one.net/en/projects/ejabberd/download.html
Migration Notes
- Before any migration, ejabberd system and database must be properly
backed up.
- When upgrading an ODBC-based installation, you will need to change the
relational database schema. The following SQL commands must be run on the
database:
CREATE SEQUENCE spool_seq_seq;
ALTER TABLE spool ADD COLUMN seq integer;
ALTER TABLE spool ALTER COLUMN seq SET DEFAULT nextval('spool_seq_seq');
UPDATE spool SET seq = DEFAULT;
ALTER TABLE spool ALTER COLUMN seq SET NOT NULL;
References
Contributed tutorials of interest are:
- Migration from Jabberd1.4 to ejabberd:
http://ejabberd.jabber.ru/jabberd1-to-ejabberd
- Migration from Jabberd2 to ejabberd:
http://ejabberd.jabber.ru/jabberd2-to-ejabberd
- Transport configuration for connecting to other networks:
http://ejabberd.jabber.ru/tutorials-transports
END
-115
View File
@@ -1,115 +0,0 @@
Release Notes
ejabberd 1.1.0
24 April 2006
This document describes the main changes in ejabberd 1.1.0. This version
introduce new features including support for new Jabber Enhancement
Proposals and several performance improvements enabling deployments on an
even larger scale than already possible.
ejabberd can be downloaded from the Process-one website:
http://www.process-one.net/en/projects/ejabberd/
Detailed information can be found in the ejabberd Feature Sheet and User
Guide which are available on the Process-one website:
http://www.process-one.net/en/projects/ejabberd/docs.html
A complete list of changes is available from:
http://support.process-one.net/secure/ReleaseNote.jspa?projectId=10011&styleName=Html&version=10025
Recent changes include:
New Jabber Enhancement Proposal support:
- JEP-0050: Ad-Hoc Commands.
- JEP-0138: Stream Compression.
- JEP-0175: SASL anonymous.
Anonymous login
- SASL anonymous.
- Anonymous login for clients that do not yet support SASL Anonymous.
Relational database Support
- MySQL is now fully supported through ODBC and in native mode.
- Various improvements to the native database interfaces.
- The migration tool can use relational databases.
Multi-User Chat improvements
- Logging of room discussion to text file is now supported.
- Better reconfiguration support.
- Security oriented fixes.
- Several improvements and updates to latest JEP-0045.
Performance scalability improvements for large clusters
- Improved session synchronisation management between cluster nodes.
- Internal architecture has been reworked to use generalize Erlang/OTP
framework usage.
- Speed improvement on logger.
- TCP/IP packet reception change for better network throttling and
regulation.
As a result, these improvements will reduce load on large scale deployments.
XMPP Protocol related improvements
- XML stanza size can be limited.
- Messages are send to all resources with the same highest priority.
Documentation and Internationalization
- Documentation has been extended to cover more topics.
- Translations have been updated.
Web interface
- XHTML 1.0 compliance.
Bugfixes
- This release contains many bugfixes on various areas such as Publish-Subscribe, build
chain, installers, IRC gateway, ejabberdctl, amongst others.
- Please refer to the ChangeLog file supplied with this release regarding
all improvements in ejabberd.
Installation Notes
Supported Erlang Version
- You need at least Erlang/OTP R9C-2 to run ejabberd 1.1.0.
Installation
Installers are provided for Microsoft Windows, Linux/x86 and MacOSX/PPC.
Installers can be retrieved from:
http://www.process-one.net/en/projects/ejabberd/download.html
Migration Notes
- Before any migration, ejabberd system and database must be properly
backed up.
- The database schema has not been changed comparing to version 1.0.0 and
consequently it does not require any migration.
References
Contributed tutorials and documents of interest are:
- Migration from Jabberd1.4, Jabberd2 and WPJabber to ejabberd:
http://ejabberd.jabber.ru/migrate-to-ejabberd
- Transport configuration for connecting to other networks:
http://ejabberd.jabber.ru/tutorials-transports
- Using ejabberd with MySQL native driver:
http://support.process-one.net/doc/display/MESSENGER/Using+ejabberd+with+MySQL+native+driver
- Anonymous User Support:
http://support.process-one.net/doc/display/MESSENGER/Anonymous+users+support
- Frequently Asked Questions:
http://ejabberd.jabber.ru/faq
END
-119
View File
@@ -1,119 +0,0 @@
Release Notes
ejabberd 1.1.1
28 April 2006
This document describes the main changes in ejabberd 1.1.x. This version
introduce new features including support for new Jabber Enhancement
Proposals and several performance improvements enabling deployments on an
even larger scale than already possible.
This release fix a security issue introduced in ejabberd 1.1.0. In SASL
mode, anonymous login was enabled as a default. Upgrading ejabberd 1.1.0 to
ejabberd 1.1.1 is highly recommended.
ejabberd can be downloaded from the Process-one website:
http://www.process-one.net/en/projects/ejabberd/
Detailed information can be found in the ejabberd Feature Sheet and User
Guide which are available on the Process-one website:
http://www.process-one.net/en/projects/ejabberd/docs.html
A complete list of changes is available from:
http://support.process-one.net/secure/ReleaseNote.jspa?projectId=10011&styleName=Html&version=10025
Recent changes include:
New Jabber Enhancement Proposal support:
- JEP-0050: Ad-Hoc Commands.
- JEP-0138: Stream Compression.
- JEP-0175: SASL anonymous.
Anonymous login
- SASL anonymous.
- Anonymous login for clients that do not yet support SASL Anonymous.
Relational database Support
- MySQL is now fully supported through ODBC and in native mode.
- Various improvements to the native database interfaces.
- The migration tool can use relational databases.
Multi-User Chat improvements
- Logging of room discussion to text file is now supported.
- Better reconfiguration support.
- Security oriented fixes.
- Several improvements and updates to latest JEP-0045.
Performance scalability improvements for large clusters
- Improved session synchronisation management between cluster nodes.
- Internal architecture has been reworked to use generalize Erlang/OTP
framework usage.
- Speed improvement on logger.
- TCP/IP packet reception change for better network throttling and
regulation.
As a result, these improvements will reduce load on large scale deployments.
XMPP Protocol related improvements
- XML stanza size can be limited.
- Messages are send to all resources with the same highest priority.
Documentation and Internationalization
- Documentation has been extended to cover more topics.
- Translations have been updated.
Web interface
- XHTML 1.0 compliance.
Bugfixes
- This release contains many bugfixes on various areas such as Publish-Subscribe, build
chain, installers, IRC gateway, ejabberdctl, amongst others.
- Please refer to the ChangeLog file supplied with this release regarding
all improvements in ejabberd.
Installation Notes
Supported Erlang Version
- You need at least Erlang/OTP R9C-2 to run ejabberd 1.1.0.
Installation
Installers are provided for Microsoft Windows, Linux/x86 and MacOSX/PPC.
Installers can be retrieved from:
http://www.process-one.net/en/projects/ejabberd/download.html
Migration Notes
- Before any migration, ejabberd system and database must be properly
backed up.
- The database schema has not been changed comparing to version 1.0.0 and
consequently it does not require any migration.
References
Contributed tutorials and documents of interest are:
- Migration from Jabberd1.4, Jabberd2 and WPJabber to ejabberd:
http://ejabberd.jabber.ru/migrate-to-ejabberd
- Transport configuration for connecting to other networks:
http://ejabberd.jabber.ru/tutorials-transports
- Using ejabberd with MySQL native driver:
http://support.process-one.net/doc/display/MESSENGER/Using+ejabberd+with+MySQL+native+driver
- Anonymous User Support:
http://support.process-one.net/doc/display/MESSENGER/Anonymous+users+support
- Frequently Asked Questions:
http://ejabberd.jabber.ru/faq
END
-119
View File
@@ -1,119 +0,0 @@
Release Notes
ejabberd 1.1.2
27 September 2006
This document describes the main changes in ejabberd 1.1.2.
This version is a major improvement over ejabberd 1.1.1, improving the
overall behaviour of the server in many areas. Users of ejabberd 1.1.1
should upgrade to this new release for improved robustness and compliance.
ejabberd can be downloaded from the Process-one website:
http://www.process-one.net/en/projects/ejabberd/
Detailed information can be found in the Feature Sheet and in the
Installation and Operation Guide which are both available on the
Process-one website:
http://www.process-one.net/en/projects/ejabberd/docs.html
ejabberd includes 44 improvements. A complete list of changes can be
retrieved from:
http://redir.process-one.net/ejabberd-1.1.2
Recent changes include:
LDAP Improvements
- Major improvements have been made on the LDAP module. It is now more
flexible and more robust.
HTTP Polling Fixes
- The HTTP polling modules have been fixed and improved: the connections are
closed properly and polled messages cannot be lost anymore.
Roster Management Improvement
- Roster management improvements increase reliability, especially in cases
where users are on different servers.
- Shared rosters are more reliable.
Improved Robustness
- It is now possible to limit the number of opened connections for a single
user.
Relational databases
- Database support: Microsoft SQL Server is now officially supported in ODBC
mode.
Publish-Subscribe Improvement
- Restricting node creation with a dedicated ACL rule is now possible.
Localization
- A Czech translation has been added.
- Translations have been updated.
Binary Installer
- New binary installer for Windows including all requirements.
- Improved installers for Linux and MacOSX (PowerPC)
XMPP Compliancy
- Some protocol compliance fix have been added, after the Portland XMPP
Interop Meeting in July.
Miscelanous
- MUC have been improved (logging rendering).
- The command line tool ejabberdctl has been improved.
- The build chain has been improved, including MacOSX support.
- The documentation has been improved and updated to describe the new
features.
Bugfixes
- Anonymous login bugfixes.
- Please refer to the ChangeLog file supplied with this release regarding
all improvements in ejabberd.
Installation Notes
Supported Erlang Version
- You need at least Erlang/OTP R9C-2 to run ejabberd 1.1.2.
- The recommanded version is Erlang/OTP R10B-10.
- Erlang/OTP R11B has not yet been fully certified for ejabberd.
Installation
Installers are provided for Microsoft Windows, Linux/x86 and MacOSX/PPC.
They can be retrieved from:
http://www.process-one.net/en/projects/ejabberd/download.html
Migration Notes
- Before any migration, ejabberd system and database must be properly
backed up.
- The relational database schema has changed between version 1.1.1 and
1.1.2. An "askmessage" column needs to be added in the "rosterusers" table
to perform the migration.
References
Contributed tutorials and documents of interest are:
- Migration from other XMPP servers to ejabberd:
http://ejabberd.jabber.ru/migrate-to-ejabberd
- Transport configuration for connecting to other networks:
http://ejabberd.jabber.ru/tutorials-transports
- Frequently Asked Questions:
http://ejabberd.jabber.ru/faq
END
-14
View File
@@ -1,14 +0,0 @@
Release Notes
ejabberd 1.1.3
2 February 2007
ejabberd 1.1.3 is a security fix release for ejabberd roster ODBC
module.
The upgrade is only necessary if you are using ejabberd with the
mod_roster_odbc.
The new code can be downloaded from ejabberd download page:
http://www.process-one.net/en/projects/ejabberd/
END
-31
View File
@@ -1,31 +0,0 @@
Release Notes
ejabberd 1.1.4
3 september 2007
ejabberd 1.1.4 is a bugfix release for ejabberd 1.1.x branch.
ejabberd 1.1.4 includes 10 improvements. A complete list of changes
can be retrieved from:
http://redir.process-one.net/ejabberd-1.1.4
The new code can be downloaded from ejabberd download page:
http://www.process-one.net/en/projects/ejabberd/
Recent changes include:
- Better LDAP support.
- Support for UTF-8 with MySQL 5.
- Roster migration script bugfixes.
- Performance improvements on user removal.
- Traffic shapers bugfix.
- Configuration: host value is now case insensitive.
- Build: ejabberd.cfg file is not overwritten with 'make install' command.
Bugs report
You can officially report bugs on Process-one support site:
http://support.process-one.net/
END
-208
View File
@@ -1,208 +0,0 @@
Release Notes
ejabberd 2.0.0
21 February 2008
ejabberd 2.0.0 is a major new version for ejabberd adding plenty of
new features, performance and scalability improvements and
architectural changes.
ejabberd 2.0.0 includes more than 200 improvements over ejabberd
1.1.x. A complete list of changes can be retrieved from:
http://redir.process-one.net/ejabberd-2.0.0
The new code can be downloaded from ejabberd downloads page:
http://www.process-one.net/en/ejabberd/
Recent changes include:
* Clustering and Architecture
- New front-end and back-end cluster architecture for better
scalability and robustness. Back-end nodes are able to run a fully
fault-tolerant XMPP router and services, but you can now deploy
many front-end nodes to share the load without needing to synchronize
any state with the back-ends.
- All components now run in cluster mode (For example, Multi-User chat
service and file transfer proxy).
- New load balancing algorithm to support Multi-User chat and gateways
clustering. More generally it supports any external component load
balancing.
- ejabberd watchdog to receive warning on suspicious resources consumption.
- Traffic shapers are now supported on components. This protect
ejabberd from components and gateways abuses.
* Publish and Subscribe
- Complete rewrite of the PubSub module. The new PubSub module is
plugin-based, allowing developers to create new nodes type. Any
application can be plugged to ejabberd and can provide rich presence
as a pubsub plugin.
- Personal Eventing via Pubsub support (XEP-0163). This module is
implemented as a PubSub service. It supports user mood (XEP-107),
User Tune (XEP-118), user location (XEP-0080) or user avatar
(XEP-0084) for example.
* Server to Server (s2s)
- More robust code with connection timeout implementation.
- Support for multiple s2s connections per domain.
- s2s whitelist and blacklist support.
- s2s retrial interval.
* LDAP
- Many enterprise-class enhancements such as better behaviour under
heavy load.
- Support for LDAP servers pool.
- Simplified use of virtual hosting with LDAP with domain substitution
in config.
- Ability to match on several userid attributes.
* Multi-User Chat
- Clustering and load balancing support.
- Ability to define default room configuration in ejabberd config file.
- Many anti abuse features have been added:
. New ACL to limit the creation of persistent room to authorized users.
. Ability to define the maximum number of users per room.
. Limitation of the rate of message and presence packets.
. Limitation of the maximum number of room a user can join at the same time.
* File Transfer
- XEP-0065 - Proxy65 file transfer proxy. The proxy can run in
cluster mode.
* Authentication
- PAM (Pluggable Authentication Modules) support on *nix systems.
- External Authentication protocol is now fully documented.
* Web Client Support
- XEP-0124 - BOSH support: BOSH (Bidirectional-streams Over
Synchronous HTTP) was formerly known as "HTTP binding". It provides
an efficient alternative to HTTP polling for scalable Web based chat
solutions.
- HTTP module can now serve static documents (with
mod_http_fileserver). It is needed for high-performance Web 2.0 chat
/ IM application. System administrators can now avoid using a proxy
(like Apache) that handles much less simultaneous than ejabberd HTTP
module.
- Added limitations enforcement on HTTP poll and HTTP bind modules
(bandwidth, packet size).
* System Administration
- XEP-0133 - Service administration support. System administrators can
now perform lot of ejabberd related admin tasks from their XMPP
client, through adhoc commands.
- Dynamic log levels: Improved logging with more log levels. You can
now change the loglevel at run time. No performance penalty is
involved when less verbose levels are used.
- The ejabberdctl command-line administration script now can start
and stop ejabberd. It also includes other useful options.
* Localization
- ejabberd is now translated to 24 languages: Catalan, Chinese, Czech,
Dutch, English, Esperanto, French, Galician, German, Italian, Japanese,
Norwegian, Polish, Portuguese, Portuguese (Brazil), Russian, Slovak,
Spanish, Swedish, Thai, Turkish, Ukrainian, Vietnamese, Walloon.
* Build and Installer
- Many launch script improvements.
- New translations. The binary installer is now available in Chinese,
Dutch, English, French, German, Spanish, Russian.
- Makefile now implements uninstall command.
- Full MacOSX compliance in Makefile.
- Configure script is clever at finding libraries in unusual places.
* Development API
- Several hooks have been added for module developers (most notably
presence related hooks).
- HTTP request handler to write HTTP based plugins.
- Manage connections IP address.
* Bugfixes
- ejabberd 2.0.0 also fixes numerous small bugs :) Read the full
changelog for details.
Important Note:
- Since this release, ejabberd requires Erlang R10B-5 or higher.
R11B-5 is the recommended version. R12 is not yet officially
supported, and is not recommended for production servers.
Upgrading From ejabberd 1.x:
- If you upgrade from a version older than 1.1.4, please check the
Release Notes of the intermediate versions for additional
information about database or configuration changes.
- The database schemas didn't change since ejabberd 1.1.4. Of course,
you are encouraged to make a database backup of your SQL database,
or your Mnesia spool directory before upgrading ejabberd.
- The ejabberdctl command line administration script is improved in
ejabberd 2.0.0, and now it can start and stop ejabberd. If you
already wrote your own start script for ejabberd 1.x, you can
continue using it, or try ejabberdctl. For your convenience, the
ejabberd Guide describes all the ejabberd and Erlang options used by
ejabberdctl.
- The example ejabberd.cfg file has been reorganized, but its format
and syntax rules are the same. So, you can continue using your
ejabberd.cfg file from 1.x if you want. The most important changes
are described now.
- The 'ssl' option is no longer available in the listening ports. For
legacy SSL encryption use the option 'tls'. For STARTTLS encryption
as defined in RFC 3920 XMPP-CORE use the option 'starttls'. Check
the ejabberd Guide for more information about configuring listening
ports.
- The options 'welcome_message' and 'registration_watchers' are now
options of the module mod_register. Check in the ejabberd Guide how
to configure that module.
- To enable PEP support in mod_pubsub, you need to enable it in the
mod_pubsub configuration, and also enable the new module
mod_caps. Check the section about mod_pubsub in the ejabberd Guide.
- Other new features and improvements also require changes in the
ejabberd.cfg, like mod_http_bind, mod_http_fileserver, mod_proxy65,
loglevel, pam_service, and watchdog_admins. Search for those words
in the ejabberd Guide and the example ejabberd.cfg.
Bug Reports
You can officially report bugs on Process-one support site:
https://support.process-one.net/
END
-30
View File
@@ -1,30 +0,0 @@
Release Notes
ejabberd 2.0.1
20 May 2008
ejabberd 2.0.1 is a bugfix release for ejabberd 2.0.x branch.
ejabberd 2.0.1 includes 10 improvements and 32 bugfixes.
A complete list of changes can be retrieved from:
http://redir.process-one.net/ejabberd-2.0.1
The new code can be downloaded from ejabberd download page:
http://www.process-one.net/en/projects/ejabberd/
Recent changes include:
- Erlang R12 support.
- Better LDAP handling.
- PubSub bugfixes.
- Documentation improvements.
- inband registration limitation per IP.
- s2s improvements.
Bugs report
You can officially report bugs on Process-one support site:
http://support.process-one.net/
END
-34
View File
@@ -1,34 +0,0 @@
Release Notes
ejabberd 2.0.2
28 August 2008
ejabberd 2.0.2 is the second bug fix release for ejabberd 2.0.x branch.
ejabberd 2.0.2 includes many bugfixes and a few improvements.
A complete list of changes can be retrieved from:
http://redir.process-one.net/ejabberd-2.0.2
The new code can be downloaded from ejabberd download page:
http://www.process-one.net/en/ejabberd/
Recent changes include:
- Anti-abuse feature: client blacklist support by IP.
- Guide: new section Securing ejabberd; improved usability.
- LDAP filter optimisation: ability to filter user in ejabberd and not LDAP.
- MUC improvements: room options to restrict visitors; broadcast reasons.
- Privacy rules: fix MySQL storage.
- Pub/Sub and PEP: many improvements in implementation and protocol compliance.
- Proxy65: send valid SOCKS5 reply (removed support for Psi < 0.10).
- Web server embedded: better support for HTTPS.
- Binary installers: SMP on Windows; don't remove config when uninstalling.
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
END
-35
View File
@@ -1,35 +0,0 @@
Release Notes
ejabberd 2.0.3
14 January 2009
ejabberd 2.0.3 is the third bugfix release for ejabberd 2.0.x branch.
ejabberd 2.0.3 includes several bugfixes and a few improvements.
A complete list of changes can be retrieved from:
http://redir.process-one.net/ejabberd-2.0.3
The new code can be downloaded from ejabberd download page:
http://www.process-one.net/en/ejabberd/
Recent changes include:
- Do not ask certificate for client (c2s)
- Check digest-uri in SASL digest authentication
- Use send timeout to avoid locking on gen_tcp:send
- Fix ejabberd reconnection to database
- HTTP-Bind: handle wrong order of packets
- MUC: Improve traffic regulation management
- PubSub: Several bugfixes and improvements for best coverage of XEP-0060 v1.12
- Shared Roster Groups: push immediately membership changes
- Rotate also sasl.log on "reopen-log" command
- Binary Windows installer: better detect "Error running Post Install Script"
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
END
-44
View File
@@ -1,44 +0,0 @@
Release Notes
ejabberd 2.0.4
ejabberd 2.0.4 is the fourth bugfix release for ejabberd 2.0.x branch.
ejabberd 2.0.4 includes several bugfixes.
A detailed list of changes can be retrieved from:
http://redir.process-one.net/ejabberd-2.0.4
The new code can be downloaded from ejabberd download page:
http://www.process-one.net/en/ejabberd/
The changes are:
- Ensure ID attribute in roster push is unique
- Authentication: Fix Anonymous auth when enabled with broken ODBC
- Authentication: Unquote correctly backslash in DIGEST-MD5 SASL responses
- Authentication: Cancel presence subscriptions on account deletion
- LDAP: Close a connection on tcp_error
- LDAP: Implemented queue for pending queries
- LDAP: On failure of LDAP connection, waiting is done on pending queue
- MUC: Owner of a password protected room must also provide the password
- MUC: Prevent XSS in MUC logs by linkifying only a few known protocols
- Privacy rules: Items are now processed in the specified order
- Privacy rules: Fix to correctly block subscription requests
- Proxy65: If ip option is not defined, take an IP address of a local hostname
- PubSub: Add roster subscription handling; send PEP events to all resources
- PubSub: Allow node creation without configure item
- PubSub: Requesting items on a node which exists, but empty returns an error
- PEP: Fix sending notifications to other domains and s2s
- S2S: Fix problem with encrypted connection to Gtalk and recent Openfire
- S2S: Workaround to get DNS SRV lookup to work on Windows machine
- Shared Roster Groups: Fix to not resend authorization request
- WebAdmin: Fix encryption problem for ejabberd_http after timeout
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
END
-33
View File
@@ -1,33 +0,0 @@
Release Notes
ejabberd 2.0.5
ejabberd 2.0.5 is the fifth bugfix release in ejabberd 2.0.x branch.
ejabberd 2.0.5 includes three bugfixes.
More details of those fixes can be retrieved from:
http://redir.process-one.net/ejabberd-2.0.5
The new code can be downloaded from ejabberd download page:
http://www.process-one.net/en/ejabberd/
The changes are:
- Fix two problems introduced in ejabberd 2.0.4: subscription request
produced many authorization requests with some clients and
transports; and subscription requests were not stored for later
delivery when receiver was offline.
- Fix warning in expat_erl.c about implicit declaration of x_fix_buff
- HTTP-Bind (BOSH): Fix a missing stream:error in the returned
remote-stream-error stanza
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
END
-281
View File
@@ -1,281 +0,0 @@
Release Notes
ejabberd 2.1.0
ejabberd 2.1.0 is a major new version for ejabberd adding many
new features, performance and scalability improvements.
ejabberd 2.1.0 includes many new features, improvements and bug fixes.
A complete list of changes can be retrieved from:
http://redir.process-one.net/ejabberd-2.1.0
The new code can be downloaded from ejabberd download page:
http://www.process-one.net/en/ejabberd/
New features and improvements:
* Anti-abuse
- Captcha support (XEP-0158). The example script uses ImageMagick.
- New option: registration_timeout to limit registrations by time
- Use send timeout to avoid locking on gen_tcp:send
- mod_ip_blacklist: client blacklist support by IP
* API
- ejabberd_http provides Host, Port, Headers and Protocol in HTTP requests
- Export function to create MUC room
- New events: s2s_send_packet and s2s_receive_packet
- New event: webadmin_user_parse_query when POST in web admin user page
- Support distributed hooks over the cluster
* Authentification
- Extauth responses: log strange responses and add timeout
* Binary Installer
- Includes exmpp library to support import/export XML files
* Caps
- Remove useless caps tables entries
- mod_caps must handle correctly external contacts with several resources
- Complain if mod_caps disabled and mod_pubsub has PEP plugin enabled
* Clustering and Architecture
* Configuration
- Added option access_max_user_messages for mod_offline
- Added option backlog for ejabberd_listener to increase TCP backlog
- Added option define_macro and use_macro
- Added option include_config_file to include additional configuration files
- Added option max_fsm_queue
- Added option outgoing_s2s_options to define IP address families and timeout
- Added option registration_timeout to ejabberd.cfg.example
- Added option s2s_dns_options to define DNS timeout and retries
- Added option ERL_OPTIONS to ejabberdctl.cfg
- Added option FIREWALL_WINDOW to ejabberdctl.cfg
- Added option EJABBERD_PID_PATH to ejabberdctl.cfg
- Deleted option user_max_messages of mod_offline
- Check certfiles are readable on server start and listener start
- Config file management mix file reading and sanity check
- Include example PAM configuration file: ejabberd.pam
- New ejabberd listener: ejabberd_stun
- Support to bind the same port to multiple interfaces
- New syntax to specify the IP address and IPv6 in listeners
configuration. The old options {ip,{1,2,3,4}} and inet6 are
supported even if they aren't documented.
- New syntax to specify the network protocol: tcp or udp
- Report error at startup if a listener module isn't available
- Only listen in a port when actually ready to serve requests
- In default config, only local accounts can create rooms and PubSub nodes
* Core architecture
- More verbose error reporting for xml:element_to_string
- Deliver messages when first presence is Invisible
- Better log message when config file is not found
- Include original timestamp on delayed presences
* Crypto
- Do not ask certificate for client (c2s)
- SSL code remove from ejabberd in favor of TLS
- Support Zlib compression after STARTTLS encryption
- tls v1 client hello
* Documentation
- Document possible default MUC room options
- Document service_check_from in the Guide
- Document s2s_default_policy and s2s_host in the Guide
- new command and guide instructions to change node name in a Mnesia database
* ejabberd commands
- ejabberd commands: separate command definition and calling interface
- access_commands restricts who can execute what commands and arguments
- ejabberdctl script now displays help and categorization of commands
* HTTP Binding and HTTP Polling
- HTTP-Bind: module optimization and clean-up
- HTTP-Bind: allow configuration of max_inactivity timeout
- HTTP-Poll: turn session timeout into a config file parameter
* Jingle
- STUN server that facilitates the client-to-client negotiation process
* LDAP
- Faster reconnection to LDAP servers
- LDAP filter optimisation: Add ability to filter user in ejabberd and not LDAP
- LDAP differentiates failed auth and unavailable auth service
- Improve LDAP logging
- LDAPS support using TLS.
* Localization
- Use Gettext PO for translators, export to ejabberd MSG
- Support translation files for additional projects
- Most translations are updated to latest code
- New translation to Greek language
* Multi-User Chat (MUC)
- Allow admins to send messages to rooms
- Allow to store room description
- Captcha support in MUC: the admin of a room can configure it to
require participants to fill a captcha to join the room.
- Limit number of characters in Room ID, Name and Description
- Prevent unvoiced occupants from changing nick
- Support Result Set Management (XEP-0059) for listing rooms
- Support for decline of invitation to MUC room
- mod_muc_log options: plaintext format; filename with only room name
* Performance
- Run roster_get_jid_info only if privacy list has subscription or group item
- Significant PubSub performance improvements
* Publish-Subscribe
- Add nodetree filtering/authorization
- Add subscription option support for collection nodes
- Allow Multiple Subscriptions
- Check option of the nodetree instead of checking configuration
- Implement whitelist authorize and roster access model
- Implicit item deletion is not notified when deleting node
- Make PubSub x-data configuration form handles list value
- Make default node name convention XEP-compatible, document usage of hierarchy
- Node names are used verbatim, without separating by slash, unless a
node plugin uses its own separator
- Send authorization update event (XEP-0060, 8.6)
- Support of collection node subscription options
- Support ODBC storage. Experimental, needs more testing.
* Relational databases:
- Added MSSQL 2000 and 2005
- Privacy rules storage in MySQL
- Implement reliable ODBC transaction nesting
* Source Package
- Default installation directories changed. Please see the upgrade notes below.
- Allow more environment variable overrides in ejabberdctl
- ChangeLog is not edited manually anymore; it's generated automatically.
- Install the ejabberd Guide
- Install the ejabberd include files
- New option for the 'configure' script: --enable-user which installs
ejabberd granting permission to manage it to a regular system user;
no need to use root account to.
- Only try to install epam if pam was enabled in configure script
- Spool, config and log dirs: owner writes, group reads, others do nothing.
- Provides an example ejabberd.init file
* S2S
- Option to define s2s outgoing behaviour: IPv4, IPv6 and timeout
- DNS timeout and retries, configurable with s2s_dns_options.
* Shared rosters
- When a member is added/removed to group, send roster upgrade to group members
* Users management
- When account is deleted, cancel presence subscription for all roster items
* XEP Support
- Added XEP-0059 Result Set Management (for listing rooms)
- Added XEP-0082 Date Time
- Added XEP-0085 Chat State Notifications
- Added XEP-0157 Contact Addresses for XMPP Services
- Added XEP-0158 CAPTCHA Forms (in MUC rooms)
- Added STUN server, for XEP-0176: Jingle ICE-UDP Transport Method
- Added XEP-0199 XMPP Ping
- Added XEP-0202 Entity Time
- Added XEP-0203 Delayed Delivery
- Added XEP-0227 Portable Import/Export Format for XMPP-IM Servers
- Added XEP-0237 Roster Versioning
* Web Admin
- Display the connection method of user sessions
- Cross link of ejabberd users in the list of users and rosters
- Improved the browsing menu: don't disappear when browsing a host or node
- Include Last-Modified HTTP header in responses to allow caching
- Make some Input areas multiline: options of listening ports and modules
- Support PUT and DELETE methods in ejabberd_http
- WebAdmin serves Guide and links to related sections
* Web plugins
- mod_http_fileserver: new option directory_indices, and improve logging
Important Notes:
- ejabberd 2.1.0 requires Erlang R10B-9 or higher.
R12B-5 is the recommended version. Support for R13B is experimental.
Upgrading From ejabberd 1.x.x:
- Check the Release Notes of the intermediate versions for additional
information about database or configuration changes.
Upgrading From ejabberd 2.0.x:
- The database schemas have three changes since ejabberd 2.0.x.
Check the database creation SQL files and update your database.
1) New table roster_version to support roster versioning.
2) Six new tables for optional pubsub ODBC storage.
3) Some tables in the MySQL database have a new created_at column.
- As usual, it is recommended to backup the Mnesia spool directory and
your SQL database (if used) before upgrading ejabberd.
- Between ejabberd 2.0.0 and 2.0.5, mod_pubsub used "default" as the
default node plugin. But in 2.1.0 this is renamed to "hometree".
You have to edit your ejabberd config file and replace those names.
If you used ejabberd 2.0.5 or older, the database will be updated
automatically. But if you were using ejabberd from SVN, you must
manually run ejabberdctl with the command: rename_default_nodeplugin.
Running this command on already updated database does nothing.
- The listener options 'ip' and 'inet6' are not documented anymore
but they are supported and you can continue using them.
There is a new syntax to define IP address and IP version.
As usual, check the ejabberd Guide for more information.
- The log file sasl.log is now called erlang.log
- ejabberdctl commands now have _ characters instead of -.
For backwards compatibility, it is still supported -.
- mod_offline has a new option: access_max_user_messages.
The old option user_max_messages is no longer supported.
- If you upgrade from ejabberd trunk SVN, you must execute this:
$ ejabberdctl rename_default_nodeplugin
- Default installation directories changed a bit:
* The Mnesia spool files that were previously stored in
/var/lib/ejabberd/db/NODENAME/*
are now stored in
/var/lib/ejabberd/*
* The directories
/var/lib/ejabberd/ebin
/var/lib/ejabberd/priv
and their content is now installed as
/lib/ejabberd/ebin
/lib/ejabberd/priv
* There is a new directory with Erlang header files:
/lib/ejabberd/include
* There is a new directory for ejabberd documentation,
which includes the Admin Guide and the release notes::
/share/doc/ejabberd
- How to upgrade from previous version to ejabberd 2.1.0:
1. Stop the old instance of ejabberd.
2. Run 'make install' of new ejabberd 2.1.0 to create the new directories.
3. Copy the content of your old directory:
/var/lib/ejabberd/db/NODENAME/
to the new location:
/var/lib/ejabberd/
so you will have the files like this:
/var/lib/ejabberd/acl.DCD ...
4. You can backup the content of those directories and delete them:
/var/lib/ejabberd/ebin
/var/lib/ejabberd/priv
/var/lib/ejabberd/db
5. Now try to start your new ejabberd 2.1.0.
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-47
View File
@@ -1,47 +0,0 @@
Release Notes
ejabberd 2.1.1
ejabberd 2.1.1 is the first bugfix release in ejabberd 2.1.x branch.
ejabberd 2.1.1 includes several important bugfixes.
More details of those fixes can be retrieved from:
http://redir.process-one.net/ejabberd-2.1.1
The new code can be downloaded from ejabberd download page:
http://www.process-one.net/en/ejabberd/
The changes are:
* Core
- Call ejabberd_router:route/3 instead of sending a message
- Can't connect if starttls_required and zlib are set
- Routes vCard request to the occupant full JID, but should to bare JID
- S2S: fix allow_host/2 on subdomains. added hook s2s_allow_host
* MUC
- Support converting one-to-one chat to MUC
- Add support for serving a Unique Room Name
* Publish Subscribe
- Receive same last published PEP items at reconnect if several resources online
- Typo in mod_pubsub_odbc breaks Service Discovery and more
* Web
- Fix memory and port leak when TLS is enabled in HTTP
- WebAdmin doesn't report correct last activity with postgresql backend
- Option to define custom HTTP headers in mod_http_fileserver
- Show informative webpage when browsing the HTTP-Poll page
* Other
- Change captcha.sh to not depend on bash
- Generate main XML file also when exporting only a vhost
- Fix last newline in ejabberdctl result
- Guide: fix -setcookie, mod_pubsub_odbc host, content_types
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-39
View File
@@ -1,39 +0,0 @@
Release Notes
ejabberd 2.1.10
ejabberd 2.1.10 includes a few bugfixes and improvements.
Read more details about the changes in:
http://redir.process-one.net/ejabberd-2.1.10
Download the source code and installers from:
http://www.process-one.net/en/ejabberd/
The major changes are:
* Erlang/OTP compatibility
- Support Erlang/OTP R15B regexp and drivers (EJAB-1521)
- Fix modules update in R14B04 and higher
- Fix modules update of stripped beams (EJAB-1520)
* XMPP Core
- Fix presence problem in C2S after first unavailable (EJAB-1466)
- Fix bug on S2S shaper when TLS is used
- Prevent overload of incoming S2S connections
* XEPs
- BOSH: Get rid of useless mnesia transaction (EJAB-1502)
- MUC: Don't reveal invitee resource when room informs invitor
- Privacy: Activate "Blocked Contacts" to current c2s connection (EJAB-1519)
- Privacy: Always allow packets from user's server and bare jid (EJAB-1441)
- Pubsub: Add hooks for node creation/deletion (EJAB-1470)
- Shared Rosters: support groupname@vhost in Displayed Groups (EJAB-506)
- Vcard: Fix error when lowercasing some search results (EJAB-1490)
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-58
View File
@@ -1,58 +0,0 @@
Release Notes
ejabberd 2.1.11
ejabberd 2.1.11 includes a few bugfixes and improvements.
Read more details about the changes in:
http://redir.process-one.net/ejabberd-2.1.11
Download the source code and installers from:
http://www.process-one.net/en/ejabberd/
The major changes are:
* HTTP service
- Fix ejabberd_http:get_line
- Don't use binary:match to extract lines from binaries
- Parse and encode https header names like native http parser does
- Parse correctly https request split into multiple packets
- Properly handle HEAD request in mod_http_bind (EJAB-1538)
- New option default_host for handling requests with ambiguous Host (EJAB-1261)
* ODBC
- New ODBC support for mod_announce
- New ODBC support for mod_blocking
- New ODBC support for mod_irc
- New ODBC support for mod_muc
- New ODBC support for mod_shared_roster
- New ODBC support for mod_vcard_xupdate
- Add ODBC exporting function for privacy table
- Work also with some unicode strings in PgSQL (EJAB-1490)
- Replace a single quote with double quotes in an ODBC escape
* SSL
- Make sure that res is initialized in all cases
- Parse correctly https request split into multiple packets (EJAB-1537)
- Added missed tls:recv_data/2
- Don't ignore Length parameter in tls:recv
- Avoid quadratic behavior in reading SSL data
- Dix http_bind webserver TLS fail on Chrome (EJAB-1530)
* Miscelanea
- Assume we have only one CPU when an auto-detection fails (EJAB-1516)
- Auth: Relax digest-uri handling (EJAB-1529)
- Caps: Cache caps timestamp before the IQ-request is done
- IRC: Use of MUC password
- Private: misc errors cases fixes
- Pubsub: return user affiliation for a specified node (EJAB-1294)
- Shared Roster: Foreign items were not pushed (EJAB-1509)
- Shared Roster LDAP: user substitution in ldap_rfilter (EJAB-1555)
- Windows: Fix makefile rules for building DLLs
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-67
View File
@@ -1,67 +0,0 @@
Release Notes
ejabberd 2.1.12
ejabberd 2.1.12 includes a many bugfixes and a few improvements.
Read more details about the changes in:
http://redir.process-one.net/ejabberd-2.1.12
Download the source code and installers from:
http://www.process-one.net/en/ejabberd/
The changes are:
* Core ejabberd
- Make terms serialization faster
- Reduce size of XML stream state
* Administration
- Add SCRAM and remove MD5 support to ejabberd commands auth verification
- Added command to list all the vhosts registered in an ejabberd node
- Added export2odbc command, copied from mod_admin_extra.erl
- Fix ejabberdctl number of arguments error report with R15
- Check node name is available before starting ejabberd (EJAB-1572)
- Fix ejabberd_xmlrpc commands authentication with SCRAM
- Fix mod_offline:store_offline_msg argument (EJAB-1581)
- Log IP address when auth attempt fails
- Make sure update_info returns atoms only (EJAB-1595)
- On shutdown, first stop listeners, then modules
* Encryption
- Detect OpenSSL version at runtime, not at compile time
- Fixed signedness issue in tls_drv GET_DESCRYPTED_INPUT (EJAB-1591)
- Enable DHE key exchange in TLS driver
- Enable ECDHE key exchange in TSL driver
- Disable old and unsecure ciphers in TLS driver
- Disable SSL 2.0 in TLS driver
* HTTP-Bind
- Do not trigger item-not-found errors in mod_http_bind
- Repeated http-bind request should abort only requests with same rid
- Receiving missing request shouldn't close waiting out-ouf-order request
* XMPP
- Allow multiple fqdn values in configuration (EJAB-1578)
- Fix get_subscription_lists/4
- Fix account registration
- Send announce Message stanzas as Headline type instead of Normal
* Other
- Guide: Fix file name of Name Service Switch
- Guide: Document the db_type modules option (EJAB-1560)
- LDAP: Fix broken JPEG photo (EJAB-1526)
- LDAP: Fix compatibility with Erlang R16A (EJAB-1612)
- MUC: Fix angle brackets handle in plaintext log (EJAB-1610)
- MUC: Fix MUC start when Mnesia tables don't exist yet
- MUC: New mod_muc_log option file_permissions (EJAB-1588)
- ODBC: Merge SQL and Mnesia code into one module (EJAB-1560)
- Translation: New Hebrew
- Translation: Update Slovak
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-51
View File
@@ -1,51 +0,0 @@
Release Notes
ejabberd 2.1.2
ejabberd 2.1.2 is the second bugfix release in ejabberd 2.1.x branch.
ejabberd 2.1.2 includes several bugfixes.
More details of those fixes can be retrieved from:
http://redir.process-one.net/ejabberd-2.1.2
The new code can be downloaded from ejabberd download page:
http://www.process-one.net/en/ejabberd/
The major changes are:
* Core
- Close sessions that were half connected
- Fix SASL PLAIN authentication message for RFC4616 compliance
- Fix support for old Erlang/OTP R10 and R11
- Return proper error (not 'conflict') when register is forbidden by ACL
- When ejabberd stops, send stream close to clients
* ejabberdctl
- Check for EGID in ejabberdctl command
- Command to stop ejabberd informing users, with grace period
- If there's a problem in config file, display config lines and stop node
* MUC
- Kick occupants with reason when room is stopped due to MUC shutdown
- Write in room log when a room is created, destroyed, started, stopped
* PubSub and PEP
- Don't call gen_server on internal event (improves performance and scalability)
- Fix duplicate SHIM header in Pubsub message
- Notification messages of Pubsub node config change contained a SHIM header
- SubID SHIM header missing in Pubsub message with multiple
subscriptions on the same node
- PEP: last published item not sent from unavailable users when the
subscription is implicit (XEP-0115)
- pep_mapping not working due to Node type mismatch
* WebAdmin
- If big offline message queue, show only subset on WebAdmin
- Support in user list page of WebAdmin when mod_offline is disabled
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-91
View File
@@ -1,91 +0,0 @@
Release Notes
ejabberd 2.1.3
ejabberd 2.1.3 is the third release in ejabberd 2.1.x branch.
ejabberd 2.1.3 includes many bugfixes, and some improvements.
More details of those fixes can be retrieved from:
http://redir.process-one.net/ejabberd-2.1.3
The new code can be downloaded from ejabberd download page:
http://www.process-one.net/en/ejabberd/
This is the full list of changes:
* Client connections
- Avoid 'invalid' value in iq record
- Avoid resending stream:error stanzas on terminate (EJAB-1180)
- Close also legacy sessions that were half connected (EJAB-1165)
- iq_query_info/1 now returns 'invalid' if XMLNS is invalid
- New ejabberd_c2s option support: max_fsm_queue
- Rewrite mnesia counter functions to use dirty_update_counter (EJAB-1177)
- Run user_receive_packet also when sending offline messages (EJAB-1193)
- Use p1_fsm behaviour in c2s FSM (EJAB-1173)
* Clustering
- Fix cluster race condition in route read
- New command to set master Mnesia node
- Use mnesia:async_dirty when cleaning table from failed node
* Documentation
- Add quotes in documentation of some erl arguments (EJAB-1191)
- Add option access_from (EJAB-1187)
- Add option max_fsm_queue (EJAB-1185)
- Fix documentation installation, no need for executable permission (EJAB-1170)
- Fix typo in EJABBERD_BIN_PATH (EJAB-891)
- Fix typos in example config comments (EJAB-1192)
* ejabberdctl
- Support concurrent connections with bound connection names
- Add support for Jot in ctl and TTY in debug
- Support help command names with old - characters
- Fix to really use the variable ERL_PROCESSES
* Erlang compatibility
- Don't call queue:filter/2 to keep compatibility with older Erlang versions
- Use alternative of file:read_line/1 to not require R13B02
* HTTP
- Add new debugging hook to the http receiving process
- Allow a request_handler to serve a file in root of HTTP
* HTTP-Bind (BOSH)
- Cross-domain HTTP-Bind support (EJAB-1168)
- Hibernate http-bind process after handling a request
- Reduce verbosity of HTTP Binding log messages
* LDAP
- Document ldap_dn_filter, fetch only needed attributes in search (EJAB-1204)
- Use "%u" pattern as default for ldap_uids (EJAB-1203)
* Localization
- Fix German translation (EJAB-1195)
- Fix Russian translation
* ODBC
- Fix MSSQL support, which was broken (EJAB-1201)
- Improved SQL reconnect behaviour
* Pubsub, PEP and Caps
- Add extended stanza addressing 'replyto' on PEP (EJAB-1198)
- Add pubsub#purge_offline (EJAB-1186)
- Fix pubsub#title option (EJAB-1190)
- Fix remove_user for node subscriptions (EJAB-1172)
- Optimizations in mod_caps
* Other
- mod_register: Add new acl access_from, default is to deny
- mod_sic: new module for the experimental XEP-0279 Server IP Check (EJAB-1205)
- PIEFXIS: Catch errors when exporting to PIEFXIS file (EJAB-1178)
- Proxy65: new option "hostname" (EJAB-838)
- Roster: Fix resending authorization problem
- Shared Roster Groups: get contacts nickname from vcard (EJAB-114)
- S2S: Improved s2s connections clean up (EJAB-1202)
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-80
View File
@@ -1,80 +0,0 @@
Release Notes
ejabberd 2.1.4
ejabberd 2.1.4 is the fourth release in ejabberd 2.1.x branch,
and includes many small bugfixes and improvements.
Read more details about the changes in:
http://redir.process-one.net/ejabberd-2.1.4
Download the source code and installers from:
http://www.process-one.net/en/ejabberd/
This is the full list of changes:
* Authentication
- Extauth: Optionally cache extauth users in mnesia (EJAB-641)
- LDAP: Allow inband password change (EJAB-199)
- LDAP: Extensible match support (EJAB-722)
- LDAP: New option ldap_tls_verify is added (EJAB-1229)
- PAM: New option pam_userinfotype to provide username or JID (EJAB-652)
* HTTP
- Add xml default content type
- Don't show HTTP request in logs, because reveals password (EJAB-1231)
- Move HTTP session timeout log from warning level to info
- New Access rule webadmin_view for read-only
* HTTP-Bind (BOSH)
- Change max inactivity from 30 to 120 seconds
- Export functions to facilitate prebinding methods
- Use dirty_delete when removing the session
- Remove an unneeded delay of 100 milliseconds
* Pubsub, PEP and Caps
- Enforce pubsub#presence_based_delivery (EJAB-1221)
- Enforce pubsub#show_values subscription option (EJAB-1096)
- Fix error code when unsubscribing from a non-existent node
- Fix to send node notifications (EJAB-1225)
- Full support for XEP-0115 v1.5 (EJAB-1223)(EJAB-1189)
- Make last_item_cache feature to be cluster aware
- Prevent orphaned pubsub node (EJAB-1233)
- Send created node notifications
* Other
- Bounce messages when closing c2s session
- Bugfixes when handling Service Discovery to contacts (EJAB-1207)
- Compilation of ejabberd_debug.erl is now optional
- Don't send error stanza as reply to error stanza (EJAB-930)
- Don't store blocked messages in offline queue
- Reduce verbosity of log when captcha_cmd is checked but not configured
- Use a standard method to get a random seed (EJAB-1229)
- Commands: new update_list and update to update modified modules (EJAB-1237)
- Localization: Updated most translations
- MUC: Refactor code to reduce calls to get_affiliation and get_role
- ODBC: Add created_at column also to PostgreSQL schema
- Vcard: Automatic vcard avatar addition in presence
Upgrading From previous ejabberd releases:
- If you use PostgreSQL, maybe you want to add the column created_at
to several tables. This is only a suggestion; ejabberd doesn't use
that column. Add it to your existing database executing those SQL
statements:
ALTER TABLE users ADD COLUMN created_at TIMESTAMP NOT NULL DEFAULT now();
ALTER TABLE rosterusers ADD COLUMN created_at TIMESTAMP NOT NULL DEFAULT now();
ALTER TABLE spool ADD COLUMN created_at TIMESTAMP NOT NULL DEFAULT now();
ALTER TABLE vcard ADD COLUMN created_at TIMESTAMP NOT NULL DEFAULT now();
ALTER TABLE privacy_list ADD COLUMN created_at TIMESTAMP NOT NULL DEFAULT now();
ALTER TABLE privacy_storage ADD COLUMN created_at TIMESTAMP NOT NULL DEFAULT now();
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-70
View File
@@ -1,70 +0,0 @@
Release Notes
ejabberd 2.1.5
ejabberd 2.1.5 is the fifth release in ejabberd 2.1.x branch,
and includes several minor bugfixes and a few improvements.
Read more details about the changes in:
http://redir.process-one.net/ejabberd-2.1.4
Download the source code and installers from:
http://www.process-one.net/en/ejabberd/
This is the full list of changes:
* Authentication
- Extauth: Support parallel script running (EJAB-1280)
- mod_register: Return Registered element when account exists
* ejabberdctl
- Fix print of command result that contains ~
- Fix problem when FIREWALL_WINDOW options for erl kernel were used
- Fix typo in update_list command (EJAB-1237)
- Some systems delete the lock dir; in such case don't use flock at all
- The command Update now returns meaningful message and exit-status (EJAB-1237)
* HTTP-Bind (BOSH)
- Don't say v1.2 in the Bind HTTP page
- New optional BOSH connection attribute process-delay (EJAB-1257)
* MUC
- Document the mod_muc option captcha_protected
- Now admins are able to see private rooms in disco (EJAB-1269)
- Show some more room options in the log file
* ODBC
- Correct handling of SQL boolean types (EJAB-1275)
- Discard too old queued requests (the caller has already got a timeout)
- Fixes wrong SQL escaping when --enable-full-xml is set
- Use ets insead of asking supervisor in ejabberd_odbc_sup:get_pids/1
* Pubsub, PEP and Caps
- Enforce disco features results (EJAB-1033, EJAB-1228, EJAB-1238)
- Support all the hash functions required by Caps XEP-0115
* Requirements
- Fixed support for Erlang R12; which doesn't support: true andalso ok
- Support OTP R14A by using public_key library instead of old ssl (EJAB-953)
- Requirement of OpenSSL increased from 0.9.6 to 0.9.8
- OpenSSL is now required, not optional
* Other
- Don't ask for client certificate when using tls (EJAB-1267)
- Fix typo in --enable-transient_supervisors
- Fix privacy check when serving local Last (EJAB-1271)
- Inform client that SSL session caching is disabled
- New configure option: --enable-nif
- Use driver allocator in C files for reflecting memory in erlang:memory(system)
- Debug: New p1_prof compiled with: make debugtools=true
- Debug: Added functions to collect stats about queues, memory, reductions etc
- HTTP: Log error if request has ambiguous Host header (EJAB-1261)
- Logs: When logging s2s out connection attempt or success, log if TLS is used
- Shared Rosters: When account is deleted, delete also member of stored rosters
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-67
View File
@@ -1,67 +0,0 @@
Release Notes
ejabberd 2.1.6
ejabberd 2.1.6 is the sixth release in ejabberd 2.1.x branch,
and includes a lot of bugfixes and improvements.
Read more details about the changes in:
http://redir.process-one.net/ejabberd-2.1.6
Download the source code and installers from:
http://www.process-one.net/en/ejabberd/
Some of the changes are:
* Account register
- mod_register: New ip_access option restricts which IPs can register (EJAB-915)
- mod_register: Default configuration allows registrations only from localhost
- mod_register: New password_strength for entropy check (EJAB-1326)
- mod_register: New captcha_protected option to require CAPTCHA (EJAB-1262)
- mod_register_web: New module, with CAPTCHA support (EJAB-471)
* BOSH
- Don't loop when there is nothing after a stream start (EJAB-1358)
- Fix http-bind supervisor to support multiple vhosts (EJAB-1321)
- Support to restart http-bind (EJAB-1318)
- Support for X-Forwarded-For HTTP header (EJAB-1356)
* Erlang/OTP compatibility
- R11: Fix detection of Erlang R11 and older (EJAB-1287)
- R12B5: Fix compatibility in ejabberd_http_bind.erl (EJAB-1343)
- R14A: Make xml.c correctly compile (EJAB-1288)
- R14A, R14B: Disapprove the use of R14A and R14B due to the rwlock bug
- R14B: Use pg2 from this version in systems with older ones (EJAB-1349)
* Listeners
- Bind listener ports early and start accepting connections later
- Fix a leak of ejabberd_receiver processes
- Speed up ejabberd_s2s:is_service/2, allow_host/2 (EJAB-1319)
- S2S: New option to require encryption (EJAB-495)
- S2S: New option to reject connection if untrusted certificate (EJAB-464)
- S2S: Include From attribute in the stream header of outgoing S2S connections
- S2S: Fix domain_certfile tlsopts modifications for S2S connections (EJAB-1086)
* Pubsub/PEP/Caps
- Fix pubsub cross domain eventing (EJAB-1340)
- Use one_queue IQ discipline by default
- Implement lifetime for broken hashes
- New CAPS processing
* ODBC
- Increase maximum restart strategy to handle some SQL timeouts
- Support PostgreSQL 9.0 (EJAB-1359)
- Use MEDIUMTEXT type for vcard avatars in MySQL schema (EJAB-1252)
* Miscellanea:
- mod_shared_roster_ldap: New Shared Roster Groups using LDAP information
- mod_privacy: Fix to allow block by group and subscription again
- Support timezone West of UTC (EJAB-1301)
- Support to change loglevel per module at runtime (EJAB-225)
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-97
View File
@@ -1,97 +0,0 @@
Release Notes
ejabberd 2.1.7
ejabberd 2.1.7 is the eighth release in ejabberd 2.1.x branch,
and includes a lot of bugfixes and improvements.
Read more details about the changes in:
http://redir.process-one.net/ejabberd-2.1.7
Download the source code and installers from:
http://www.process-one.net/en/ejabberd/
The changes are:
* BOSH and Web
- Clarify error message when BOSH query is sent to non-running module
- Keep the order of stanzas when BOSH sends several (EJAB-1374)
- Show configuration for HTTPS http_bind
- Support as read-only HTTP method not only GET, also HEAD
- The responses to HEAD must have empty Body
* CAPTCHA
- If the port number isn't listener, then specify the protocol (EJAB-1418)
- New CAPTCHA limit
- New CAPTCHA whitelist support
- Only check system at startup if option is enabled
- Provide HTTPS URL in CAPTCHA form when listener has 'tls' option (EJAB-1406)
- Show captcha_limit option in the example config
- Support more captcha_host value formats (EJAB-1418)
- Throw error when captcha fails at server start, not later at runtime
- captcha_host must have the port number to get protocol (EJAB-1418)
* Core ejabberd
- Disable all entity expansions (EJAB-1451)
- Do not accept XML with undefined prefixes (EJAB-680)
- Make jlib:ip_to_list safe to use
- Make sure 'closed' event is correctly processed on every state
- New route_iq/5 accepting Timeout (EJAB-1398)
- Take into consideration internal queue length when sorting processes queues
- Use route instead of send_element to go through standard workflow
* Erlang/OTP compatibility
- Remove Type and Spec, backport list comprehensions, so R12B-5 can compile
- Tweak pg2_backport.erl to work with Erlang older than R13A (EJAB-1349)
* ODBC
- Don't let presence-in privacy rule block a presence subscription (EJAB-255)
- Escape user input in mod_privacy_odbc (EJAB-1442)
- Try to improve support for roster_version in MSSQL (EJAB-1437)
* Pubsub/PEP/Caps
- Apply filtered notification to PEP last items (EJAB-1456)
- Fix empty pubsub payload check
- Owner can delete any items from its own node (EJAB-1445)
- Pubsub node maxitem forced to 0 if non persistent node (EJAB-1434)
- Reorganize the push_item function, and handle version not_found (EJAB-1420)
* Scripts
- ejabberd.init: Several fixes and improvements
- ejabberdctl: Escape output from ctlexec() to erl script (EJAB-1399)
- ejabberdctl: Fix bashism and mimic master branch (EJAB-1404)
- ejabberdctl: Fix space between INET_DIST_INTERFACE (EJAB-1416)
- ejabberdctl: New DIST_USE_INTERFACE restricts IP of erlang listen (EJAB-1404)
- ejabberdctl: New ERL_EPMD_ADDRESS that works since Erlang/OTP R14B03
- extauth: Fix delayed response of timeout was reused for next login (EJAB-1385)
- extauth: Forward old messages to newly spawned extauth process (EJAB-1385)
- extauth: If script crashes, ejabberd should restart it (EJAB-1428)
* XEP support
- mod_blocking: New XEP-0191 Simple Communications Blocking (EJAB-695)
- No need to inform that XEP-0237 is optional; clarified in XEP version 1.2
* Miscellanea:
- If a module start fails during server start, stop erlang (EJAB-1446)
- New Indonesian translation (EJAB-1407)
- LDAP: Note that ejabberd works with CGP LDAP server
- S2S: Handle Tigase's unexpected version=1.0 (EJAB-1379)
- mod_irc: Send presence unavailable to the departing occupant (EJAB-1417)
- mod_last: Allow user to query his own Last activity
- mod_muc: Do not decrease MUC admin's role/affiliation
- mod_muc: Send jid attribute when occupant is banned (EJAB-1432)
- mod_offline: Change c2s state before offline messages resending
- mod_ping: Use iqdisc no_queue by default (EJAB-1435)
- mod_pres_counter: Prevent subscription flood (EJAB-1388)
- mod_register Access now also controls account unregistrations
- mod_register: Clarify more the expected content of welcome_message option
- mod_shared_roster: Fix support for anonymous accounts in @all@ (EJAB-1264)
- mod_shared_roster: New @online@ directive (EJAB-1391)
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-21
View File
@@ -1,21 +0,0 @@
Release Notes
ejabberd 2.1.8
ejabberd 2.1.8 is the ninth release in ejabberd 2.1.x branch,
and includes a PubSub regression bugfix.
Download the source code and installers from:
http://www.process-one.net/en/ejabberd/
The change is:
- Fix issue on PubSub preventing publication of items (EJAB-1457)
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-56
View File
@@ -1,56 +0,0 @@
Release Notes
ejabberd 2.1.9
ejabberd 2.1.9 is the eighth release in ejabberd 2.1.x branch,
and includes a lot of bugfixes and improvements.
Read more details about the changes in:
http://redir.process-one.net/ejabberd-2.1.9
Download the source code and installers from:
http://www.process-one.net/en/ejabberd/
The changes are:
* Core ejabberd
- Decrease CPU usage caused by tls:send with large data
- Escape iolist correctly when NIFs are disabled (EJAB-1462)
- Fix code to satisfy Dialyzer warnings
- Fix compilation in Windows
- Replace calls of OTP's Binary, since they would require R14
* LDAP
- Document ldap_tls_cacertfile and ldap_tls_depth options (EJAB-1299)
- Log an error when an LDAP filter is incorrect (EJAB-1395)
- New options: ldap_tls_cacertfile and ldap_tls_depth (EJAB-1299)
- New option: ldap_deref_aliases (EJAB-639)
- Match ldap_uidattr_format case-insensitively (EJAB-1449)
* MUC
- Support for multiple entry with same nick to MUC rooms (EJAB-305)
- Support voice request and approvement
- New room option: allow_private_messages_from_visitors
- New room options: allow_voice_requests and voice_request_min_interval
- Include status 110 in presence to new occupant (EJAB-740)
- Fix mod_muc_log crash when first log entry is room destroy (EJAB-1499)
- Many fixes and improvements in mod_muc
* Pubsub
- Enable pubsub#deliver_notification checking (EJAB-1453)
- Fix Denial of Service when user sends malformed publish stanza (EJAB-1498)
* ODBC
- Fix ODBC account counting (EJAB-1491)
- Optimized mod_roster_odbc:get_roster
* Miscellanea:
- New SASL SCRAM-SHA-1 authentication mechanism (EJAB-1196)
- New option: resource_conflict (EJAB-650)
Bug reports
You can officially report bugs on ProcessOne support site:
http://support.process-one.net/
-2
View File
@@ -1,2 +0,0 @@
% ejabberd version (automatically generated).
\newcommand{\version}{13.03-beta2}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

-609
View File
@@ -1,609 +0,0 @@
%%%
%%% ejabberd configuration file
%%%
%%%'
%%% The parameters used in this configuration file are explained in more detail
%%% in the ejabberd Installation and Operation Guide.
%%% Please consult the Guide in case of doubts, it is included with
%%% your copy of ejabberd, and is also available online at
%%% http://www.process-one.net/en/ejabberd/docs/
%%% This configuration file contains Erlang terms.
%%% In case you want to understand the syntax, here are the concepts:
%%%
%%% - The character to comment a line is %
%%%
%%% - Each term ends in a dot, for example:
%%% override_global.
%%%
%%% - A tuple has a fixed definition, its elements are
%%% enclosed in {}, and separated with commas:
%%% {loglevel, 4}.
%%%
%%% - A list can have as many elements as you want,
%%% and is enclosed in [], for example:
%%% [http_poll, web_admin, tls]
%%%
%%% - A keyword of ejabberd is a word in lowercase.
%%% Strings are enclosed in "" and can contain spaces, dots, ...
%%% {language, "en"}.
%%% {ldap_rootdn, "dc=example,dc=com"}.
%%%
%%% - This term includes a tuple, a keyword, a list, and two strings:
%%% {hosts, ["jabber.example.net", "im.example.com"]}.
%%%
%%%. =======================
%%%' OVERRIDE STORED OPTIONS
%%
%% Override the old values stored in the database.
%%
%%
%% Override global options (shared by all ejabberd nodes in a cluster).
%%
%%override_global.
%%
%% Override local options (specific for this particular ejabberd node).
%%
%%override_local.
%%
%% Remove the Access Control Lists before new ones are added.
%%
%%override_acls.
%%%. =========
%%%' DEBUGGING
%%
%% loglevel: Verbosity of log files generated by ejabberd.
%% 0: No ejabberd log at all (not recommended)
%% 1: Critical
%% 2: Error
%% 3: Warning
%% 4: Info
%% 5: Debug
%%
{loglevel, 4}.
%%
%% watchdog_admins: Only useful for developers: if an ejabberd process
%% consumes a lot of memory, send live notifications to these XMPP
%% accounts.
%%
%%{watchdog_admins, ["bob@example.com"]}.
%%%. ================
%%%' SERVED HOSTNAMES
%%
%% hosts: Domains served by ejabberd.
%% You can define one or several, for example:
%% {hosts, ["example.net", "example.com", "example.org"]}.
%%
{hosts, ["localhost"]}.
%%
%% route_subdomains: Delegate subdomains to other XMPP servers.
%% For example, if this ejabberd serves example.org and you want
%% to allow communication with an XMPP server called im.example.org.
%%
%%{route_subdomains, s2s}.
%%%. ===============
%%%' LISTENING PORTS
%%
%% listen: The ports ejabberd will listen on, which service each is handled
%% by and what options to start it with.
%%
{listen,
[
{5222, ejabberd_c2s, [
%%
%% If TLS is compiled in and you installed a SSL
%% certificate, specify the full path to the
%% file and uncomment this line:
%%
%%{certfile, "/path/to/ssl.pem"}, starttls,
{access, c2s},
{shaper, c2s_shaper},
{max_stanza_size, 65536}
]},
%%
%% To enable the old SSL connection method on port 5223:
%%
%%{5223, ejabberd_c2s, [
%% {access, c2s},
%% {shaper, c2s_shaper},
%% {certfile, "/path/to/ssl.pem"}, tls,
%% {max_stanza_size, 65536}
%% ]},
{5269, ejabberd_s2s_in, [
{shaper, s2s_shaper},
{max_stanza_size, 131072}
]},
%%
%% ejabberd_service: Interact with external components (transports, ...)
%%
%%{8888, ejabberd_service, [
%% {access, all},
%% {shaper_rule, fast},
%% {hosts, ["icq.example.org", "sms.example.org"],
%% [{password, "secret"}]
%% }
%% ]},
%%
%% ejabberd_stun: Handles STUN Binding requests
%%
%%{{3478, udp}, ejabberd_stun, []},
{5280, ejabberd_http, [
%%{request_handlers,
%% [
%% {["pub", "archive"], mod_http_fileserver}
%% ]},
captcha,
http_bind,
http_poll,
%%register,
web_admin
]}
]}.
%%
%% s2s_use_starttls: Enable STARTTLS + Dialback for S2S connections.
%% Allowed values are: false optional required required_trusted
%% You must specify a certificate file.
%%
%%{s2s_use_starttls, optional}.
%%
%% s2s_certfile: Specify a certificate file.
%%
%%{s2s_certfile, "/path/to/ssl.pem"}.
%%
%% domain_certfile: Specify a different certificate for each served hostname.
%%
%%{domain_certfile, "example.org", "/path/to/example_org.pem"}.
%%{domain_certfile, "example.com", "/path/to/example_com.pem"}.
%%
%% S2S whitelist or blacklist
%%
%% Default s2s policy for undefined hosts.
%%
%%{s2s_default_policy, allow}.
%%
%% Allow or deny communication with specific servers.
%%
%%{{s2s_host, "goodhost.org"}, allow}.
%%{{s2s_host, "badhost.org"}, deny}.
%%
%% Outgoing S2S options
%%
%% Preferred address families (which to try first) and connect timeout
%% in milliseconds.
%%
%%{outgoing_s2s_options, [ipv4, ipv6], 10000}.
%%%. ==============
%%%' AUTHENTICATION
%%
%% auth_method: Method used to authenticate the users.
%% The default method is the internal.
%% If you want to use a different method,
%% comment this line and enable the correct ones.
%%
{auth_method, internal}.
%%
%% Store the plain passwords or hashed for SCRAM:
%%{auth_password_format, plain}.
%%{auth_password_format, scram}.
%%
%% Define the FQDN if ejabberd doesn't detect it:
%%{fqdn, "server3.example.com"}.
%%
%% Authentication using external script
%% Make sure the script is executable by ejabberd.
%%
%%{auth_method, external}.
%%{extauth_program, "/path/to/authentication/script"}.
%%
%% Authentication using ODBC
%% Remember to setup a database in the next section.
%%
%%{auth_method, odbc}.
%%
%% Authentication using PAM
%%
%%{auth_method, pam}.
%%{pam_service, "pamservicename"}.
%%
%% Authentication using LDAP
%%
%%{auth_method, ldap}.
%%
%% List of LDAP servers:
%%{ldap_servers, ["localhost"]}.
%%
%% Encryption of connection to LDAP servers:
%%{ldap_encrypt, none}.
%%{ldap_encrypt, tls}.
%%
%% Port to connect to on LDAP servers:
%%{ldap_port, 389}.
%%{ldap_port, 636}.
%%
%% LDAP manager:
%%{ldap_rootdn, "dc=example,dc=com"}.
%%
%% Password of LDAP manager:
%%{ldap_password, "******"}.
%%
%% Search base of LDAP directory:
%%{ldap_base, "dc=example,dc=com"}.
%%
%% LDAP attribute that holds user ID:
%%{ldap_uids, [{"mail", "%u@mail.example.org"}]}.
%%
%% LDAP filter:
%%{ldap_filter, "(objectClass=shadowAccount)"}.
%%
%% Anonymous login support:
%% auth_method: anonymous
%% anonymous_protocol: sasl_anon | login_anon | both
%% allow_multiple_connections: true | false
%%
%%{host_config, "public.example.org", [{auth_method, anonymous},
%% {allow_multiple_connections, false},
%% {anonymous_protocol, sasl_anon}]}.
%%
%% To use both anonymous and internal authentication:
%%
%%{host_config, "public.example.org", [{auth_method, [internal, anonymous]}]}.
%%%. ==============
%%%' DATABASE SETUP
%% ejabberd by default uses the internal Mnesia database,
%% so you do not necessarily need this section.
%% This section provides configuration examples in case
%% you want to use other database backends.
%% Please consult the ejabberd Guide for details on database creation.
%%
%% MySQL server:
%%
%%{odbc_server, {mysql, "server", "database", "username", "password"}}.
%%
%% If you want to specify the port:
%%{odbc_server, {mysql, "server", 1234, "database", "username", "password"}}.
%%
%% PostgreSQL server:
%%
%%{odbc_server, {pgsql, "server", "database", "username", "password"}}.
%%
%% If you want to specify the port:
%%{odbc_server, {pgsql, "server", 1234, "database", "username", "password"}}.
%%
%% If you use PostgreSQL, have a large database, and need a
%% faster but inexact replacement for "select count(*) from users"
%%
%%{pgsql_users_number_estimate, true}.
%%
%% ODBC compatible or MSSQL server:
%%
%%{odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}.
%%
%% Number of connections to open to the database for each virtual host
%%
%%{odbc_pool_size, 10}.
%%
%% Interval to make a dummy SQL request to keep the connections to the
%% database alive. Specify in seconds: for example 28800 means 8 hours
%%
%%{odbc_keepalive_interval, undefined}.
%%%. ===============
%%%' TRAFFIC SHAPERS
%%
%% The "normal" shaper limits traffic speed to 1000 B/s
%%
{shaper, normal, {maxrate, 1000}}.
%%
%% The "fast" shaper limits traffic speed to 50000 B/s
%%
{shaper, fast, {maxrate, 50000}}.
%%
%% This option specifies the maximum number of elements in the queue
%% of the FSM. Refer to the documentation for details.
%%
{max_fsm_queue, 1000}.
%%%. ====================
%%%' ACCESS CONTROL LISTS
%%
%% The 'admin' ACL grants administrative privileges to XMPP accounts.
%% You can put here as many accounts as you want.
%%
%%{acl, admin, {user, "aleksey", "localhost"}}.
%%{acl, admin, {user, "ermine", "example.org"}}.
%%
%% Blocked users
%%
%%{acl, blocked, {user, "baduser", "example.org"}}.
%%{acl, blocked, {user, "test"}}.
%%
%% Local users: don't modify this line.
%%
{acl, local, {user_regexp, ""}}.
%%
%% More examples of ACLs
%%
%%{acl, jabberorg, {server, "jabber.org"}}.
%%{acl, aleksey, {user, "aleksey", "jabber.ru"}}.
%%{acl, test, {user_regexp, "^test"}}.
%%{acl, test, {user_glob, "test*"}}.
%%
%% Define specific ACLs in a virtual host.
%%
%%{host_config, "localhost",
%% [
%% {acl, admin, {user, "bob-local", "localhost"}}
%% ]
%%}.
%%%. ============
%%%' ACCESS RULES
%% Maximum number of simultaneous sessions allowed for a single user:
{access, max_user_sessions, [{10, all}]}.
%% Maximum number of offline messages that users can have:
{access, max_user_offline_messages, [{5000, admin}, {100, all}]}.
%% This rule allows access only for local users:
{access, local, [{allow, local}]}.
%% Only non-blocked users can use c2s connections:
{access, c2s, [{deny, blocked},
{allow, all}]}.
%% For C2S connections, all users except admins use the "normal" shaper
{access, c2s_shaper, [{none, admin},
{normal, all}]}.
%% All S2S connections use the "fast" shaper
{access, s2s_shaper, [{fast, all}]}.
%% Only admins can send announcement messages:
{access, announce, [{allow, admin}]}.
%% Only admins can use the configuration interface:
{access, configure, [{allow, admin}]}.
%% Admins of this server are also admins of the MUC service:
{access, muc_admin, [{allow, admin}]}.
%% Only accounts of the local ejabberd server can create rooms:
{access, muc_create, [{allow, local}]}.
%% All users are allowed to use the MUC service:
{access, muc, [{allow, all}]}.
%% Only accounts on the local ejabberd server can create Pubsub nodes:
{access, pubsub_createnode, [{allow, local}]}.
%% In-band registration allows registration of any possible username.
%% To disable in-band registration, replace 'allow' with 'deny'.
{access, register, [{allow, all}]}.
%% By default the frequency of account registrations from the same IP
%% is limited to 1 account every 10 minutes. To disable, specify: infinity
%%{registration_timeout, 600}.
%%
%% Define specific Access Rules in a virtual host.
%%
%%{host_config, "localhost",
%% [
%% {access, c2s, [{allow, admin}, {deny, all}]},
%% {access, register, [{deny, all}]}
%% ]
%%}.
%%%. ================
%%%' DEFAULT LANGUAGE
%%
%% language: Default language used for server messages.
%%
{language, "en"}.
%%
%% Set a different default language in a virtual host.
%%
%%{host_config, "localhost",
%% [{language, "ru"}]
%%}.
%%%. =======
%%%' CAPTCHA
%%
%% Full path to a script that generates the image.
%%
%%{captcha_cmd, "/lib/ejabberd/priv/bin/captcha.sh"}.
%%
%% Host for the URL and port where ejabberd listens for CAPTCHA requests.
%%
%%{captcha_host, "example.org:5280"}.
%%
%% Limit CAPTCHA calls per minute for JID/IP to avoid DoS.
%%
%%{captcha_limit, 5}.
%%%. =======
%%%' MODULES
%%
%% Modules enabled in all ejabberd virtual hosts.
%%
{modules,
[
{mod_adhoc, []},
{mod_announce, [{access, announce}]}, % recommends mod_adhoc
{mod_blocking,[]}, % requires mod_privacy
{mod_caps, []},
{mod_configure,[]}, % requires mod_adhoc
{mod_disco, []},
%%{mod_echo, [{host, "echo.localhost"}]},
{mod_irc, []},
{mod_http_bind, []},
%%{mod_http_fileserver, [
%% {docroot, "/var/www"},
%% {accesslog, "/var/log/ejabberd/access.log"}
%% ]},
{mod_last, []},
{mod_muc, [
%%{host, "conference.@HOST@"},
{access, muc},
{access_create, muc_create},
{access_persistent, muc_create},
{access_admin, muc_admin}
]},
%%{mod_muc_log,[]},
{mod_offline, [{access_max_user_messages, max_user_offline_messages}]},
{mod_ping, []},
%%{mod_pres_counter,[{count, 5}, {interval, 60}]},
{mod_privacy, []},
{mod_private, []},
%%{mod_proxy65,[]},
{mod_pubsub, [
{access_createnode, pubsub_createnode},
{ignore_pep_from_offline, true}, % reduces resource comsumption, but XEP incompliant
%%{ignore_pep_from_offline, false}, % XEP compliant, but increases resource comsumption
{last_item_cache, false},
{plugins, ["flat", "hometree", "pep"]} % pep requires mod_caps
]},
{mod_register, [
%%
%% Protect In-Band account registrations with CAPTCHA.
%%
%%{captcha_protected, true},
%%
%% Set the minimum informational entropy for passwords.
%%
%%{password_strength, 32},
%%
%% After successful registration, the user receives
%% a message with this subject and body.
%%
{welcome_message, {"Welcome!",
"Hi.\nWelcome to this XMPP server."}},
%%
%% When a user registers, send a notification to
%% these XMPP accounts.
%%
%%{registration_watchers, ["admin1@example.org"]},
%%
%% Only clients in the server machine can register accounts
%%
{ip_access, [{allow, "127.0.0.0/8"},
{deny, "0.0.0.0/0"}]},
%%
%% Local c2s or remote s2s users cannot register accounts
%%
%%{access_from, deny},
{access, register}
]},
%%{mod_register_web, [
%%
%% When a user registers, send a notification to
%% these XMPP accounts.
%%
%%{registration_watchers, ["admin1@example.org"]}
%% ]},
{mod_roster, []},
%%{mod_service_log,[]},
{mod_shared_roster,[]},
{mod_stats, []},
{mod_time, []},
{mod_vcard, []},
{mod_version, []}
]}.
%%
%% Enable modules with custom options in a specific virtual host
%%
%%{host_config, "localhost",
%% [{{add, modules},
%% [
%% {mod_echo, [{host, "mirror.localhost"}]}
%% ]
%% }
%% ]}.
%%%.
%%%'
%%% $Id$
%%% Local Variables:
%%% mode: erlang
%%% End:
%%% vim: set filetype=erlang tabstop=8 foldmarker=%%%',%%%. foldmethod=marker:
+1 -1
View File
@@ -24,7 +24,7 @@ test -x "$CTL" || {
echo "ERROR: ejabberd not found: $DIR"
exit 1
}
grep ^"$USER": /etc/passwd >/dev/null || {
getent passwd "$USER" >/dev/null || {
echo "ERROR: System user not found: $USER"
exit 2
}
+19
View File
@@ -0,0 +1,19 @@
[Unit]
Description=XMPP Server
After=network.target
[Service]
Type=forking
User=ejabberd
Group=ejabberd
LimitNOFILE=65536
Restart=on-failure
RestartSec=5
ExecStart=/bin/sh -c '@ctlscriptpath@/ejabberdctl start && @ctlscriptpath@/ejabberdctl started'
ExecStop=/bin/sh -c '@ctlscriptpath@/ejabberdctl stop && @ctlscriptpath@/ejabberdctl stopped'
ExecReload=@ctlscriptpath@/ejabberdctl reload_config
PrivateDevices=true
TimeoutSec=300
[Install]
WantedBy=multi-user.target
+872
View File
@@ -0,0 +1,872 @@
###
###' ejabberd configuration file
###
###
### The parameters used in this configuration file are explained in more detail
### in the ejabberd Installation and Operation Guide.
### Please consult the Guide in case of doubts, it is included with
### your copy of ejabberd, and is also available online at
### http://www.process-one.net/en/ejabberd/docs/
### The configuration file is written in YAML.
### Refer to http://en.wikipedia.org/wiki/YAML for the brief description.
### However, ejabberd treats different literals as different types:
###
### - unquoted or single-quoted strings. They are called "atoms".
### Example: dog, 'Jupiter', '3.14159', YELLOW
###
### - numeric literals. Example: 3, -45.0, .0
###
### - quoted or folded strings.
### Examples of quoted string: "Lizzard", "orange".
### Example of folded string:
### > Art thou not Romeo,
### and a Montague?
###. =======
###' LOGGING
##
## loglevel: Verbosity of log files generated by ejabberd.
## 0: No ejabberd log at all (not recommended)
## 1: Critical
## 2: Error
## 3: Warning
## 4: Info
## 5: Debug
##
loglevel: 4
##
## rotation: Describe how to rotate logs. Either size and/or date can trigger
## log rotation. Setting count to N keeps N rotated logs. Setting count to 0
## does not disable rotation, it instead rotates the file and keeps no previous
## versions around. Setting size to X rotate log when it reaches X bytes.
## To disable rotation set the size to 0 and the date to ""
## Date syntax is taken from the syntax newsyslog uses in newsyslog.conf.
## Some examples:
## $D0 rotate every night at midnight
## $D23 rotate every day at 23:00 hr
## $W0D23 rotate every week on Sunday at 23:00 hr
## $W5D16 rotate every week on Friday at 16:00 hr
## $M1D0 rotate on the first day of every month at midnight
## $M5D6 rotate on every 5th day of the month at 6:00 hr
##
log_rotate_size: 10485760
log_rotate_date: ""
log_rotate_count: 1
##
## overload protection: If you want to limit the number of messages per second
## allowed from error_logger, which is a good idea if you want to avoid a flood
## of messages when system is overloaded, you can set a limit.
## 100 is ejabberd's default.
log_rate_limit: 100
###. ===============
###' NODE PARAMETERS
##
## net_ticktime: Specifies net_kernel tick time in seconds. This options must have
## identical value on all nodes, and in most cases shouldn't be changed at all from
## default value.
##
## net_ticktime: 60
###. ================
###' SERVED HOSTNAMES
##
## hosts: Domains served by ejabberd.
## You can define one or several, for example:
## hosts:
## - "example.net"
## - "example.com"
## - "example.org"
##
hosts:
- "localhost"
##
## route_subdomains: Delegate subdomains to other XMPP servers.
## For example, if this ejabberd serves example.org and you want
## to allow communication with an XMPP server called im.example.org.
##
## route_subdomains: s2s
###. ============
###' Certificates
## List all available PEM files containing certificates for your domains,
## chains of certificates or certificate keys. Full chains will be built
## automatically by ejabberd.
##
## certfiles:
## - "/etc/letsencrypt/live/example.org/*.pem"
## - "/etc/letsencrypt/live/example.com/*.pem"
##
## If your system provides only a single CA file (CentOS/FreeBSD):
## ca_file: "/etc/ssl/certs/ca-bundle.pem"
###. =================
###' TLS configuration
## Note that the following configuration is the default
## configuration of the TLS driver, so you don't need to
## uncomment it.
##
## define_macro:
## 'TLS_CIPHERS': "HIGH:!aNULL:!eNULL:!3DES:@STRENGTH"
## 'TLS_OPTIONS':
## - "no_sslv3"
## - "cipher_server_preference"
## - "no_compression"
## 'DH_FILE': "/path/to/dhparams.pem" # generated with: openssl dhparam -out dhparams.pem 2048
##
## c2s_dhfile: 'DH_FILE'
## s2s_dhfile: 'DH_FILE'
## c2s_ciphers: 'TLS_CIPHERS'
## s2s_ciphers: 'TLS_CIPHERS'
## c2s_protocol_options: 'TLS_OPTIONS'
## s2s_protocol_options: 'TLS_OPTIONS'
###. ===============
###' LISTENING PORTS
##
## listen: The ports ejabberd will listen on, which service each is handled
## by and what options to start it with.
##
listen:
-
port: 5222
ip: "::"
module: ejabberd_c2s
##
## If TLS is compiled in and you installed a SSL
## certificate, uncomment this line:
##
## starttls: true
##
## To enforce TLS encryption for client connections,
## use this instead of the "starttls" option:
##
## starttls_required: true
##
## Stream compression
##
## zlib: true
##
max_stanza_size: 65536
shaper: c2s_shaper
access: c2s
##
## Direct-TLS for C2S (XEP-0368). A good practice is to forward
## traffic from port 443 to this port, possibly multiplexing it
## with HTTP using e.g. sslh [https://wiki.xmpp.org/web/Tech_pages/XEP-0368],
## so modern clients can bypass restrictive firewalls (in airports, hotels, etc.).
##
## -
## port: 5223
## ip: "::"
## module: ejabberd_c2s
## tls: true
## max_stanza_size: 65536
## shaper: c2s_shaper
## access: c2s
-
port: 5269
ip: "::"
module: ejabberd_s2s_in
-
port: 5280
ip: "::"
module: ejabberd_http
request_handlers:
"/ws": ejabberd_http_ws
"/bosh": mod_bosh
"/api": mod_http_api
## "/pub/archive": mod_http_fileserver
web_admin: true
## register: true
captcha: true
##
## ejabberd_service: Interact with external components (transports, ...)
##
## -
## port: 8888
## ip: "::"
## module: ejabberd_service
## access: all
## shaper_rule: fast
## ip: "127.0.0.1"
## privilege_access:
## roster: "both"
## message: "outgoing"
## presence: "roster"
## delegations:
## "urn:xmpp:mam:1":
## filtering: ["node"]
## "http://jabber.org/protocol/pubsub":
## filtering: []
## hosts:
## "icq.example.org":
## password: "secret"
## "sms.example.org":
## password: "secret"
##
## ejabberd_stun: Handles STUN Binding requests
##
## -
## port: 3478
## transport: udp
## module: ejabberd_stun
##
## To handle XML-RPC requests that provide admin credentials:
##
## -
## port: 4560
## ip: "::"
## module: ejabberd_xmlrpc
## maxsessions: 10
## timeout: 5000
## access_commands:
## admin:
## commands: all
## options: []
##
## To enable secure http upload
##
## -
## port: 5444
## ip: "::"
## module: ejabberd_http
## request_handlers:
## "": mod_http_upload
## tls: true
## protocol_options: 'TLS_OPTIONS'
## dhfile: 'DH_FILE'
## ciphers: 'TLS_CIPHERS'
## Disabling digest-md5 SASL authentication. digest-md5 requires plain-text
## password storage (see auth_password_format option).
## disable_sasl_mechanisms: "digest-md5"
###. ==================
###' S2S GLOBAL OPTIONS
##
## s2s_use_starttls: Enable STARTTLS for S2S connections.
## Allowed values are: false, optional or required
## You must specify 'certfiles' option
##
## s2s_use_starttls: optional
##
## S2S whitelist or blacklist
##
## Default s2s policy for undefined hosts.
##
## s2s_access: s2s
##
## Outgoing S2S options
##
## Preferred address families (which to try first) and connect timeout
## in seconds.
##
## outgoing_s2s_families:
## - ipv4
## - ipv6
## outgoing_s2s_timeout: 190
###. ==============
###' AUTHENTICATION
##
## auth_method: Method used to authenticate the users.
## The default method is the internal.
## If you want to use a different method,
## comment this line and enable the correct ones.
##
auth_method: internal
##
## Store the plain passwords or hashed for SCRAM:
## auth_password_format: plain
## auth_password_format: scram
##
## Define the FQDN if ejabberd doesn't detect it:
## fqdn: "server3.example.com"
##
## Authentication using external script
## Make sure the script is executable by ejabberd.
##
## auth_method: external
## extauth_program: "/path/to/authentication/script"
##
## Authentication using SQL
## Remember to setup a database in the next section.
##
## auth_method: sql
##
## Authentication using PAM
##
## auth_method: pam
## pam_service: "pamservicename"
##
## Authentication using LDAP
##
## auth_method: ldap
##
## List of LDAP servers:
## ldap_servers:
## - "localhost"
##
## Encryption of connection to LDAP servers:
## ldap_encrypt: none
## ldap_encrypt: tls
##
## Port to connect to on LDAP servers:
## ldap_port: 389
## ldap_port: 636
##
## LDAP manager:
## ldap_rootdn: "dc=example,dc=com"
##
## Password of LDAP manager:
## ldap_password: "******"
##
## Search base of LDAP directory:
## ldap_base: "dc=example,dc=com"
##
## LDAP attribute that holds user ID:
## ldap_uids:
## - "mail": "%u@mail.example.org"
##
## LDAP filter:
## ldap_filter: "(objectClass=shadowAccount)"
##
## Anonymous login support:
## auth_method: anonymous
## anonymous_protocol: sasl_anon | login_anon | both
## allow_multiple_connections: true | false
##
## host_config:
## "public.example.org":
## auth_method: anonymous
## allow_multiple_connections: false
## anonymous_protocol: sasl_anon
##
## To use both anonymous and internal authentication:
##
## host_config:
## "public.example.org":
## auth_method:
## - internal
## - anonymous
###. ==============
###' DATABASE SETUP
## ejabberd by default uses the internal Mnesia database,
## so you do not necessarily need this section.
## This section provides configuration examples in case
## you want to use other database backends.
## Please consult the ejabberd Guide for details on database creation.
##
## MySQL server:
##
## sql_type: mysql
## sql_server: "server"
## sql_database: "database"
## sql_username: "username"
## sql_password: "password"
##
## If you want to specify the port:
## sql_port: 1234
##
## PostgreSQL server:
##
## sql_type: pgsql
## sql_server: "server"
## sql_database: "database"
## sql_username: "username"
## sql_password: "password"
##
## If you want to specify the port:
## sql_port: 1234
##
## If you use PostgreSQL, have a large database, and need a
## faster but inexact replacement for "select count(*) from users"
##
## pgsql_users_number_estimate: true
##
## SQLite:
##
## sql_type: sqlite
## sql_database: "/path/to/database.db"
##
## ODBC compatible or MSSQL server:
##
## sql_type: odbc
## sql_server: "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"
##
## Number of connections to open to the database for each virtual host
##
## sql_pool_size: 10
##
## Interval to make a dummy SQL request to keep the connections to the
## database alive. Specify in seconds: for example 28800 means 8 hours
##
## sql_keepalive_interval: undefined
##
## Use the new SQL schema
##
## new_sql_schema: true
##
## A database can also can be used to store information from several
## modules. To enable storage to the database, just make sure it is
## setup above and set default_db: sql if you want to use SQL for
## all modules.
##
## default_db: sql
###. ===============
###' TRAFFIC SHAPERS
shaper:
##
## The "normal" shaper limits traffic speed to 1000 B/s
##
normal: 1000
##
## The "fast" shaper limits traffic speed to 50000 B/s
##
fast: 50000
##
## This option specifies the maximum number of elements in the queue
## of the FSM. Refer to the documentation for details.
##
max_fsm_queue: 10000
###. ====================
###' ACCESS CONTROL LISTS
acl:
##
## The 'admin' ACL grants administrative privileges to XMPP accounts.
## You can put here as many accounts as you want.
##
## admin:
## user:
## - "aleksey@localhost"
## - "ermine@example.org"
##
## Blocked users
##
## blocked:
## user:
## - "baduser@example.org"
## - "test"
## Local users: don't modify this.
##
local:
user_regexp: ""
##
## More examples of ACLs
##
## jabberorg:
## server:
## - "jabber.org"
## aleksey:
## user:
## - "aleksey@jabber.ru"
## test:
## user_regexp: "^test"
## user_glob: "test*"
##
## Loopback network
##
loopback:
ip:
- "127.0.0.0/8"
- "::1/128"
- "::FFFF:127.0.0.1/128"
##
## Bad XMPP servers
##
## bad_servers:
## server:
## - "xmpp.zombie.org"
## - "xmpp.spam.com"
##
## Define specific ACLs in a virtual host.
##
## host_config:
## "localhost":
## acl:
## admin:
## user:
## - "bob-local@localhost"
###. ============
###' SHAPER RULES
shaper_rules:
## Maximum number of simultaneous sessions allowed for a single user:
max_user_sessions: 10
## Maximum number of offline messages that users can have:
max_user_offline_messages:
- 5000: admin
- 100
## For C2S connections, all users except admins use the "normal" shaper
c2s_shaper:
- none: admin
- normal
## All S2S connections use the "fast" shaper
s2s_shaper: fast
###. ============
###' ACCESS RULES
access_rules:
## This rule allows access only for local users:
local:
- allow: local
## Only non-blocked users can use c2s connections:
c2s:
- deny: blocked
- allow
## Only admins can send announcement messages:
announce:
- allow: admin
## Only admins can use the configuration interface:
configure:
- allow: admin
## Only accounts of the local ejabberd server can create rooms:
muc_create:
- allow: local
## Only accounts on the local ejabberd server can create Pubsub nodes:
pubsub_createnode:
- allow: local
## In-band registration allows registration of any possible username.
## To disable in-band registration, replace 'allow' with 'deny'.
register:
- allow
## Only allow to register from localhost
trusted_network:
- allow: loopback
## Do not establish S2S connections with bad servers
## If you enable this you also have to uncomment "s2s_access: s2s"
## s2s:
## - deny:
## - ip: "XXX.XXX.XXX.XXX/32"
## - deny:
## - ip: "XXX.XXX.XXX.XXX/32"
## - allow
## ===============
## API PERMISSIONS
## ===============
##
## This section allows you to define who and using what method
## can execute commands offered by ejabberd.
##
## By default "console commands" section allow executing all commands
## issued using ejabberdctl command, and "admin access" section allows
## users in admin acl that connect from 127.0.0.1 to execute all
## commands except start and stop with any available access method
## (ejabberdctl, http-api, xmlrpc depending what is enabled on server).
##
## If you remove "console commands" there will be one added by
## default allowing executing all commands, but if you just change
## permissions in it, version from config file will be used instead
## of default one.
##
api_permissions:
"console commands":
from:
- ejabberd_ctl
who: all
what: "*"
"admin access":
who:
- access:
- allow:
- acl: loopback
- acl: admin
- oauth:
- scope: "ejabberd:admin"
- access:
- allow:
- acl: loopback
- acl: admin
what:
- "*"
- "!stop"
- "!start"
"public commands":
who:
- ip: "127.0.0.1/8"
what:
- "status"
- "connected_users_number"
## By default the frequency of account registrations from the same IP
## is limited to 1 account every 10 minutes. To disable, specify: infinity
## registration_timeout: 600
##
## Define specific Access Rules in a virtual host.
##
## host_config:
## "localhost":
## access:
## c2s:
## - allow: admin
## - deny
## register:
## - deny
###. ================
###' DEFAULT LANGUAGE
##
## language: Default language used for server messages.
##
language: "en"
##
## Set a different default language in a virtual host.
##
## host_config:
## "localhost":
## language: "ru"
###. =======
###' CAPTCHA
##
## Full path to a script that generates the image.
##
## captcha_cmd: "/lib/ejabberd/priv/bin/captcha.sh"
##
## Host for the URL and port where ejabberd listens for CAPTCHA requests.
##
## captcha_host: "example.org:5280"
##
## Limit CAPTCHA calls per minute for JID/IP to avoid DoS.
##
## captcha_limit: 5
###. ====
###' ACME
##
## In order to use the acme certificate acquiring through "Let's Encrypt"
## an http listener has to be configured to listen to port 80 so that
## the authorization challenges posed by "Let's Encrypt" can be solved.
##
## A simple way of doing this would be to add the following in the listening
## section and to configure port forwarding from 80 to 5280 either via NAT
## (for ipv4 only) or using frontends such as haproxy/nginx/sslh/etc.
## -
## port: 5280
## ip: "::"
## module: ejabberd_http
acme:
## A contact mail that the ACME Certificate Authority can contact in case of
## an authorization issue, such as a server-initiated certificate revocation.
## It is not mandatory to provide an email address but it is highly suggested.
contact: "mailto:example-admin@example.com"
## The ACME Certificate Authority URL.
## This could either be:
## - https://acme-v01.api.letsencrypt.org - (Default) for the production CA
## - https://acme-staging.api.letsencrypt.org - for the staging CA
## - http://localhost:4000 - for a local version of the CA
ca_url: "https://acme-v01.api.letsencrypt.org"
###. =======
###' MODULES
##
## Modules enabled in all ejabberd virtual hosts.
##
modules:
mod_adhoc: {}
mod_admin_extra: {}
mod_announce: # recommends mod_adhoc
access: announce
mod_blocking: {} # requires mod_privacy
mod_caps: {}
mod_carboncopy: {}
mod_client_state: {}
mod_configure: {} # requires mod_adhoc
## mod_delegation: {} # for xep0356
mod_disco: {}
mod_echo: {}
mod_bosh: {}
## mod_http_fileserver:
## docroot: "/var/www"
## accesslog: "/var/log/ejabberd/access.log"
## mod_http_upload:
## # docroot: "@HOME@/upload"
## put_url: "https://@HOST@:5444"
## thumbnail: false # otherwise needs ejabberd to be compiled with libgd support
## mod_http_upload_quota:
## max_days: 30
mod_last: {}
## XEP-0313: Message Archive Management
## You might want to setup a SQL backend for MAM because the mnesia database is
## limited to 2GB which might be exceeded on large servers
## mod_mam: {} # for xep0313, mnesia is limited to 2GB, better use an SQL backend
mod_muc:
## host: "conference.@HOST@"
access:
- allow
access_admin:
- allow: admin
access_create: muc_create
access_persistent: muc_create
mod_muc_admin: {}
## mod_muc_log: {}
## mod_multicast: {}
mod_offline:
access_max_user_messages: max_user_offline_messages
mod_ping: {}
## mod_pres_counter:
## count: 5
## interval: 60
mod_privacy: {}
mod_private: {}
## mod_proxy65: {}
mod_pubsub:
access_createnode: pubsub_createnode
## reduces resource comsumption, but XEP incompliant
ignore_pep_from_offline: true
## XEP compliant, but increases resource comsumption
## ignore_pep_from_offline: false
last_item_cache: false
plugins:
- "flat"
- "hometree"
- "pep" # pep requires mod_caps
force_node_config:
## Avoid using OMEMO by default because it
## introduces a lot of hard-to-track problems.
## Comment out the following lines to enable OMEMO support
"eu.siacs.conversations.axolotl.*":
access_model: whitelist
## Avoid buggy clients to make their bookmarks public
"storage:bookmarks":
access_model: whitelist
mod_push: {}
mod_push_keepalive: {}
## mod_register:
##
## Protect In-Band account registrations with CAPTCHA.
##
## captcha_protected: true
##
## Set the minimum informational entropy for passwords.
##
## password_strength: 32
##
## After successful registration, the user receives
## a message with this subject and body.
##
## welcome_message:
## subject: "Welcome!"
## body: |-
## Hi.
## Welcome to this XMPP server.
##
## When a user registers, send a notification to
## these XMPP accounts.
##
## registration_watchers:
## - "admin1@example.org"
##
## Only clients in the server machine can register accounts
##
## ip_access: trusted_network
##
## Local c2s or remote s2s users cannot register accounts
##
## access_from: deny
## access: register
mod_roster: {}
mod_shared_roster: {}
mod_stats: {}
mod_time: {}
mod_vcard:
search: false
mod_vcard_xupdate: {}
mod_avatar: {}
mod_version: {}
mod_stream_mgmt: {}
## Non-SASL Authentication (XEP-0078) is now disabled by default
## because it's obsoleted and is used mostly by abandoned
## client software
## mod_legacy_auth: {}
## The module for S2S dialback (XEP-0220). Please note that you cannot
## rely solely on dialback if you want to federate with other servers,
## because a lot of servers have dialback disabled and instead rely on
## PKIX authentication. Make sure you have proper certificates installed
## and check your accessibility at https://check.messaging.one/
mod_s2s_dialback: {}
mod_http_api: {}
mod_fail2ban: {}
##
## Enable modules with custom options in a specific virtual host
##
## host_config:
## "localhost":
## modules:
## mod_echo:
## host: "mirror.localhost"
##
## Enable modules management via ejabberdctl for installation and
## uninstallation of public/private contributed modules
## (enabled by default)
##
allow_contrib_modules: true
###.
###'
### Local Variables:
### mode: yaml
### End:
### vim: set filetype=yaml tabstop=8 foldmarker=###',###. foldmethod=marker:
+40 -7
View File
@@ -33,10 +33,10 @@
# from a client or from another Jabber server. So take this into
# account when setting this limit.
#
# Default: 32000
# Default: 65536 (or 8196 on Windows)
# Maximum: 268435456
#
#ERL_MAX_PORTS=32000
#ERL_MAX_PORTS=65536
#.
#' FIREWALL_WINDOW: Range of allowed ports to pass through a firewall
@@ -56,7 +56,7 @@
# This communication is used by ejabberdctl command line tool,
# and in a cluster of several ejabberd nodes.
#
# Default: 127.0.0.1
# Default: 0.0.0.0
#
#INET_DIST_INTERFACE=127.0.0.1
@@ -85,10 +85,10 @@
# Erlang, and therefore not related to the operating system processes, you do
# not have to worry about allowing a huge number of them.
#
# Default: 250000
# Default: 262144
# Maximum: 268435456
#
#ERL_PROCESSES=250000
#ERL_PROCESSES=262144
#.
#' ERL_MAX_ETS_TABLES: Maximum number of ETS and Mnesia tables
@@ -99,9 +99,9 @@
# You can safely increase this limit when starting ejabberd. It impacts memory
# consumption but the difference will be quite small.
#
# Default: 1400
# Default: 2053
#
#ERL_MAX_ETS_TABLES=1400
#ERL_MAX_ETS_TABLES=2053
#.
#' ERL_OPTIONS: Additional Erlang options
@@ -148,6 +148,39 @@
#
#EJABBERD_PID_PATH=/var/run/ejabberd/ejabberd.pid
#.
#' EJABBERD_CONFIG_PATH: ejabberd configuration file
#
# Specify the full path to the ejabberd configuration file. If the file name has
# yml or yaml extension, it is parsed as a YAML file; otherwise, Erlang syntax is
# expected.
#
# Default: $ETC_DIR/ejabberd.yml
#
#EJABBERD_CONFIG_PATH=/etc/ejabberd/ejabberd.yml
#.
#' CONTRIB_MODULES_PATH: contributed ejabberd modules path
#
# Specify the full path to the contributed ejabberd modules. If the path is not
# defined, ejabberd will use ~/.ejabberd-modules in home of user running ejabberd.
#
# Default: $HOME/.ejabberd-modules
#
#CONTRIB_MODULES_PATH=/opt/ejabberd-modules
#.
#' CONTRIB_MODULES_CONF_DIR: configuration directory for contributed modules
#
# Specify the full path to the configuration directory for contributed ejabberd
# modules. In order to configure a module named mod_foo, a mod_foo.yml file can
# be created in this directory. This file will then be used instead of the
# default configuration file provided with the module.
#
# Default: $CONTRIB_MODULES_PATH/conf
#
#CONTRIB_MODULES_CONF_DIR=/etc/ejabberd/modules
#.
#'
# vim: foldmarker=#',#. foldmethod=marker:
+224 -309
View File
@@ -7,137 +7,92 @@ ERL_MAX_PORTS=32000
ERL_PROCESSES=250000
ERL_MAX_ETS_TABLES=1400
FIREWALL_WINDOW=""
INET_DIST_INTERFACE="127.0.0.1"
INET_DIST_INTERFACE=""
ERLANG_NODE=ejabberd@localhost
# define default environment variables
SCRIPT_DIR=`cd ${0%/*} && pwd`
ERL={{erl}}
INSTALLUSER={{installuser}}
SCRIPT_DIR=$(cd "${0%/*}" && pwd)
ERL="{{erl}}"
IEX="{{bindir}}/iex"
EPMD="{{epmd}}"
INSTALLUSER="{{installuser}}"
# Compatibility in ZSH
#setopt shwordsplit 2>/dev/null
# check the proper system user is used if defined
if [ "$INSTALLUSER" != "" ] ; then
EXEC_CMD="false"
for GID in `id -G`; do
if [ $GID -eq 0 ] ; then
EXEC_CMD="su $INSTALLUSER -p -c"
# check the proper system user is used
case $(id -un) in
"$INSTALLUSER")
EXEC_CMD="as_current_user"
;;
root)
if [ -n "$INSTALLUSER" ] ; then
EXEC_CMD="as_install_user"
else
EXEC_CMD="as_current_user"
echo "WARNING: It is not recommended to run ejabberd as root" >&2
fi
done
if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
EXEC_CMD="sh -c"
fi
if [ "$EXEC_CMD" = "false" ] ; then
echo "This command can only be run by root or the user $INSTALLUSER" >&2
exit 4
fi
else
EXEC_CMD="sh -c"
fi
;;
*)
if [ -n "$INSTALLUSER" ] ; then
echo "ERROR: This command can only be run by root or the user $INSTALLUSER" >&2
exit 7
else
EXEC_CMD="as_current_user"
fi
;;
esac
# parse command line parameters
ARGS=""
while [ $# -ne 0 ] ; do
PARAM=$1
shift
case $PARAM in
--) break ;;
--node) ERLANG_NODE_ARG=$1 ; shift ;;
--config-dir) ETCDIR=$1 ; shift ;;
--config) EJABBERD_CONFIG_PATH=$1 ; shift ;;
--ctl-config) EJABBERDCTL_CONFIG_PATH=$1 ; shift ;;
--logs) LOGS_DIR=$1 ; shift ;;
--spool) SPOOLDIR=$1 ; shift ;;
*) ARGS="$ARGS $PARAM" ;;
while [ $# -gt 0 ]; do
case $1 in
-n|--node) ERLANG_NODE_ARG=$2; shift 2;;
-s|--spool) SPOOL_DIR=$2; shift 2;;
-l|--logs) LOGS_DIR=$2; shift 2;;
-f|--config) EJABBERD_CONFIG_PATH=$2; shift 2;;
-c|--ctl-config) EJABBERDCTL_CONFIG_PATH=$2; shift 2;;
-d|--config-dir) ETC_DIR=$2; shift 2;;
-t|--no-timeout) NO_TIMEOUT="--no-timeout"; shift;;
*) break;;
esac
done
# Define ejabberd variable if they have not been defined from the command line
if [ "$ETCDIR" = "" ] ; then
ETCDIR={{sysconfdir}}/ejabberd
fi
if [ "$EJABBERDCTL_CONFIG_PATH" = "" ] ; then
EJABBERDCTL_CONFIG_PATH=$ETCDIR/ejabberdctl.cfg
fi
if [ -f "$EJABBERDCTL_CONFIG_PATH" ] ; then
. "$EJABBERDCTL_CONFIG_PATH"
fi
if [ "$EJABBERD_CONFIG_PATH" = "" ] ; then
EJABBERD_CONFIG_PATH=$ETCDIR/ejabberd.cfg
fi
if [ "$LOGS_DIR" = "" ] ; then
LOGS_DIR={{localstatedir}}/log/ejabberd
fi
if [ "$SPOOLDIR" = "" ] ; then
SPOOLDIR={{localstatedir}}/lib/ejabberd
fi
if [ "$EJABBERD_DOC_PATH" = "" ] ; then
EJABBERD_DOC_PATH={{docdir}}
fi
if [ "$ERLANG_NODE_ARG" != "" ] ; then
ERLANG_NODE=$ERLANG_NODE_ARG
NODE=${ERLANG_NODE%@*}
fi
if [ "{{release}}" != "true" ] ; then
if [ "$EJABBERDDIR" = "" ] ; then
EJABBERDDIR={{libdir}}/ejabberd
fi
if [ "$EJABBERD_EBIN_PATH" = "" ] ; then
EJABBERD_EBIN_PATH=$EJABBERDDIR/ebin
fi
if [ "$EJABBERD_PRIV_PATH" = "" ] ; then
EJABBERD_PRIV_PATH=$EJABBERDDIR/priv
fi
if [ "$EJABBERD_BIN_PATH" = "" ] ; then
EJABBERD_BIN_PATH=$EJABBERD_PRIV_PATH/bin
fi
if [ "$EJABBERD_SO_PATH" = "" ] ; then
EJABBERD_SO_PATH=$EJABBERD_PRIV_PATH/lib
fi
if [ "$EJABBERD_MSGS_PATH" = "" ] ; then
EJABBERD_MSGS_PATH=$EJABBERD_PRIV_PATH/msgs
fi
fi
EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
SASL_LOG_PATH=$LOGS_DIR/erlang.log
DATETIME=`date "+%Y%m%d-%H%M%S"`
ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
ERL_INETRC=$ETCDIR/inetrc
HOME=$SPOOLDIR
# define ejabberd variables if not already defined from the command line
: "${ETC_DIR:="{{sysconfdir}}/ejabberd"}"
: "${LOGS_DIR:="{{localstatedir}}/log/ejabberd"}"
: "${SPOOL_DIR:="{{localstatedir}}/lib/ejabberd"}"
: "${EJABBERD_CONFIG_PATH:="$ETC_DIR/ejabberd.yml"}"
: "${EJABBERDCTL_CONFIG_PATH:="$ETC_DIR/ejabberdctl.cfg"}"
[ -f "$EJABBERDCTL_CONFIG_PATH" ] && . "$EJABBERDCTL_CONFIG_PATH"
[ -n "$ERLANG_NODE_ARG" ] && ERLANG_NODE="$ERLANG_NODE_ARG"
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && S="-s"
: "${EJABBERD_DOC_PATH:="{{docdir}}"}"
: "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}"
# define erl parameters
ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $ERL_OPTIONS"
KERNEL_OPTS=""
if [ "$FIREWALL_WINDOW" != "" ] ; then
KERNEL_OPTS="${KERNEL_OPTS} -kernel inet_dist_listen_min ${FIREWALL_WINDOW%-*} inet_dist_listen_max ${FIREWALL_WINDOW#*-}"
if [ -n "$FIREWALL_WINDOW" ] ; then
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_listen_min ${FIREWALL_WINDOW%-*} inet_dist_listen_max ${FIREWALL_WINDOW#*-}"
fi
if [ "$INET_DIST_INTERFACE" != "" ] ; then
INET_DIST_INTERFACE2="$(echo $INET_DIST_INTERFACE | sed 's/\./,/g')"
if [ "$INET_DIST_INTERFACE" != "$INET_DIST_INTERFACE2" ] ; then
INET_DIST_INTERFACE2="{$INET_DIST_INTERFACE2}"
if [ -n "$INET_DIST_INTERFACE" ] ; then
INET_DIST_INTERFACE2=$("$ERL" -noshell -eval 'case inet:parse_address("'$INET_DIST_INTERFACE'") of {ok,IP} -> io:format("~p",[IP]); _ -> ok end.' -s erlang halt)
if [ -n "$INET_DIST_INTERFACE2" ] ; then
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_use_interface $INET_DIST_INTERFACE2"
fi
KERNEL_OPTS="${KERNEL_OPTS} -kernel inet_dist_use_interface \"${INET_DIST_INTERFACE2}\""
fi
if [ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] ; then
NAME="-sname"
else
NAME="-name"
fi
ERL_LIBS={{libdir}}
ERL_CRASH_DUMP="$LOGS_DIR"/erl_crash_$(date "+%Y%m%d-%H%M%S").dump
ERL_INETRC="$ETC_DIR"/inetrc
# create the ejabberd home dir with the proper user if doesn't exist
# then change to that directory readable by INSTALLUSER to
# prevent "File operation error: eacces." messages
[ -d $HOME ] || $EXEC_CMD "mkdir -p $HOME"
cd $HOME
# define ejabberd parameters
EJABBERD_OPTS="$EJABBERD_OPTS\
$(sed '/^log_rate_limit/!d;s/:[ \t]*\([0-9]*\).*/ \1/;s/^/ /' "$EJABBERD_CONFIG_PATH")\
$(sed '/^log_rotate_size/!d;s/:[ \t]*\([0-9]*\).*/ \1/;s/^/ /' "$EJABBERD_CONFIG_PATH")\
$(sed '/^log_rotate_count/!d;s/:[ \t]*\([0-9]*\).*/ \1/;s/^/ /' "$EJABBERD_CONFIG_PATH")\
$(sed '/^log_rotate_date/!d;s/:[ \t]*\(.[^ ]*\).*/ \1/;s/^/ /' "$EJABBERD_CONFIG_PATH")"
[ -n "$EJABBERD_OPTS" ] && EJABBERD_OPTS="-ejabberd $EJABBERD_OPTS"
EJABBERD_OPTS="-mnesia dir \"$SPOOL_DIR\" $MNESIA_OPTIONS $EJABBERD_OPTS -s ejabberd"
# export global variables
export EJABBERD_CONFIG_PATH
export EJABBERD_MSGS_PATH
export EJABBERD_LOG_PATH
export EJABBERD_SO_PATH
export EJABBERD_BIN_PATH
export EJABBERD_DOC_PATH
export EJABBERD_PID_PATH
export ERL_CRASH_DUMP
@@ -145,255 +100,215 @@ export ERL_EPMD_ADDRESS
export ERL_INETRC
export ERL_MAX_PORTS
export ERL_MAX_ETS_TABLES
export HOME
export EXEC_CMD
export CONTRIB_MODULES_PATH
export CONTRIB_MODULES_CONF_DIR
export ERL_LIBS
# start server
start()
# run command either directly or via su $INSTALLUSER
exec_cmd()
{
check_start
$EXEC_CMD "$ERL \
$NAME $ERLANG_NODE \
-noinput -detached \
-pa $EJABBERD_EBIN_PATH \
-mnesia dir \"\\\"$SPOOLDIR\\\"\" \
$KERNEL_OPTS \
-s ejabberd \
-sasl sasl_error_logger \\{file,\\\"$SASL_LOG_PATH\\\"\\} \
$ERLANG_OPTS $ARGS \"$@\""
case $EXEC_CMD in
as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
as_current_user) "$@" ;;
esac
}
exec_erl()
{
NODE=$1; shift
exec_cmd "$ERL" ${S:--}name "$NODE" $ERLANG_OPTS "$@"
}
exec_iex()
{
NODE=$1; shift
exec_cmd "$IEX" -${S:--}name "$NODE" --erl "$ERLANG_OPTS" "$@"
}
# attach to server
debug()
# usage
debugwarning()
{
echo "--------------------------------------------------------------------"
echo ""
echo "IMPORTANT: we will attempt to attach an INTERACTIVE shell"
echo "to an already running ejabberd node."
echo "If an ERROR is printed, it means the connection was not successful."
echo "You can interact with the ejabberd node if you know how to use it."
echo "Please be extremely cautious with your actions,"
echo "and exit immediately if you are not completely sure."
echo ""
echo "To detach this shell from ejabberd, press:"
echo " control+c, control+c"
echo ""
echo "--------------------------------------------------------------------"
echo "To bypass permanently this warning, add to ejabberdctl.cfg the line:"
echo " EJABBERD_BYPASS_WARNINGS=true"
echo "Press any key to continue"
if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then
read foo
echo "--------------------------------------------------------------------"
echo ""
echo "IMPORTANT: we will attempt to attach an INTERACTIVE shell"
echo "to an already running ejabberd node."
echo "If an ERROR is printed, it means the connection was not successful."
echo "You can interact with the ejabberd node if you know how to use it."
echo "Please be extremely cautious with your actions,"
echo "and exit immediately if you are not completely sure."
echo ""
echo "To detach this shell from ejabberd, press:"
echo " control+c, control+c"
echo ""
echo "--------------------------------------------------------------------"
echo "To bypass permanently this warning, add to ejabberdctl.cfg the line:"
echo " EJABBERD_BYPASS_WARNINGS=true"
echo "Press return to continue"
read -r input
echo ""
fi
echo ""
TTY=`tty | sed -e 's/.*\///g'`
$EXEC_CMD "$ERL \
$NAME debug-${TTY}-${ERLANG_NODE} \
-remsh $ERLANG_NODE \
-hidden \
$KERNEL_OPTS \
$ERLANG_OPTS $ARGS \"$@\""
}
# start interactive server
live()
livewarning()
{
check_start
echo "--------------------------------------------------------------------"
echo ""
echo "IMPORTANT: ejabberd is going to start in LIVE (interactive) mode."
echo "All log messages will be shown in the command shell."
echo "You can interact with the ejabberd node if you know how to use it."
echo "Please be extremely cautious with your actions,"
echo "and exit immediately if you are not completely sure."
echo ""
echo "To exit this LIVE mode and stop ejabberd, press:"
echo " q(). and press the Enter key"
echo ""
echo "--------------------------------------------------------------------"
echo "To bypass permanently this warning, add to ejabberdctl.cfg the line:"
echo " EJABBERD_BYPASS_WARNINGS=true"
echo "Press any key to continue"
if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then
read foo
echo "--------------------------------------------------------------------"
echo ""
echo "IMPORTANT: ejabberd is going to start in LIVE (interactive) mode."
echo "All log messages will be shown in the command shell."
echo "You can interact with the ejabberd node if you know how to use it."
echo "Please be extremely cautious with your actions,"
echo "and exit immediately if you are not completely sure."
echo ""
echo "To exit this LIVE mode and stop ejabberd, press:"
echo " q(). and press the Enter key"
echo ""
echo "--------------------------------------------------------------------"
echo "To bypass permanently this warning, add to ejabberdctl.cfg the line:"
echo " EJABBERD_BYPASS_WARNINGS=true"
echo "Press return to continue"
read -r input
echo ""
fi
echo ""
$EXEC_CMD "$ERL \
$NAME $ERLANG_NODE \
-pa $EJABBERD_EBIN_PATH \
-mnesia dir \"\\\"$SPOOLDIR\\\"\" \
$KERNEL_OPTS \
-s ejabberd \
$ERLANG_OPTS $ARGS \"$@\""
}
etop()
{
$EXEC_CMD "$ERL \
$NAME debug-${TTY}-${ERLANG_NODE} \
-hidden -s etop -s erlang halt -output text -node $ERLANG_NODE"
}
help()
{
echo ""
echo "Commands to start an ejabberd node:"
echo " start Start an ejabberd node in server mode"
echo " debug Attach an interactive Erlang shell to a running ejabberd node"
echo " live Start an ejabberd node in live (interactive) mode"
echo " start Start an ejabberd node in server mode"
echo " debug Attach an interactive Erlang shell to a running ejabberd node"
echo " iexdebug Attach an interactive Elixir shell to a running ejabberd node"
echo " live Start an ejabberd node in live (interactive) mode"
echo " iexlive Start an ejabberd node in live (interactive) mode, within an Elixir shell"
echo " foreground Start an ejabberd node in server mode (attached)"
echo ""
echo "Optional parameters when starting an ejabberd node:"
echo " --config-dir dir Config ejabberd: $ETCDIR"
echo " --config-dir dir Config ejabberd: $ETC_DIR"
echo " --config file Config ejabberd: $EJABBERD_CONFIG_PATH"
echo " --ctl-config file Config ejabberdctl: $EJABBERDCTL_CONFIG_PATH"
echo " --logs dir Directory for logs: $LOGS_DIR"
echo " --spool dir Database spool dir: $SPOOLDIR"
echo " --spool dir Database spool dir: $SPOOL_DIR"
echo " --node nodename ejabberd node name: $ERLANG_NODE"
echo ""
}
# common control function
ctl()
# dynamic node name helper
uid()
{
COMMAND=$@
# Control number of connections identifiers
# using flock if available. Expects a linux-style
# flock that can lock a file descriptor.
MAXCONNID=100
CONNLOCKDIR={{localstatedir}}/lock/ejabberdctl
FLOCK='/usr/bin/flock'
if [ ! -x "$FLOCK" ] || [ ! -d "$CONNLOCKDIR" ] ; then
JOT='/usr/bin/jot'
if [ ! -x "$JOT" ] ; then
# no flock or jot, simply invoke ctlexec()
CTL_CONN="ctl-${ERLANG_NODE}"
ctlexec $CTL_CONN $COMMAND
result=$?
else
# no flock, but at least there is jot
RAND=`jot -r 1 0 $MAXCONNID`
CTL_CONN="ctl-${RAND}-${ERLANG_NODE}"
ctlexec $CTL_CONN $COMMAND
result=$?
fi
else
# we have flock so we get a lock
# on one of a limited number of
# conn names -- this allows
# concurrent invocations using a bound
# number of atoms
for N in `seq 1 $MAXCONNID`; do
CTL_CONN="ejabberdctl-$N"
CTL_LOCKFILE="$CONNLOCKDIR/$CTL_CONN"
(
exec 8>"$CTL_LOCKFILE"
if flock --nb 8; then
ctlexec $CTL_CONN $COMMAND
ssresult=$?
# segregate from possible flock exit(1)
ssresult=`expr $ssresult \* 10`
exit $ssresult
else
exit 1
fi
)
result=$?
if [ $result -eq 1 ] ; then
# means we errored out in flock
# rather than in the exec - stay in the loop
# trying other conn names...
badlock=1
else
badlock=""
break;
fi
done
result=`expr $result / 10`
fi
if [ "$badlock" ] ;then
echo "Ran out of connections to try. Your ejabberd processes" >&2
echo "may be stuck or this is a very busy server. For very" >&2
echo "busy servers, consider raising MAXCONNID in ejabberdctl">&2
exit 1;
fi
case $result in
0) :;;
1) :;;
2) help;;
3) help;;
esac
return $result
}
ctlexec()
{
CONN_NAME=$1; shift
COMMAND=$@
$EXEC_CMD "$ERL \
$NAME ${CONN_NAME} \
-noinput \
-hidden \
-pa $EJABBERD_EBIN_PATH \
$KERNEL_OPTS \
-s ejabberd_ctl -extra $ERLANG_NODE $COMMAND"
uuid=$(uuidgen 2>/dev/null)
[ -z "$uuid" ] && [ -f /proc/sys/kernel/random/uuid ] && uuid=$(cat /proc/sys/kernel/random/uuid)
[ -z "$uuid" ] && uuid=$(printf "%X" "${RANDOM:-$$}$(date +%M%S)")
uuid=${uuid%%-*}
[ $# -eq 0 ] && echo "${uuid}-${ERLANG_NODE}"
[ $# -eq 1 ] && echo "${uuid}-${1}-${ERLANG_NODE}"
[ $# -eq 2 ] && echo "${uuid}-${1}@${2}"
}
# stop epmd if there is no other running node
stop_epmd()
{
epmd -names 2>/dev/null | grep -q name || epmd -kill >/dev/null
"$EPMD" -names 2>/dev/null | grep -q name || "$EPMD" -kill >/dev/null
}
# make sure node not already running and node name unregistered
# if all ok, ensure runtime directory exists and make it current directory
check_start()
{
epmd -names 2>/dev/null | grep -q " ${ERLANG_NODE%@*} " && {
ps ux | grep -v grep | grep -q " $ERLANG_NODE " && {
"$EPMD" -names 2>/dev/null | grep -q " ${ERLANG_NODE%@*} " && {
pgrep -f "$ERLANG_NODE" >/dev/null && {
echo "ERROR: The ejabberd node '$ERLANG_NODE' is already running."
exit 4
} || {
ps ux | grep -v grep | grep -q beam && {
echo "ERROR: The ejabberd node '$ERLANG_NODE' is registered,"
echo " but no related beam process has been found."
echo "Shutdown all other erlang nodes, and call 'epmd -kill'."
exit 5
} || {
epmd -kill >/dev/null
}
}
pgrep beam >/dev/null && {
echo "ERROR: The ejabberd node '$ERLANG_NODE' is registered,"
echo " but no related beam process has been found."
echo "Shutdown all other erlang nodes, and call 'epmd -kill'."
exit 5
}
"$EPMD" -kill >/dev/null
}
}
# allow sync calls
wait_for_status()
wait_status()
{
# args: status try delay
# return: 0 OK, 1 KO
timeout=$2
timeout="$2"
status=4
while [ $status -ne $1 ] ; do
sleep $3
timeout=`expr $timeout - 1`
[ $timeout -eq 0 ] && {
status=$1
} || {
ctl status > /dev/null
status=$?
}
while [ "$status" -ne "$1" ] ; do
sleep "$3"
timeout=$((timeout - 1))
if [ $timeout -eq 0 ] ; then
status="$1"
else
exec_erl "$(uid ctl)" -hidden -noinput -s ejabberd_ctl \
-extra "$ERLANG_NODE" $NO_TIMEOUT status > /dev/null
status="$?"
fi
done
[ $timeout -eq 0 ] && return 1 || return 0
[ $timeout -gt 0 ]
}
# main handler
case $ARGS in
' start') start;;
' debug') debug;;
' live') live;;
' etop') etop;;
' started') wait_for_status 0 30 2;; # wait 30x2s before timeout
' stopped') wait_for_status 3 15 2 && stop_epmd;; # wait 15x2s before timeout
*) ctl $ARGS;;
# ensure we can change current directory to SPOOL_DIR
[ -d "$SPOOL_DIR" ] || exec_cmd mkdir -p "$SPOOL_DIR"
cd "$SPOOL_DIR" || {
echo "ERROR: can not access directory $SPOOL_DIR"
exit 6
}
# main
case $1 in
start)
check_start
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS -detached
;;
foreground)
check_start
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS -noinput
;;
live)
livewarning
check_start
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS
;;
debug)
debugwarning
exec_erl "$(uid debug)" -hidden -remsh "$ERLANG_NODE"
;;
etop)
exec_erl "$(uid top)" -hidden -node "$ERLANG_NODE" -s etop \
-s erlang halt -output text
;;
iexdebug)
debugwarning
exec_iex "$(uid debug)" --remsh "$ERLANG_NODE"
;;
iexlive)
livewarning
exec_iex "$ERLANG_NODE" --erl "$EJABBERD_OPTS" --app ejabberd
;;
ping)
PEER=${2:-$ERLANG_NODE}
[ "$PEER" = "${PEER%.*}" ] && PS="-s"
exec_cmd "$ERL" ${PS:--}name "$(uid ping "$(hostname $PS)")" $ERLANG_OPTS \
-noinput -hidden -eval 'io:format("~p~n",[net_adm:ping('"'$PEER'"')])' \
-s erlang halt -output text
;;
started)
wait_status 0 30 2 # wait 30x2s before timeout
;;
stopped)
wait_status 3 30 2 && stop_epmd # wait 30x2s before timeout
;;
*)
exec_erl "$(uid ctl)" -hidden -noinput -s ejabberd_ctl \
-extra "$ERLANG_NODE" $NO_TIMEOUT "$@"
result=$?
case $result in
2|3) help;;
*) :;;
esac
exit $result
;;
esac
+1 -1
View File
@@ -70,7 +70,7 @@ done
echo '7. compile ejabberd'
gmake
for A in mod_irc mod_muc mod_pubsub; do
for A in mod_muc mod_pubsub; do
(cd $A; gmake)
done
-1
View File
@@ -51,7 +51,6 @@ override_acls.
{mod_offline, []},
{mod_echo, [{host, "echo.jabber.dbc.mtview.ca.us"}]},
{mod_private, []},
% {mod_irc, []},
{mod_muc, []},
{mod_pubsub, []},
{mod_time, []},
+4 -5
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2013 ProcessOne
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -12,10 +12,9 @@
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
%%% 02111-1307 USA
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
+51
View File
@@ -0,0 +1,51 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
%%% published by the Free Software Foundation; either version 2 of the
%%% License, or (at your option) any later version.
%%%
%%% This program is distributed in the hope that it will be useful,
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
-define(CT_XML,
{<<"Content-Type">>, <<"text/xml; charset=utf-8">>}).
-define(CT_PLAIN,
{<<"Content-Type">>, <<"text/plain">>}).
-define(CT_JSON,
{<<"Content-Type">>, <<"application/json">>}).
-define(AC_ALLOW_ORIGIN,
{<<"Access-Control-Allow-Origin">>, <<"*">>}).
-define(AC_ALLOW_METHODS,
{<<"Access-Control-Allow-Methods">>,
<<"GET, POST, OPTIONS">>}).
-define(AC_ALLOW_HEADERS,
{<<"Access-Control-Allow-Headers">>,
<<"Content-Type">>}).
-define(AC_MAX_AGE,
{<<"Access-Control-Max-Age">>, <<"86400">>}).
-define(OPTIONS_HEADER,
[?CT_PLAIN, ?AC_ALLOW_ORIGIN, ?AC_ALLOW_METHODS,
?AC_ALLOW_HEADERS, ?AC_MAX_AGE]).
-define(HEADER(CType),
[CType, ?AC_ALLOW_ORIGIN, ?AC_ALLOW_HEADERS]).
-define(BOSH_CACHE, bosh_cache).
-52
View File
@@ -1,52 +0,0 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2013 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
%%% published by the Free Software Foundation; either version 2 of the
%%% License, or (at your option) any later version.
%%%
%%% This program is distributed in the hope that it will be useful,
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
%%% 02111-1307 USA
%%%
%%%----------------------------------------------------------------------
%% This macro returns a string of the ejabberd version running, e.g. "2.3.4"
%% If the ejabberd application description isn't loaded, returns atom: undefined
-define(VERSION, ejabberd_config:get_version()).
-define(MYHOSTS, ejabberd_config:get_myhosts()).
-define(MYNAME, hd(ejabberd_config:get_myhosts())).
-define(MYLANG, ejabberd_config:get_mylang()).
-define(MSGS_DIR, filename:join(["priv", "msgs"])).
-define(CONFIG_PATH, <<"ejabberd.cfg">>).
-define(LOG_PATH, <<"ejabberd.log">>).
-define(EJABBERD_URI, <<"http://www.process-one.net/en/ejabberd/">>).
-define(S2STIMEOUT, 600000).
%%-define(DBGFSM, true).
-record(scram,
{storedkey = <<"">>,
serverkey = <<"">>,
salt = <<"">>,
iterationcount = 0 :: integer()}).
-type scram() :: #scram{}.
-define(SCRAM_DEFAULT_ITERATION_COUNT, 4096).
+53
View File
@@ -0,0 +1,53 @@
-record(challenge, {
type = <<"http-01">> :: bitstring(),
status = pending :: pending | valid | invalid,
uri = "" :: url(),
token = <<"">> :: bitstring()
}).
-record(data_acc, {
id :: list(),
ca_url :: url(),
key :: jose_jwk:key()
}).
-type data_acc() :: #data_acc{}.
-record(data_cert, {
domain :: bitstring(),
pem :: pem(),
path :: string()
}).
-type data_cert() :: #data_cert{}.
%%
%% Types
%%
%% Acme configuration
-type acme_config() :: [{ca_url, url()} | {contact, bitstring()}].
%% The main data type that ejabberd_acme keeps
-type acme_data() :: proplist().
%% The list of certificates kept in data
-type data_certs() :: proplist(bitstring(), data_cert()).
%% The certificate saved in pem format
-type pem() :: bitstring().
-type nonce() :: string().
-type url() :: string().
-type proplist() :: [{_, _}].
-type proplist(X,Y) :: [{X,Y}].
-type dirs() :: #{string() => url()}.
-type jws() :: map().
-type handle_resp_fun() :: fun(({ok, proplist(), proplist()}) -> {ok, _, nonce()}).
-type acme_challenge() :: #challenge{}.
%% Options
-type account_opt() :: string().
-type verbose_opt() :: string().
-type domains_opt() :: string().
+22
View File
@@ -0,0 +1,22 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
%%% published by the Free Software Foundation; either version 2 of the
%%% License, or (at your option) any later version.
%%%
%%% This program is distributed in the hope that it will be useful,
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
-record(passwd, {us = {<<"">>, <<"">>} :: {binary(), binary()} | '$1',
password = <<"">> :: binary() | scram() | '_'}).
+40 -10
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2013 ProcessOne
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -12,10 +12,9 @@
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
%%% 02111-1307 USA
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
@@ -27,23 +26,55 @@
{tuple, [rterm()]} | {list, rterm()} |
rescode | restuple.
-type oauth_scope() :: atom().
%% ejabberd_commands OAuth ReST ACL definition:
%% Two fields exist that are used to control access on a command from ReST API:
%% 1. Policy
%% If policy is:
%% - restricted: command is not exposed as OAuth Rest API.
%% - admin: Command is allowed for user that have Admin Rest command enabled by access rule: commands_admin_access
%% - user: Command might be called by any server user.
%% - open: Command can be called by anyone.
%%
%% Policy is just used to control who can call the command. A specific additional access rules can be performed, as
%% defined by access option.
%% Access option can be a list of:
%% - {Module, accessName, DefaultValue}: Reference and existing module access to limit who can use the command.
%% - AccessRule name: direct name of the access rule to check in config file.
%% TODO: Access option could be atom command (not a list). In the case, User performing the command, will be added as first parameter
%% to command, so that the command can perform additional check.
-record(ejabberd_commands,
{name :: atom(),
{name :: atom(),
tags = [] :: [atom()] | '_' | '$2',
desc = "" :: string() | '_' | '$3',
longdesc = "" :: string() | '_',
module :: atom(),
function :: atom(),
version = 0 :: integer(),
weight = 1 :: integer(),
module :: atom() | '_',
function :: atom() | '_',
args = [] :: [aterm()] | '_' | '$1' | '$2',
result = {res, rescode} :: rterm() | '_' | '$2'}).
policy = restricted :: open | restricted | admin | user,
%% access is: [accessRuleName] or [{Module, AccessOption, DefaultAccessRuleName}]
access = [] :: [{atom(),atom(),atom()}|atom()],
result = {res, rescode} :: rterm() | '_' | '$2',
args_desc = none :: none | [string()] | '_',
result_desc = none :: none | string() | '_',
args_example = none :: none | [any()] | '_',
result_example = none :: any()}).
%% TODO Fix me: Type is not up to date
-type ejabberd_commands() :: #ejabberd_commands{name :: atom(),
tags :: [atom()],
desc :: string(),
longdesc :: string(),
version :: integer(),
module :: atom(),
function :: atom(),
args :: [aterm()],
policy :: open | restricted | admin | user,
access :: [{atom(),atom(),atom()}|atom()],
result :: rterm()}.
%% @type ejabberd_commands() = #ejabberd_commands{
@@ -72,4 +103,3 @@
%% @type rterm() = {Name::atom(), Type::rtype()}.
%% A result term is a tuple with the term name and the term type.
+5 -9
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2013 ProcessOne
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -12,22 +12,18 @@
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
%%% 02111-1307 USA
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
-record(config, {key :: any(), value :: any()}).
-record(local_config, {key :: any(), value :: any()}).
-type config() :: #config{}.
-type local_config() :: #local_config{}.
-record(state,
{opts = [] :: [acl:acl() | config() | local_config()],
{opts = [] :: [acl:acl() | local_config()],
hosts = [] :: [binary()],
override_local = false :: boolean(),
override_global = false :: boolean(),
+4 -5
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2013 ProcessOne
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -12,10 +12,9 @@
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
%%% 02111-1307 USA
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
+28 -10
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2013 ProcessOne
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -12,25 +12,43 @@
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
%%% 02111-1307 USA
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
-record(request,
{method, % :: method(),
{method :: method(),
path = [] :: [binary()],
q = [] :: [{binary() | nokey, binary()}],
us = {<<>>, <<>>} :: {binary(), binary()},
auth :: {binary(), binary()} |
{auth_jid, {binary(), binary()}, jlib:jid()},
auth :: {binary(), binary()} | {oauth, binary(), []} | undefined,
lang = <<"">> :: binary(),
data = <<"">> :: binary(),
ip :: {inet:ip_address(), inet:port_number()},
host = <<"">> :: binary(),
port = 5280 :: inet:port_number(),
tp = http, % :: protocol(),
headers = [] :: [{atom() | binary(), binary()}]}).
opts = [] :: list(),
tp = http :: protocol(),
headers = [] :: [{atom() | binary(), binary()}],
length = 0 :: non_neg_integer(),
sockmod :: gen_tcp | fast_tls,
socket :: inet:socket() | fast_tls:tls_socket()}).
-record(ws,
{socket :: inet:socket() | fast_tls:tls_socket(),
sockmod = gen_tcp :: gen_tcp | fast_tls,
ip :: {inet:ip_address(), inet:port_number()},
host = <<"">> :: binary(),
port = 5280 :: inet:port_number(),
path = [] :: [binary()],
headers = [] :: [{atom() | binary(), binary()}],
local_path = [] :: [binary()],
q = [] :: [{binary() | nokey, binary()}],
buf :: binary(),
http_opts = [] :: list()}).
-type method() :: 'GET' | 'HEAD' | 'DELETE' | 'OPTIONS' | 'PUT' | 'POST' | 'TRACE' | 'PATCH'.
-type protocol() :: http | https.
-type http_request() :: #request{}.
+26
View File
@@ -0,0 +1,26 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
%%% published by the Free Software Foundation; either version 2 of the
%%% License, or (at your option) any later version.
%%%
%%% This program is distributed in the hope that it will be useful,
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
-record(oauth_token, {
token = <<"">> :: binary() | '_',
us = {<<"">>, <<"">>} :: {binary(), binary()} | '_',
scope = [] :: [binary()] | '_',
expire :: integer() | '$1' | '_'
}).
+8
View File
@@ -0,0 +1,8 @@
-define(ROUTES_CACHE, routes_cache).
-type local_hint() :: integer() | {apply, atom(), atom()}.
-record(route, {domain :: binary() | '_',
server_host :: binary() | '_',
pid :: undefined | pid(),
local_hint :: local_hint() | undefined | '_'}).
+36
View File
@@ -0,0 +1,36 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
%%% published by the Free Software Foundation; either version 2 of the
%%% License, or (at your option) any later version.
%%%
%%% This program is distributed in the hope that it will be useful,
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
-ifndef(EJABBERD_SM_HRL).
-define(EJABBERD_SM_HRL, true).
-define(SM_CACHE, sm_cache).
-record(session, {sid, usr, us, priority, info = []}).
-record(session_counter, {vhost, count}).
-type sid() :: {erlang:timestamp(), pid()}.
-type ip() :: {inet:ip_address(), inet:port_number()} | undefined.
-type info() :: [{conn, atom()} | {ip, ip()} | {node, atom()}
| {oor, boolean()} | {auth_module, atom()}
| {num_stanzas_in, non_neg_integer()}
| offline].
-type prio() :: undefined | integer().
-endif.
+36
View File
@@ -0,0 +1,36 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
%%% published by the Free Software Foundation; either version 2 of the
%%% License, or (at your option) any later version.
%%%
%%% This program is distributed in the hope that it will be useful,
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
-define(SQL_MARK, sql__mark_).
-define(SQL(SQL), ?SQL_MARK(SQL)).
-define(SQL_UPSERT_MARK, sql_upsert__mark_).
-define(SQL_UPSERT(Host, Table, Fields),
ejabberd_sql:sql_query(Host, ?SQL_UPSERT_MARK(Table, Fields))).
-define(SQL_UPSERT_T(Table, Fields),
ejabberd_sql:sql_query_t(?SQL_UPSERT_MARK(Table, Fields))).
-define(SQL_INSERT_MARK, sql_insert__mark_).
-define(SQL_INSERT(Table, Fields), ?SQL_INSERT_MARK(Table, Fields)).
-record(sql_query, {hash, format_query, format_res, args, loc}).
-record(sql_escape, {string, integer, boolean}).
+4 -5
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2013 ProcessOne
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -12,10 +12,9 @@
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
%%% 02111-1307 USA
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
+5 -6
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2013 ProcessOne
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -12,10 +12,9 @@
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
%%% 02111-1307 USA
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
@@ -28,7 +27,7 @@
-record(eldap_search,
{scope = wholeSubtree :: scope(),
base = <<"">> :: binary(),
filter :: eldap:filter(),
filter :: eldap:filter() | undefined,
limit = 0 :: non_neg_integer(),
attributes = [] :: [binary()],
types_only = false :: boolean(),
+8 -6
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2013 ProcessOne
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -12,10 +12,9 @@
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
%%% 02111-1307 USA
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
@@ -39,9 +38,12 @@
-define(AC_MAX_AGE,
{<<"Access-Control-Max-Age">>, <<"86400">>}).
-define(NO_CACHE,
{<<"Cache-Control">>, <<"max-age=0, no-cache, no-store">>}).
-define(OPTIONS_HEADER,
[?CT_PLAIN, ?AC_ALLOW_ORIGIN, ?AC_ALLOW_METHODS,
?AC_ALLOW_HEADERS, ?AC_MAX_AGE]).
-define(HEADER,
[?CT_XML, ?AC_ALLOW_ORIGIN, ?AC_ALLOW_HEADERS]).
[?CT_XML, ?AC_ALLOW_ORIGIN, ?AC_ALLOW_HEADERS, ?NO_CACHE]).
-502
View File
@@ -1,502 +0,0 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2013 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
%%% published by the Free Software Foundation; either version 2 of the
%%% License, or (at your option) any later version.
%%%
%%% This program is distributed in the hope that it will be useful,
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
%%% 02111-1307 USA
%%%
%%%----------------------------------------------------------------------
-include("ns.hrl").
-include("xml.hrl").
-define(STANZA_ERROR(Code, Type, Condition),
#xmlel{name = <<"error">>,
attrs = [{<<"code">>, Code}, {<<"type">>, Type}],
children =
[#xmlel{name = Condition,
attrs = [{<<"xmlns">>, ?NS_STANZAS}],
children = []}]}).
-define(ERR_BAD_FORMAT,
?STANZA_ERROR(<<"406">>, <<"modify">>,
<<"bad-format">>)).
-define(ERR_BAD_REQUEST,
?STANZA_ERROR(<<"400">>, <<"modify">>,
<<"bad-request">>)).
-define(ERR_CONFLICT,
?STANZA_ERROR(<<"409">>, <<"cancel">>, <<"conflict">>)).
-define(ERR_FEATURE_NOT_IMPLEMENTED,
?STANZA_ERROR(<<"501">>, <<"cancel">>,
<<"feature-not-implemented">>)).
-define(ERR_FORBIDDEN,
?STANZA_ERROR(<<"403">>, <<"auth">>, <<"forbidden">>)).
-define(ERR_GONE,
?STANZA_ERROR(<<"302">>, <<"modify">>, <<"gone">>)).
-define(ERR_INTERNAL_SERVER_ERROR,
?STANZA_ERROR(<<"500">>, <<"wait">>,
<<"internal-server-error">>)).
-define(ERR_ITEM_NOT_FOUND,
?STANZA_ERROR(<<"404">>, <<"cancel">>,
<<"item-not-found">>)).
-define(ERR_JID_MALFORMED,
?STANZA_ERROR(<<"400">>, <<"modify">>,
<<"jid-malformed">>)).
-define(ERR_NOT_ACCEPTABLE,
?STANZA_ERROR(<<"406">>, <<"modify">>,
<<"not-acceptable">>)).
-define(ERR_NOT_ALLOWED,
?STANZA_ERROR(<<"405">>, <<"cancel">>,
<<"not-allowed">>)).
-define(ERR_NOT_AUTHORIZED,
?STANZA_ERROR(<<"401">>, <<"auth">>,
<<"not-authorized">>)).
-define(ERR_PAYMENT_REQUIRED,
?STANZA_ERROR(<<"402">>, <<"auth">>,
<<"payment-required">>)).
-define(ERR_RECIPIENT_UNAVAILABLE,
?STANZA_ERROR(<<"404">>, <<"wait">>,
<<"recipient-unavailable">>)).
-define(ERR_REDIRECT,
?STANZA_ERROR(<<"302">>, <<"modify">>, <<"redirect">>)).
-define(ERR_REGISTRATION_REQUIRED,
?STANZA_ERROR(<<"407">>, <<"auth">>,
<<"registration-required">>)).
-define(ERR_REMOTE_SERVER_NOT_FOUND,
?STANZA_ERROR(<<"404">>, <<"cancel">>,
<<"remote-server-not-found">>)).
-define(ERR_REMOTE_SERVER_TIMEOUT,
?STANZA_ERROR(<<"504">>, <<"wait">>,
<<"remote-server-timeout">>)).
-define(ERR_RESOURCE_CONSTRAINT,
?STANZA_ERROR(<<"500">>, <<"wait">>,
<<"resource-constraint">>)).
-define(ERR_SERVICE_UNAVAILABLE,
?STANZA_ERROR(<<"503">>, <<"cancel">>,
<<"service-unavailable">>)).
-define(ERR_SUBSCRIPTION_REQUIRED,
?STANZA_ERROR(<<"407">>, <<"auth">>,
<<"subscription-required">>)).
-define(ERR_UNEXPECTED_REQUEST,
?STANZA_ERROR(<<"400">>, <<"wait">>,
<<"unexpected-request">>)).
-define(ERR_UNEXPECTED_REQUEST_CANCEL,
?STANZA_ERROR(<<"401">>, <<"cancel">>,
<<"unexpected-request">>)).
%-define(ERR_,
% ?STANZA_ERROR("", "", "")).
-define(STANZA_ERRORT(Code, Type, Condition, Lang,
Text),
#xmlel{name = <<"error">>,
attrs = [{<<"code">>, Code}, {<<"type">>, Type}],
children =
[#xmlel{name = Condition,
attrs = [{<<"xmlns">>, ?NS_STANZAS}], children = []},
#xmlel{name = <<"text">>,
attrs = [{<<"xmlns">>, ?NS_STANZAS}],
children =
[{xmlcdata,
translate:translate(Lang, Text)}]}]}).
-define(ERRT_BAD_FORMAT(Lang, Text),
?STANZA_ERRORT(<<"406">>, <<"modify">>,
<<"bad-format">>, Lang, Text)).
-define(ERRT_BAD_REQUEST(Lang, Text),
?STANZA_ERRORT(<<"400">>, <<"modify">>,
<<"bad-request">>, Lang, Text)).
-define(ERRT_CONFLICT(Lang, Text),
?STANZA_ERRORT(<<"409">>, <<"cancel">>, <<"conflict">>,
Lang, Text)).
-define(ERRT_FEATURE_NOT_IMPLEMENTED(Lang, Text),
?STANZA_ERRORT(<<"501">>, <<"cancel">>,
<<"feature-not-implemented">>, Lang, Text)).
-define(ERRT_FORBIDDEN(Lang, Text),
?STANZA_ERRORT(<<"403">>, <<"auth">>, <<"forbidden">>,
Lang, Text)).
-define(ERRT_GONE(Lang, Text),
?STANZA_ERRORT(<<"302">>, <<"modify">>, <<"gone">>,
Lang, Text)).
-define(ERRT_INTERNAL_SERVER_ERROR(Lang, Text),
?STANZA_ERRORT(<<"500">>, <<"wait">>,
<<"internal-server-error">>, Lang, Text)).
-define(ERRT_ITEM_NOT_FOUND(Lang, Text),
?STANZA_ERRORT(<<"404">>, <<"cancel">>,
<<"item-not-found">>, Lang, Text)).
-define(ERRT_JID_MALFORMED(Lang, Text),
?STANZA_ERRORT(<<"400">>, <<"modify">>,
<<"jid-malformed">>, Lang, Text)).
-define(ERRT_NOT_ACCEPTABLE(Lang, Text),
?STANZA_ERRORT(<<"406">>, <<"modify">>,
<<"not-acceptable">>, Lang, Text)).
-define(ERRT_NOT_ALLOWED(Lang, Text),
?STANZA_ERRORT(<<"405">>, <<"cancel">>,
<<"not-allowed">>, Lang, Text)).
-define(ERRT_NOT_AUTHORIZED(Lang, Text),
?STANZA_ERRORT(<<"401">>, <<"auth">>,
<<"not-authorized">>, Lang, Text)).
-define(ERRT_PAYMENT_REQUIRED(Lang, Text),
?STANZA_ERRORT(<<"402">>, <<"auth">>,
<<"payment-required">>, Lang, Text)).
-define(ERRT_RECIPIENT_UNAVAILABLE(Lang, Text),
?STANZA_ERRORT(<<"404">>, <<"wait">>,
<<"recipient-unavailable">>, Lang, Text)).
-define(ERRT_REDIRECT(Lang, Text),
?STANZA_ERRORT(<<"302">>, <<"modify">>, <<"redirect">>,
Lang, Text)).
-define(ERRT_REGISTRATION_REQUIRED(Lang, Text),
?STANZA_ERRORT(<<"407">>, <<"auth">>,
<<"registration-required">>, Lang, Text)).
-define(ERRT_REMOTE_SERVER_NOT_FOUND(Lang, Text),
?STANZA_ERRORT(<<"404">>, <<"cancel">>,
<<"remote-server-not-found">>, Lang, Text)).
-define(ERRT_REMOTE_SERVER_TIMEOUT(Lang, Text),
?STANZA_ERRORT(<<"504">>, <<"wait">>,
<<"remote-server-timeout">>, Lang, Text)).
-define(ERRT_RESOURCE_CONSTRAINT(Lang, Text),
?STANZA_ERRORT(<<"500">>, <<"wait">>,
<<"resource-constraint">>, Lang, Text)).
-define(ERRT_SERVICE_UNAVAILABLE(Lang, Text),
?STANZA_ERRORT(<<"503">>, <<"cancel">>,
<<"service-unavailable">>, Lang, Text)).
-define(ERRT_SUBSCRIPTION_REQUIRED(Lang, Text),
?STANZA_ERRORT(<<"407">>, <<"auth">>,
<<"subscription-required">>, Lang, Text)).
-define(ERRT_UNEXPECTED_REQUEST(Lang, Text),
?STANZA_ERRORT(<<"400">>, <<"wait">>,
<<"unexpected-request">>, Lang, Text)).
-define(ERR_AUTH_NO_RESOURCE_PROVIDED(Lang),
?ERRT_NOT_ACCEPTABLE(Lang, <<"No resource provided">>)).
-define(ERR_AUTH_BAD_RESOURCE_FORMAT(Lang),
?ERRT_NOT_ACCEPTABLE(Lang,
<<"Illegal resource format">>)).
-define(ERR_AUTH_RESOURCE_CONFLICT(Lang),
?ERRT_CONFLICT(Lang, <<"Resource conflict">>)).
-define(STREAM_ERROR(Condition, Cdata),
#xmlel{name = <<"stream:error">>, attrs = [],
children =
[#xmlel{name = Condition,
attrs = [{<<"xmlns">>, ?NS_STREAMS}],
children = [{xmlcdata, Cdata}]}]}).
-define(SERR_BAD_FORMAT,
?STREAM_ERROR(<<"bad-format">>, <<"">>)).
-define(SERR_BAD_NAMESPACE_PREFIX,
?STREAM_ERROR(<<"bad-namespace-prefix">>, <<"">>)).
-define(SERR_CONFLICT,
?STREAM_ERROR(<<"conflict">>, <<"">>)).
-define(SERR_CONNECTION_TIMEOUT,
?STREAM_ERROR(<<"connection-timeout">>, <<"">>)).
-define(SERR_HOST_GONE,
?STREAM_ERROR(<<"host-gone">>, <<"">>)).
-define(SERR_HOST_UNKNOWN,
?STREAM_ERROR(<<"host-unknown">>, <<"">>)).
-define(SERR_IMPROPER_ADDRESSING,
?STREAM_ERROR(<<"improper-addressing">>, <<"">>)).
-define(SERR_INTERNAL_SERVER_ERROR,
?STREAM_ERROR(<<"internal-server-error">>, <<"">>)).
-define(SERR_INVALID_FROM,
?STREAM_ERROR(<<"invalid-from">>, <<"">>)).
-define(SERR_INVALID_ID,
?STREAM_ERROR(<<"invalid-id">>, <<"">>)).
-define(SERR_INVALID_NAMESPACE,
?STREAM_ERROR(<<"invalid-namespace">>, <<"">>)).
-define(SERR_INVALID_XML,
?STREAM_ERROR(<<"invalid-xml">>, <<"">>)).
-define(SERR_NOT_AUTHORIZED,
?STREAM_ERROR(<<"not-authorized">>, <<"">>)).
-define(SERR_POLICY_VIOLATION,
?STREAM_ERROR(<<"policy-violation">>, <<"">>)).
-define(SERR_REMOTE_CONNECTION_FAILED,
?STREAM_ERROR(<<"remote-connection-failed">>, <<"">>)).
-define(SERR_RESOURSE_CONSTRAINT,
?STREAM_ERROR(<<"resource-constraint">>, <<"">>)).
-define(SERR_RESTRICTED_XML,
?STREAM_ERROR(<<"restricted-xml">>, <<"">>)).
-define(SERR_SEE_OTHER_HOST(Host),
?STREAM_ERROR(<<"see-other-host">>, Host)).
-define(SERR_SYSTEM_SHUTDOWN,
?STREAM_ERROR(<<"system-shutdown">>, <<"">>)).
-define(SERR_UNSUPPORTED_ENCODING,
?STREAM_ERROR(<<"unsupported-encoding">>, <<"">>)).
-define(SERR_UNSUPPORTED_STANZA_TYPE,
?STREAM_ERROR(<<"unsupported-stanza-type">>, <<"">>)).
-define(SERR_UNSUPPORTED_VERSION,
?STREAM_ERROR(<<"unsupported-version">>, <<"">>)).
-define(SERR_XML_NOT_WELL_FORMED,
?STREAM_ERROR(<<"xml-not-well-formed">>, <<"">>)).
%-define(SERR_,
% ?STREAM_ERROR("", "")).
-define(STREAM_ERRORT(Condition, Cdata, Lang, Text),
#xmlel{name = <<"stream:error">>, attrs = [],
children =
[#xmlel{name = Condition,
attrs = [{<<"xmlns">>, ?NS_STREAMS}],
children = [{xmlcdata, Cdata}]},
#xmlel{name = <<"text">>,
attrs =
[{<<"xml:lang">>, Lang},
{<<"xmlns">>, ?NS_STREAMS}],
children =
[{xmlcdata,
translate:translate(Lang, Text)}]}]}).
-define(SERRT_BAD_FORMAT(Lang, Text),
?STREAM_ERRORT(<<"bad-format">>, <<"">>, Lang, Text)).
-define(SERRT_BAD_NAMESPACE_PREFIX(Lang, Text),
?STREAM_ERRORT(<<"bad-namespace-prefix">>, <<"">>, Lang,
Text)).
-define(SERRT_CONFLICT(Lang, Text),
?STREAM_ERRORT(<<"conflict">>, <<"">>, Lang, Text)).
-define(SERRT_CONNECTION_TIMEOUT(Lang, Text),
?STREAM_ERRORT(<<"connection-timeout">>, <<"">>, Lang,
Text)).
-define(SERRT_HOST_GONE(Lang, Text),
?STREAM_ERRORT(<<"host-gone">>, <<"">>, Lang, Text)).
-define(SERRT_HOST_UNKNOWN(Lang, Text),
?STREAM_ERRORT(<<"host-unknown">>, <<"">>, Lang, Text)).
-define(SERRT_IMPROPER_ADDRESSING(Lang, Text),
?STREAM_ERRORT(<<"improper-addressing">>, <<"">>, Lang,
Text)).
-define(SERRT_INTERNAL_SERVER_ERROR(Lang, Text),
?STREAM_ERRORT(<<"internal-server-error">>, <<"">>,
Lang, Text)).
-define(SERRT_INVALID_FROM(Lang, Text),
?STREAM_ERRORT(<<"invalid-from">>, <<"">>, Lang, Text)).
-define(SERRT_INVALID_ID(Lang, Text),
?STREAM_ERRORT(<<"invalid-id">>, <<"">>, Lang, Text)).
-define(SERRT_INVALID_NAMESPACE(Lang, Text),
?STREAM_ERRORT(<<"invalid-namespace">>, <<"">>, Lang,
Text)).
-define(SERRT_INVALID_XML(Lang, Text),
?STREAM_ERRORT(<<"invalid-xml">>, <<"">>, Lang, Text)).
-define(SERRT_NOT_AUTHORIZED(Lang, Text),
?STREAM_ERRORT(<<"not-authorized">>, <<"">>, Lang,
Text)).
-define(SERRT_POLICY_VIOLATION(Lang, Text),
?STREAM_ERRORT(<<"policy-violation">>, <<"">>, Lang,
Text)).
-define(SERRT_REMOTE_CONNECTION_FAILED(Lang, Text),
?STREAM_ERRORT(<<"remote-connection-failed">>, <<"">>,
Lang, Text)).
-define(SERRT_RESOURSE_CONSTRAINT(Lang, Text),
?STREAM_ERRORT(<<"resource-constraint">>, <<"">>, Lang,
Text)).
-define(SERRT_RESTRICTED_XML(Lang, Text),
?STREAM_ERRORT(<<"restricted-xml">>, <<"">>, Lang,
Text)).
-define(SERRT_SEE_OTHER_HOST(Host, Lang, Text),
?STREAM_ERRORT(<<"see-other-host">>, Host, Lang, Text)).
-define(SERRT_SYSTEM_SHUTDOWN(Lang, Text),
?STREAM_ERRORT(<<"system-shutdown">>, <<"">>, Lang,
Text)).
-define(SERRT_UNSUPPORTED_ENCODING(Lang, Text),
?STREAM_ERRORT(<<"unsupported-encoding">>, <<"">>, Lang,
Text)).
-define(SERRT_UNSUPPORTED_STANZA_TYPE(Lang, Text),
?STREAM_ERRORT(<<"unsupported-stanza-type">>, <<"">>,
Lang, Text)).
-define(SERRT_UNSUPPORTED_VERSION(Lang, Text),
?STREAM_ERRORT(<<"unsupported-version">>, <<"">>, Lang,
Text)).
-define(SERRT_XML_NOT_WELL_FORMED(Lang, Text),
?STREAM_ERRORT(<<"xml-not-well-formed">>, <<"">>, Lang,
Text)).
-record(jid, {user = <<"">> :: binary(),
server = <<"">> :: binary(),
resource = <<"">> :: binary(),
luser = <<"">> :: binary(),
lserver = <<"">> :: binary(),
lresource = <<"">> :: binary()}).
-type(jid() :: #jid{}).
-type(ljid() :: {binary(), binary(), binary()}).
-record(iq, {id = <<"">> :: binary(),
type = get :: get | set | result | error,
xmlns = <<"">> :: binary(),
lang = <<"">> :: binary(),
sub_el = #xmlel{} :: xmlel() | [xmlel()]}).
-type(iq_get()
:: #iq{
id :: binary(),
type :: get,
xmlns :: binary(),
lang :: binary(),
sub_el :: xmlel()
}
).
-type(iq_set()
:: #iq{
id :: binary(),
type :: set,
xmlns :: binary(),
lang :: binary(),
sub_el :: xmlel()
}
).
-type iq_request() :: iq_get() | iq_set().
-type(iq_result()
:: #iq{
id :: binary(),
type :: result,
xmlns :: binary(),
lang :: binary(),
sub_el :: [xmlel()]
}
).
-type(iq_error()
:: #iq{
id :: binary(),
type :: error,
xmlns :: binary(),
lang :: binary(),
sub_el :: [xmlel()]
}
).
-type iq_reply() :: iq_result() | iq_error() .
-type(iq() :: iq_request() | iq_reply()).
-record(rsm_in, {max :: integer(),
direction :: before | aft,
id :: binary(),
index :: integer()}).
-record(rsm_out, {count :: integer(),
index :: integer(),
first :: binary(),
last :: binary()}).
-type(rsm_in() :: #rsm_in{}).
-type(rsm_out() :: #rsm_out{}).
-type broadcast() :: {broadcast, broadcast_data()}.
-type broadcast_data() ::
{rebind, pid(), binary()} | %% ejabberd_c2s
{item, ljid(), mod_roster:subscription()} | %% mod_roster/mod_shared_roster
{exit, binary()} | %% mod_roster/mod_shared_roster
{privacy_list, mod_privacy:userlist(), binary()} | %% mod_privacy
{blocking, unblock_all | {block | unblock, [ljid()]}}. %% mod_blocking
-record(xmlelement, {name = "" :: string(),
attrs = [] :: [{string(), string()}],
children = [] :: [{xmlcdata, iodata()} | xmlelement()]}).
-type xmlelement() :: #xmlelement{}.
+13 -23
View File
@@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2013 ProcessOne
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@@ -12,15 +12,13 @@
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
%%% 02111-1307 USA
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
-define(PRINT(Format, Args), io:format(Format, Args)).
-ifdef(LAGER).
-define(PRINT(Format, Args), io:format(Format, Args)).
-compile([{parse_transform, lager_transform}]).
-define(DEBUG(Format, Args),
@@ -38,20 +36,12 @@
-define(CRITICAL_MSG(Format, Args),
lager:critical(Format, Args)).
-else.
%% Use only when trying to troubleshoot test problem with ExUnit
-define(EXUNIT_LOG(Format, Args),
case lists:keyfind(logger, 1, application:loaded_applications()) of
false -> ok;
_ -> 'Elixir.Logger':bare_log(error, io_lib:format(Format, Args), [?MODULE])
end).
-define(DEBUG(Format, Args),
ejabberd_logger:debug_msg(?MODULE, ?LINE, Format, Args)).
-define(INFO_MSG(Format, Args),
ejabberd_logger:info_msg(?MODULE, ?LINE, Format, Args)).
-define(WARNING_MSG(Format, Args),
ejabberd_logger:warning_msg(?MODULE, ?LINE, Format, Args)).
-define(ERROR_MSG(Format, Args),
ejabberd_logger:error_msg(?MODULE, ?LINE, Format, Args)).
-define(CRITICAL_MSG(Format, Args),
ejabberd_logger:critical_msg(?MODULE, ?LINE, Format, Args)).
-endif.
%% Uncomment if you want to debug p1_fsm/gen_fsm
%%-define(DBGFSM, true).
+25
View File
@@ -0,0 +1,25 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
%%% published by the Free Software Foundation; either version 2 of the
%%% License, or (at your option) any later version.
%%%
%%% This program is distributed in the hope that it will be useful,
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%%% General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License along
%%% with this program; if not, write to the Free Software Foundation, Inc.,
%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
%%%
%%%----------------------------------------------------------------------
-record(motd, {server = <<"">> :: binary(),
packet = #xmlel{} :: xmlel()}).
-record(motd_users, {us = {<<"">>, <<"">>} :: {binary(), binary()} | '$1',
dummy = [] :: [] | '_'}).

Some files were not shown because too many files have changed in this diff Show More