25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-31 15:21:38 +01:00

Compare commits

...

4263 Commits

Author SHA1 Message Date
Badlop
601fcba4cb Set version to 24.10 2024-10-28 17:02:10 +01:00
Badlop
cc3a9f7722 Update Changelog to 24.10 2024-10-28 16:34:25 +01:00
Badlop
296ef8287f Remove mod_tombstone from man, it's in ejabberd-contrib (thanks to Licaon_Kter) 2024-10-28 16:34:22 +01:00
Paweł Chmielowski
b5dab24679 Update dependencies 2024-10-28 16:21:44 +01:00
Badlop
319414b985 Update man page to 24.10 2024-10-28 13:50:02 +01:00
Badlop
6b0058c89c Add two more version notes 2024-10-28 13:50:02 +01:00
Badlop
855c828d1f Update Spanish and Catalan translations 2024-10-28 13:35:49 +01:00
Badlop
c72ef537ee Update Chinese (Simplified) translation (thanks to Sketch6580) 2024-10-28 13:35:47 +01:00
Badlop
11e86811a0 Update Portuguese (Brazil) translation (thanks to Wellington Uemura) 2024-10-28 13:35:46 +01:00
Badlop
2183f60917 Update Italian translation (thanks to Ermete Melchiorre) 2024-10-28 13:35:45 +01:00
Badlop
05f0fbf195 Update Bulgarian translation (thanks to MrEddX) 2024-10-28 13:35:43 +01:00
Badlop
853da159de ejabberd.yml.example: Enable mod_s2s_bidi in default configuration 2024-10-28 12:06:56 +01:00
Badlop
643ae7e5f9 Result of running "make doap options" 2024-10-28 12:06:55 +01:00
Badlop
322e25d18e CI: Get again continue-on-error for XMPP Interop Tests
See explanations following the comment
https://github.com/processone/ejabberd/pull/4285#issuecomment-2397047355

This partially reverts commit 94c2a115d5.
2024-10-28 12:06:53 +01:00
Badlop
bdd8ba115e Document ejabberd version of the new modules 2024-10-28 12:06:51 +01:00
Badlop
71ad7c368d Minor improvements to support mod_tombstones
New check_register_user hook in ejabberd_auth.erl
to allow blocking account registration when a tombstone exists.

Modified room_destroyed hook in mod_muc_room.erl
Until now the hook passed as arguments: LServer, Room, Host.
Now it passes: LServer, Room, Host, Persistent
That new Persistent argument passes the room persistent option,
required by mod_tombstones because only persistent rooms should generate
a tombstone, temporary ones should not.
And the persistent option should not be completely overwritten, as we must
still known its real value even when room is being destroyed.

mod_tombstones is available in experimental mode in ejabberd-contrib git.

Initial feature request: #2546
2024-10-28 12:06:48 +01:00
Paweł Chmielowski
8be0f8a0b0 Revert some unrelated changes 2024-10-28 09:44:05 +01:00
Paweł Chmielowski
e9e678a994 Add support for scram upgrade tasks 2024-10-28 09:26:04 +01:00
Paweł Chmielowski
a89152a3d7 Add support for s2s bidi 2024-10-28 09:25:56 +01:00
Badlop
46d5ab369f Update xmpp dependency 2024-10-21 17:23:59 +02:00
Badlop
81906b74ed Support "IQ permission" from XEP-0356 0.4.1 (#3889) 2024-10-21 17:23:59 +02:00
Badlop
74b0f64645 mod_block_strangers: Add feature announcement to disco-info (#4039) 2024-10-21 17:23:59 +02:00
Badlop
50948d1619 mod_mam: Advertise XEP-0424 feature in server disco-info (#3340) 2024-10-21 17:23:49 +02:00
Holger Weiss
38f1132192 ejabberd_stun: Omit 'auth_realm' log message
These days, TURN authentication is usually performed using ephemeral
credentials handed out by mod_stun_disco.  In that case, the TURN realm
is irrelevant.  Therefore, omit the misleading log message that warned
about a missing realm configuration.

(Commit 6eb2f07274 reduced the log level
of that message already.)
2024-10-15 22:50:30 +02:00
Badlop
50ef49d190 mod_vcard: Return explicit error stanza when user attempts to modify other's vcard 2024-10-11 11:54:18 +02:00
Badlop
3669ac8aed ejabberd_app: At server start, log Erlang and Elixir versions 2024-10-11 11:54:16 +02:00
Badlop
7f8519c0af ejabberdctl: If ERLANG_NODE lacks host, add hostname (#4288) 2024-10-11 11:49:34 +02:00
dependabot[bot]
859ba3e0c2 Bump dialyxir from 1.4.3 to 1.4.4
Bumps [dialyxir](https://github.com/jeremyjh/dialyxir) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/jeremyjh/dialyxir/releases)
- [Changelog](https://github.com/jeremyjh/dialyxir/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jeremyjh/dialyxir/compare/1.4.3...1.4.4)

---
updated-dependencies:
- dependency-name: dialyxir
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-11 11:49:30 +02:00
Badlop
94c2a115d5 CI: Disable XMPP Interop specifications that are known to fail 2024-10-11 11:49:28 +02:00
badlop
634b646711
Merge pull request #4285 from guusdk/xmpp-interop-testing
CI: Add XMPP Interop tests
2024-10-11 11:03:26 +02:00
Holger Weiss
2a9dc2c7b2 make-binaries: Bump Erlang/OTP version to 26.2.5.4 2024-10-09 15:37:47 +02:00
Holger Weiss
ef93a5359b Bump 'xmpp' dependency tag
This fixes announcing SASL2 over non-TLS connections if
'allow_unencrypted_sasl2' is configured.
2024-10-08 17:38:11 +02:00
Badlop
efb1fc9b3f mod_register: Document behavior when access is set to none (#4078) 2024-10-01 15:57:19 +02:00
Badlop
aa5faf1f36 mod_privilege: Replace try...catch with a clean alternative 2024-10-01 15:57:15 +02:00
Holger Weiss
4723283896 ejabberd_c2s: Optionally allow unencrypted SASL2
XEP-0388 says: "SASL2 MUST only be used by Clients or offered by Servers
after TLS negotiation".  Therefore, we reject SASL2 negotiations over
unencrypted transports by default.  However, TLS might be terminated
outside of ejabberd.  Add the 'allow_unencrypted_sasl2' option to
support this use case.
2024-09-29 20:40:01 +02:00
Holger Weiss
36187e07d0 mod_pubsub: Fall back to default plugin options
If the plugin handling a node creation request isn't enabled, fall back
to applying the default plugin (currently node_flat) options.
2024-09-28 17:58:07 +02:00
Holger Weiss
a9583b43c3 mod_pubsub: Fix choice of node config defaults
Ignore node plugin defaults if the plugin handling the request isn't
enabled, rather than ignoring 'default_node_config' options and
applying plugin defaults in that case.
2024-09-28 17:51:28 +02:00
Holger Weiss
ca54f81f58 mod_pubsub: Fix merging of default node options
Use any option specified via 'default_node_config' by default, and take
the remaining defaults from the node plugin handling the request.  This
is the documented behavior.

Before this change, the code applied the plugin defaults only if no
'default_node_config' existed at all.  And even this logic didn't work
as intended, since 'default_node_config' yielded an empty list in case
it wasn't configured, which resulted in plugin defaults never being
applied.
2024-09-28 16:56:46 +02:00
Holger Weiss
b4399291ef mod_pubsub: Fix default node config parsing
Don't merge 'default_node_config' settings with the default options of
the first configured node plugin.  Otherwise, the latter might later
override those of the plugin that should handle a node creation request.
For example, the following configuration would lead to the 'flat'
options being used by default for 'pep' nodes as well:

  mod_pubsub:
    plugins:
      - flat
      - pep
2024-09-28 16:45:59 +02:00
Guus der Kinderen
a8df58f056 CI: Limit execution of XMPP Interop tests
Run the XMPP Interop tests on only one build of the CI-matrix. This prevents redundant testing, as well as logs overwriting each-other.
2024-09-27 09:55:18 +02:00
Guus der Kinderen
54a89b39fb CI: Add XMPP Interop tests
Modifies the CI build to integrate the GitHub Action-based test runner from the [XMPP Interop Testing project](https://xmpp-interop-testing.github.io). This executes additional integration tests that help verify ejabberd's compliance with XMPP specifications.

In this commit, none of the tests are excluded, which likely results in false positives. Therefor, the 'continue-on-error' flag is set. This should ideally be removed in a later commit.
2024-09-26 21:45:51 +02:00
Badlop
4a931b42ab hooks_deps: Hide false-positive warnings about gen_mod 2024-09-24 12:37:06 +02:00
Badlop
15d73b9d20 Support to block IPs in a vhost using append_host_config (#4038) 2024-09-24 12:20:16 +02:00
Badlop
c2d4f73893 Move some modules webadmin pages to their modules 2024-09-16 17:50:47 +02:00
Badlop
31b85351f2 Add new "MAM Archive" page to webadmin 2024-09-16 17:50:46 +02:00
Badlop
c900f0ad83 WebAdmin: Improve pages to handle disabled modules 2024-09-16 17:50:44 +02:00
Badlop
b2e6749fd2 Fix dialyzer: captcha_cmd is a binary for sure 2024-09-16 17:50:43 +02:00
Badlop
2437dc4e06 New command get_mam_count to get number of archived messages for an account 2024-09-16 17:50:42 +02:00
Badlop
115e7d08aa Add links in user page to offline and roster pages 2024-09-16 17:50:40 +02:00
Badlop
d9ddbe0212 Add mam and offline tags to the related purge commands 2024-09-16 17:50:39 +02:00
Badlop
512285e48d Result of running "make options" 2024-09-16 17:50:38 +02:00
Badlop
642e7ecc29 mod_matrix_gw: Remove useless option "persist" 2024-09-16 17:50:37 +02:00
Badlop
ce5a8acaf7 Define the types of options that opt_type.sh cannot derive automatically 2024-09-16 17:50:33 +02:00
Holger Weiss
3d9a5a1635 Fix 'update' command output
So far, ejabberd_update:update/0 returned the return value of
release_handler_1:eval_script/1.  That function returns the list of
updated but unpurged modules, i.e., modules where one or more processes
are still running an old version of the code.  Since commit
5a34020d23, the ejabberd 'update' command
assumes that value to be the list of updated modules instead.  As
that seems more useful, modify ejabberd_update:update/0 accordingly.
This fixes the 'update' command output.
2024-09-14 21:54:01 +02:00
Holger Weiss
3469a51f58 mod_pubsub: Don't blindly echo PEP notification
Since commit 514c25caef, whenever a PEP
item was published, a notification was blindly sent back to the owner.
However, this should only be done subject to +notify filtering, as per
XEP-0163:

| the PEP service shall send notifications to all of the account owner's
| available resources (subject to notification filtering).

The motivation for the mentioned commit was that +notify subscriptions
initially didn't work for PEP node owners (#2108).  However, that issue
was fixed by commit 5968bc9318 (#2112).
As a result, the owner's client was actually notified twice if the
client was subscribed to the node (e.g., via +notify).

Therefore, just omit the additional, blind notification.

Thanks to W. Martin Borgert and Daniel Gultsch for reporting the issue.
2024-09-13 20:50:00 +02:00
Paweł Chmielowski
d4b30957a3 Skip non-delivery errors for local pubsub generated notifications
Those are ignored by pubsub service anyway, so we can skip those, and
reduce number of messages processed by pubsub process.
2024-09-11 13:20:53 +02:00
Badlop
cc377bbebf Update lock files 2024-09-11 11:39:39 +02:00
Badlop
eec836239f Improve documentation of ldap_servers and ldap_backups options (#3977) 2024-09-11 11:39:34 +02:00
Badlop
941d51a6e7 Handle call by gen_event:swap_handler (#4233) 2024-09-11 11:39:30 +02:00
Holger Weiss
e3243fa35b make-binaries: Update OpenSSL URLs 2024-09-06 19:18:32 +02:00
Holger Weiss
70512c7116 make-binaries: Bump dependency versions 2024-09-06 19:05:12 +02:00
Paweł Chmielowski
3c896d1c6a Better handling of malformed jids in send_direct_invitation command 2024-09-02 12:49:39 +02:00
Paweł Chmielowski
b455d93c69 Fix dialyzer warnings 2024-09-02 12:42:55 +02:00
Paweł Chmielowski
017b2feac1 Make set_presence command return error when session not found
Should fix issue #4274
2024-09-02 12:01:56 +02:00
Paweł Chmielowski
5f47860ee1 Remove support for old websocket connection protocol
This removes handling of pre-rfc7395 encapsulation of xmpp in websocket
(where data send in websocket was using just raw data as send in regular
socket). This didn't work correctly for last 5 years, and as we didn't
see complains about this, we can assume it's not used anymore.
2024-09-02 11:55:46 +02:00
Badlop
795498fa45 Runtime: Cache hex.pm archive from rebar3 and mix 2024-08-26 15:50:25 +02:00
Badlop
aa1717ee77 CI: Add Elvis tests 2024-08-26 15:50:25 +02:00
Badlop
db6d3e63f2 Fix Elvis report: Fix dollar space syntax
https://github.com/inaka/elvis_core/blob/main/doc_rules/elvis_style/no_dollar_space.md
2024-08-26 15:50:25 +02:00
Badlop
0304428d95 Fix Elvis report: Remove spaces in weird places
https://github.com/inaka/elvis_core/blob/main/doc_rules/elvis_style/no_space.md
2024-08-26 15:50:25 +02:00
Badlop
74b80bfe08 Fix Elvis report: Don't use ignored variables
https://github.com/inaka/elvis_core/blob/main/doc_rules/elvis_style/used_ignored_variable.md
2024-08-26 15:48:32 +02:00
Badlop
90ce65e4dc Fix Elvis report: Remove trailing whitespace characters
https://github.com/inaka/elvis_core/blob/main/doc_rules/elvis_text_style/no_trailing_whitespace.md
2024-08-26 15:48:32 +02:00
Badlop
d4d9771a71 Makefile: Add support for "make elvis" when using rebar3 2024-08-26 15:48:32 +02:00
Badlop
70ee294079 elvis.config: Fix file syntax, set vim mode, disable many tests
Let's disable the tests that would require major changes in existing
ejabberd source code, and fixing them would produce a curtain of changes
that would difficult using git blame and git log, but provide minimal
benefits.

Don't check erlang header files by now.

Don't check rebar.config because it has customizations that must be
parsed by rebar.config.script to have suitable syntax.
2024-08-26 15:48:32 +02:00
Badlop
5f4d17621f Fix Erlang LS warning about unused macro definitions
Macro name + commit when it was added - commit when usage was removed:

* BATCH_SIZE + f6db8428 - 71c44bff8
* INVALID_SETTING_MSG - 6b126171d - 381065397
* POLICY_ACCESS + 7c1e7e5b - 56d273477
* PROCNAME + 068db1a2 - 6876a37e6
* SALT_LENGTH + e575c87e - 633b68db1
* SERVER + 068db1a2 - but was never used!
* SERVER + f44e23b8c - but was never used!
* STORAGE_TYPES + 92db9ff1 - 9a93acc62
* TCP_SEND_TIMEOUT + f0af10e6 - 6e900d6a8
* TDTD + c3280e9 - 5a34020
* TVFIELD + dcc05ac8 - da310a517
2024-08-26 15:48:32 +02:00
Badlop
8f4179050b erlang_ls.config: Let it find paths, update to Erlang 26, enable crossref 2024-08-26 15:48:32 +02:00
Badlop
fddacd51a4 .vscode/launch.json: Experimental support for debugging with Neovim 2024-08-26 15:48:32 +02:00
Badlop
e726ba9a8b .vscode/relive.sh: Update to benefit from ejabberd 24.02 behaviour 2024-08-26 15:48:32 +02:00
Badlop
da1673e264 mix.lock: Don't mention Relive deps, otherwise they are always downloaded 2024-08-26 15:48:32 +02:00
Badlop
7cd34d3709 CONTAINER.md: Use same general badges in both container images readme files 2024-08-26 15:48:32 +02:00
Paweł Chmielowski
ec7fd05987 Update xmpp once more 2024-08-24 15:27:58 +02:00
Paweł Chmielowski
34a58863e3 Update xmpp dep 2024-08-24 13:16:03 +02:00
Paweł Chmielowski
3237a955e5 Fix dep spec for rebar2 2024-08-23 20:56:52 +02:00
Paweł Chmielowski
8e7489c2be Remove duplicate dep from mix.exs 2024-08-23 20:52:36 +02:00
Paweł Chmielowski
df5202a2f0 Update deps to bring improved s2s fallback for invalid direct tls connections
This allows connections to server that have both xmpps-server and xmpp-server
srv entries, for which xmpps version doesn't work correctly. Before this
change we would stop on non-working xmpps server, now we will also attempt
to connect further servers on list.
2024-08-23 20:48:53 +02:00
Badlop
db3a5d8915 Start ExSync manually to ensure it's started if (and only if) Relive 2024-08-21 10:51:59 +02:00
Badlop
6110f213de Return error stanza when storage doesn't support vcard update (#4266) 2024-08-21 10:51:56 +02:00
Badlop
e99fe98db4 Remove from extra_applications the apps already defined in deps (#4265) 2024-08-21 10:51:53 +02:00
Michael Slezak
b07e28be2c Fix 'mix release' error: logger being regular and included application (#4265) 2024-08-21 10:51:51 +02:00
Badlop
937d5fe495 Document which SQL servers can really use update_sql_schema 2024-08-21 10:51:49 +02:00
Badlop
01141e5f69 Relax password complexity in test database
This password is not strong enough in MSSQL 2022, relax this restriction
  https://learn.microsoft.com/en-us/sql/relational-databases/security/password-policy?view=sql-server-ver16
  https://learn.microsoft.com/en-us/sql/t-sql/statements/create-login-transact-sql?view=sql-server-ver16#check_policy---on--off-
2024-08-21 10:51:46 +02:00
Badlop
15569d0b13 Add links in top-level options documentation to their Docs website sections 2024-08-12 16:25:42 +02:00
Badlop
918806006c Update fast_xml to use use_maps and remove obsolete elixir files 2024-08-09 12:31:37 +02:00
Badlop
d5e030a638 CI: Tell sqlcmd to trust server self-signed certificate
As explained in
https://techcommunity.microsoft.com/t5/sql-server-blog/odbc-driver-18-0-for-sql-server-released/ba-p/3169228

Version 18.0 of the Microsoft ODBC Driver 18 for SQL Server has been released.
BREAKING CHANGE - Default Encrypt to Yes/Mandatory.
2024-08-09 12:31:35 +02:00
Badlop
47f1beca0c CI: Update path to sqlcmd command in the mssql container
As mentioned in
https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker

Starting with SQL Server 2022 (16.x) CU 14 and SQL Server 2019 (15.x)
CU 28, the container images include the new mssql-tools18 package.
The previous directory /opt/mssql-tools/bin is being phased out.
The new directory for Microsoft ODBC 18 tools is /opt/mssql-tools18/bin,
aligning with the latest tools offering.
2024-08-09 12:31:34 +02:00
Badlop
a565b0e4c1 ext_mod: Handle info message when contrib module transfers table ownership 2024-08-09 12:31:29 +02:00
Badlop
10d1704899 mod_muc_rtbl: Fix call to gen_server:stop (#4260) 2024-07-22 13:28:47 +02:00
Badlop
bc7c8e3952 Handle case when elixir support is enabled but not available
This happens when:
./configure --with-rebar=rebar3 --enable-elixir
make
rebar3 ct
2024-07-19 18:08:02 +02:00
Paweł Chmielowski
4e35515a8c Also change mysql.new.sql in similar way 2024-07-18 17:55:37 +02:00
Paweł Chmielowski
d2a3fe3ed2 Fix column type in comment with schema update 2024-07-18 17:13:45 +02:00
Badlop
9bd1b39f9f Set version to 24.07 2024-07-18 11:55:10 +02:00
Badlop
20a01a25e4 Update changelog 2024-07-18 11:55:07 +02:00
Badlop
68e69debff Update man page to 24.07 2024-07-18 11:55:05 +02:00
Badlop
7a333eecbe Update more translations translation 2024-07-18 11:11:55 +02:00
Badlop
e274bcc87d Update Portuguese (Brazil) translation (thanks to Wellington Uemura) 2024-07-18 11:11:54 +02:00
Badlop
c42cb2bbac Update Italian translation (thanks to Ermete Melchiorre) 2024-07-18 11:11:52 +02:00
Badlop
9ee7054823 Update Chinese translation (thanks to Sketch6580) 2024-07-18 11:11:51 +02:00
Badlop
65e16dcac1 make format 2024-07-18 11:11:48 +02:00
Paweł Chmielowski
97c2d6a29d
Merge pull request #4259 from heyanyanchina123/fix_mysql
[fix] fix mysql.sql archive origin_id
2024-07-18 09:40:25 +02:00
haha
93cdee80ed [fix] fix mysql.sql archive origin_id 2024-07-18 15:14:39 +08:00
Holger Weiss
11055f61a6 make-installers: Don't edit too much
The init script and systemd units don't refer to "/opt/ejabberd", and
ejabberdctl doesn't refer to "/opt/ejabberd-$version".

Fixes #4258.
2024-07-17 13:33:46 +02:00
Paweł Chmielowski
af99799e8a Use tagged deps 2024-07-17 11:11:00 +02:00
Paweł Chmielowski
926f60b2ed Output muc#roominfo_avatarhash in room disco info as per updated xep-0486
This should fix issue #4234.
2024-07-16 18:55:02 +02:00
Badlop
0fdbb03f54 Don't add iex to included_applications
- iex is unnecessary for ejabberd in OTP release
- adding iex breaks dialyzer when --enable-elixir
2024-07-16 17:16:35 +02:00
Badlop
bd0332c716 ext_mod: Fix typo in log message 2024-07-16 17:16:33 +02:00
Badlop
45007809f6 CHANGELOG.md: Only include URLs at the end of line for plaintext readability 2024-07-16 17:16:31 +02:00
Badlop
0e0fdb440c CHANGELOG.md: Fix Issues URLs 2024-07-16 17:16:29 +02:00
Paweł Chmielowski
2016cf547f Make dialyzer happy 2024-07-16 15:56:41 +02:00
Paweł Chmielowski
ead87e3727 Add option update_sql_schema_timeout to allow schema update use longer timeouts
This also makes batch of schema updates to single table use transaction,
which should help in not leaving table in inconsistent state if some update
steps fails (unless you use mysql where you can't rollback changes to
table schemas).
2024-07-16 15:42:00 +02:00
Paweł Chmielowski
f56739fd9f Make any uncatched exception inside transaction trigger rollback 2024-07-16 15:42:00 +02:00
Paweł Chmielowski
c5f2b389c3 Allow to configure number of restart in sql_transaction() 2024-07-16 15:42:00 +02:00
dependabot[bot]
4cc95dda42 Bump ex_doc from 0.34.1 to 0.34.2
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.34.1 to 0.34.2.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases)
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.34.1...v0.34.2)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-16 11:31:42 +02:00
Badlop
0bfbe3e154 Add ejabberd example config files to the hex package 2024-07-16 11:31:39 +02:00
Badlop
9bd6b11007 Use proper format depending on the formatter (#4256)
This fixes recent commmit 090a8e3
2024-07-16 11:31:35 +02:00
Paweł Chmielowski
c013a59d16 Restore args conversion of {"k":"v"} to tuple lists in mod_http_api
Switching to json compatible output did broke this, which caused issues in
for example create_rooms_with_opts command.
2024-07-15 21:58:41 +02:00
Paweł Chmielowski
aa02c4de1e Move logger app to included_applications
We don't particularly need this to start with ejabberd, and by having
it always started we will change logger to always use elixir formating.
2024-07-15 21:26:16 +02:00
badlop
fb9e2b9603
Merge pull request #4256 from slezakattack/elixir_logger
Fix template error for elixir-enabled applications.
2024-07-15 11:00:07 +02:00
Badlop
a70bdc0776 WebAdmin: Fix number of accounts shown in the online-users page 2024-07-15 10:59:16 +02:00
Badlop
936460212f Fix bug in 8a3344e when Elixir enabled but no need to compile elixir files 2024-07-15 10:59:14 +02:00
Holger Weiss
8ac51e63b5 node_pep: Add missing feature
Publishers may specify item identifiers for PEP nodes as well.

(Greetings to Thilo!)
2024-07-14 17:42:40 +02:00
Michael Slezak
090a8e3c95 Fix template error for elixir-enabled applications. 2024-07-12 14:39:42 -06:00
Badlop
101cce0c1e ext_mod: Fetch dependencies from hex.pm when mix is available
This doesn't work when running an OTP release build using mix,
which means it doesn't work in binary installers or containers;
only when using relive, or compiled with rebar3.

Set the desired hex package version in the module's rebar.config
For example, to fetch hex package recon 2.5.5 when mix is available,
and otherwise download using git: in the file
  ejabberd-contrib/ejabberd_observer_cli/rebar.config
set both the hex version and git details:
{deps, [
        {recon, "2.5.5", {git, "https://github.com/ferd/recon"}}
       ]}.
2024-07-12 15:47:10 +02:00
Badlop
a935302a19 ejabberd.yml.example: Add api_permissions group for webadmin (#4249) 2024-07-12 15:46:01 +02:00
Badlop
9a0ff13cc2 mod_register: Send welcome message as 'chat' too (#4246)
Apparently, some clients don't display 'normal' messages to the user.
2024-07-12 15:45:59 +02:00
Badlop
ef933c07cc WebAdmin: Support groupid with spaces when making shared roster result (#4245) 2024-07-12 15:45:57 +02:00
Badlop
df5291e4bd ext_mod: Improve error result when problem compiling elixir file 2024-07-11 16:35:24 +02:00
Badlop
7a8c0331c1 mix.exs: Include Elixir's Logger in the OTP release, useful for libcluster 2024-07-11 16:35:23 +02:00
Badlop
28e37bcaad ext_mod: files_to_path is deprecated, use compile_to_path
As recommended in
d9cf285d71/lib/elixir/lib/kernel/parallel_compiler.ex (L240)
2024-07-11 16:35:21 +02:00
Badlop
8a3344e78a ext_mod: Compile all Elixir files in a library with one function call
Some Elixir libraries have files with dependencies between them.
Compiler can detect and solve those internal dependency if
we call Compile with a list of all the files
https://hexdocs.pm/elixir/1.17.2/Kernel.ParallelCompiler.html#compile/2

This is useful to compile libcluster
2024-07-11 16:35:18 +02:00
Badlop
ce95f1f25a WebAdmin: Fix crash when viewing SRG created using ejabberd 24.02 (#4245) 2024-07-11 16:35:16 +02:00
Badlop
f1739ce34d mod_register: Add example configuration of welcome_message option 2024-07-11 16:35:12 +02:00
Holger Weiss
1add1de23b ejabberd_options: Add trailing @ to @VERSION@
Thanks to Marc Schink for reporting the issue.
2024-07-05 22:41:18 +02:00
Paweł Chmielowski
e25bdba16d Use error_logger when printing startup failure message 2024-07-05 10:25:59 +02:00
Paweł Chmielowski
7c63cd1000 Print message when starting ejabberd application fails 2024-07-05 09:57:21 +02:00
Badlop
4192190a96 Fix problem parsing tuples when using OTP 27 json library (#4242) 2024-07-04 16:55:28 +02:00
Badlop
a733ba311c New tests for API commands
Only mod_http_api is tested right now; support to test also
ejabberdctl, ejabberd_xmlrpc and web_admin would be great.

This uses mod_example from ejabberd-contrib

How to run only those tests:
  CT_BACKENDS=no_db rebar3 ct --suite=test/ejabberd_SUITE --group=commands_single
2024-07-04 16:55:14 +02:00
Paweł Chmielowski
fe472a63a0 Improve cross version handling of muc retractions 2024-07-04 13:57:25 +02:00
Paweł Chmielowski
25b78b73d0 Add ability to specify custom timeout for sql operations 2024-07-04 11:21:26 +02:00
Paweł Chmielowski
b978a47925 Fix unused variable warning 2024-07-03 15:55:48 +02:00
Paweł Chmielowski
b44b1304b8 Fix typo in last commit 2024-07-03 15:55:29 +02:00
Paweł Chmielowski
a4fd756eae Add misc:json_encode_With_kv_lists and use it in matrix sign function
R27 json module doesn't recognize list of tuples as object specification,
so this creates wrapper that offer this functionality.
2024-07-03 15:20:48 +02:00
Paweł Chmielowski
8d4c1e3617 One more fix for pg91 in test suite 2024-07-03 13:44:48 +02:00
Paweł Chmielowski
54f5db851d Don't use host from url in webadmin, prefer host used for authentication 2024-07-03 13:15:33 +02:00
Paweł Chmielowski
35042ebc6a Make sql query in testsuite compatible with pg9.1 2024-07-03 12:38:48 +02:00
Mickaël Rémond
6c2dfd3d31
Update CODE_OF_CONDUCT.md
Try to limit the number of ping comments in the community. This can get into the way of efficient work and be considered a bit offensive for some users or maintainers.
2024-07-02 15:42:41 +02:00
Badlop
543b874a10 ext_mod: Handle case when contrib module has no *.ex and no *.erl 2024-07-02 13:43:37 +02:00
Badlop
4258d3dc24 Update rebar.lock 2024-07-02 13:43:35 +02:00
Badlop
949649e3a9 Fix typos (thanks to Jerome Sautret) 2024-07-02 13:43:33 +02:00
Pouriya
82d95ac81d feat: Hook subscribers 2024-07-02 12:38:54 +02:00
Alexey Shchepin
3124644315 Fix matrix_id_as_jid option documentation 2024-06-28 05:31:16 +03:00
Badlop
27ba09debf Set version to 24.06 2024-06-27 15:43:26 +02:00
Badlop
686938045b Update changelog 2024-06-27 15:42:19 +02:00
dependabot[bot]
5645858262 Bump docker/build-push-action from 5 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-27 15:11:46 +02:00
Badlop
410c81a51d Update man page to 24.06 2024-06-27 14:54:41 +02:00
Badlop
d19bac70ce Update version number of new commands, options and protocols to 24.06 2024-06-27 14:54:40 +02:00
Badlop
9b9eb409b2 join_cluster: Handle also atom arguments, useful for mod_libcluster 2024-06-27 14:54:38 +02:00
Badlop
f3ad49ebc4 Fix copy deps *.app file, and strip *.src if present 2024-06-27 14:54:36 +02:00
Badlop
394ba26d1d ext_mod: Support to compile nested *.erl, and include other deps *.hrl
This is useful to compile as a dependency
https://github.com/deadtrickster/prometheus.erl
2024-06-27 14:54:35 +02:00
Badlop
cafe28fdea Update other translations 2024-06-27 14:54:32 +02:00
Badlop
22cefeb2bd Update German translation (thanks to Nautilusx) 2024-06-27 14:54:31 +02:00
Badlop
9e4cccd4db Update Polish translation (thanks to Wojciech Teichert) 2024-06-27 14:54:29 +02:00
Badlop
3ff3bdf812 Update Chinese translation (thanks to Sketch6580) 2024-06-27 14:54:27 +02:00
Paweł Chmielowski
45f0f983b1 Override jose version for <R23 in mix to fix compilation with new p1_acme 2024-06-27 14:51:14 +02:00
Paweł Chmielowski
28e94513db Update deps 2024-06-27 14:26:19 +02:00
Badlop
afe32e2c05 Fix generate-doap.sh to accept x in the version number 2024-06-25 17:05:56 +02:00
Badlop
0b6d40c9df Log messages not only when node joins the cluster, also when leaves it 2024-06-25 17:05:41 +02:00
Badlop
992d84c002 Add JSON EUnit testing 2024-06-25 17:05:31 +02:00
Badlop
9b675fe775 Add support to test also EUnit suite 2024-06-25 17:05:28 +02:00
Badlop
35783d9a2c Format also files in test/ 2024-06-25 17:05:26 +02:00
Badlop
f28e7b37bc Fix call to atom_to_binary/1 for Erlang/OTP older than 23 2024-06-25 17:05:21 +02:00
Badlop
eceb9b729f WebAdmin: New login box in the left menu bar 2024-06-25 10:51:23 +02:00
Badlop
ce348596b7 WebAdmin: Improve CSS of welcome page, docs links, anchor element 2024-06-25 10:51:22 +02:00
Badlop
b85cd9a487 join_cluster_here: New command to join a remote node into our local cluster 2024-06-25 10:51:20 +02:00
Badlop
d170885d8d Run "make doap" (#4237) 2024-06-25 10:51:18 +02:00
Badlop
9a6bd83aa1 Remove obsolete code for Erlang/OTP older than 20.0 2024-06-25 10:51:17 +02:00
Badlop
0d31482647 Use newer rebar3_hex with new Erlang, but Erlang 20 requires 7.0.7 2024-06-25 10:51:13 +02:00
Holger Weiss
40c27b54b0 ejabberd_ctl: Fix output of UTF-8-encoded binaries
Converting binary results to char() lists using binary_to_list/1 yields
incorrect results for characters outside the ISO Latin-1 range.
2024-06-19 19:51:50 +02:00
badlop
0380695bba
Merge pull request #4228 from badlop/webadmin-commands
Use commands in WebAdmin to generate page content
2024-06-19 18:01:35 +02:00
Badlop
899b77cdf4 ejabberd_ctl: Improve parsing of commas in arguments 2024-06-19 17:59:38 +02:00
Badlop
4819baaa07 Test: Update to the new webadmin pages 2024-06-19 17:59:38 +02:00
Badlop
5a34020d23 WebAdmin: Move content to commands; new pages; hook changes; new commands
Also:
- Added support to view user subpages in the menu
- Webadmin hooks now get the full request
- New commands added to be used in webadmin pages
2024-06-19 17:59:38 +02:00
Badlop
2b1d4ff98d Commands with 'internal' tag: don't list and block execution by frontends 2024-06-19 17:59:38 +02:00
Badlop
ed4843b0ed Document 'any' argument and result type, useful for internal commands
Also 'atom' may be used as argument type by some internal commands,
for example the ones that refer to erlang node names.
2024-06-19 17:59:38 +02:00
Badlop
30bd8f1570 WebAdmin: Add make_command functions to produce HTML command element
Support to sort tables using Sortable library from:
  https://github.com/tofsjonas/sortable
2024-06-19 17:59:38 +02:00
Badlop
74d6f0a68d WebAdmin: logo-fill.png is useless since the visual refresh in commit 9eeee67 2024-06-19 17:59:38 +02:00
Badlop
5872ccc992 WebAdmin: Sort alphabetically the menu items, except the most used ones 2024-06-19 17:59:38 +02:00
Badlop
9ee23d3649 WebAdmin: Improve home page
- Update ejabberd WebAdmin logo
- Add hyperlink in disclaimer text
- Add welcome paragraph
2024-06-19 17:59:38 +02:00
Badlop
724f304e48 WebAdmin: Unauthorized response: include some text to direct to the logs 2024-06-19 11:56:16 +02:00
Badlop
a16e5a7055 WebAdmin: Remove webadmin_view for now, as commands allow more fine-grained permissions 2024-06-19 11:56:16 +02:00
Badlop
3bda858225 Add Makefile targets to format and indent source code 2024-06-19 11:56:16 +02:00
Badlop
701d2ce0f6 Define kick_user command version 2, useful for the WebAdmin command usage 2024-06-19 11:56:16 +02:00
Badlop
be847a7e91 rebar.config.script: Require port_compiler 1.15.0 and accept any 1.15.x 2024-06-19 11:51:03 +02:00
Badlop
fff0b5209c Apply previous commit to the container ejabberdctl script 2024-06-19 11:48:33 +02:00
Paweł Chmielowski
2c5a8f0860 Make native dynamic node names work when using fully qualified domain names
This should fix issue reported in 4184
2024-06-13 18:02:13 +02:00
Badlop
103a30df2c Document that XEP-0485 is available in mod_pubsub_serverinfo 2024-06-10 19:03:25 +02:00
Badlop
e4c8dbc2af make-binaries: Bump OpenSSL version to 3.3.1 2024-06-10 19:03:13 +02:00
Badlop
882cd8faf5 ejabberd_access_permissions: Fix debug lines indentation that were hard to read 2024-06-10 19:03:06 +02:00
Holger Weiss
7ba9f2e4e8 mod_private: Cope with bookmark decoding errors
Handle invalid XEP-0048 bookmarks gracefully while attempting to publish
them to an XEP-0402 node.
2024-05-28 21:07:04 +02:00
Badlop
52abe8016b Update lock files 2024-05-28 15:36:39 +02:00
Badlop
b840ab9907 Revert "Disable update_sql_schema by default"
The update_sql_schema feature was published half a year ago,
included in two releases, it is used by the CI tests,
and consequently it's stable enough to be enabled by default.

This reverts commit ec20691188.
2024-05-28 15:36:39 +02:00
Badlop
b977eb7193 Add support for XEP-0425 version 0.3.0, keep supporting 0.2.1 (#4193) 2024-05-28 15:36:39 +02:00
Badlop
a179d5e34b mix:exs: Move xmpp from included_applications to applications
because now p1_pgsql has it in applications to satisfy dialyzer OTP 26,
and we cannot have xmpp both in applications and included_applications.
2024-05-28 15:36:39 +02:00
Badlop
ab274147d8 Runtime: Add final OTP 27 and preliminary Elixir 1.17 to the matrix 2024-05-28 15:36:39 +02:00
Badlop
d81a844e1c make-binaries: Bump versions to Erlang/OTP 26.2.5 and Elixir 1.16.3 2024-05-28 15:21:05 +02:00
Badlop
b288d5c763 make-binaries: Revert temporarily an OTP commit that breaks MSSQL (#4178) 2024-05-28 15:21:01 +02:00
Badlop
1b81af00b2 Update p1_pgsql and mysql to support Unix Domain Socket (#3716) 2024-05-28 15:20:57 +02:00
Badlop
d04f92d44e mod_muc_room: Use ejabberd hooks instead of function calls to mod_muc_log (#4191) 2024-05-28 15:20:53 +02:00
Badlop
80dc95fc03 Remove unnecessary case from recent commit 599cddf 2024-05-28 15:14:08 +02:00
Badlop
a8e36e7b1b CI: Don't load database schema files for mysql and pgsql 2024-05-24 13:21:21 +02:00
Badlop
ec13350b24 Test: Enable update_sql_schema
- Test: Enable update_sql_schema by default
- Update test/README about new option
- enable new_schema in tests
2024-05-24 13:21:19 +02:00
Badlop
1076f8bfc2 Test: Clear tables when ending a group, instead of when starting
Because a group may be started but the tables are not yet created,
as they are created automatically when update_sql_schema is enabled.

This modifies commit e2b79ea
2024-05-24 13:21:18 +02:00
Badlop
599cddfb67 ejabberd_sql_schema: Rewrite recent commit cb49fcf
lists:search is available since OTP 21.0, and ejabberd is said to
support since OTP 20.0.
Also, that code wouldn't work if ejabberd uses different database types
(MySQL, PgSQL, ...), as this would only update the first database.
2024-05-24 13:21:16 +02:00
Badlop
034af6aefd Set process flags when Erlang/OTP 27 to help debugging
https://www.erlang.org/blog/highlights-otp-27/#process-labels
2024-05-24 13:21:15 +02:00
Badlop
5d2a111b9c Update lock files 2024-05-24 13:21:13 +02:00
Badlop
ca9ca7f5af Use the new port_compiler 1.15.0 that supports Erlang/OTP 27.0
Revert "rebar.config.script: Use port_compiler branch that supports OTP 27.0-rc2"

This partially reverts commit e9b9159d23.
2024-05-24 13:21:12 +02:00
Badlop
677d66d818 Revert "mix.exs: Dirty workaround to get port_compiler with OTP 27 support"
This reverts commit c7c3cc10c5.
2024-05-24 13:21:10 +02:00
Badlop
750bf07e13 Runtime: Define Elixir major versions, and let it pick the latest minor one 2024-05-24 13:21:08 +02:00
Badlop
2cd53410bc Runtime: Avoid testing with OTP 27 + rebar2, because Jose has warnings_as_errors
and we can't disable that option in rebar2 using overrides
2024-05-24 13:21:07 +02:00
Badlop
ad7008a545 CI and Runtime: Update Erlang/OTP 27.0-rc3 to 27 2024-05-24 13:21:05 +02:00
Badlop
bedfc2e188 rebar.config: Add temporary workaround to compile Jose with Erlang/OTP 27.0 2024-05-24 13:21:04 +02:00
Badlop
83b1a40f8b Run "make doap" 2024-05-24 13:21:02 +02:00
Badlop
a05dbcc2b2 Add some XEPs support that was forgotten 2024-05-24 13:21:00 +02:00
Badlop
01f2697faf mod_muc_admin: Update module to the new gen_mod API 2024-05-24 13:20:58 +02:00
Badlop
fba915e04e gen_mod: Add support to specify a hook global, not vhost-specific 2024-05-24 13:20:56 +02:00
Badlop
0d1cbc62d4 mod_muc_rtbl: Change this module attribute name to the main one: behaviour
https://erlang.org/documentation/doc-15.0-rc3/doc/system/modules.html#behaviour-module-attribute
2024-05-24 13:20:52 +02:00
Holger Weiss
f72cb1b5c8 .gitignore: Ignore ctags/etags files
Running `make TAGS` generates a `TAGS` file, and "vim-erlang-tags"
produces a `tags` file when :ErlangTags is called.
2024-05-19 18:55:38 +02:00
Alexey Shchepin
cb49fcf459 Fix handling of mqtt_pub table definition from mysql.sql and fix should_update_schema/1 in ejabberd_sql_schema.erl 2024-05-18 05:18:24 +03:00
Badlop
66a08b6f18 Run "make doap" 2024-05-17 11:36:07 +02:00
Badlop
2554b51173 hook_deps: Use precise name: hooks are added and later deleted, not removed 2024-05-17 11:36:00 +02:00
Badlop
d2e7b5ffa0 hook_deps: Fix to handle FileNo as tuple {FileNumber, CharacterPosition} 2024-05-17 11:35:57 +02:00
Badlop
38fd9a3ed2 Update URLs of module documentations 2024-05-10 16:04:28 +02:00
dependabot[bot]
4ec236966a Bump exsync from 0.4.0 to 0.4.1
Bumps [exsync](https://github.com/falood/exsync) from 0.4.0 to 0.4.1.
- [Changelog](https://github.com/falood/exsync/blob/main/CHANGELOG.md)
- [Commits](https://github.com/falood/exsync/compare/v0.4.0...v0.4.1)

---
updated-dependencies:
- dependency-name: exsync
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 11:28:19 +02:00
Badlop
696e42b5b4 Use json module when Erlang/OTP 27, jiffy with older ones 2024-05-07 11:28:17 +02:00
Badlop
0ad1d315e8 Use maps instead of tuple+list+tuple as arguments in jiffy functions 2024-05-07 11:28:16 +02:00
Badlop
4697a9295a Update p1_acme that uses Erlang's json library instead of jiffy when OTP 27 2024-05-07 11:28:14 +02:00
Badlop
9fbc7b96e4 Update pkix dependency with minor fixes for compilation warnings 2024-05-07 11:28:11 +02:00
Badlop
392d7ee30b CI and Runtime: Now ejabberd and dependencies can compile with OTP 27.0-rc3 2024-05-02 17:30:21 +02:00
Badlop
025e2a5760 CI and Runtime: Don't get explicitly dependencies (#4213) 2024-05-02 17:30:04 +02:00
Badlop
f7dc4fa2ac configure.ac: When using rebar3 with old Erlang, unlock some dependencies (#4213) 2024-05-02 17:29:57 +02:00
Badlop
13ebe89fdc Remove unused format_status/2 callback that is deprecated in OTP 27 2024-04-30 18:00:32 +02:00
Badlop
c7c3cc10c5 mix.exs: Dirty workaround to get port_compiler with OTP 27 support 2024-04-30 18:00:29 +02:00
Badlop
e9b9159d23 rebar.config.script: Use port_compiler branch that supports OTP 27.0-rc2
If we provide this plugin in ejabberd, then dependencies will not download
the old pc 1.14.0 which doesn't support OTP 27.0-rc2, and will use this one.
2024-04-30 18:00:27 +02:00
Badlop
f15d5d073e configure.ac: When using rebar3, unlock dependencies that are disabled (#4212) 2024-04-30 18:00:25 +02:00
Badlop
b461657407 Bump idna from 6.0.0 to 6.1.1
Bumps [idna](https://github.com/benoitc/erlang-idna) from 6.0.0 to 6.1.1.
- [Changelog](https://github.com/benoitc/erlang-idna/blob/master/CHANGELOG)
- [Commits](https://github.com/benoitc/erlang-idna/compare/6.0.0...6.1.1)

---
updated-dependencies:
- dependency-name: idna
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 18:00:23 +02:00
Badlop
0da767f568 ban_account/unban: When mod_private is disabled, return meaningful error (#4201) 2024-04-30 18:00:21 +02:00
Badlop
395a73bbe0 Handle case when mod_private is not enabled (#4201) 2024-04-30 18:00:18 +02:00
Badlop
5870e2e378 Use updated xmpp library with minor improvement in auth (#4201) 2024-04-30 18:00:16 +02:00
Badlop
94a0aa6967 Add support to provide ban detail when account logins (#4201) 2024-04-30 18:00:14 +02:00
Badlop
2bfc4b0f5d Use "jabber:" namespace that clients cannot use (#4201)
As mentioned in:
  Certain namespaces are reserved in Jabber (namespaces beginning with
  'jabber:' or 'http://jabber.org/', as well as 'vcard-temp').
  If a user attempts to get or set jabber:iq:private data in a reserved
  namespace, historically some server implementations have chosen to
  return an error (commonly "Not Acceptable") to the sender.

  https://xmpp.org/extensions/xep-0049.html#example-5
2024-04-30 18:00:12 +02:00
Badlop
374f6b8e7d Improve recent commit so users cannot prevent banning, fixes 44bafa4 (#4201) 2024-04-30 18:00:11 +02:00
Badlop
33c6b3700e Ammend ejabberd_admin:update/0 from adbccbe to be used by Rebar3 Sync 2024-04-30 18:00:08 +02:00
Badlop
eb975268f4 Add ExSync tool to "make relive" with Mix
How to use:
- Compile ejabberd with Mix
- Start ejabberd with "make relive"
- Edit some ejabberd source code file
- Save the file, and ExSync will compile and reload it automatically

ExSync depends on FileSystem library, which requires inotify-tools, see
https://github.com/falood/file_system#system-support

References:
https://hex.pm/packages/exsync
https://github.com/falood/exsync
2024-04-30 18:00:06 +02:00
Badlop
b0afe4946d Add Sync tool to "make relive" with Rebar3
How to use:
- Compile ejabberd with Rebar3
- Start ejabberd with "make relive"
- Edit some ejabberd source code file
- Save the file, and Sync will compile and reload it automatically

I've added src_dirs option so Sync doesn't act on dependencies,
which would produce many garbage log lines.
However, now it only works if the parent directory is named "ejabberd"

Sync requires at least Erlang/OTP 21, which introduced the
new try-catch syntax to retrieve the stacktrace
https://www.erlang.org/patches/otp-21.0

References:
https://hex.pm/packages/sync
https://github.com/rustyio/sync
2024-04-30 17:59:59 +02:00
Badlop
5c6a399f5b Update links to some moved content in docs.ejabberd.im 2024-04-25 02:55:02 +02:00
Badlop
e744665171 Fix links in mix.exs 2024-04-24 13:20:48 +02:00
Badlop
0b16cbddde Remove vcard example config in mod_proxy65, it breaks PDF Docs generation 2024-04-24 13:20:47 +02:00
Badlop
7ea2c6eabf Improve markdown of md files 2024-04-24 13:20:46 +02:00
Badlop
45ca11ecd0 Improve markdown of generated documentation 2024-04-24 13:20:44 +02:00
Badlop
d8cdd82bf8 Rewrite vcard example configuration to not require extended format 2024-04-24 13:20:43 +02:00
Badlop
345af5a535 Remove ... in example configuration: it is assumed and reduces verbosity 2024-04-24 13:20:42 +02:00
Badlop
6e5895ce45 Update some modules doc to use the note field 2024-04-24 13:20:41 +02:00
Badlop
b70a2fe4cf Support for version note in modules too 2024-04-24 13:20:40 +02:00
Badlop
da01d932ea Add some text to examples, so docs Makefile can find and update its syntax 2024-04-24 13:20:39 +02:00
Badlop
7cd5808766 Mark toplevel options, commands and modules that changed in latest version 2024-04-24 13:20:37 +02:00
Badlop
c98302b3c0 Now modules themselves can have version annotations in 'note'
This was already supported in module options, toplevel options
and ejabberd_commands.
2024-04-24 13:20:36 +02:00
Badlop
cd7eedf589 Update API to mkdocs 2024-04-24 13:20:35 +02:00
Badlop
27bd8852a1 Update name of API section 2024-04-24 13:20:34 +02:00
Badlop
effcf0b7cf Update markdown text for version notes, to work with mkdocs 2024-04-24 13:20:33 +02:00
Badlop
71b9db688a Fix markdown indentation of JSON examples 2024-04-24 13:20:32 +02:00
Badlop
8be6dc7758 Use new shorthand to provide URLs relative to ejabberd Docs 2024-04-24 13:20:30 +02:00
Badlop
569f0b303b Use same module shorthand in API documentation than in module docs 2024-04-24 13:20:29 +02:00
Badlop
15e3add909 CHANGELOG.md: Fix markdown syntax to work with MkDocs 2024-04-24 13:20:28 +02:00
Badlop
68c0c4d94f Update doc headers to MkDocs and mention ejabberd version used 2024-04-24 13:20:27 +02:00
Badlop
a550a1c55c Fix documentation links to new URLs generated by MkDocs 2024-04-24 13:20:26 +02:00
Badlop
832588f861 mix.lock: Update to get p1_acme fix in ACME IPv6 2024-04-24 13:20:24 +02:00
Paweł Chmielowski
73bcabd2fa Replace muc.example.com with conference.example.com in commands docs
Second form matches what we use by default, and we seen some confusion
between those two when people try to adopt commands from docs to real
usage.
2024-04-23 14:33:34 +02:00
Badlop
da8c9f3357 rebar.lock: Track it, now that rebar3 uses loose dependency versioning
This is recommended in Rebar3 documentation:
  [Lock files] should always be checked into source control.
  https://rebar3.org/docs/configuration/dependencies/#lock-files
2024-04-23 13:46:21 +02:00
Badlop
6cfef4f476 mix.lock: Update to latest versions 2024-04-22 18:28:34 +02:00
Badlop
e9fbfaf536 Update Luerl to 1.2.0 when OTP>=20, simplifies commit a09f222 2024-04-22 18:28:34 +02:00
Badlop
0407c56605 rebar.config: Update deps version to rebar3's relaxed versioning 2024-04-22 18:28:34 +02:00
Badlop
1a63443e02 rebar.config.script: Support relaxed dependency version (#4192)
Instead of adding another element to the tuple, let's reuse the second
element, which was used only by rebar2, and always has ".*" as value.
2024-04-22 18:28:34 +02:00
Badlop
0345f798bd Update p1_acme to git, to support Jose 1.11.10 and Ipv6 support (#4170) 2024-04-22 18:28:34 +02:00
Badlop
ee9d4d56a9 Update Jose to the new 1.11.10 for Erlang/OTP > 23 2024-04-22 18:28:34 +02:00
Badlop
44bafa478e New ban commands use private storage to keep ban information (#4201) 2024-04-22 18:28:15 +02:00
badlop
ce57e02769
Merge pull request #4205 from LeszekBlazewski/fix-command-on-start-docs
fix: invalid CTL_ON_CREATE usage in docker-compose example
2024-04-19 18:24:46 +02:00
LeszekBlazewski
64cd794c02 fix: invalid CTL_ON_CREATE usage in docker-compose example 2024-04-19 16:14:05 +02:00
Badlop
9c8ae96f25 Define base64url dependency only when using rebar2 and Erlang<24
base64url is not called directly in ejabberd code since e227940,
it is only required by p1_acme and erlang-jose 1.11.1

erlang-jose 1.11.1 defines base64url dependency as an hex package,
and rebar2 is not able to download it.
For that reason, when compiling ejabberd with rebar2,
we provide a rebar2-friendly base64url dependency definition.
That way when jose is downloaded, that dependency is already available.
2024-04-19 01:50:42 +02:00
Badlop
e973360aa7 Test: Fix some minor compilation warnings
- This QueryID is unnecessary since d3aeed8, due to d6e9e03
- DB variable was added in d32a0ce to detect riak and disable some tests,
  but support for Riak was removed later in 3f7d9e3.
- MyJID was added in 5b863c2 but was never actually used
- recv2 return should be checked
2024-04-19 01:50:42 +02:00
dependabot[bot]
697e5b8b6c Bump peaceiris/actions-gh-pages from 3 to 4
Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3 to 4.
- [Release notes](https://github.com/peaceiris/actions-gh-pages/releases)
- [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-gh-pages/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peaceiris/actions-gh-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 01:50:42 +02:00
Badlop
017f609a51 make-binaries: Bump OpenSSL to 3.3.0 2024-04-19 01:50:42 +02:00
Badlop
22f0d44fed make-binaries: Bump Linux-PAM to 1.6.1 2024-04-19 01:50:42 +02:00
Paweł Chmielowski
0fdf58b1ec Add ability to use additional custom errors when parsing options 2024-04-17 14:01:21 +02:00
Badlop
051bf2968a Runtime: Test 27.0-rc1 instead of 27, as port_compiler still fails in rc2 2024-04-12 17:56:02 +02:00
Badlop
4fd83631ec Mention in what ejabberd version was added update_sql_schema option 2024-04-12 16:41:25 +02:00
Badlop
a29d54c497 Comment ERTS_VSN variable in ejabberdctl when not used (#4194)
That variable is not used in "make relive" and "make install",
so let's comment the variable in ejabberdctl when preparing
that file for those targets.
2024-04-12 16:41:21 +02:00
Badlop
ed6762b8ee Don't name integer and string results in API examples (#4198)
Since ejabberd 24.02, mod_http_api does not name any results,
previously integer and strings were named, but other results were not.
And ejabberdctl obviously does not name results either.
Only ejabberd_xmlrpc does.
Consequently, the documentation should not name results in the examples.
2024-04-12 12:08:03 +02:00
Badlop
b6a0c7e57f mod_configure: Retract 'Get User Password' command to update XEP-0133 1.3.0
https://github.com/xsf/xeps/pull/1314
2024-04-12 12:07:50 +02:00
Badlop
ba0be28d45 CONTAINER.md: live in podman doesn't strictly require EJABBERD_BYPASS_WARNINGS 2024-04-12 12:07:46 +02:00
Badlop
ef5a435480 sql_server option: Mention in what version it was last updated 2024-04-12 12:07:40 +02:00
Paweł Chmielowski
61ad808d26 Fix validation of user field in get_user_subscriptions command
I made it test for valid muc room, instead of just valid username.

This should fix issue #4197
2024-04-11 12:17:02 +02:00
Badlop
426e33d3a6 Fix previous commit: shellcheck reported a warning 2024-04-04 15:58:48 +02:00
Badlop
d6d8bce0e4 If INET_DIST_INTERFACE is IPv6, set required option (thanks to Stu Tomlinson)(#4189) 2024-04-04 13:42:09 +02:00
Badlop
7c76f2b764 Handle the "approved" attribute. As feature isn't implemented, discard it (#4188)
Reference:
https://xmpp.org/rfcs/rfc6121.html#roster-syntax-items-approved

Additionally, when roster contains unknown attribute, discard it and
show a warning
2024-04-04 13:42:09 +02:00
Paweł Chmielowski
735516ed37 Don't start sql connection pools for unknown hosts
It's possible to trigger that by passing wrong domain to some ctl commands,
and if you don't have default credentials for sql connections, you get
repeating errors when this pools tries to reconnect from error.
2024-04-04 11:05:34 +02:00
Badlop
dbf0fb8e86 Runtime: Run Dialyzer in Mix jobs 2024-04-01 14:26:55 +02:00
Badlop
f50b5e1a58 Fix typo in elixir code that breaks 537aac2 when using mix 2024-04-01 14:26:55 +02:00
Badlop
50c74ab821 Fix code:lib_dir call to work with Erlang/OTP 27.0-rc2 2024-04-01 14:26:55 +02:00
Badlop
a1b76ac0a9 Container: Update to Elixir 1.16.2 2024-04-01 14:26:55 +02:00
Badlop
49ca325845 make-binaries: Bump to OTP 26.2.3, Elixir 1.16.2, Expat 2.6.2 2024-04-01 14:26:55 +02:00
dependabot[bot]
703e98ec45 Bump ex_doc from 0.31.1 to 0.31.2
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.31.1 to 0.31.2.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases)
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.31.1...v0.31.2)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 14:26:55 +02:00
dependabot[bot]
208f798b07 Bump softprops/action-gh-release from 1 to 2
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 14:26:55 +02:00
Badlop
059a028c0c CONTRIBUTING.md: Fix markdown 2024-04-01 14:26:55 +02:00
Badlop
7269d171a7 README.md: Fix markdown syntax and add docs badge 2024-04-01 14:26:55 +02:00
Badlop
3ca2d99a47 COPYING: Move the markdown-formatted file to Docs git, keep plaintext file here 2024-04-01 14:26:55 +02:00
Paweł Chmielowski
9ab60935a4 Add update_primary_key command to sql schema updater 2024-03-21 10:58:06 +01:00
Paweł Chmielowski
c5437235f3 Make mod_vcard_xupdate send hash after avatar get set for first time
We need to remove info about empty photo in session stored presence after
avatar get set, otherwise as we don't modify presences like that in
mod_vcard_xupdate, we will send presence with updated hash.

This fixes issue #4182
2024-03-20 10:57:12 +01:00
Paweł Chmielowski
537aac24f7 Improve detection of types in odbc
This should fix issue with dialyzer on erlang 26.2.3+
2024-03-18 14:54:32 +01:00
Paweł Chmielowski
8f20dd8425 Test retractons in mam_tests 2024-03-18 12:42:03 +01:00
Badlop
1639471250 Fix crash running export2sql when MAM enabled but MUC disabled
Problem introduced in cfc393a
2024-03-07 18:38:32 +01:00
Badlop
fcc5f00e75 Copy from COPYING the sentence about OpenSSL additional permission 2024-03-07 18:38:32 +01:00
Badlop
80b06da56b Download GPL 2 in markdown format
Downloaded file https://www.gnu.org/licenses/old-licenses/gpl-2.0.md
from https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
2024-03-07 18:38:32 +01:00
Badlop
2c1b0bb77b Use shorthands provided by docs.ejabberd.im Makefile, fix markdown syntax 2024-03-07 18:38:32 +01:00
Badlop
f5c8406353 Dialyzer: Add support to run Dialyzer with Mix 2024-03-06 15:25:38 +01:00
Badlop
c7f76944f3 Dialyzer: Update Elixir code to satisfy dialyzer warnings 2024-03-06 15:25:38 +01:00
Badlop
6542a70c05 Dialyzer: First set alias definitions and then use them in @type 2024-03-06 15:25:38 +01:00
Badlop
5bb94f1d9e Result of running "make options" 2024-03-06 15:25:38 +01:00
Badlop
2378ea9c07 Dialyzer: Replace re:mp dirty workaround from 0bbc255 with other less dirty 2024-03-06 15:25:38 +01:00
Badlop
cd30538130 Fix "ejabberdctl iexlive" after "make prod" when using Elixir
The version number in ejabberd is 24.02,
but Elixir requires semver, that is, 24.2.
Use the version() function, which does the conversion.
2024-03-06 15:25:38 +01:00
Badlop
356ee22cc5 Change method from 1bf80e8 to determine if Elixir supports default_formatter function
Dialyzer when using Elixir complains about undefined function module_info.
2024-03-06 15:25:38 +01:00
Badlop
281515cd9f mod_muc_log: Hide join/leave lines, add method to show them 2024-03-06 15:25:32 +01:00
Badlop
c0055b7a7f mod_muc_log: Support allowpm introduced in 2bd61ab 2024-03-06 15:23:16 +01:00
Holger Weiss
6bdbafcd5c Merge remote-tracking branch 'processone/pr/4169'
* processone/pr/4169:
  mod_mam: Document that XEP-0441 is implemented as well
2024-03-04 11:30:53 +01:00
Melvin Keskin
a29955ff96
mod_mam: Document that XEP-0441 is implemented as well 2024-03-03 21:05:57 +01:00
Badlop
91cca3cff3 mod_conversejs: Simplify support for @HOST@ in default_domain option (#4167) 2024-02-28 13:06:49 +01:00
Badlop
716f5de517 mod_matrix_gw: Fix support for @HOST@ in matrix_domain option (#4167) 2024-02-28 13:06:47 +01:00
Paweł Chmielowski
aac0e782d0 Don't use ejabberd_config:get_myhosts() 2024-02-28 12:24:50 +01:00
Paweł Chmielowski
c69884fa3f Config reload should update loger settings part 2 2024-02-28 12:03:42 +01:00
Paweł Chmielowski
06675e4fb2 Improve validation of arguments in mod_muc_admin commands
This adds validation to couple command where they were missing and catch
passing unknown hostnames.
2024-02-28 12:01:14 +01:00
Paweł Chmielowski
ad67710f7e Make config reload update new logger settings 2024-02-28 11:46:30 +01:00
Badlop
654601ff23 Set version to 24.02 2024-02-27 10:32:55 +01:00
Badlop
d29ef59514 Update links to SQL files in the man page 2024-02-27 10:06:40 +01:00
Badlop
e3e8b9afb4 COMPILE.md: Update text about OTP release to match current behaviour
Also keep this document direct, short and introductory, there's a
already a section in the ejabberd Docs site with all the details.
2024-02-27 10:06:39 +01:00
Badlop
a8e3af3586 Update Japanese translation (thanks to Mako N) 2024-02-27 10:06:37 +01:00
Badlop
11ff7d1ff9 Update Italian translation (thanks to Ermete Melchiorre) 2024-02-27 10:06:36 +01:00
Badlop
b04b16825f Revert "CI: Don't run CT with OTP 27 until "Peer certificate rejected" gets solved"
This recent fix in fast_tls solves the problem:
528d9759d6

This reverts commit 95e9a63dcb.
2024-02-27 10:06:34 +01:00
Paweł Chmielowski
0f43a7f36b Update deps 2024-02-26 17:26:30 +01:00
Badlop
95e9a63dcb CI: Don't run CT with OTP 27 until "Peer certificate rejected" gets solved 2024-02-26 16:16:19 +01:00
Badlop
146d958fc0 CHANGELOG.md: Update to match the newest commits 2024-02-26 16:16:17 +01:00
Badlop
bb349d6085 Update "make edoc" to use ExDoc 2024-02-26 16:16:14 +01:00
Badlop
cb9053cd79 Makefile.in: Inform what build tools support some tasks 2024-02-26 16:16:13 +01:00
Badlop
4146f19814 Update man page 2024-02-26 16:16:11 +01:00
Badlop
79eca7c098 Update version number from the unreleased 24.01 to 24.02 2024-02-26 16:16:09 +01:00
Badlop
723c53e1df Revert "Container: Update make-binaries to support setup-beam v1.17.2"
We can now revert commit c81a47a692
because erlef/setup-beam v1.17.3 has recovered its original behavior in
951dd857ae
2024-02-26 16:16:08 +01:00
Badlop
daca3b558b Use another example, because "archive" is replaced when generating EDoc 2024-02-26 16:16:06 +01:00
Badlop
2075480b14 Improve some documentation: URLs are parsed later when preparing Docs 2024-02-26 16:16:05 +01:00
Badlop
e43194d59b README.md: Fix typo in link to COPYING file: its name is plain-text, not markdown 2024-02-26 16:16:03 +01:00
Badlop
8bbc27fd39 CHANGELOG.md: Fix warnings reported by "make edoc" 2024-02-26 16:16:01 +01:00
Badlop
9a9a466bd4 CHANGELOG.md: Lower markdown headers level so they get better rendered 2024-02-26 16:16:00 +01:00
Badlop
92c533f42a CONTRIBUTING.md: Remove anchor with name attribute 2024-02-26 16:15:58 +01:00
Badlop
863b7eee8b CONTAINER.md: Update documentation about sofware version numbers 2024-02-26 16:15:56 +01:00
Badlop
417294339d Matrix: Minor documentation improvements 2024-02-26 16:15:51 +01:00
Holger Weiss
6aaefc663b Fix XEP-0425: Message Moderation with SQL storage
Use the correct server name and room JID when removing moderated
messages from SQL.
2024-02-24 22:06:36 +01:00
Jérôme Sautret
a6b10ac4c0 Merge branch 'master' of github.com:processone/ejabberd 2024-02-23 12:09:51 +01:00
Jérôme Sautret
2b7b92edee Add mod_matrix_gw doc 2024-02-23 12:09:10 +01:00
Paweł Chmielowski
f4de0cef26 Add alternative types that should fix dialyzer on r26 2024-02-22 17:25:56 +01:00
Paweł Chmielowski
1b5a9c1a1f Fix dialyzer warnings in ejabberd_sql in R27 2024-02-22 16:12:04 +01:00
Badlop
a09f222b4c Use Luerl 1.0 for Erlang 20, 1.1.1 for 21-26, and temporary fork for 27
The Luerl 1.1.0 and 1.1.1 hex packages contain garbage files that
break compilation with Erlang 20.
2024-02-21 16:46:37 +01:00
Badlop
5fb76b4918 Use http_uri only when matrix requires it, ammend commit 59ff77e 2024-02-21 16:46:37 +01:00
Badlop
27d5a1d5bb configure.ac: Update enable-tools description to its current usage 2024-02-21 16:46:37 +01:00
Badlop
ba1917d23c vars.config.in: Remove comment that nowadays is obsolete 2024-02-21 16:46:37 +01:00
Badlop
0b37d50dac rebar.config.script: Don't check REBAR_PROFILE here
To get release with development tools,
don't check rebar profile here.
Instead, use "./configure --enable-tools" and it will be
checked in ejabberd.app.src.script
2024-02-21 16:46:37 +01:00
Badlop
9275bf40b2 Rebar3/Mix: If dev profile/environment, enable tools automatically 2024-02-21 16:46:37 +01:00
Badlop
4431fbbe5a Include only observer; runtime_tools is automatically added 2024-02-21 16:46:37 +01:00
Badlop
8c64ce67fc CI/Runtime: Test also with the new Erlang/OTP 27.0-rc1 2024-02-21 16:46:26 +01:00
Badlop
1ddc4a5c5d CI/Runtime: For OTP < 24 use rebar binaries from ejabberd 21.12 2024-02-21 16:45:28 +01:00
Badlop
081cab821b Rebar/Rebar3: Update binaries to work with Erlang/OTP 24-27
They are compiled from their git repositories, main branches,
using erlang:24-slim docker image.

To compile ejabberd using rebar/rebar3 and Erlang 20.0 up to 23.3,
you can download the old binaries from ejabberd 21.12, available at:
  https://github.com/processone/ejabberd/raw/21.12/rebar
  https://github.com/processone/ejabberd/raw/21.12/rebar3
2024-02-21 16:45:24 +01:00
Badlop
efe5c76469 Runtime: Test compilation with the included rebar/rebar3 binaries 2024-02-19 15:33:09 +01:00
Badlop
16c9b169f2 Runtime: Properly purge nginx in Rebars job, as done in commit 853f35c 2024-02-19 15:33:09 +01:00
Badlop
73f20a8f1e Makefile: Now --with-rebar detects if it's system-installed, otherwise use local one 2024-02-19 15:33:09 +01:00
Badlop
70e430cff1 Makefile: No need to use escript to run rebar|rebar3|mix
Usage of escript to run rebar was added to Makefile.in
when support for rebar2 was added in 4d8f770 for ejabberd 13.10.
Nowadays this seems unnecessary, and configure.ac right now can
determine what binary to use: the sysmte installed or local one.
2024-02-19 15:33:09 +01:00
Badlop
aa21aee14b configure: If --with-rebar=rebar3 but rebar3 not system-installed, use local one 2024-02-19 15:33:09 +01:00
Badlop
59ff77e171 Matrix: Fix commit 816900a for OTP below 25.0
uri_string:quote was added in OTP 25.0
2024-02-19 15:33:09 +01:00
Paweł Chmielowski
045170a67e Fix dialyzer warning on R26 in mod_matrix* 2024-02-19 12:08:56 +01:00
Alexey Shchepin
c9deea1f6f Bugfix in mod_matrix_gw_room:get_sender_power_level 2024-02-19 14:05:25 +03:00
Alexey Shchepin
c10f2a22b6 Fix dialyzer errors 2024-02-16 06:00:57 +03:00
Alexey Shchepin
45f24c63cb Update mod_matrix_gw copyright dates 2024-02-15 09:38:14 +03:00
Badlop
18cb0bca19 Fix compilation with Erlang/OTP 27: don't use the reserved word 'maybe' 2024-02-15 01:57:44 +01:00
Badlop
071dc08405 Container: Support OTP versions with "-rc" string 2024-02-15 01:57:42 +01:00
Badlop
b8181974ec Replace 'if' preprocessor directive with 'ifndef', add OTP_BELOW_24
The 'if' preprocessor directive was added in Erlang/OTP 21.0,
but ejabberd currently supports Erlang 20.0 and higher...
Let's use 'ifndef' instead.

https://www.erlang.org/doc/reference_manual/macros.html#flow-control-in-macros
https://www.erlang.org/doc/apps/compiler/notes#compiler-7.2
https://www.erlang.org/patches/otp-21.0#compiler-7.2
2024-02-15 01:57:41 +01:00
Badlop
816900a6cf Use uri_string module instead of the deprecated http_uri
http_uri is marked for deprecation since OTP 23
Use uri_string which is available since OTP 21
No need to provide alternative, because it's used only by mod_matrix,
and this runs only with Erlang/OTP 24 or higher.

https://www.erlang.org/patches/otp-23.0#inets-7.2
https://www.erlang.org/docs/23/man/http_uri
2024-02-15 01:57:39 +01:00
Badlop
2438fc8b31 Add OTP_BELOW_25 to mix.exs that was added to rebar.config in 4ae06f0 2024-02-15 01:57:38 +01:00
Badlop
8b84f991e1 make-binaries: Bump many dependency versions
Unfortunately, newer versions of linux-pam throw compilation problems:

linux-pam 1.5.3:
tty_conv.c:9:10: fatal error: termio.h: No such file or directory

linux-pam 1.6.0:
pam_namespace.c:649:41: error: 'SIZE_MAX' undeclared (first use in this function)
2024-02-15 01:57:36 +01:00
Badlop
3c98ec5b48 Update "make translations" to reduce build requirements
Previously, preparing translations required rebar3 and:
  ./configure --enable-tools
  make
  make translations

With this change it works with rebar3 and mix, just running:
  ./configure
  make translations
2024-02-15 01:57:34 +01:00
Badlop
e1f863afa4 Makefile: Group all variable definitions, and later just use them 2024-02-15 01:57:32 +01:00
Badlop
f40a036d97 Makefile: Express rebar3 profile using "as profile"
This allows to use REBAR_PROFILE to add another profile.
Right now it doesn't seem specially useful, but it's possible:
  REBAR_PROFILE=dev make prod
  REBAR_PROFILE=translations make dev

https://rebar3.org/docs/configuration/profiles/
2024-02-15 01:57:30 +01:00
dependabot[bot]
3f07e232aa Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-15 01:57:28 +01:00
Alexey Shchepin
f44e23b8cc Add mod_matrix_gw 2024-02-14 06:59:23 +03:00
Paweł Chmielowski
67a6776fba Add ability to ignore failures in execution of container CTL_ON_* commands
This will allow to use register in CTL_ON_CREATE and not abort if used with
existing data that have account already registered.
2024-02-13 11:55:23 +01:00
Badlop
cdaf45f91c Test: Check that the message we get is the welcome message, not other 2024-02-09 14:12:22 +01:00
Badlop
e1b94487ef Container: Apply commit 35b727a
ejabberdctl: Detect problem running iex and show explanation
2024-02-09 14:12:21 +01:00
Badlop
2531ebf685 Container: Apply commit abf0796
ejabberdctl: Detect problem running etop and show some help
2024-02-09 14:12:20 +01:00
Badlop
01909b07ce Container: Apply commit e1f14ac
Rebar3: Provide proper path to iex
2024-02-09 14:12:18 +01:00
Badlop
39ea08b7cb Container: Apply commit 841d5c0 and 81ceefe
Fix startup problem when having set EJABBERD_OPTS and logger options
Remove spurious line
2024-02-09 14:12:17 +01:00
Badlop
413ffd7470 Container: Apply commit 19e2e16
Let "ejabberdctl etop" work in a release (if observer is available)
2024-02-09 14:12:15 +01:00
Badlop
66645baa75 Container: Apply commit 122af79
move spool dir to make it fully configurable per ejabberdctl.cfg (#3863)
2024-02-09 14:12:13 +01:00
Badlop
021f0be119 Container: Update to Erlang/OTP 26.2, Elixir 1.16.1 and Alpine 3.19 2024-02-09 14:12:12 +01:00
Badlop
1962fc88d6 make-binaries: Bump OpenSSL 3.2.1, Erlang/OTP 26.2.2, Elixir 1.16.1
The update of OpenSSL follows:
eae4ab473d
39823a8009
92e9a41888
2024-02-09 14:12:10 +01:00
Badlop
fa12301e08 ejabberdctl: Fix problem when running ejabberdctl in container 2024-02-09 14:12:08 +01:00
Badlop
9f934abd48 ejabberdctl: Fix crash running defined commands in container and installers 2024-02-09 14:12:06 +01:00
Badlop
4680954112 README.md: Add links to nightly builds 2024-02-09 14:12:03 +01:00
Paweł Chmielowski
7e6ffc34fb Update mix.lock 2024-02-07 19:32:49 +01:00
Paweł Chmielowski
95135af6b3 Rework temporary node name generation in ejabberdctl
This should limit number of possible node names generated by and with that
prevent atom space exhaustion in ejabberd process.

On R23+ we switch to using native dynamic node features and on older
versions we iterate over small number of possible names and skip those
already in use.
2024-02-07 12:17:16 +01:00
Badlop
c81a47a692 Container: Update make-binaries to support setup-beam v1.17.2
With setup-beam v1.17.2, make-binaries failed in the Container action with:

* ERROR:   No usable Erlang/OTP system for the build machine found! Cannot
*          cross compile without such a system.
*
*          Either build a bootstrap system for the build machine, or provide
*          an Erlang/OTP-26 system in the $PATH, and try again. For more
*          information on cross compiling Erlang/OTP-26, see the
*          $ERL_TOP/xcomp/README file.

The problematic commit is:
  cf854bf149
more concretely this change:
  -  core.exportVariable(installDirForVarName, cachePath)
  +  core.exportVariable(installDirForVarName, catchPathBin)

Up until setup-beam@v1.17.1, the INSTALL_DIR_FOR_OTP was something like
  /opt/hostedtoolcache/otp/ubuntu-22.04/OTP-26.1.1/x64
but starting in v1.17.2, the path contains /bin, for example:
  /opt/hostedtoolcache/otp/ubuntu-22.04/OTP-26.1.1/x64/bin
2024-02-06 17:57:27 +01:00
Badlop
3bd9fc9f43 Container: Fix typo in cache key name 1.25->1.26 2024-02-06 17:57:27 +01:00
Badlop
c664d6dc32 Workflows: Update actions to use Node.js 20 as recommended by Github Actions 2024-02-06 17:57:27 +01:00
Badlop
a182ec12cf Workflows: Use explicit ubuntu-22.04 instead of a varying ubuntu-latest
Also notice that ubuntu-22.04 doesn't include Erlang/OTP.
2024-02-06 17:57:27 +01:00
Badlop
70bf316f9d Explain that reopen_log and rotate_log only affect some modules (#4156) 2024-02-06 17:52:31 +01:00
Badlop
2979fb4a9b ext_mod: Support in WebAdmin when a module spec lacks some information 2024-02-06 17:52:29 +01:00
Badlop
a33be2d67a ejabberdctl.bc: Improve caching of commands list
Improvements:
- Keep command cache for one hour
- Fix parsing command list with ECMA-48 SGR escape sequence for font attributes
2024-02-06 17:52:27 +01:00
Badlop
c6878f9c9d ejabberdctl: Print argument description, examples and note in help 2024-02-06 17:52:25 +01:00
Badlop
1d65f4471b ejabberdctl: Document exclusive ejabberdctl commands like all the others 2024-02-06 17:52:24 +01:00
Badlop
e9de3748bd ejabberdctl: Reorganize commands related to mnesia info
- ejabberdctl mnesia: already implemented in ejabberd_admin.erl
- ejabberdctl mnesia info: renamed to mnesia_info_ctl
- ejabberdctl mnesia Arg: command removed, use mnesia_info_ctl instead
2024-02-06 17:52:22 +01:00
Badlop
ea40afbe03 update_sql_schema: Fix typo, add example MySQL version number 2024-02-06 17:52:19 +01:00
Holger Weiss
01c70868ef Ignore hints when checking for chat states
Ignore XEP-0334 elements when checking whether a stanza is a stand-alone
XEP-0085 chat state notification.  This allows for CSI-filtering chat
states with (e.g.) a no-store hint.

Thanks to Thilo Molitor for reporting the issue.
2024-02-03 13:20:34 +01:00
Alexey Shchepin
66d701e788 Add print_sql_schema ejabberdctl command 2024-01-24 22:52:20 +03:00
Badlop
6eff14a71d Update changelog 2024-01-23 14:41:23 +01:00
Paweł Chmielowski
506152d4e7 Use tagged version of dependencies 2024-01-23 13:39:21 +01:00
Badlop
6e9c96a0e5 Run: make doap 2024-01-22 17:29:24 +01:00
Badlop
e58be4d57e Update man page 2024-01-22 17:29:23 +01:00
Badlop
e94edbdb8f Update Chinese translation (thanks to Sketch6580) 2024-01-22 17:29:21 +01:00
Badlop
0c8d2ea557 Update Ukrainian translation (thanks to Олександр Кревський) 2024-01-22 17:29:20 +01:00
Badlop
07e3456631 Update Portuguese translation (thanks to Silvério Santos) 2024-01-22 17:29:19 +01:00
Badlop
e65d554309 Update Dutch translation (thanks to Ranforingus) 2024-01-22 17:29:17 +01:00
Badlop
f5652cf946 Update Czech translation (thanks to Jan Aschenbrenner) 2024-01-22 17:29:16 +01:00
Badlop
399d0a5bf0 Update Bulgarian translation (thanks to Mr. EddX) 2024-01-22 17:29:14 +01:00
Badlop
589521bfd8 Update copyright year to 2024 (#4139) 2024-01-22 17:29:13 +01:00
Badlop
d802b6ab44 Fix version number in ejabberd_xmlrpc.erl 2024-01-22 17:29:12 +01:00
Badlop
45863b4651 Grant execution permission to install-sh
The file `src/install-sh` was added in c311ea1.
Most files from that commit were removed in 4d8f770 and install-sh was moved.
Since recent commit 7cae092, `./configure` checks for a race-free `mkdir -p`,
the `install-sh` script may be used, and it needs execution permission.
2024-01-22 17:29:10 +01:00
Badlop
f34c2b1714 Document new XEPs supported thanks to its implementation in the xmpp library 2024-01-22 17:29:09 +01:00
Badlop
78750bf753 Annotate version when the commands v1 are available 2024-01-22 17:29:07 +01:00
Badlop
65d585496c Document sql_flags option introduced in 00c7600 2024-01-22 17:29:06 +01:00
badlop
194d3b9e17
Merge pull request #4143 from badlop/elixir-all-in
Improve support for Elixir, Mix and Rebar3
2024-01-22 12:44:21 +01:00
Badlop
b4b85e569e Runtime: Clean Rebar tests and add Rebar2 to them 2024-01-17 14:44:09 +01:00
Badlop
daabfeb0e2 Makefile: Add install-rel and uninstall-rel 2024-01-17 14:44:09 +01:00
Badlop
c61b57f7ab Makefile: Uninstall also the man file 2024-01-17 14:44:09 +01:00
Badlop
7cae0920b8 Makefile: Use AWK and MKDIR_P 2024-01-17 14:44:09 +01:00
Badlop
920e4ba6b1 Makefile: Fix TAGS target 2024-01-17 14:44:09 +01:00
Badlop
16e58a1911 Makefile: Update PHONY targets 2024-01-17 14:44:09 +01:00
Badlop
ec7570f93e Makefile: Add sections, headers and Vim folding 2024-01-17 14:44:09 +01:00
Badlop
ae2993ecae Rebar: Use excl_archive_filters only when Erlang < 26
That option is required when Erlang < 26 to disable the archive feature.
The feature and the option were removed in Erlang 26, and the release
building process fails if the option is used.
https://www.erlang.org/patches/otp-26.0
2024-01-17 14:43:24 +01:00
Badlop
ee778ca8f9 COMPILE.md: For Elixir, recommend at least 1.13.4 with Erlang/OTP 23.0 2024-01-17 10:24:34 +01:00
Badlop
a2ff5fbfdb Add observer and runtime_tools in releases when --enable-tools
When --enable-tools, include observer and runtime_tools
in the OTP releases, as they are required by "ejabberdctl etop".

With this fix, "ejabberdctl etop" works correctly when:
* rebar3 + make rel
* mix + make dev
* mix + make rel
2024-01-17 10:24:34 +01:00
Badlop
eeb4be6e4b Makefile: Rename "make rel" to "make prod"
Rebar2 could create a release, so it made sense to call it "make rel".

Nowadays, Rebar3 and Mix support creating different types of releases:
production, development, ...
In this sense, our "make rel" target is more properly named "make prod"

For backwards compatibility, "make rel" redirects to "make prod"
2024-01-17 10:24:34 +01:00
Badlop
aad3306bdf Makefile: Support using --with-rebar=/path/to/mix 2024-01-17 10:24:34 +01:00
Badlop
35b727ac39 ejabberdctl: Detect problem running iex and show explanation 2024-01-17 10:24:34 +01:00
Badlop
abf07966be ejabberdctl: Detect problem running etop and show some help 2024-01-17 10:24:34 +01:00
Badlop
a1c81955d3 ejabberdctl: Document to stop live shell with control+g, following cd421f9 2024-01-17 10:24:34 +01:00
Badlop
ad7538f394 Runtime: Rebar3+Elixir: Add new job to test Rebar3 compiling Elixir 2024-01-17 10:24:34 +01:00
Badlop
c0a909296e Runtime: Mix: Enable ModPresenceDemo and Elixir dep 2024-01-17 10:24:34 +01:00
Badlop
7186cd09bf Runtime: Test also "make install" 2024-01-17 10:24:34 +01:00
Badlop
db8583b1c6 Runtime: Mix: Add step to view logs 2024-01-17 10:24:34 +01:00
Badlop
07be61585c Runtime: Mix: No need to specify --disable-elixir 2024-01-17 10:24:34 +01:00
Badlop
8bdd811a16 Runtime: Mix: Update Erlang and Elixir versions to test 2024-01-17 10:24:34 +01:00
Badlop
c69d88c45a Runtime: Rebars: Add log tests similar to the Mix job 2024-01-17 10:24:34 +01:00
Badlop
b18fa2ebc2 Runtime: Rebars: Use the rebar binaries included in the repository 2024-01-17 10:24:34 +01:00
Badlop
f838319455 Runtime: Rebars: Get old rebar binaries when testing old erlang versions 2024-01-17 10:24:34 +01:00
Badlop
0d852474be Use Mix or Rebar3 by default instead of Rebar2 to compile ejabberd
Use the program specified in option: --with-rebar=/path/to/bin
When none is specified, use the system mix
When Elixir not found, use the system rebar3
When Rebar3 not found, use the rebar3 binary included with ejabberd
2024-01-17 10:24:34 +01:00
Badlop
dd5a198222 Rebar3: Include Elixir files when making a release 2024-01-17 10:24:34 +01:00
Badlop
2d067f7498 Rebar3: Workaround to fix protocol consolidation 2024-01-17 10:24:34 +01:00
Badlop
a6c1e42c0a Rebar3: Add support to compile Elixir dependencies
As described in
https://rebar3.org/docs/configuration/plugins/#elixir-dependencies
2024-01-17 10:24:34 +01:00
Badlop
ff783d15e8 Rebar3: Compile explicitly our Elixir files when --enable-elixir 2024-01-17 10:24:34 +01:00
Badlop
e1f14aca9b Rebar3: Provide proper path to iex
We can't use iex variable, because rebar3/relx_overlay.erl already uses
all existing app names as variables.
2024-01-17 10:24:34 +01:00
Badlop
65ff45e202 Rebar/Rebar3: Remove elixir as a gitonly_deps, and add ejabberd_po
Adding ejabberd_po to gitonly_deps isn't strictly needed,
because we request a branch in the ejabberd-po git repository,
and rebar.config.script understands that this means ejabberd_po
should be downloaded from git, not hex.pm.
2024-01-17 10:24:34 +01:00
Badlop
f330267361 Rebar/Rebar3: Remove Elixir as a rebar dependency
Elixir is standalone since years ago. When Elixir support is required,
better simply install Elixir and use Mix as build tool.
Or install Elixir and use the experimental Rebar3 support to compile
Elixir files and dependencies.
2024-01-17 10:24:34 +01:00
Badlop
1de28fa566 Rebar/Rebar3: Update binaries to work with Erlang/OTP 23-26
They are compiled from their git repositories, main branches,
using erlang:23-slim docker image.

To compile ejabberd using rebar/rebar3 and Erlang 22.3 or older,
you can download the old binaries from ejabberd 21.12, available at:
  https://github.com/processone/ejabberd/raw/21.12/rebar
  https://github.com/processone/ejabberd/raw/21.12/rebar3
2024-01-17 10:24:34 +01:00
Badlop
b08001183e ext_mod: Support Elixir modules with several defimpl, like Decimal 2024-01-17 10:24:34 +01:00
Badlop
0121adec03 ext_mod: Compile *.ex files also in source subfolders 2024-01-17 10:24:34 +01:00
Badlop
4daeb41f0e Elixir: Fix compiling ejabberd as a dependency (4128) 2024-01-17 10:24:34 +01:00
Badlop
b2df22469b Elixir: Fix ejabberdctl start/live when installed
The problem appeared when:
  ./configure --with-rebar=mix
  make install
  ejabberdctl live

=INFO REPORT==== 19-Dec-2023::21:28:36.006306 ===
    application: ssl
    exited: stopped
    type: temporary
...
2024-01-17 10:24:34 +01:00
Badlop
1bf80e861d Elixir: Fix: FORMATTER ERROR: bad return value (4087)
This is required since Elixir 1.15 when starting ejabberd with:
  ./configure --with-rebar=mix
  make relive
  make relive && ejabberdctl iexlive
  make install && ejabberdctl iexlive

Reference:
  https://elixir-lang.org/blog/2023/06/19/elixir-v1-15-0-released/
  https://hexdocs.pm/logger/Logger.Formatter.html#module-formatting
2024-01-17 10:24:34 +01:00
Badlop
5bb2beb179 Elixir: Fix: Couldn't find file Elixir.Hex.API
Fix for error when starting ejabberd with Elixir 1.15:
  [critical] Couldn't find file Elixir.Hex.API needed for Erlang application 'hex'.
2024-01-17 10:24:34 +01:00
Badlop
852a540cb0 Elixir: Fix Elixir 1.17-dev warnings about single-quoted charlists 2024-01-17 10:24:34 +01:00
Badlop
8b38aebbc7 Mix: Enable stun by default when vars.config not found
configure.ac by default enables stun and zlib, in fact ejabberd.yml
has ejabberd_stun enabled by default, so for coherence mix.exs should
enable stun too when vars.config is not found.
2024-01-17 10:24:34 +01:00
Badlop
fa3c25ab66 Mix: New option vars_config_path to set path to vars.config (4128)
Useful when setting ejabberd as dependency in another Elixir project,
and you want to enable or disable some ejabberd dependencies, see
https://www.process-one.net/blog/how-to-use-ejabberd-as-an-elixir-application-dependency/
2024-01-17 10:24:34 +01:00
Badlop
30df1dbe3f Mix: Set the nodename when using the ejabberd script generated by Elixir
Also use start instead of console in Elixir script
2024-01-17 10:24:34 +01:00
Badlop
6d61e3590d Mix: Print shell commands output to the console when "make dev" 2024-01-17 10:24:34 +01:00
Badlop
e71650e6ab Mix: Fix ejabberdctl iexlive problem locating iex in an OTP release
The problem appeared when:
  ./configure --with-rebar=mix
  make dev
  _build/dev/rel/ejabberd/bin/ejabberdctl iexlive
2024-01-17 10:24:34 +01:00
Badlop
d81b3805e3 Mix: Elixir 1.14 requires mix, and Elixir 1.16 warns about duplicate 2024-01-17 10:24:34 +01:00
Badlop
416253496d Mix: Add yecc compiler as suggested by Elixir 1.16 warning over p1_pgsql 2024-01-17 10:24:34 +01:00
Paweł Chmielowski
29ec5bff60 Add option to disable XEP-0474: SASL SCRAM Downgrade Protection support
Looks like clients using strophejs aren't able to authenticate when we
add data required by that spec to scram packets, so at least give a way
to disable this until clients will be fixed.
2024-01-16 12:03:35 +01:00
Holger Weiss
6c691a73bd Support XEP-0198 pings
If stream management is enabled, let mod_ping trigger XEP-0198
<r/>equests rather than sending XEP-0199 pings.  This avoids the
overhead of the ping IQ stanzas, which, if stream management is enabled,
are accompanied by XEP-0198 elements anyway.

Thanks to MoyaApp (<https://moya.app>) for sponsoring this work.
2024-01-15 21:38:54 +01:00
Badlop
74cb2e054f Rephrase sentences to avoid using "allow to + verb" 2024-01-11 13:42:06 +01:00
Badlop
5b6329a12e Fix a few spelling errors 2024-01-11 13:41:40 +01:00
Badlop
973ba58744 mod_avatar implements XEP-0398 0.2.0 since ddc29d4 2024-01-08 18:21:15 +01:00
Badlop
1f60bcb2d0 Fix syntax of enable-user and enable-group options help 2024-01-08 18:21:13 +01:00
Badlop
8e8354caec Fix explanation of --enable-group option (#4135) 2024-01-08 18:21:10 +01:00
badlop
e26c547afc
Merge pull request #4118 from badlop/api-version-1
Commands API version 1
2024-01-05 13:10:06 +01:00
Badlop
fc13fdceca Docs: Separate tags with commas in markdown docs 2024-01-04 22:01:21 +01:00
Badlop
d585b1fcb6 Docs: When definer is unknown, don't show Module section 2024-01-04 22:01:21 +01:00
Badlop
57bd0ef4f5 Docs: Optional support to get commands from runtime instead of BEAM files, based in bdeb4a7 2024-01-04 22:01:21 +01:00
Badlop
d140f99b68 ejabberd_xmlrpc: Fix support for restuple error response 2024-01-04 22:01:21 +01:00
Badlop
90766685ae ejabberd_ctl: When API version>0, update syntax of list results 2024-01-04 21:53:14 +01:00
Badlop
d65638efe1 ejabberd_ctl: Pass API version to format_result 2024-01-04 21:53:14 +01:00
Badlop
b34572e7ce ejabberd_ctl: Show proper command help when version is explicitly set 2024-01-04 21:53:14 +01:00
Badlop
c4c0cd1b77 ejabberd_ctl: Add support for list and tuple arguments
Tuple elements are separated with :
List elements are separated with ,

For example:
  ejabberdctl add_rosteritem user1 localhost testuser7 localhost NickUser77l gr1,gr2,gr3 both
  ejabberdctl create_room_with_opts room1 conference.localhost localhost public:false,persistent:true
  ejabberdctl subscribe_room_many user1@localhost:User1,admin@localhost:Admin room1@conference.localhost urn:xmpp:mucsub:nodes:messages,urn:xmpp:mucsub:nodes:affiliations

Affected commands:
- add_rosteritem
- create_room_with_opts
- oauth_issue_token
- send_direct_invitation
- set_vcard2_multi
- srg_create
- subscribe_room
- subscribe_room_many
2024-01-04 21:53:14 +01:00
Badlop
9f42f17088 mod_http_api: Fix to allow the client override the API version
When configured like:
listen:
  -
    request_handlers:
      /api: mod_http_api
      /apizero/v0: mod_http_api

What API version will be used depending on the URL:
- api/commandname use the latest available version
- api/commandname/v0 use version 0
- apizero/v0/commandname use version 0
- apizero/v0/commandname/v2 use version 2
2024-01-04 21:53:14 +01:00
Badlop
d570870be5 mod_http_api: When using API version>0, avoid result names for integers and strings 2024-01-04 21:53:14 +01:00
Badlop
8671bf70ab mod_http_api: When no specific API version is requested, use the latest 2024-01-04 21:53:14 +01:00
Badlop
e26729b483 Commands: Use list arguments in many commands that used separators
Commands that has some argument change:
- add_rosteritem
- oauth_issue_token
- send_direct_invitation
- srg_create
- subscribe_room
- subscribe_room_many
2024-01-04 21:53:14 +01:00
Badlop
d4113d9569 Commands: set_presence: switch priority argument from string to integer 2024-01-04 21:53:14 +01:00
Badlop
c5a5dd859e Commands: Improve syntax of many commands documentation 2024-01-04 21:53:14 +01:00
Badlop
0961fa1830 Commands: When result is rescode, result_desc is automatically added 2024-01-04 21:53:14 +01:00
Badlop
f18b8d464d Commands: Add a new muc_sub tag to all the relevant commands 2024-01-04 21:53:14 +01:00
Badlop
98d7519274 ejabberd_commands: Add the command version as a tag "vX" 2024-01-04 21:53:14 +01:00
Badlop
1326a7764a ejabberd_commands: Update -type and remove obsolete @type 2024-01-04 21:53:14 +01:00
Alexey Shchepin
97568195d6 Update SQL schema files 2023-12-27 17:01:57 +03:00
Alexey Shchepin
8d2d3a6540 Support XEP-0424 in mod_mam_mnesia 2023-12-27 09:42:22 +03:00
Alexey Shchepin
4f6730621a Add default value to #archive_msg.origin_id 2023-12-27 09:28:02 +03:00
Alexey Shchepin
a4bb695fc3 Support for XEP-0424 "Message Retraction" 2023-12-27 08:59:20 +03:00
Badlop
a57bdfffb7 Document recent change from 7d4330b57 2023-12-22 13:19:53 +01:00
Paweł Chmielowski
bdb513a660 Update xmpp 2023-12-19 10:43:37 +01:00
Paweł Chmielowski
b5ce53c907 Update xmpp to fix issue with scram with missing channel bindings
This makes scram downgrade protection hash calculation work properly when
using non -plus sasl mechanism or when stream is not encrypted

This should fix issue #4123.
2023-12-18 12:10:28 +01:00
Paweł Chmielowski
b556fae08f Update xmpp to bring support for XEP-0474: SASL SCRAM Downgrade Protection 2023-12-13 10:08:31 +01:00
Paweł Chmielowski
f87ab9a99f Update xmpp 2023-12-12 14:37:01 +01:00
Paweł Chmielowski
a5c973f86b Mention in docs for sql_prepared_statements that it works with MySQL 2023-12-12 11:29:12 +01:00
Holger Weiss
6b2b89da78 mod_push: Fix disabling of notifications
Remove the correct field from the c2s state when the client explicitly
disables push notifications.  This fixes a regression introduced by
commit c148ab4430.
2023-12-08 18:52:53 +01:00
Paweł Chmielowski
7d4330b57a Increase default value of negotiation_timeout from 30s to 2m
This timeout also covers in-band registration, and if user don't fill
registration form in that time leads to disconnect and aborting
registration. This will allow for more time to finish that.
2023-12-04 13:24:32 +01:00
Badlop
225d14cbbe Minor improvements in auth_password_format documentation 2023-12-01 00:07:21 +01:00
Paweł Chmielowski
d2a84c96a4 Update xmpp to fix incompatibility with < R21 2023-11-22 18:40:10 +01:00
Paweł Chmielowski
48f0d9c15e Update xmpp to make us present both sasl1 and sasl2 with from in initial stanza 2023-11-22 18:34:18 +01:00
Paweł Chmielowski
9c7e91a1e9 Update xmpp and make opening bind2 session close other sessions with same tag 2023-11-21 13:55:40 +01:00
Paweł Chmielowski
91e74204b2 Teach mod_carboncopy how to interact with bind2 inline requests 2023-11-20 18:55:07 +01:00
Paweł Chmielowski
fdee4efe98 Fix presenting features and returning results of inline bind2 elements 2023-11-20 18:54:23 +01:00
Paweł Chmielowski
59bb6dae14 Make apps passed to check in dialyzer consult configure optons 2023-11-20 18:47:42 +01:00
Paweł Chmielowski
3300f8bafb Update fast_tls in mix 2023-11-20 15:39:07 +01:00
Paweł Chmielowski
c61e56d8a6 Fix for one more dialyzer warning 2023-11-16 20:49:28 +01:00
Paweł Chmielowski
ad15659fb2 Fix warnings 2023-11-16 18:45:33 +01:00
Paweł Chmielowski
efffc3142a Add implementation for SASL2 and Bind2 2023-11-16 16:52:55 +01:00
Alexey Shchepin
b0a9b58958 Use the first unique index as a primary key in ejabberd_sql_schema 2023-11-16 16:00:35 +03:00
Paweł Chmielowski
4ea46c5765 Set EJABBERD_OPTS back to "", and use previous flags as example
Also try to clarify distinction between EJABBERD_OPTS and ERLANG_OPTS
2023-11-15 14:16:53 +01:00
Paweł Chmielowski
7de0ba95d0 Update mysql to bring sha256_password auth plugin support 2023-11-09 15:43:47 +01:00
Paweł Chmielowski
3ad30c3ff5 Use correct commit hash for xmpp 2023-10-31 10:15:35 +01:00
Paweł Chmielowski
3ed2b41a5a Update xmpp to bring tls-server-end-point channel binding and sasl2 codec 2023-10-31 09:41:25 +01:00
Paweł Chmielowski
3bf4cf5c3f Fix reversed logic in node fixup function 2023-10-26 15:44:45 +02:00
Paweł Chmielowski
52e7c166fc Normalize pubsub max_items node options on read
Older version used infinity value, for what never version use max, let's
always return max in that case.
2023-10-26 14:31:40 +02:00
Paweł Chmielowski
08a78a1654 Change logic for eldap tls_verify=soft and false
Looks like originally both soft and hard worked the same way, so lets make
them do that, and we also need to add {verify, verify_none} for false case
otherwise it fails on R26.
2023-10-26 11:17:17 +02:00
Paweł Chmielowski
81ceefe2f1 Remove spurious line 2023-10-25 20:35:25 +02:00
Paweł Chmielowski
c2d04bc478 Don't set fail_if_no_peer_cert for eldap ssl client connections
Looks like R26 generates error when this option is used for client
connection, let's just use verify_peer/verify_none for
ldap_tls_verify hard/soft options.

This should fix issue #4110.
2023-10-25 20:31:50 +02:00
Paweł Chmielowski
36fffa5b23 Revert dialyzer changes commited by mistake 2023-10-25 20:07:02 +02:00
Paweł Chmielowski
841d5c0299 Fix startup problem when having set EJABBERD_OPTS and logger options
Make sure that logger options that we extract from config file are put in
correct places when starting erl, directly after -ejabberd, custom
EJABBERD_OPTS should be places after them.

This fixes issue #4109
2023-10-25 20:05:27 +02:00
Paweł Chmielowski
0bdca8fd9e Updated deps to bring support for tls-exporter channel binding 2023-10-25 16:46:03 +02:00
Paweł Chmielowski
f48275bc11 Only care about pep bookmarks options when creating node from scratch 2023-10-19 19:26:25 +02:00
Paweł Chmielowski
aa369de280 Fix xmpp dep in mix 2023-10-18 16:17:11 +02:00
Badlop
543404bcb8 Fixing minor typos in CHANGELOG 2023-10-17 15:57:50 +02:00
Badlop
b7166d7da0 Set version to 23.10 2023-10-17 15:31:32 +02:00
Badlop
cf54608c71 Update changelog 2023-10-17 15:29:20 +02:00
Alexey Shchepin
ec20691188 Disable update_sql_schema by default 2023-10-16 19:31:32 +03:00
Alexey Shchepin
c1af36ac20 Automatically create and update SQL schema 2023-10-16 18:21:08 +03:00
Alexey Shchepin
f6e8eb52f0 Fix ejabberd_sql:sql_query* types 2023-10-16 18:21:08 +03:00
Paweł Chmielowski
ad7db90c80 Use tagged deps 2023-10-16 15:14:31 +02:00
Holger Weiss
cbfb8eb805 Example configuration: Specify s2s shaper
Specify a shaper for incoming s2s connections (got lost in commit
91a74e3e27).

Thanks to Paul Menzel for noting that it was missing.
2023-10-16 14:44:01 +02:00
Holger Weiss
df60818883 Example configuration: Clarify direct TLS listener
The ejabberd_c2s listener for port 5223 is meant to support direct TLS
access rather than STARTTLS.  Therefore, remove the 'starttls_required'
option, which had no effect.
2023-10-16 14:32:38 +02:00
Badlop
d5de93b8fa Update other translations 2023-10-16 11:28:51 +02:00
Badlop
ab6da9530d Update Ukrainian translation (thanks to Олександр Кревський) 2023-10-16 11:28:29 +02:00
Badlop
ca82376657 Update man page 2023-10-16 11:18:59 +02:00
Badlop
87f18aa8d7 Result of running: make doap options 2023-10-16 11:09:13 +02:00
Badlop
6340d61397 Dcoument ejabberd version number in the new options 2023-10-16 10:58:59 +02:00
Badlop
80d1e36542 mod_private: Document that it supports XEP-0402 now 2023-10-16 10:56:15 +02:00
Paweł Chmielowski
f75909db4c Allow pubsub node owner to overwrite items published by other persons
Owner is already permitted to delete those items, so it could do that by
deleting old item, and publishing it again, so i don't see reason to not
allow that overwrite.
2023-10-12 13:16:32 +02:00
Paweł Chmielowski
12d47455ba Add auth_external_user_exists_check option
This makes `user_check` hook work better with authentication methods
that don't have a way to determine if user exists (like is the case for
jwt and cert based authentication), and as result will improve mod_offline
and mod_mam handling of offline messages to those users. This reuses
information stored by `mod_last` for this purpose.

Should fix issue #3377.
2023-10-11 14:17:18 +02:00
Badlop
9acf591242 Run 'make translations' 2023-10-11 01:17:27 +02:00
Badlop
bab8673055 Update Portuguese (Brazil) translation (thanks to Wellington Uemura) 2023-10-11 01:17:24 +02:00
Badlop
3851a77134 Update German translation (thanks to nautilusx) 2023-10-11 01:17:21 +02:00
Badlop
8e324e67a4 New Bulgarian translation (thanks to Mr. EddX) 2023-10-11 01:13:49 +02:00
Badlop
10245b40ee Add support to register nick in a room (#3455)
Registering a nick in the MUC service or in a room is mutually exclusive:
- A nick that is registered in the service cannot be registered in any
  room, not even the original owner can register it.
- Similarly, a nick registered in any room cannot be registered in the
  service.
2023-10-10 13:08:56 +02:00
Badlop
9534ca2da1 ext_mod: Support when git repository name is not identical to the module name
For example, ejabberd-contrib has an extra module, mod_prometheus,
that is hosted in a git repository named ejabberd-prometheus-exporter
2023-10-04 20:57:02 +02:00
Badlop
f9d11265d0 ext_mod: Don't crash when github page response is 403 2023-10-04 20:55:01 +02:00
Badlop
d85c125bef ext_mod: Use the same URL that ejabberd-contrib spec files 2023-10-04 20:54:49 +02:00
Paweł Chmielowski
62d3d7a32d Relay pubsub iq queries to muc members without using bare jid
We do something similar for vcard queries, this allows target server
to respond to those queries by target server, which is what we want to
do in both of those cases.
2023-10-04 17:20:20 +02:00
Holger Weiss
a3f4a05b0c make-binaries: Don't use non-prefixed cross tools
Omit the directory that contains cross compilation tools without
"$target-" prefix from the PATH.  Having it in the path might lead to
problems when native tools are needed during cross compilation.  For
actual cross compilation, the prefixed tools should always be used
anyway.
2023-10-03 17:56:27 +02:00
Paweł Chmielowski
86465c418d Try to fill xep-0402 bookmarks from private storage on first access 2023-10-02 14:39:30 +02:00
Paweł Chmielowski
a63d3bf0d6 Fix crash in mod_private bookmarks converter
This should fix issue reported in #4092
2023-10-02 08:32:24 +02:00
Holger Weiss
762e4951f2 make-binaries: Bump Erlang/OTP version to 26.1.1 2023-09-29 19:01:50 +02:00
Holger Weiss
d4fc54be18 make-binaries: Let curl fail on HTTP errors 2023-09-29 17:33:09 +02:00
Holger Weiss
f327f4cc67 make-binaries: Suppress curl's info messages 2023-09-29 17:32:17 +02:00
Paweł Chmielowski
9ba645503b Fix dialyzer warning 2023-09-27 23:02:32 +02:00
badlop
5406693a1e
Merge pull request #4079 from sando38/fix/Dockerfile-odbc
Dockerfile: add missing dependency for mssql databases
2023-09-27 21:10:16 +02:00
Paweł Chmielowski
d55955f7d8 Clean also urn:xmpp:bookmarks:1 after mod_private tests 2023-09-27 19:38:14 +02:00
Paweł Chmielowski
765770aaa5 Add support for xep-0402 - PEP Native Bookmarks 2023-09-27 18:36:30 +02:00
Paweł Chmielowski
c3e0b746d7 Add pubsub_delete_item hook 2023-09-27 18:30:17 +02:00
Paweł Chmielowski
accb0bc35a Report support of config-node-max in pep 2023-09-27 18:29:56 +02:00
Holger Weiss
b16530bb6a make-binaries: Bump dependency versions 2023-09-27 00:28:46 +02:00
Holger Weiss
ad00553bf8 make-binaries: Bump Erlang/OTP version to 26.1 2023-09-27 00:17:30 +02:00
Holger Weiss
b70bef77cb make-binaries: Bump crosstool-NG version to 1.26.0 2023-09-26 23:55:01 +02:00
Holger Weiss
ac47b7b8cb ejabberd_web_admin: Make text translatable
This also fixes a type issue.
2023-09-26 23:21:45 +02:00
Badlop
abe0817553 Mention what software versions are used to build the container image 2023-09-26 18:51:57 +02:00
Badlop
ab431b378a WebAdmin: Show a warning when visiting webadmin with non-privileged account (4089) 2023-09-26 18:51:56 +02:00
Badlop
a534196315 Fix unused variable, forgotten in the recent commit 739a231 2023-09-26 18:51:51 +02:00
Badlop
cd421f98d7 ejabberdctl: Document how to stop a debug shell: control+g
control+g is the correct way to enter shell break mode, as documented in
https://www.erlang.org/doc/apps/erts/tty

The ejabberdctl script included in installers use the included VT100,
and that may break when hitting control+c.
In that scenario let's explicitly recommend to not use control+c.

Thanks to Holger Weiß for the report.
2023-09-26 18:51:47 +02:00
badlop
b33d660f88
Merge pull request #4088 from badlop/get-roster-command
Improve get_roster command result: show groups as a list
2023-09-25 13:15:26 +02:00
Badlop
245c9ae446 ejabberd_ctl: Support policy=user in the help and return proper arguments 2023-09-21 13:47:07 +02:00
Badlop
8d39431d68 ejabberd_ctl: Improve printing lists in results
When formatting the results of a command:
- If the top of the result is a list, split elements with newline as usual
- If it's a list in one of the resulting lines, split elements with ;
2023-09-21 13:47:05 +02:00
Badlop
739a231259 Improve get_roster command to return groups in a list instead of newlines 2023-09-21 13:47:00 +02:00
Paweł Chmielowski
426fd14b11 Make sure that policy=user commands have host instead of server arg in docs
We renamed them in ejabberd_command, but forgot to update doc geenerator.
2023-09-20 14:06:23 +02:00
dependabot[bot]
4735372682 Bump docker/build-push-action from 4 to 5
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 11:05:15 +02:00
dependabot[bot]
4b3fa13163 Bump docker/setup-buildx-action from 2 to 3
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 11:05:15 +02:00
dependabot[bot]
d40250c3d6 Bump docker/setup-qemu-action from 2 to 3
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 11:05:15 +02:00
dependabot[bot]
7d2cfd2aaa Bump docker/metadata-action from 4 to 5
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 11:05:14 +02:00
dependabot[bot]
11fdd417dd Bump docker/login-action from 2 to 3
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 11:05:14 +02:00
dependabot[bot]
1b7b23fab6 Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 11:05:14 +02:00
dependabot[bot]
10882af7c8 Bump ex_doc from 0.30.5 to 0.30.6
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.30.5 to 0.30.6.
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.30.5...v0.30.6)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 11:05:14 +02:00
Holger Weiss
6c573cc9fd mod_push: Set 'last-message-sender' to bare JID
If the mod_push option 'include_sender' is set to 'true', use the bare
JID rather than the full JID for the 'last-message-sender' field.
2023-09-09 17:33:16 +02:00
Holger Weiss
2782430887 mod_push: Add 'notify_on' option
If the new 'notify_on' option is set to 'messages', notifications are
only triggered by actual chat messages with a body (or encrypted
payload).  The default behavior remains to generate a notification on
any kind of stanzas.

Thanks to EISST International Ltd for sponsoring this work.
2023-09-08 19:49:17 +02:00
Badlop
7522c29f25 Update xmpp version to send roomconfig_changesubject in disco info (#4085) 2023-09-08 18:37:38 +02:00
Badlop
706424f0d2 Fix crash when loading room from DB older than ffa07c6, 23.04
Before commit ffa07c6, the subject_author was just the author nick,
since that commit, subject_author contains {author nick, JID}.
2023-09-04 11:32:28 +02:00
Badlop
57d404a99b Remove mailing list link, it had no activity and was removed long ago 2023-09-04 11:32:07 +02:00
Badlop
19e2e169b1 Let "ejabberdctl etop" work in a release (if observer is available) 2023-08-28 18:27:30 +02:00
Badlop
2a6ea79260 When building OTP release with mix, keep ERLANG_NODE=ejabberd@localhost
This updates the mix.exs code from commit 8ca12d4 (ejabberd 21.07)
Consequently, no need in make-binaries to update ERLANG_NODE.
The ecs docker image 23.04 got a similar change in
  f81905d5e3
2023-08-28 18:27:23 +02:00
Badlop
40333066d6 Update syntax of function calls as recommended by Elixir compiler 2023-08-28 18:26:55 +02:00
Badlop
6d596063de Elixir 1.15 removed support for --app
Removing that argument does not affect iexlive at all

For reference:
e1eecb8ca6
2023-08-28 18:26:55 +02:00
Badlop
a7c3c9b77d Pass ERLANG_OPTS when calling erl to parse the INET_DIST_INTERFACE (#4066)
This is required when running ejabberdctl in binary installers
and INET_DIST_INTERFACE was configured, because some boot files were removed
2023-08-28 18:26:48 +02:00
Badlop
a01de8d944 Fix small bug introduced in 5d549dc
When providing a client-id as explained in
  https://www.process-one.net/blog/understanding-ejabberd-oauth-support-roadmap/
ejabberd crashed with an error
  exception error: no function clause matching
  ejabberd_oauth:get_client_identity(
as reported in
  https://stackoverflow.com/questions/76922951/ejabberd-oauth-api-http-1-1-502-bad-gateway
2023-08-28 18:26:03 +02:00
Paweł Chmielowski
c0e7774937 Don't always store messages passed through muc_filter_message
Recently we added new places where we call muc_filter_message to add
occupandid info to messages, but this also made them be stored in archive
as mod_mam uses that hook for getting sent messages - in case of those
messages we shouldn't be doing this.

This should fix issue #4083
2023-08-25 14:20:51 +02:00
Paweł Chmielowski
00c76003cb Add ability to force alternative upsert implementation in mysql 2023-08-18 11:46:37 +02:00
Badlop
b29f87a978 Result of running: make doap options 2023-08-16 13:14:02 +02:00
Holger Weiss
2dc843cddd mod_privilege: Don't fail to edit roster (#3942) 2023-08-16 13:08:21 +02:00
dependabot[bot]
9f08b4aa15 Bump ex_doc from 0.30.1 to 0.30.5
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.30.1 to 0.30.5.
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.30.1...v0.30.5)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-16 12:27:23 +02:00
Badlop
a84fbd6a74 Improve syntax of many command descriptions for the Docs site 2023-08-16 12:27:23 +02:00
Badlop
f8af3a0005 create_room_with_opts: fix typo and move examples to args_example (#4080) 2023-08-16 12:27:23 +02:00
Badlop
83e51c815d Pass also MUC room retract messages over the muc_filter_message (#3397) 2023-08-16 12:27:23 +02:00
Badlop
ff24700156 Fix support to retract a MUC room message
Now this works as expected
https://xmpp.org/extensions/xep-0425.html#example-4
2023-08-16 12:27:22 +02:00
Badlop
7683691f5a mod_muc_occupantid: New mnesia table to store rooms salts (#3397) 2023-08-16 12:27:22 +02:00
Badlop
3479f88dab Pass MUC room private messages over the muc_filter_message too (#3397) 2023-08-16 12:27:22 +02:00
Badlop
86fc2f157e Always add the occupant id, even in non-anonymous rooms (#3397) 2023-08-16 12:27:22 +02:00
Badlop
ffa07c649b Store the subject author JID, and run muc_filter_message when sending subject (#3397)
When changing the room subject, store the original author JID,
so later it can be provided in the hook and mod_room_occupantid
can use it to calculate and provide the occupant id

This is noticeable when a new occupant joins an existing room,
and receives the room subject.
2023-08-16 12:27:22 +02:00
Badlop
2bd61abd71 Convert allow_private_message MUC room option to allowpm (#3736) 2023-08-16 12:25:46 +02:00
Badlop
66df953da1 Fix usage of plugins option, which produced default_node_config ignore (#4070) 2023-08-16 12:25:42 +02:00
Badlop
550a586d2a New listener option unix_socket, useful when setting unix socket files (#4059)
listen:
  -
    port: "unix://tmp/asd/socket"
    unix_socket:
      mode: '0775'
      owner: 117
      group: 135
2023-08-16 12:25:36 +02:00
Badlop
16473ab691 When sending message on behalf of user, trigger user_send_packet (#3990)
This way, MAM and CarbonCopy get triggered.
This is useful for transports like Slidge.
2023-08-16 12:25:29 +02:00
Paweł Chmielowski
c5afd0322e Properly parse mysql version even if it doesn't have type tag 2023-08-14 17:12:16 +02:00
sando38
c4563c429c Dockerfile: add missing dependency for mssql databases 2023-08-12 14:46:30 +02:00
Alexey Shchepin
eeacace02a Update some modules to the new gen_mod API 2023-08-09 17:08:45 +03:00
Holger Weiss
caf3807bcc ejabberd_systemd: Add a few debug messages 2023-08-09 01:58:48 +02:00
Holger Weiss
6c7e85d3d8 ejabberd_systemd: Avoid using gen_server timeout
Don't (ab)use the gen_server timeout mechanism for pinging the systemd
watchdog.  Under certain conditions (e.g., the process receiving sys
messages), the gen_server timeout might not be triggered as expected.

Fixes #4054, fixes #4058,
2023-08-09 01:54:12 +02:00
Holger Weiss
f0db7623d1 mod_push_keepalive: Don't let hook crash
Check whether mod_push_keepalive is loaded for a given host before
querying the module configuration for that host.  This avoids a hook
crash in the case where the module is enabled for some but not all
hosts.
2023-08-09 00:11:43 +02:00
Holger Weiss
26ed6539ba mod_push_keepalive: Delay 'wake_on_start'
Delay the 'wake_on_start' notifications until ejabberd is fully
initialized.  This makes sure no s2s connections are initiated before
certificates are loaded.

Many thanks to Friedrich Altheide for reporting the issue.
2023-08-08 20:17:10 +02:00
Alexey Shchepin
a9347cd248 Fix unused variable warnings in mod_stats 2023-08-04 20:54:02 +03:00
Alexey Shchepin
60002fc145 Update some modules to the new gen_mod API 2023-08-04 18:53:50 +03:00
Paweł Chmielowski
20a8654be2 Reset scram fields when setting plain password in ejabberd_auth_sql
Setting scram password, then disabling scram and setting plain password
again, will make us think we are still using scramed password and crash
when trying to process it as such. This makes sure that when set plain
password we don't leave parts from old scram password.
2023-08-03 13:07:13 +02:00
Badlop
25411333da Add support for XEP-0421 Occupant Id in anonymous MUC rooms (#3397) 2023-08-02 17:54:54 +02:00
Badlop
07d4282603 Update XMPP library which supports XEP-0421 (3397) 2023-08-02 17:54:07 +02:00
Alexey Shchepin
4bd77797fc Add shorter forms for gen_mod hook/iq_handler API 2023-08-01 18:14:08 +03:00
Alexey Shchepin
03ffbe00c1 Update mod_disco to the new gen_mod API 2023-07-31 16:52:00 +03:00
Alexey Shchepin
5a9099f49c Extend gen_mod API to simplify hooks and IQ handlers registration 2023-07-31 16:52:00 +03:00
Badlop
b501ee2b8d Remove obsolete example files, and add link in Docs to the archived copies 2023-07-27 14:03:40 +02:00
Badlop
a7c3368635 Move example Perl extauth script from ejabberd git to Docs site 2023-07-27 14:03:37 +02:00
Paweł Chmielowski
84ee724aa3 Fix dialyzer warning 2023-07-25 18:49:45 +02:00
Paweł Chmielowski
da7fe59834 Commit changes to ejabberd_sql.hrl as well 2023-07-25 18:24:24 +02:00
Paweł Chmielowski
3710dc1e3b Use prepared statement with mysql 2023-07-25 18:11:24 +02:00
Badlop
db03c7428c Web Admin roster page: move the AddJID textbox to top (#4067) 2023-07-24 20:27:01 +02:00
Badlop
9c6fe98f76 Partially revert "Improve ejabberdctl script: Copy recent commit 6272c0e90 to the container"
This reverts commit e66ba2e424
following the revert in commit 8288774787
2023-07-24 20:26:37 +02:00
Holger Weiss
c03af0afb3 make-binaries: Remove outdated workaround
Remove a workaround for an issue that has been fixed in Erlang/OTP 25:

https://github.com/erlang/otp/pull/5558
2023-07-24 00:11:32 +02:00
Holger Weiss
d109d7f0c5 make-binaries: Revert to Linux-PAM 1.5.2
Linux-PAM's --disable-examples flag doesn't seem to have the expected
effect.
2023-07-23 16:34:21 +02:00
Holger Weiss
bf9b257eab make-binaries: Don't build Linux-PAM examples
Building the examples shipped with Linux-PAM 1.5.3 fails with musl libc:

5374f677e4
2023-07-23 16:08:25 +02:00
Holger Weiss
11dc0c1774 make-binaries: Bump dependency versions 2023-07-23 15:52:32 +02:00
Holger Weiss
0a5eda0777 make-binaries: Fix check for current Expat version 2023-07-23 15:51:27 +02:00
Holger Weiss
a657a6d2f6 make-binaries: Apply another minor simplification 2023-07-23 15:35:09 +02:00
Holger Weiss
121acd1da7 make-binaries: Apply minor simplifications 2023-07-23 15:06:40 +02:00
Holger Weiss
ec86079747 make-binaries: Don't duplicate config entries 2023-07-23 14:56:01 +02:00
Holger Weiss
f1b0a9cb32 make-binaries: Don't hard-code musl version
The default is to link against the most-recent musl version available
within the crosstool-ng toolchain, which is currently 1.2.2.  Unlike
with glibc, there's no point in sticking to some older version.
2023-07-23 14:54:04 +02:00
Holger Weiss
0b6cb77b3c make-binaries: Omit unnecessary glibc setting
The CT_GLIBC_KERNEL_VERSION_NONE option is about the minimum kernel
version supported by the toolchain's glibc.  The default is to stick to
the version of the kernel headers, which should be just fine.
2023-07-23 14:52:18 +02:00
Holger Weiss
8a740d5087 make-binaries: Set kernel version for all builds
Specify the same min. supported kernel version for builds against musl
libc and glibc.
2023-07-23 14:49:07 +02:00
Jérôme Sautret
8288774787 Add EJABBERD_OPTS in ejabberdctl.cfg & revert "Improve ejabberdctl script"
EJABBERD_OPTS is used to pass options to erl only when starting
ejabberd, to enable -heart for example.

This partially reverts commit 6272c0e901.
2023-07-18 15:31:10 +02:00
Paweł Chmielowski
d349e3a88e Revert "Add stun app to cond_apps in mix.exs"
Looks like this is required only when using older mix versions.

This reverts commit 2ef9fbc111.
2023-07-18 11:14:57 +02:00
Paweł Chmielowski
2ef9fbc111 Add stun app to cond_apps in mix.exs 2023-07-17 18:40:39 +02:00
Badlop
78f81de252 Improve support to stop external modules written in Elixir 2023-07-13 13:41:18 +02:00
dependabot[bot]
8d9ee8e35b Bump ex_doc from 0.29.4 to 0.30.1
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.29.4 to 0.30.1.
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.29.4...v0.30.1)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 13:41:14 +02:00
Badlop
e66ba2e424 Improve ejabberdctl script: Copy recent commit 6272c0e90 to the container 2023-07-13 13:41:06 +02:00
Paweł Chmielowski
fafb48e88f
Merge pull request #4025 from jpds/increase-default-backlog
ejabberd_listener.erl: Increase default listen queue backlog value
2023-07-11 12:19:33 +02:00
Jérôme Sautret
6272c0e901 Improve ejabberdctl script
Improved handling of ERLANG_OPTS and fixed hanging process when running some ejabberdctl commands as root, such as debug or foreground.
2023-07-10 16:18:06 +02:00
Paweł Chmielowski
54314e5bb9 Better error handling in mod_muc_rtbl
Should fix issue #4050
2023-07-04 18:18:49 +02:00
Badlop
ffbcf19156 Halt ejabberd if a command in CTL_ON_ fails during ejabberd startup
See processone/ejabberd-contrib#97
2023-06-20 17:54:10 +02:00
Badlop
dcc8149f58 New command to halt ejabberd abruptly with an error status code
Used for processone/ejabberd-contrib#97
2023-06-20 17:54:10 +02:00
Badlop
d2c54fd5fe Fix calling ejabberdctl command with wrong number of arguments with Erlang 26
In Erlang up to 25.3, the lists:zip arguments were [A1, A2]
Since Erlang 26.0, the arguments are: [A1, A2, fail]

93748a8d84
2023-06-13 12:25:27 +02:00
Badlop
f40a7b1c77 OAuth: Handle badpass error message 2023-06-13 12:25:22 +02:00
Badlop
16f758e13f Support to provide only the dependency name
This is used in ejabberd-contrib repository's ci.yml,
and useful for a custom development that doesn't require rebar2 support.
2023-06-12 20:48:47 +02:00
Badlop
c333cc0776 New option install_contrib_modules
This option is read during ejabberd start or config reload.
It installs the listed modules which aren't yet installed,
as long as allow_contrib_modules is not disabled.
Edit ejabberd.yml and configure the desired ejabberd-contrib modules,
add them in the install_contrib_modules option,
finally start ejabberd (or reload config).
2023-06-09 10:27:13 +02:00
Badlop
3263e81972 Move Xref and Dialyzer options from workflows to rebar.config
And also include some more applications in Dialyzer plt_extra_apps,
which apparently is required since Erlang 26.
2023-06-09 00:02:20 +02:00
Badlop
397a08afca Move configure options from the Test to the Compile section 2023-06-09 00:02:18 +02:00
Badlop
19070e4b04 Add sections to rebar.config to organize its content 2023-06-09 00:02:17 +02:00
Badlop
0bbc255814 Dialyzer dirty workarounds because re:mp() is not an exported type
Since Erlang/OTP 26, Dialyzer by default reports unknown types.
ejabberd's type specs refer to the re:mp() type,
but that isn't exported in the OTP source code,
and cannot be used in any other modules.
This commit provides very dirty workarounds, and any cleaner
alternative is very welcomed.
2023-06-09 00:02:15 +02:00
Badlop
1b06f4ca4f The warnings_as_errors compiler option is already disabled by default 2023-06-09 00:02:13 +02:00
Badlop
b3eeac637f Update tests to Erlang/OTP 26 and recent Elixir 2023-06-09 00:02:10 +02:00
Badlop
480b42b36d Run Dialyzer again with Erlang/OTP 26, and let's solve its problems 2023-06-09 00:02:06 +02:00
Badlop
436074c67a When installing module already configured, keep config as example
When installing a module using ext_mod, if it has already configuration
in the modules section, copy its specific config file as an example
(copy file and rename it).
This may happen when using the new install_contrib_modules option.
2023-06-09 00:02:02 +02:00
Badlop
c9a2117570 Ignore .tool-versions in git, this file is used by asdf 2023-06-09 00:01:56 +02:00
sando38
6155b001b4 Dockerfile: Reorder stages and steps for consistency
Also avoid duplicated lines.
2023-06-09 00:01:54 +02:00
sando38
8f05af7810 Dockerfile: Use Alpine as base for METHOD=package
No need to use the "large" docker.io/erlang image as we do not need any erlang/otp for the binary installers.
2023-06-09 00:01:51 +02:00
sando38
33ac7916d3 Dockerfile: Cosmetic changes
Ommit the path to ejabberdctl as it is already located at the $PATH

Also, do not copy Dockerfile into the container as this may unnecessarily trigger re-compiling of ejabberd.
2023-06-09 00:01:49 +02:00
sando38
461c1ddf3d Dockerfile: Rename packages to improve compatibility
Rename libcap packages to improve compatibility between Alpine versions. This may be beneficial if one specifies an OTP_VSN which was built using an older Alpine base version.

The alpine package libcap has been splitted into libcap2 and libcap-utils in Alpine 3.17. 'libcap' is now an alias for libcap2 and libcap-utils. We define 'so:libcap.so.2' for the runtime stage, as we only need the libraries, not the binaries.
2023-06-09 00:01:46 +02:00
sando38
2428f74fbd Dockerfile: Provide specific OTP and elixir vsn for direct compilation
Ejabberd images can now be built with specific erlang/OTP and elixir vsn with the new build arguments OTP_VSN and ELIXIR_VSN.
2023-06-09 00:01:36 +02:00
Paweł Chmielowski
bb8e892323 Add alternate version of mysql upsert
This one works by issuing select and then insert or update or skip depending
on what select returns. We use this on mysql 5.7.26 and 8.0.20 where
previous implementation using 'replace' or 'on conflict update' can cause
excessive deadlocks.
2023-06-07 16:38:07 +02:00
Paweł Chmielowski
3eecf4ae8a Remove existing role information for users that are kicked from room
This should fix issue reported in #4035
2023-05-24 12:15:20 +02:00
Paweł Chmielowski
4a53d4cb56 Expand rule "mucsub subscribers are members in members only rooms" to more places 2023-05-24 11:26:48 +02:00
Paweł Chmielowski
1818a29c29 Don't crash in mod_shared_roster_ldap:get_member_jid on empty output
This based on crash from issue #3614
2023-05-22 12:48:29 +02:00
Paweł Chmielowski
dd2efc360b Fix return values from calculate_diff inside mod_privacy_sql 2023-05-02 15:59:40 +02:00
Paweł Chmielowski
8e64992f47 Use more efficient way to calculate changes in set_privacy_list 2023-05-02 11:43:29 +02:00
Jonathan Davies
040c72f1c8 ejabberd_listener.erl: Increase default listen queue backlog value to 128, which
is the default value on both Linux and FreeBSD.
2023-04-25 20:11:04 +01:00
Badlop
d95a1bac3e Use container names to differentiate them; don't force logo height 2023-04-25 09:50:19 +02:00
Badlop
c6b295b5a0 Fix typo in the previous commit 2023-04-25 09:48:02 +02:00
Badlop
2a4a6bec18 Add trailing backslash to URLs shown in mod_muc_log disco#info 2023-04-24 13:43:09 +02:00
Badlop
0d3f8c7b9f Make mod_register_web redirect to page that end with / (#3177)
Code copied from ejabberd_web_admin.erl, commit 5ec21438
2023-04-24 13:43:07 +02:00
Badlop
d299b97261 Raise Erlang/OTP requirement to 20.0 2023-04-24 13:43:00 +02:00
Paweł Chmielowski
5b8ebed81b Optimize mod_privacy_sql:set_list
Previously we always did delete everything and set all entries back, now
we check if we need to delete anything and if not insert only missing data.
2023-04-20 10:55:30 +02:00
Badlop
bb28265261 Set version to 23.04 2023-04-18 11:39:33 +02:00
Paweł Chmielowski
46f33e5051 Update dependencies 2023-04-18 11:22:33 +02:00
Badlop
06669b12e8 Update changelog 2023-04-18 11:12:18 +02:00
Badlop
1ca126381b Update man 2023-04-18 10:37:22 +02:00
dependabot[bot]
bf5de81b24 Bump ex_doc from 0.29.3 to 0.29.4
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.29.3 to 0.29.4.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases)
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.29.3...v0.29.4)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-18 10:37:16 +02:00
Badlop
d717ffd1a0 Update version notes of options and commands 2023-04-18 10:37:14 +02:00
Badlop
c271d73dbd CI: Update Erlang/OTP to 26.0-rc3 2023-04-18 10:37:11 +02:00
Badlop
e1a8980d6c Container: no need to specify captcha_url, auto may be enough in most cases 2023-04-18 10:37:08 +02:00
Badlop
ec7ff88dda Update Portuguese translation (thanks to Silvério Santos) 2023-04-18 10:37:06 +02:00
Badlop
5b695766ae Mention what ejabberd version first supports rtbl 2023-04-18 10:37:04 +02:00
Paweł Chmielowski
f5b6909cca Unregister hooks on stop in mod_muc_rbtl 2023-04-17 18:03:21 +02:00
Paweł Chmielowski
98d348893b Make mod_muc_rtbl notify only local node rooms 2023-04-17 17:07:59 +02:00
Paweł Chmielowski
c942c31e38 Add mod_muc_rtbl
This implements Real-time blocklists for XMPP (xmppbl.org).

Closes #4017
2023-04-17 16:59:42 +02:00
Paweł Chmielowski
70cbdd1117 Allow to update state from muc_process_iq hook 2023-04-17 16:57:54 +02:00
Paweł Chmielowski
1114a35e0a Recognize message retractions in mod_muc 2023-04-14 12:32:35 +02:00
Paweł Chmielowski
d12e5a44b8 Add by attribute to generated muc moderation messages 2023-04-14 12:31:34 +02:00
Badlop
34420444db Container: Revert change in entrypoint that was added in d15cf994a 2023-04-11 15:29:28 +02:00
Badlop
38eb50bf5c Container: Reorganize how to build container image 2023-04-11 15:29:26 +02:00
Badlop
6705679cf3 Container: Update instructions to build image following d15cf994a (#3983) 2023-04-11 15:29:24 +02:00
Badlop
10635bccc9 Container: Reword sentences about docker.io and ghcr.io 2023-04-11 15:29:23 +02:00
Badlop
dee0ec50b9 Remove ci-19.3, as Github Actions no longer supports ubuntu-18.04 2023-04-11 15:29:21 +02:00
sando38
401bdedae8 Dockerfile: Detect runtime dependencies automatically
Only libcap2 and tini can't be auto-detected. libcap2 has been renamed in Alpine version 3.17, hence the Dockerfile is not compatible with Alpine versions <3.17
2023-04-11 15:27:49 +02:00
Badlop
99e51a2123 Mention in mod_mam.erl its support for XEP-0425: Message Moderation
Then run "make doap" to regenerate ejabberd.doap
2023-03-30 17:02:54 +02:00
Badlop
d43ce53f9a Update xmpp version in mix following commit 6da1bb5b2 2023-03-30 16:54:35 +02:00
Paweł Chmielowski
f6385fae50 Fix dialyzer warning 2023-03-30 14:53:51 +02:00
Paweł Chmielowski
6da1bb5b22 Add support for "xep-0424 Message Moderation"
This fixes issue #3730
2023-03-30 14:38:08 +02:00
Badlop
64e1cfcbba Test only with oldest OTP supported, newest stable and bleeding edge 2023-03-28 11:41:57 +02:00
Badlop
fbfcebf417 Container: Remove Elixir Matchers to prevent useless warnings in github actions page 2023-03-28 11:41:56 +02:00
Saarko
d15cf994a2 Container: Add METHOD to build container using packages (#3983)
make-*: include musl build in make-binaries

Ctr actions: use github runners to provide bootstrap erlang

- adjust make-binaries script to use github runners' installed erlang
  for bootstrapping
- this reduces the need to build an unnecessary toolchain for glibc
  based binaries
2023-03-28 11:41:54 +02:00
Saarko
c71887db43 Container: Add tini as runtime init 2023-03-28 11:41:52 +02:00
Badlop
7c634f3615 Container: No need of openssl package at runtime 2023-03-28 11:41:51 +02:00
Badlop
874b961680 Container: Remove unused Mix stuff: ejabberd script and static COOKIE
Instead of including this file in the container with static content:
  /opt/ejabberd-master/releases/COOKIE
the cookie file will be generated by erlang in
  /opt/ejabberd/.erlang.cookie
or by ejabberdctl if ERLANG_COOKIE environment variable was provided.
2023-03-28 11:41:49 +02:00
Badlop
2c1ee698cc Container: Copy captcha scripts to /opt/ejabberd-*/lib like the installers
Instead of a path like
  /opt/ejabberd-master/lib/ejabberd-23.1.0/priv/bin
they are now in
  /opt/ejabberd-master/lib
2023-03-28 11:41:47 +02:00
Badlop
b0f0dd3227 Container: Expose only HOME volume, it contains all the required subdirs 2023-03-28 11:41:46 +02:00
Badlop
de477f7b6c Container: Update Alpine to 3.17 to get Erlang/OTP 25 and Elixir 1.14 2023-03-28 11:41:44 +02:00
Saarko
440ede313b make-binaries: fix building with erlang/otp v25.x
Signed-off-by: sando38 <sandomir@tutanota.com>
2023-03-28 11:41:43 +02:00
Saarko
976c6c5e41 make-binaries: bump versions, e.g. erlang/otp to 25.3 2023-03-28 11:41:41 +02:00
Badlop
7e6d25314d make-packages: Fix for installers workflow, which didn't find lynx... 2023-03-28 11:41:39 +02:00
Badlop
cc5c3f7b2c ejabberdctl: Don't use .../releases/COOKIE, it's no longer included
And slightly clean the .erlang.cookie line
This partially reverts 9c23a7dc3f
2023-03-28 11:41:33 +02:00
Badlop
1d62dc4621 Set roster name from XEP-0172, or the stored one (#1611) 2023-03-28 11:41:27 +02:00
Badlop
e2496562f9 Preliminary support to store extra elements in subscription request (#840) 2023-03-28 11:41:24 +02:00
Badlop
c4a2f8d64f captcha_url option now accepts 'auto' value, and it's the default 2023-03-22 16:23:41 +01:00
Badlop
6c620f6f43 Remove wrong get_room_history command fields specification 2023-03-22 16:23:37 +01:00
dependabot[bot]
af29adb558 Bump ex_doc from 0.29.2 to 0.29.3
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.29.2 to 0.29.3.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases)
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/v0.29.3/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.29.2...v0.29.3)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-22 16:23:33 +01:00
Paweł Chmielowski
3c97775573 Pubsub xdata fields max_item/item_expira/children_max use 'max' not 'infinity'
Codec in xmpp crashes when we use infinity (see issue #4011), so lets
convert those values before passing them to xmpp:encode(0
2023-03-21 15:30:44 +01:00
Blake Miller
f953dc3f5e Persist none role for outcasts
`none` roles *should* be persisted for banned users. I totally forgot about this, my bad. I'm shocked nobody else noticed it.
2023-03-20 17:07:10 +01:00
dependabot[bot]
04b431f191 Bump ex_doc from 0.29.1 to 0.29.2
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.29.1 to 0.29.2.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases)
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.29.1...v0.29.2)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-07 13:11:26 +01:00
Badlop
5cd6c524ea Allow XML to be visible in web browser in Common Test page 2023-03-07 13:11:24 +01:00
Badlop
37676757e3 CI: Add OTP 26.0-rc1 to the test matrix
But disable dialyzer in 26, as it complains verbosely without reason
2023-03-07 13:11:22 +01:00
Badlop
1c82daacb2 CI: Upload Common Test logs as artifact in case of failure 2023-03-07 13:11:21 +01:00
Badlop
9f0a5c5ef0 CI: Produce less verbose logs for tests
This gets a line first introduced in 5b5548b8c that was lost later
2023-03-07 13:11:19 +01:00
Badlop
9bb86132c6 CI: Use default verbosity to let log files contain XMPP stanzas
This partially reverts 2a7780507
2023-03-07 13:11:17 +01:00
Badlop
2137a4f663 Fix Shellcheck warnings in shell scripts 2023-02-21 18:17:26 +01:00
Badlop
c9143dd3d8 Fix TSQLlint warnings in MSSQL test script 2023-02-21 18:17:25 +01:00
Badlop
66d58504d0 Fix TSQLlint warning about typo in mssql.new.sql 2023-02-21 18:16:59 +01:00
Badlop
0def333550 Fix Remark-lint warnings 2023-02-21 18:14:02 +01:00
Badlop
dea452bdfd Fix Prospector and Pylint warnings in test extauth.py 2023-02-21 18:14:02 +01:00
dependabot[bot]
d504ed8a9b Container: Bump docker/build-push-action from 3 to 4
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-21 18:13:15 +01:00
Paweł Chmielowski
9503beca6c Make mod_muc_room:set_opts process persistent flag first
As processing some other options depends on this setting flag in room
state.
2023-02-20 13:42:52 +01:00
Paweł Chmielowski
dfe4884d16 Allow passing affiliations and subscribers to create_room_with_opts command 2023-02-20 13:03:46 +01:00
Paweł Chmielowski
f10f6d176f Store state in db in mod_muc:create_room() 2023-02-20 12:56:41 +01:00
Paweł Chmielowski
4e7aa41e3f Make subscribers members by default 2023-02-20 12:55:31 +01:00
Paweł Chmielowski
d91812730b Stop ejabberd_system_monitor before stopping node
Sometimes monitor module is performing checks when node is stopping and
this causes crash in monitoring process.
2023-02-08 19:53:19 +01:00
Paweł Chmielowski
54cf37e917 Invalidate vcard_xupdate cache on all nodes when vcard is updated 2023-02-08 19:06:44 +01:00
Paweł Chmielowski
3de803be2f Add get_room_history command in mod_muc_admin 2023-02-08 11:04:26 +01:00
Paweł Chmielowski
5ca59807d9 Fix problem with results of mam queries using rsm with max and before
Plus add test case for it.
2023-02-03 11:37:54 +01:00
Paweł Chmielowski
5c3b43cd63 Update spec 2023-02-01 17:32:22 +01:00
Paweł Chmielowski
1a6baf223c Re-allow anonymous connection for connection without client certificates
This fixes issue #3985. Initial issue was introduced in
5506b838c8 adding tls client cert
authentication.
2023-02-01 16:58:25 +01:00
Paweł Chmielowski
74c9aa8ac0
Merge pull request #3982 from nosnilmot/sql-update-tests
SQL schema migration fixes and testing
2023-02-01 12:03:48 +01:00
Badlop
fb16727180 Ammend previous commit with another fix 2023-01-27 15:40:34 +01:00
Badlop
9842b035e3 Fix compilation problem with Erlang/OTP older than 21 introduced recently
Those macros were first introduced in c88a2d0
2023-01-27 15:29:41 +01:00
Alexey Shchepin
f6b5a52104 Add s2s_out_bounce_packet hook 2023-01-27 03:54:31 +03:00
Alexey Shchepin
f650b1e83c Log HTTP handler exceptions 2023-01-27 03:54:31 +03:00
Badlop
03cbc9b004 Revert previous commit, stick with Alpine 3.16 and Erlang/OTP 24 (#3983)
Alpine 3.17 includes Erlang/OTP 25, and it segfaults when
used in QEMU for arm64.

Revert "Update Alpine to 3.17 to get Elixir 1.14 required by recent libraries"
This reverts commit 43cae922f3.
2023-01-26 14:53:14 +01:00
Badlop
43cae922f3 Update Alpine to 3.17 to get Elixir 1.14 required by recent libraries 2023-01-25 17:58:27 +01:00
Badlop
c5c7e7fc4d ext_mod: Improve support for loading *.so files from ext_mod dependencies
Copying files from deps/*/priv/*.so to the ejabberd priv/
is not possible when running ejabberd as OTP release or in a container.
Instead, let's copy the deps/*/priv/*.so maintaining the file structure,
and then using code:add_pathz for those dirs.

This partially reverts 5c1b72853f
2023-01-25 17:58:12 +01:00
Stu Tomlinson
0c1cf43519 Fix a long standing bug in new schema migration
... and make the test that uncovered it explicitly fail (there was already a
TODO) instead of passing but with errors logged
2023-01-21 15:42:43 +00:00
Stu Tomlinson
cbbf85c555 Add support for running tests on MS SQL 2023-01-21 15:42:43 +00:00
Stu Tomlinson
56e974ab80 Add ability to run tests on upgraded DB
To test update_sql operation and functionality of resulting DB:

1. Load original schema to DB
2. Set {update_sql, true} in suite.erl
3. Run tests
2023-01-21 15:42:43 +00:00
Stu Tomlinson
9398052b65 New schema migration 'update_sql' improvements
- check that server_host column does not already exist before addding it
  and making other changes to table (update_sql becomes idempotent,
  yay!)
- check that indexes exist before dropping them (some are historical and
  are not created in more recent deployments), elminating spurious
  errors from logs
- update new_sql_schema config after migration, to allow near
  zero-downtime migrations (and help with automated testing)
2023-01-21 14:54:36 +00:00
Stu Tomlinson
6a8899677d Un-deprecate ejabberd_config:set_option/2
There does not appear to be an alternative way to set individual config
options, and this is already used by test/ejabberd_SUITE.erl
2023-01-21 14:54:36 +00:00
Paweł Chmielowski
3b34538038 Remove debug line from last commit 2023-01-20 17:12:50 +01:00
Paweł Chmielowski
6cf1e05993 Try to populate room history from mam when unhibernating 2023-01-20 16:27:08 +01:00
Paweł Chmielowski
baf1336761
Merge pull request #3980 from nosnilmot/sql-maintenance
SQL related fixes and updates
2023-01-20 14:18:55 +01:00
Stu Tomlinson
4f0e426a12 Change PostgreSQL SERIAL to BIGSERIAL columns
This is consistent with other schemas, internally consistent with
foreign keys, and allows for > 2B records in these tables.
2023-01-19 23:36:42 +00:00
Stu Tomlinson
d5bf051e79 Fix minor SQL schema inconsistencies 2023-01-19 23:36:42 +00:00
Stu Tomlinson
c7c982b67b Add MS SQL support for new schema migration 2023-01-19 23:36:42 +00:00
Stu Tomlinson
f7f0d3b1fb Enable MySQL support for new schema migration 2023-01-19 23:36:42 +00:00
Stu Tomlinson
d4ab4d16e8 Use python3 to run extauth.py for tests 2023-01-19 23:36:42 +00:00
Stu Tomlinson
aeed1679d8 Add 'new' schema for MS SQL 2023-01-19 23:36:42 +00:00
Stu Tomlinson
6fc67d83f4 Minor MS SQL improvements
Support 'sql_ssl' option for MS SQL - set Encryption=required and
Encrypt=yes in ODBC connection string to require SSL using default
FreeTDS driver and Microsoft ODBC Driver for SQL Server repectively.

Allow setting full ODBC connection string in 'sql_server' for MS SQL,
allowing custom connection configuration beyond what is possible with
just 'sql_odbc_driver' option.
2023-01-19 23:36:42 +00:00
Stu Tomlinson
06ffe995e1 Remove unnecessary indexes
For columns are already included in a compound index there is no
benefit to having a separate index with a subset of the same columns in
the same order, it just wastes space.
2023-01-19 23:36:42 +00:00
Stu Tomlinson
93bf4d5411 New SQL schema migrate fix
'server_host' column on 'route' table already exists in old schema and
does not need adding for new schema migration.
2023-01-19 23:36:42 +00:00
Stu Tomlinson
19f2f1fa86 Fix MS SQL error caused by ORDER BY in subquery
'The ORDER BY clause is invalid in views, inline functions, derived
tables, subqueries, and common table expressions, unless TOP, OFFSET
or FOR XML is also specified.'

Omit the ORDER BY clause from subquery if the SELECT is not constrained
by TOP.
2023-01-19 23:36:42 +00:00
Stu Tomlinson
5e94fdcfd5 MS SQL schema fixes
* Add missing 'mix' tables and indexes

* Fix text vs varchar issues

Various tests triggered this error:
The data types text and varchar are incompatible in the equal to operator.

Caused by incompatible 'text' columns in muc_online_room,
muc_online_users, pubsub_node_option, and pubsub_node tables.

* Fix definition of mqtt_pub table

This table incorrectly included 'server_host' column in old schema, and
had other inconsistencies.
2023-01-19 23:35:05 +00:00
Stu Tomlinson
ec6f5c17c8 Correct README for creating test docker MS SQL DB 2023-01-19 14:06:11 +00:00
Paweł Chmielowski
758c87f564 Revert notes placement when generating markdown api commands documentation 2023-01-19 13:24:51 +01:00
Paweł Chmielowski
b6dde41000 Improve output in gen_html_doc_for_commands command 2023-01-19 11:45:33 +01:00
Stu Tomlinson
648c83ea03
Fix ejabberdctl output formatting (#3979)
ECMA-48 SGR sequence ESC [21m is actually 'set double underline' but was
incorrectly implemented as 'set normal intensity' in Linux prior to
4.17.

The correct sequence for 'set normal intensity' is ESC [22m, which fixes
output formatting of 'ejabberdctl' and 'ejabberdctl help' on macos.
2023-01-19 11:18:59 +01:00
Paweł Chmielowski
cc4cacdb5e Set version to 23.01 2023-01-17 11:35:52 +01:00
Paweł Chmielowski
c84cdb6bfb Update mix dependences 2023-01-17 11:24:28 +01:00
Paweł Chmielowski
a7ea8ecc29 Use tagged versions of dependences 2023-01-17 11:24:28 +01:00
Badlop
24839ad4be Fix typos in documentation and changelog 2023-01-16 18:34:09 +01:00
Badlop
e11b89efd2 Get back mod_sip documentation and version number in the man page 2023-01-16 16:30:50 +01:00
Paweł Chmielowski
4566c82a85 Update man file 2023-01-16 16:24:44 +01:00
Paweł Chmielowski
024f3be13a Update mod_mqtt_bridge documentation 2023-01-16 15:33:37 +01:00
Badlop
af2dae2ff3 Update changelog 2023-01-16 15:20:16 +01:00
Badlop
d92372af70 Update man page 2023-01-16 15:10:31 +01:00
Badlop
a70381e7c1 Annotate options that change in ejabberd 23.01 2023-01-16 15:10:29 +01:00
Badlop
21c0aaf417 Container: Replace set-output command with environment file
Announced in:
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2023-01-16 15:10:28 +01:00
Badlop
ce10bed5d8 Container: Update Alpine to 3.16, the latest one cached in Github Actions 2023-01-16 15:10:27 +01:00
Badlop
eb12c1db1b Update check_xep_versions.sh to support extended -protocol attribute (#3915) 2023-01-16 15:10:25 +01:00
Badlop
276c11b04a Fix doc of log_modules_fully allowed value 2023-01-16 15:10:24 +01:00
Badlop
0255562d93 Fix doc of outgoing_s2s_families default value, it changed in 25ddd7b 2023-01-16 15:10:22 +01:00
Paweł Chmielowski
26a7107cd5 Fix dialyzer warning 2023-01-16 12:14:21 +01:00
Paweł Chmielowski
89918865b0 Implement reload in mqtt_bridge 2023-01-16 11:22:17 +01:00
Paweł Chmielowski
f2cbe7f3c2 Recognize ws5/wss5 urls in mqtt_bridge 2023-01-16 11:01:24 +01:00
Paweł Chmielowski
83418c3195 Fix warning in mqtt_bridge 2023-01-16 11:01:04 +01:00
Paweł Chmielowski
5592f8df1a Make dialyzer happy 2023-01-13 20:34:49 +01:00
Paweł Chmielowski
4311a5646f Add support for websockets to mqtt bridge 2023-01-13 20:09:10 +01:00
Badlop
c103182bc7 Update German translation (thanks to Johannes Keyser) 2023-01-10 13:52:06 +01:00
Badlop
243697e25a Update copyright year to 2023 (#3967) 2023-01-10 13:52:04 +01:00
dependabot[bot]
dfc6e7833c Bump ex_doc from 0.28.4 to 0.29.1
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.28.4 to 0.29.1.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases)
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.28.4...v0.29.1)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 13:52:02 +01:00
Badlop
e0b4ea6652 Update jose to 1.11.5 when Erlang/OTP is 21 or higher
But use old jose 1.11.1 on Erlang/OTP older than 21
Erlang older than 21 does not support
  try catch _Class:_Reason:_Stacktrace ->
that is used in jose_server.erl
2023-01-10 13:51:56 +01:00
Badlop
503ad8e905 Fix bash completion when using Relive or other install methods 2023-01-10 13:51:53 +01:00
Frédéric Fauberteau
d26a9d583f
Fix portability issue with some shells (#3970) 2023-01-09 16:26:36 +01:00
Jérôme Sautret
0b1800fc10 Add hooks for mqtt subscribe & unsubscribe events 2023-01-05 14:58:18 +01:00
Badlop
92d7be4338 Use alternative split/2 function that works with Erlang/OTP as old as 19.3 2023-01-03 20:32:52 +01:00
Badlop
ce89ff07e7 Fix "make hooks" 2023-01-03 19:13:43 +01:00
Badlop
5c1b72853f External modules: compile C files and install them in ejabberd's priv 2023-01-03 18:48:44 +01:00
Badlop
5d38143c3f Initialize captcha system after loading modules and external modules
Since recently, ejabberd_captcha instead of a script may use a module,
for example the external module mod_ecaptcha, which must be loaded first.
2023-01-03 18:48:42 +01:00
Badlop
353c68cfa6 Add support to define module instead of path to script 2023-01-03 18:48:40 +01:00
Badlop
9087e72f0e Update image key, some scripts generate their own random key 2023-01-03 18:48:38 +01:00
Badlop
4ad4a3bf24 Support to get module status from Elixir modules 2022-12-22 14:00:38 +01:00
Badlop
17160e9379 Container: Update Actions versions as requested by GitHub Actions 2022-12-22 14:00:36 +01:00
Jonathan Davies
ed84fee2bf ejabberd_options_doc.erl: Added outgoing_s2s_families deprecation
notice.

Signed-off-by: Jonathan Davies <jpds@protonmail.com>
2022-12-22 14:00:22 +01:00
Jonathan Davies
25ddd7b152 Changed default outgoing_s2s_families to IPv6 as servers are within datacenters
where IPv6 is more commonly enabled (contrary to clients), and if it's not
present - it'll just fall back to IPv4.
2022-12-22 14:00:22 +01:00
Paweł Chmielowski
5ad709a2e2 Fix typo in last commit 2022-12-21 11:13:49 +01:00
Paweł Chmielowski
32ace140df Don't store mucsub presence events in offline storage
This is expanded version of pull request #3959
2022-12-21 11:12:08 +01:00
Paweł Chmielowski
bc063b8f97 Fix crash when api_permisions don't have who: section
Default value of that field was wrong, so lets correct this.

This fixes issue #3957
2022-12-15 11:27:20 +01:00
Badlop
03681cd68d Expose the pubsub#type field in disco#info query to the node (#3914) 2022-12-13 23:57:34 +01:00
Badlop
fe8b98a1f3 When using erlef, Erlang/OTP 21 is only available in ubuntu 20.04
See
https://github.com/erlef/setup-beam#compatibility-between-operating-system-and-erlangotp
2022-12-13 23:57:31 +01:00
Badlop
a193128543 Fix path where gem is installed and fpm can be found 2022-12-13 23:24:01 +01:00
Badlop
6a10048339 Document the new log_modules_fully option 2022-12-13 23:24:01 +01:00
Badlop
9087dd9210 Improve .devcontainer to use use devcontainer image and .vscode 2022-12-13 23:24:01 +01:00
Badlop
a08c038c9c Add .vscode files to instruct VSCode how to run ejabberd 2022-12-13 23:24:01 +01:00
Badlop
e191bc253d Add Erlang LS default configuration 2022-12-13 23:24:01 +01:00
Badlop
c8d866d01a Add Elvis default configuration 2022-12-13 23:24:01 +01:00
Badlop
01d25c5c37 Let setup-relive.sh normally end with no error status 2022-12-13 23:24:01 +01:00
Paweł Chmielowski
25d6b3d1c8 Fix dialyzer warnings 2022-12-07 14:08:23 +01:00
Paweł Chmielowski
639183a783 Add support for certificate authentication in mqtt bridge 2022-12-07 13:38:05 +01:00
Paweł Chmielowski
80477f71b3 Add misc:uri_parse/2 to allow declaring default ports for protocols 2022-12-07 13:34:29 +01:00
Paweł Chmielowski
d49b50a055 Add log_modules_fully option to make some modules log everything independed from global loglevel 2022-12-01 13:24:46 +01:00
Paweł Chmielowski
54592202ef Allow admin command to subscribe new users to members_only rooms 2022-12-01 11:52:39 +01:00
Paweł Chmielowski
be60263d47 Fix dialyzer warnings in mod_mqtt_bridge 2022-11-24 16:23:37 +01:00
Badlop
441eca75b2 hibernation_time is not an option worth storing in room state (#3946) 2022-11-23 18:40:28 +01:00
Badlop
266dd98521 OAuth: Accept jid as a HTTP URL query argument 2022-11-23 18:40:26 +01:00
Badlop
b0e74464b1 OAuth: Handle when client is not identified 2022-11-23 18:40:23 +01:00
Badlop
daaaf221cb Don't set i18n option because Converse enforces it instead of browser lang (#3951) 2022-11-23 18:39:49 +01:00
Paweł Chmielowski
e2779e1155 Try to redirect access to files mod_conversejs to cdn when there is no local copies 2022-11-23 16:28:42 +01:00
Paweł Chmielowski
514bab47a2 Add hook for mqtt publish event 2022-11-23 15:16:43 +01:00
Paweł Chmielowski
fbea49dbab Add mqtt bridge module 2022-11-23 14:50:18 +01:00
chengshq
5cf9b052dd
Jid format when multicastc was cached (#3950)
The error log:

```2022-11-22 04:10:25.436648+00:00 [error] <0.515.0>@ejabberd_router:route/1:95 Failed to route packet:
#message{
    id = <<>>,type = normal,lang = <<>>,
    from =
        #jid{
            user = <<"a123">>,server = <<"conference.example.com">>,
            resource = <<>>,luser = <<"a123">>,
            lserver = <<"conference.example.com">>,lresource = <<>>},
    to = <<"multicast.app.example.com">>,subject = [],body = [],
    thread = undefined,
    sub_els =
        [#ps_event{
             items =
                 #ps_items{
                     xmlns = <<>>,
                     node = <<"urn:xmpp:mucsub:nodes:subscribers">>,
                     items =
                         [#ps_item{
                              xmlns = <<>>,id = <<"5803948964051348597">>,
                              sub_els =
                                  [#muc_subscribe{
                                       nick = <<"bb">>,password = <<>>,
                                       jid = undefined,events = []}],
                              node = <<>>,publisher = <<>>}],
                     max_items = undefined,subid = <<>>,retract = undefined},
             purge = undefined,subscription = undefined,delete = undefined,
             create = undefined,configuration = undefined},
         #addresses{
             list =
                 [#address{
                      type = bcc,
                      jid =
                          #jid{
                              user = <<"aaa">>,server = <<"app.example.com">>,
                              resource = <<>>,luser = <<"aaa">>,
                              lserver = <<"app.example.com">>,lresource = <<>>},
                      desc = <<>>,node = <<>>,delivered = undefined,
                      sub_els = []},
                  #address{
                      type = bcc,
                      jid =
                          #jid{
                              user = <<"bb">>,server = <<"app.example.com">>,
                              resource = <<>>,luser = <<"bb">>,
                              lserver = <<"app.example.com">>,lresource = <<>>},
                      desc = <<>>,node = <<>>,delivered = undefined,
                      sub_els = []}]}],
    meta = #{}}
** exception error: {badrecord,jid}
   in function  ejabberd_router:do_route/1 (src/ejabberd_router.erl, line 394)
   in call from ejabberd_router:route/1 (src/ejabberd_router.erl, line 92)
   in call from maps:fold_1/3 (maps.erl, line 232)
   in call from mod_multicast:handle_info/2 (src/mod_multicast.erl, line 206)
   in call from gen_server:try_dispatch/4 (gen_server.erl, line 637)
   in call from gen_server:handle_msg/6 (gen_server.erl, line 711)
   in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 249)```


Then command debug select the multicastc:
```
(ejabberd@localhost)2> mnesia:dirty_read(multicastc, <<"app.example.com">>).
[{multicastc,<<"app.example.com">>,
             {{multicast_supported,<<"multicast.app.example.com">>,
                                   {limits,{default,20},{default,20}}},
              cached},
             63836303692}]```

The type of `Service` was binary.
2022-11-22 12:11:31 +01:00
Holger Weiss
3b50cd36ba Merge remote-tracking branch 'processone/pr/3945'
* processone/pr/3945:
  make-binaries: reduce log output
  make-binaries: Bump zlib version to 1.2.13
2022-11-16 16:20:10 +01:00
Stu Tomlinson
ed678f58d3 make-binaries: reduce log output
Reduce log output from make-binaries:
 - quieter curl downloads
 - quiet build of crosstool-ng
 - disable crosstool-ng progress bar
2022-11-16 13:41:57 +00:00
Stu Tomlinson
aa8d800577 make-binaries: Bump zlib version to 1.2.13
Update zlib to 1.2.13 to address CVE-2022-37434

Also change zlib download to use archive URL so builds do not fail
when specified version is no longer the current version
2022-11-16 13:41:42 +00:00
Stu Tomlinson
a1cfae8c98
pgsql: do not set standard_conforming_strings to 'off' (#3944)
Since f9120f75b0 string literals use escape string syntax (E'...') on
pgsql, so it is no longer necessary to set standard_conforming_strings
to 'off'

Fixes #3932
2022-11-16 13:58:30 +01:00
Badlop
c6513fcfc6 Handle mnesia_system_event mnesia_up when other node joins this (#3842) 2022-11-14 18:45:20 +01:00
Badlop
d3d50b456e Fix compilation warnings with Elixir 1.14
warning: missing parentheses for expression following "do:" keyword.
Parentheses are required to solve ambiguity inside keywords.
2022-11-14 18:45:20 +01:00
Badlop
196eca2dc4 Runtime: Add Elixir 1.14 to the test matrix 2022-11-14 18:45:17 +01:00
Paweł Chmielowski
6fcfe80a65 Pass ssl options to mysql driver 2022-11-14 11:19:51 +01:00
Paweł Chmielowski
992d998695 Silent warning in OTP24 about not specified cacerts in sql connections 2022-11-14 11:18:26 +01:00
Badlop
e58920b2c6 Container: Update link to the local example of CTL_ON_CREATE usage 2022-11-07 22:38:55 +01:00
Badlop
0804f46095 Container: Add Composer Examples section 2022-11-07 22:19:40 +01:00
Badlop
662d9a0ed0 Container: Raise sections levels to improve legibility in GitHub web TOC 2022-11-07 22:19:22 +01:00
Badlop
d957404adc Add link in README to the ProcessOne Downloads page 2022-11-07 18:56:53 +01:00
Badlop
779c98e314 Add link to ejabberd page at xmpp.org, which displays protocols from DOAP 2022-11-07 18:56:51 +01:00
Badlop
8de270cdaf Run "make doap" 2022-11-07 18:56:46 +01:00
Badlop
b71a481e63 Add details about XEP implementations to some protocol attributes 2022-11-07 18:56:46 +01:00
Badlop
5a5e5bbdc6 Support extended protocol attribute (#3915) 2022-11-07 18:56:46 +01:00
Badlop
3b3d3eaa04 Run "make doap" to update ejabberd's DOAP file 2022-11-07 11:13:31 +01:00
Daniel Brötzmann
811fea14d8 Fix DOAP file logo namespace 2022-11-07 11:12:10 +01:00
Badlop
9794b4f778 Commit the generated DOAP file 2022-11-04 16:17:40 +01:00
Badlop
b73a9234d9 Add some missing RFCs and remove problematic leading 0 in xep versions 2022-11-04 16:17:39 +01:00
Badlop
c9b3d32031 Add DOAP script to Makefile 2022-11-04 16:17:37 +01:00
Badlop
4542bcb57f New script to generate DOAP file 2022-11-04 16:17:35 +01:00
Badlop
1072f593f1 Ignore /doc, generated by tools/check_xep_versions.sh 2022-11-04 16:17:33 +01:00
duritong
122af79207
move spool dir to make it fully configurable per ejabberdctl.cfg (#3863)
In the packaged rpm the spool dir is set to:
```
: "${SPOOL_DIR:="/opt/ejabberd/database/$ERLANG_NODE"}"
```

However, `$ERLANG_NODE` is effectively set later (now in line 67), which effectively makes spool dir always in `...../ejabberd@localhost`
2022-10-26 14:02:42 +02:00
Badlop
2ef71a6684 Annotate captcha_cmd option, run make options, update man 2022-10-25 12:11:24 +02:00
Paweł Chmielowski
bb22f574fe Bump version 2022-10-25 10:35:00 +02:00
Badlop
2e623a7f20 Update German translation (thanks to nautilusx)" 2022-10-24 13:09:23 +02:00
Badlop
8ea7690fc5 Support @VERSION@ and @SEMVER@ in captcha_cmd option 2022-10-24 12:35:30 +02:00
Paweł Chmielowski
a80717ed0e Update changelog 2022-10-18 18:59:28 +02:00
Holger Weiß
13d4787ea9
Bump default 's2s_timeout' value (#3653)
Wait for an hour before closing an idle s2s connection.

It's not uncommon for a connection to be idle for longer than ten
minutes but less than an hour.  For example, XEP-0410 suggests a ping
interval of fifteen minutes.  A longer idle timeout avoids the latency
and log entries associated with constantly re-establishing such
connections.

Co-authored-by: Paweł Chmielowski <pawel@process-one.net>
2022-10-18 16:08:16 +02:00
Frank
28b3134098
fix table creation on a running cluster (#3913) 2022-10-18 15:38:55 +02:00
Badlop
d2f79e268e Update Portuguese (Brazil) translation (thanks to Wellington Terumi Uemura) 2022-10-12 17:09:49 +02:00
Badlop
b529f72d8f Update Chinese (Simplified) translation (thanks to Eric) 2022-10-12 14:11:39 +02:00
Paweł Chmielowski
c4d834b879 Update deps 2022-10-12 12:44:36 +02:00
Badlop
67094ca065 Update Catalan and Spanish translations 2022-10-12 12:06:30 +02:00
Badlop
d29fdc4d2e Remove unnecessary text string 2022-10-12 12:06:28 +02:00
Badlop
7be52065dd Update Chinese (Simplified) translation (thanks to Eric) 2022-10-12 12:06:26 +02:00
Badlop
582a245cc7 Update Ukrainian translation (thanks to Artem) 2022-10-12 12:06:24 +02:00
Badlop
4e4c696730 Update Russian translation (thanks to AHOHNMYC) 2022-10-12 12:06:22 +02:00
Badlop
1942f1b370 Update Portuguese (Brazil) translation (thanks to Wellington Terumi Uemura) 2022-10-12 12:06:21 +02:00
Badlop
b14b84744a Update French translation (thanks to Maxime Leroy) 2022-10-12 12:06:20 +02:00
Badlop
d34274549c Update Spanish translation (thanks to Eduardo Malaspina) 2022-10-12 12:06:18 +02:00
Badlop
28fb992947 Update German translation (thanks to nautilusx) 2022-10-12 12:06:16 +02:00
Badlop
83150e0b76 Update Catalan translation (thanks to Maite Guix) 2022-10-12 12:06:15 +02:00
Badlop
1e24ad817c Update man page 2022-10-12 12:06:13 +02:00
Badlop
77f9254f45 Handle case that module exports mod_doc, but nothing in it 2022-10-12 12:06:11 +02:00
Badlop
77dacf92d2 Annotate new options 2022-10-12 12:06:09 +02:00
Paweł Chmielowski
c99ff6059f Fix cache invalidation in shared roster
Doing srg_get_info for not existing group, then srg_create, will make
srg_add_user fail because it will get info that group doesn't exist from
cache.
2022-09-28 18:28:24 +02:00
Holger Weiss
e4c20aa674 make-binaries: Bump Expat and libpng versions 2022-09-23 13:46:19 +02:00
Holger Weiss
403dc41b5f make-binaries: Fix GitHub release version checks
Adapt to changes to GitHub release pages.
2022-09-23 13:45:09 +02:00
Paweł Chmielowski
4a22604701 Export mod_muc_admin:get_room_pid/2 2022-09-22 11:11:02 +02:00
Paweł Chmielowski
09b33e17a6 Update mysql 2022-09-22 11:09:12 +02:00
Badlop
796f567db1 The archive_msg export fun requires MUC Service for room archives 2022-09-16 16:35:00 +02:00
Badlop
2229e4c6db Allow MUC service admins to bypass max_user_conferences limitation 2022-09-16 16:34:58 +02:00
Badlop
fac74f623e Remove unused macro definitions detected by rebar3_hank
?OFFLINE_TABLE_LOCK_THRESHOLD is unused:
  definition and usage added in 4103f30812
  definition copied, and usage moved to mod_offline_mnesia, in 901d2e0aed
  definition and usage removed in mod_offline_mnesia in d88e4d495f
  this definition looks useless
?VERSION_MULTICAST is unused:
  added in 0cf8d1fa6e
  it was never used
?DISCO_QUERY_TIMEOUT is unused:
  added in 0cf8d1fa6e
  it was never used
?FEATURE/1 is unused:
  added in 0cf8d1fa6e
  usage removed in bc33a3873d
?DEFAULT_MAX_USERS_PRESENCE is unused:
  added in f817762cc4
  usage removed in ba2b650464
?CT_XML is unused:
  added in 46568fb959
  removed in 3dc55c6d47
2022-09-16 16:34:56 +02:00
Badlop
cde8c8ce7d Remove unused header files which content is already in xmpp library 2022-09-16 16:34:53 +02:00
Holger Weiss
9e9904c79d Merge remote-tracking branch 'processone/pr/3905'
* processone/pr/3905:
  Adapt to change of mix_annotate type to boolean in roster_query
  Adapt to renaming of 'participant-id' from mix_roster_channel record
  Update xmpp module
2022-09-16 12:39:13 +02:00
Linus Jahn
14882342be Adapt to change of mix_annotate type to boolean in roster_query 2022-09-16 12:29:51 +02:00
Linus Jahn
eeed1ca87f Adapt to renaming of 'participant-id' from mix_roster_channel record 2022-09-16 12:29:50 +02:00
Linus Jahn
e22d496610 Update xmpp module 2022-09-16 12:29:29 +02:00
Badlop
5ee1dc9e8d Container: Support ERL_DIST_PORT 2022-09-13 17:55:17 +02:00
Badlop
30f1e28468 Support ERL_DIST_PORT option to work without epmd
Please note:
- Erlang/OTP 23.1 or higher is required to use ERL_DIST_PORT
- "make relive" doesn't support ERL_DIST_PORT, neither rebar3 nor elixir
- "make install" doesn't work with Elixir since at least ejabberd 21.07

Reference:
https://www.erlang.org/blog/otp-23-highlights/
https://blog.erlware.org/epmdlessless/
2022-09-13 17:55:15 +02:00
Badlop
4664358176 Ignore .ejabberd-modules/ , may be used when building container 2022-09-13 17:55:14 +02:00
Badlop
a564707da4 Container: Get ejabberd-contrib sources to include them 2022-09-13 17:55:12 +02:00
Badlop
d0bc83147a Container: Copy .ejabberd-modules directory if available 2022-09-13 17:55:11 +02:00
Badlop
a8121cd7e5 Don't persist 'none' role (thanks to Blake Miller)(#3330) 2022-09-13 17:55:09 +02:00
Badlop
4d3875f4ff Store role, and use it when joining a moderated room (#3330) 2022-09-13 17:55:03 +02:00
Holger Weiss
add55e1947 make-binaries: Bump Erlang/OTP version to 24.3.4.5 2022-09-13 14:25:13 +02:00
Holger Weiss
95ce3888f6 Merge remote-tracking branch 'processone/pr/3904'
* processone/pr/3904:
  make-binaries: Bump dependency versions
2022-09-13 11:53:04 +02:00
Stu Tomlinson
5bb4731bc1 make-binaries: Bump dependency versions 2022-09-13 08:37:46 +01:00
Holger Weiss
b017207ac1 mod_admin_extra: Handle empty roster group names
Don't let 'add_rosteritem' create a roster group with an empty name.

Thanks to Licaon_Kter for reporting the issue.
2022-09-09 18:27:49 +02:00
Badlop
3312eaa51d Add more examples of podman usage 2022-09-07 14:00:42 +02:00
Badlop
fe2fd776ef Update CONTAINER example calls to recent changes 2022-09-07 13:59:31 +02:00
Badlop
c496baaf87 Container: Don't complain if the bin/ directory already exists 2022-09-07 13:59:20 +02:00
Badlop
14cced0bad Container: No need to search for the ejabberdctl binary 2022-09-07 13:58:56 +02:00
Badlop
17a5835143 Simplify recent commit (thanks to Simon Lipp)(#3894) 2022-09-07 13:57:12 +02:00
Roman Hargrave
f542a82309 feat: do not clone repo inside container build 2022-09-07 10:57:55 +02:00
Badlop
42e384beb7 Fix unix socket support for ejabberd_http (thanks to Simon Lipp)(#3894) 2022-09-06 13:34:01 +02:00
Badlop
9a3ba9d76f Update Github Action workflows: Ubuntu 18 is deprecated and 22 is added
CI:
- Update Ubuntu to 20.04, the lowest available starting in April 2023 [1]
- Don't test 19.3, as it isn't available in Ubuntu 20.04
- Use OTP 25 for Shellcheck, Coveralls, ECIL page
- Use erlef instead of ErlGang, supports better old erlangs in new ubuntus
- Remove support for rebar2 testing, as that's done in Runtime

CI-19.3:
- Add a temporary workflow for testing ejabberd with OTP 19.3

Container and Runtime:
- Update Ubuntu to latest (22.04)

[1] https://github.com/actions/runner-images/issues/6002
https://github.com/ErlGang/setup-erlang
https://github.com/erlef/setup-beam
2022-09-06 13:33:58 +02:00
Paweł Chmielowski
f624b14636 Add function for getting room diagnostics 2022-09-01 13:37:48 +02:00
Badlop
aaf391b284 Catch all errors from jose_jwt:verify and log debugging details (#3890) 2022-09-01 13:02:56 +02:00
Badlop
808def7d32 The #roster_item.ask allowed values are subscribe|undefined 2022-09-01 13:02:54 +02:00
Badlop
4ae06f039d Add definition to detect OTP older than 25, used by ejabberd_auth_http 2022-09-01 13:02:52 +02:00
Badlop
7a1ca4b203 mod_host_meta: Complain at start if listener is not encrypted 2022-09-01 13:02:49 +02:00
Holger Weiss
63caa369be mod_pubsub: Don't crash on command failures
Handle 'delete_old_items' and 'delete_expired_items' errors gracefully.
2022-08-31 18:10:22 +02:00
Paweł Chmielowski
fba651822d Handle invalid values in X-Forwarded-For header more gracefuly 2022-08-29 11:26:31 +02:00
Paweł Chmielowski
cfc8746d29 Update roster_get hook in mod_shared_roster_ldap to use #roster_item{} 2022-08-24 11:14:32 +02:00
Paweł Chmielowski
a9e85674b8 Fix mucsub unsubscribe notification payload to have muc_unsubcribe in it
...instead of muc_subscribe
2022-08-24 10:30:02 +02:00
Holger Weiss
bce429dc44 make-packages: Fix permissions on RPM systems
RPM resets ownership/permissions of /opt/ejabberd and its subdirectories
on installation.  Therefore, fix those in the "after-install" script.
2022-08-21 15:48:28 +02:00
Jonah Brüchert
9a8a843724 Fix filter_nodes
The previous implementation always returned an empty list while testing
it. However I don't really understand why that happened. The list
comprehension based one works, although it looks equivalent to me.
2022-08-17 16:37:20 +02:00
Jonah Brüchert
0faf34b26d Parse sub elements of the mix join remote result 2022-08-17 16:37:20 +02:00
Jonah Brüchert
b1e6e408f8 mod_mix: Return user jid on join 2022-08-17 16:37:20 +02:00
Linus Jahn
4a52b73a17 mod_shared_roster: Fix wrong hook type #roster{} (now #roster_item{})
The hook type was changed from #roster{} to #roster_item{} by me in the
recent MIX changes. Unfortunately I've overseen this one (and unit tests
+ dialyzer passed).
2022-08-12 17:07:28 +02:00
Linus Jahn
b0526cd903 mod_mix, mod_mix_pam: Add new MIX namespaces to disco features 2022-08-12 10:53:53 +02:00
Jonah Brüchert
648245e974 mod_mix, mod_mix_pam: Add handling of IQs with newer MIX namespaces
Supported are mix:core:{0,1} and mix:pam:{0,2}
2022-08-12 10:53:53 +02:00
Linus Jahn
d6b72f1c5d mod_roster: Change hook type from #roster{} to #roster_item{}
The problem with #roster{} is that every new record entry is also stored
in the mnesia roster table.  Adding the mix_participant_id there makes
no sense because the normal roster items are no MIX channels.  Using
\#roster_item{} for the hook and #roster{} for storing the normal items
seems to be a better idea.
2022-08-11 12:45:20 +02:00
Linus Jahn
d450d40178 mod_roster: Respect MIX <annotate/> setting
MIX extensions are not sent to clients if they haven't been enabled by
the client with <annotate/> in the roster get request.
2022-08-11 12:45:20 +02:00
Linus Jahn
3bf0892c74 mod_mix_pam: Do roster pushes on join/leave
Before the channels were added/removed from the database but the
clients were not notified of it.
2022-08-11 12:45:20 +02:00
Linus Jahn
7564a4e953 mod_mix_pam: Provide MIX channels as roster entries via hook 2022-08-11 12:45:20 +02:00
Holger Weiss
e858738736 ejabberd_listener: Let module take over socket
For some use cases, it may be necessary to allow a module to take over
socket ownership during initialization.
2022-08-10 18:28:35 +02:00
Badlop
c2cd592eff Update documentation to reflect the GHCR image usage 2022-08-08 12:31:18 +02:00
Badlop
f080aa5fd9 Apply the minimal changes required to use the GHCR image 2022-08-08 12:31:16 +02:00
Badlop
682c258760 Copy ejabberd-docker-install.bat from docker-ejabberd git and rename it 2022-08-08 12:31:14 +02:00
Badlop
7d8fa3c880 ext_mod: Support managing remote nodes in the cluster 2022-08-05 16:15:05 +02:00
Badlop
72944d895b ext_mod: Handle correctly when COMMIT.json not found 2022-08-05 16:15:03 +02:00
Badlop
00e6b0c97c Show allow_query_users room option in disco info (#3830) 2022-08-04 12:28:15 +02:00
Badlop
a798a21386 CI: Remove syntax_tools from applications, as fast_xml fails Dialyzer 2022-08-04 12:05:46 +02:00
Mark Zealey
555ff2db4c
Add log_burst_limit_* options (#3865)
* Add log_burst_limit_* options

On our ejabberd deployment we were sometimes seeing more than 500
msgs/sec of legitimate traffic, however this was getting silently
dropped. Provide config options to enable this limit to be configured
from the config file.

* Pass new logging vars in via ejabberdctl
2022-08-01 12:07:54 +02:00
Paweł Chmielowski
9b647a7afe Skip connection exit message when we triggered reconnection 2022-07-28 19:25:17 +02:00
Paweł Chmielowski
2b3644c8ac Handle errors reported from begin/commit inside transaction 2022-07-28 19:24:28 +02:00
Paweł Chmielowski
3d329c7e8f Make connection close errors bubble up from inside sql transaction 2022-07-28 13:17:35 +02:00
Badlop
1ea53bf940 Add syntax_tools to applications, required when using ejabberd_sql_pt (#3869) 2022-07-27 15:16:52 +02:00
Badlop
bc8050eb03 Don't bother with COMMIT.json user-friendly feature in automated user case 2022-07-27 15:16:51 +02:00
Badlop
a38ed7fb2c Handle not found COMMIT.json, for example in GH Actions 2022-07-27 15:16:49 +02:00
Badlop
033656d70e Add WebAdmin page for managing external modules 2022-07-26 15:42:13 +02:00
Badlop
853f35c706 Remove nginx and libgd3, so the proper versions can be installed 2022-07-26 15:42:13 +02:00
Paweł Chmielowski
7b944444ce Catch mysql connection being close earlier 2022-07-19 14:35:35 +02:00
Paweł Chmielowski
73167ef1bd Make first sql reconnect wait shorter time 2022-07-19 14:32:47 +02:00
Paweł Chmielowski
43f36205bd React to sql driver process exit earlier
If there are queued request when connection closes we may try to process
those requests (by trying to send them to already terminated db process,
and waiting until we hit timeout) before we see that driver is not longer
alive. This change adds check for driver exit before we process next
queued sql request, and immediately switch to connection state if we have
one.
2022-07-15 13:51:30 +02:00
Alexey Shchepin
99d9e315a3 Don't set affiliation to 'none' if it's already 'none' in mod_muc_room:process_item_change/3 2022-07-01 09:39:37 +03:00
Linus Jahn
e10c67a74a mod_mix_pam: Display joined channels on webadmin page 2022-06-28 22:15:04 +02:00
Paweł Chmielowski
991d52f019 Fix error reporting in 'make options' on OTP24+ 2022-06-24 11:36:54 +02:00
Paweł Chmielowski
06147deccd Don't register listeners that failed to start in config reload
This should alleviate some issues in #3850
2022-06-21 11:09:37 +02:00
Paweł Chmielowski
46c947bc76 Define batch delete function types in coresponding behaviours 2022-06-17 10:35:02 +02:00
Paweł Chmielowski
a2efde185a Fix mam delete_old_messages_batch for sql backend
Too much copy/paste from spool equivalent...
2022-06-17 10:22:57 +02:00
Badlop
382c3836af Runtime: Add Xref options to be as strict as CI 2022-06-12 13:08:29 +02:00
Badlop
6d39af7dd6 Runtime: No need for a specific mix erlang 25 job 2022-06-12 13:08:27 +02:00
Badlop
a30d8c718f Update workflows to Erlang 25 2022-06-12 13:08:24 +02:00
Paweł Chmielowski
a89b1f332d Use INSERT ... ON DUPLICATE KEY UPDATE for upsert on mysql
This can be used for all upsert expressions (where REPLACE INTO used
previously were only possible to use for subset of queries), and may
potentially help with deadlocks reported by mysql when we issues multiple
querier for same key in quick succession.
2022-06-10 16:25:50 +02:00
Badlop
a6101cc26d Container: Set a less frequent healthcheck to reduce CPU usage (#3826) 2022-06-09 12:34:44 +02:00
Badlop
06a2b1c671 Container: Support to pass a fork repository as argument 2022-06-09 11:57:49 +02:00
Badlop
8d94ae4cb0 Container: Fix build instructions 2022-06-09 11:41:34 +02:00
Holger Weiss
fbf43f2a31 make-binaries: Include CAPTCHA script with release 2022-05-28 15:00:25 +02:00
Holger Weiss
b4c78336a6 make-binaries: Edit rebar.config more carefully
Don't break the (currently nonexistent) case where a dependency's
rebar.config file specifies LDFLAGS before and after "-lstdc++", such as
"-lfoo -lstdc++ -lbar".
2022-05-28 10:21:43 +02:00
Holger Weiss
c1ee86e85c make-binaries: Fix linking of EIMP dependencies
Avoid linker errors such as the following when using GCC 10 or newer:

| multiple definition of `gdImageCreateFromJpegPtr'

See: https://gcc.gnu.org/gcc-10/porting_to.html

Fixes #3514.
2022-05-25 20:37:37 +02:00
Badlop
5a2e58e066 Fix regression on stop_ping in clustering context (thanks to fdie)(#3817) 2022-05-23 16:52:27 +02:00
Badlop
0e25f8d43e Fix mod_conversejs crash when mod_register not enabled (#3824) 2022-05-23 16:49:35 +02:00
Badlop
75ffce0417 configure also when running "make update", which is similar to "make deps" 2022-05-23 16:49:19 +02:00
Badlop
34e1ddb66f Update "make help" with recent changes 2022-05-23 13:58:50 +02:00
Badlop
26e6bb4a17 Use "make deps", which performs additional steps (#3823) 2022-05-23 13:58:41 +02:00
Badlop
7850ce0ec8 Ensure deps configuration is ran when getting deps (#3823) 2022-05-23 13:58:33 +02:00
Badlop
7d16907296 Configure eimp with mix to detect image convert properly (#3823) 2022-05-23 13:58:08 +02:00
Badlop
ddc457060b Improve "make clean" and "distclean" 2022-05-23 13:57:17 +02:00
Badlop
93f994d50a Generate start scripts in "make all", not in "make install" (#3821) 2022-05-23 13:57:06 +02:00
Paweł Chmielowski
75a771bfec Don't leak DESTDIR in files copied by 'make install'
This fixes issue #3819
2022-05-19 12:20:58 +02:00
Holger Weiss
e6c1bf9c9a make-binaries: Adjust Mnesia spool directory path
Adjust the default Mnesia directory for compatibility with older binary
packages.

Closes #3818.
2022-05-18 17:08:05 +02:00
Holger Weiss
cac31f9325 make-packages: Include systemd unit with RPM
Don't forget to include the /etc/systemd/system/ejabberd.service unit
with the RPM package.

Closes #3816.
2022-05-18 10:20:34 +02:00
Paweł Chmielowski
99064548e8 Fix parsing of scram password from prosody
Looks like parsed integer no longer are convered to floats on erlang side,
so let's make check for them less restrictive.
2022-05-17 13:21:30 +02:00
Holger Weiss
553a1ccadf Merge remote-tracking branch 'processone/pr/3813'
* processone/pr/3813:
  make-installers: Support non-root installation
  make-installers: Override code on upgrade
  make-installers: Apply cosmetic changes
2022-05-17 12:44:34 +02:00
Holger Weiss
621445e096 make-installers: Support non-root installation
If the installer is invoked without superuser privileges, warn the user,
ask for the installation prefix, and perform a local installation on
confirmation.
2022-05-17 12:40:12 +02:00
Licaon_Kter
432e97296c Fix typos in changelog 2022-05-17 11:45:57 +02:00
Badlop
4f8e6fe844 Fix errors and warnings for "rebar3 edoc" 2022-05-17 10:42:02 +02:00
Badlop
01b791c0fa Define license for hex.pm using SPDX identifier
Until now, when publishing package to hex.pm, it complained:
> The following licenses are not recognized by SPDX:
>  * GPLv2
> Consider using licenses from https://spdx.org/licenses
2022-05-17 10:42:00 +02:00
Badlop
dde096515d Update mix.lock with ex_doc 2022-05-17 10:41:59 +02:00
Badlop
78e97f3605 ex_doc is required to publish docs to hex.pm
Revert "Let's assume ex_doc is no longer needed"
This reverts commit 2f92dc40df.
2022-05-17 10:41:57 +02:00
Badlop
6c9f97d7cc Update README.md, the installers are now in GitHub Releases 2022-05-17 10:41:56 +02:00
Badlop
861347e911 CHANGELOG: Update to 22.05 version 2022-05-17 10:41:53 +02:00
Holger Weiss
c54fe5b29e make-installers: Override code on upgrade
Use tar's --skip-old-files option for the data directory (/opt/ejabberd)
only.  Files in the code directory (/opt/ejabberd-$version) should be
overridden on upgrade.
2022-05-16 00:45:01 +02:00
Holger Weiss
6d93d49c6c make-installers: Apply cosmetic changes 2022-05-16 00:13:43 +02:00
Holger Weiss
8addf96f9e make-binaries: Bump dependency versions 2022-05-12 01:02:33 +02:00
Paweł Chmielowski
a916d94000 Pass room state to muc_{un}subscribed hook 2022-05-09 17:32:34 +02:00
Paweł Chmielowski
ed7fc956d5 Allow muc_{un}subscribe hooks to modify sent packets 2022-05-09 16:34:27 +02:00
Badlop
024ad02169 Revert "Temporary workaround to provide a 22.05 tagged container"
This reverts commit 3449621ccc.
2022-05-06 17:58:58 +02:00
Badlop
3449621ccc Temporary workaround to provide a 22.05 tagged container 2022-05-06 17:30:26 +02:00
Badlop
e5782a519a Use alternate method to get priv/ path when copying captcha scripts 2022-05-06 17:30:24 +02:00
Badlop
fbeaa2e03a Remove dependabot because it gets fired in forks too 2022-05-06 17:30:21 +02:00
Jérôme Sautret
d0452e3bef Update version to 22.05 2022-05-06 15:12:22 +02:00
Holger Weiss
ec36dd7ba1 make-binaries: Bump SQLite and ODBC versions 2022-05-06 14:03:11 +02:00
Paweł Chmielowski
84d8c156a0 Fix spec 2022-05-06 10:15:23 +02:00
Paweł Chmielowski
c7ab3274c5 Return userinfo from misc:uri_parse 2022-05-06 10:14:50 +02:00
Paweł Chmielowski
3d4f2d365f Have consistent schema type in misc:uri_parse 2022-05-06 10:06:13 +02:00
Paweł Chmielowski
bc9e5c5363 Fix one more place where misc:uri_parse is used 2022-05-05 13:46:02 +02:00
Paweł Chmielowski
54a1fcc5e8 Improve misc:uri_parse 2022-05-05 13:07:03 +02:00
Badlop
c3d8c3d9c5 README: Improve badges, header, commercial links 2022-05-04 18:01:46 +02:00
Badlop
bdfa1b3403 Update man page 2022-05-04 18:01:46 +02:00
Badlop
aa190ca896 Run 'make options' 2022-05-04 18:01:46 +02:00
Badlop
49ecddc646 Dependabot: Detect updates in docker, actions and mix 2022-05-04 18:01:26 +02:00
Badlop
fad5406348 Container: Build containers also for linux/arm64 2022-05-04 18:00:58 +02:00
Badlop
30b3c6c908 Annotate options and commands recently added 2022-05-04 18:00:58 +02:00
Badlop
32dee33070 Run 'make translations' for all other languages 2022-05-04 16:26:32 +02:00
Badlop
59e1c5643f Update Spanish and Catalan translations 2022-05-04 16:26:32 +02:00
Badlop
b253cc46d4 Update Chinese (simplified) (thanks to Erix and Yzqzss) 2022-05-04 16:26:27 +02:00
Badlop
09bdb055fb Update Portuguese translation (thanks to Ssantos) 2022-05-04 16:26:27 +02:00
Badlop
449ac8f3e3 Update Portuguese (Brazil) (thanks to Wellington Terumi Uemura) 2022-05-04 16:26:22 +02:00
Badlop
28be716c5f Update French translation (thanks to ButterflyOfFire) 2022-05-04 16:21:21 +02:00
Badlop
f250594738 Update German translation (thanks to Nautilusx) 2022-05-04 16:20:49 +02:00
Badlop
0fb7213e1a New Arabic translation (thanks to Black) 2022-05-04 16:19:56 +02:00
Badlop
bb2cb19a5c Move some content from README to new COMPILE and CONTAINER files 2022-05-04 02:39:30 +02:00
Badlop
6e4079586a Installers: Add job to create draft release 2022-05-04 02:39:23 +02:00
Badlop
d0bca94638 Installers: update workflow name 2022-05-04 02:39:19 +02:00
Badlop
0302d1615b Packages: Rename workflow file to Installers 2022-05-04 02:39:17 +02:00
Badlop
985fa24130 Apparently the --tags option is required to properly describe a brand new tag 2022-05-04 02:39:15 +02:00
Badlop
ba5b6133cd Create uninstall.txt with instructions 2022-05-04 02:39:13 +02:00
Badlop
0964f9cbcd Add help header to the installer help 2022-05-04 02:39:12 +02:00
Badlop
06e448b4d0 Once installed, show next steps 2022-05-04 02:39:10 +02:00
Badlop
b773bb4cd4 Add some blank lines to output 2022-05-04 02:39:07 +02:00
Holger Weiss
65437d08ef make-binaries: Update to Crosstool-NG 1.25.0-RC2
Update Crosstool-NG to the current release candidate, and use much
shorter "defconfig" files for specifying the configuration.
2022-05-04 00:30:36 +02:00
Holger Weiss
87995a57de Add GitHub Action to build binary packages
Publish DEB and RPM packages as well as binary installers for each
commit that modifies source code.  This allows for testing development
code, and makes sure that problems with building binary packages are
noticed early on.
2022-05-04 00:30:36 +02:00
Holger Weiss
a7dc1de980 make-binaries: Try to avoid rebuilding deps
Don't rebuild external dependencies if all of them are up to date.
2022-05-04 00:30:36 +02:00
Holger Weiss
ce6f32906a Import script for building command line installers
The tools/make-installers script creates command line installers for
Linux/x64 and Linux/arm64 systems using the archives built by the
tools/make-binaries script.
2022-05-04 00:30:36 +02:00
Holger Weiss
ef7470b503 Import script for building DEB and RPM packages
The tools/make-packages script creates DEB and RPM packages for
Linux/x64 and Linux/arm64 systems using the archives built by the
tools/make-binaries script.
2022-05-04 00:30:36 +02:00
Holger Weiss
853be230a8 Import script for building Linux binaries
The tools/make-binaries script creates self-contained OTP releases for
Linux/x64 and Linux/arm64 systems.  All optional ejabberd features are
supported.  Erlang/OTP, Elixir, and all dependencies are downloaded and
built from source (using crosstool-NG).  The generated binaries depend
on glibc 2.17 or later, all other external libraries are linked
statically.

The script should work on any non-ancient Linux/x64 system and requires
just a few common development tools (to bootstrap crosstool-NG).

The release is installed by creating an "ejabberd" user, extracting the
archive into /opt, and moving the systemd unit (or init script) into
place.
2022-05-04 00:30:36 +02:00
Badlop
2739a52e0f Update options configurable in default_room_options 2022-05-02 20:20:21 +02:00
Badlop
f1c422db8e Runtime: Fix path of own workflow file 2022-05-02 20:20:21 +02:00
Badlop
011630f8b9 CI: The Binaries job will soon be unnecessary 2022-05-02 20:20:13 +02:00
Paweł Chmielowski
6f11210edd Implement batch operations in mnesia backend 2022-05-02 15:05:55 +02:00
Paweł Chmielowski
ce18c93419 Simplify rules for choosing jiffy version 2022-05-02 13:56:16 +02:00
Paweł Chmielowski
f3f80f2f55 Update p1_pgsql in mix.lock 2022-05-02 13:41:44 +02:00
Paweł Chmielowski
cae86f62e6 Update esip in mix.lock 2022-05-02 13:37:40 +02:00
Badlop
ea4a365bf5 Container: New GitHub workflow to build and publish containers 2022-05-02 13:25:18 +02:00
Badlop
9c23a7dc3f Container: When ERLANG_COOKIE is set, create cookie file; otherwise use -setcookie 2022-05-02 13:25:18 +02:00
Badlop
b0db87c683 Container: Experimental support CTL_ON_CREATE and CTL_ON_START environment variables 2022-05-02 13:25:18 +02:00
Badlop
200cea25c8 Container: Start BEAM with exec to maintain the PID and catch SIGTERM in Docker Stop
Until now, when stopping the ejabberd container, Erlang is not gracefully
closed, Mnesia is not properly closed... exit code is 137.
With this change, when the container is stopped, Erlang receives the
SIGTERM signal, shutsdown, Mnesia database is properly closed, ...
and exit code is 0.
2022-05-02 13:25:18 +02:00
Badlop
8d15e973e2 Container: Copy ejabberdctl.template, it requires some customizations 2022-05-02 13:25:01 +02:00
Badlop
493ee7f534 Container: New Dockerfile, more simple than the one in ejabberd/ecs 2022-05-02 13:23:57 +02:00
Badlop
d6de831381 Runtime: New workflow to test compilation, rel, starting and ejabberdctl 2022-05-02 13:20:52 +02:00
Badlop
5ece51f8da CI: Update actions versions 2022-05-02 13:20:52 +02:00
Badlop
ca786e8102 CI: Update to the new "make rel" paths 2022-05-02 13:20:52 +02:00
Badlop
bde513d088 CI: For older erlang versions, get old rebars 2022-05-02 13:20:52 +02:00
Badlop
c5f9652019 CI: Update to test latest OTP 25.0-rc3 2022-05-02 13:20:52 +02:00
Badlop
5e2aca8138 Update rebar3 binary, works from Erlang/OTP 22 to 25
The old version was:
  rebar 3.15.2
and it couldn't work with Erlang/OTP 25

This new version is
  rebar 3.18.0
compiled from tag 3.18.0 from
  https://github.com/erlang/rebar3
using erlang:22-slim docker image

To compile ejabberd using rebar3 and ancient Erlang 19.3-21.3,
you need a rebar3 binary compiled with an old Erlang.
If your operating system doesn't provide one, you can download
the old one included in ejabberd 21.12, available at:
  https://github.com/processone/ejabberd/raw/21.12/rebar3
2022-05-02 13:20:52 +02:00
Badlop
12331768bc Update rebar2 binary, works from Erlang/OTP 22 to 25
The old version was:
  rebar 2.6.4 17 20170823_084242 git 2.6.4-27-g8076675-dirty
and it couldn't work with Erlang/OTP 25

This new version is
  rebar 2.6.4 22 20220426_202500 git 2.6.4-39-gb6d3094
compiled from master branch from
  https://github.com/rebar/rebar
using erlang:22-slim docker image

To compile ejabberd using rebar and ancient Erlang 19.3-21.3,
you need a rebar binary compiled with an old Erlang.
If your operating system doesn't provide one, you can download
the old one included in ejabberd 21.12, available at:
  https://github.com/processone/ejabberd/raw/21.12/rebar
2022-05-02 13:20:52 +02:00
Badlop
7a1e0d4720 Fix 'make xref' when using Mix; notice it only checks Elixir files 2022-05-02 13:20:52 +02:00
Badlop
45c7fbb5ae Switch "make rel" and "make dev" to paths: conf, database, logs 2022-05-02 13:17:53 +02:00
Badlop
a852c31c6c Set default ejabberd version number when not using git
This is useful when the source code was downloaded from
https://github.com/processone/ejabberd/tags
2022-05-02 13:17:50 +02:00
Paweł Chmielowski
c8c4827626 Update hex deps 2022-05-02 13:06:40 +02:00
Paweł Chmielowski
4f33524842 Update deps 2022-05-02 12:50:08 +02:00
Holger Weiss
b5a76fb4de mod_push: Keep push session ID on session resume
Don't forget the push session ID if the client resumes a stream
management session.  This makes sure no push notifications are generated
for a connected client with a resumed stream management session.

Thanks to Thilo Molitor for spotting the issue.
2022-05-02 01:54:42 +02:00
Holger Weiss
c148ab4430 Adapt mod_push_keepalive to mod_push changes
Adjust mod_push_keepalive to work with the mod_push changes applied by
commit 11574f0a43.
2022-05-01 17:51:07 +02:00
Holger Weiss
a30d5875ed mod_push: Rename "timestamp" to "push session ID"
The fact that mod_push uses a timestamp as a push session ID is just an
implementation detail.  Rename things accordingly to avoid confusion.

However, stick to "timestamp" in the storage modules, as it corresponds
to the database column names/types, there.
2022-05-01 15:49:22 +02:00
Holger Weiss
11574f0a43 mod_push: Fix notifications for pending sessions
Fix the problem that no push notifications were triggered in the case
where all of the following conditions applied:

- The XEP-0198 session has been resumed at least once.
- The XEP-0198 session is pending (i.e., the client is disconnected).
- The message wasn't stored in the user's MAM archive (e.g., because it
  was of type "groupchat").

The problem was introduced in cd336369a5.

Many thanks to Friedrich Altheide for reporting the issue and to Thilo
Molitor for his help with tracking it down.
2022-05-01 15:26:21 +02:00
Paweł Chmielowski
d65d04cc9a Compile elixir_logger_backend only when lager is used 2022-04-29 12:35:16 +02:00
Paweł Chmielowski
881cc42168 Attach meta field with real jid to mucsub subscription events 2022-04-29 11:58:38 +02:00
Jérôme Sautret
69a5a22810 Delete ping timer if resource is gone after the ping has been sent 2022-04-28 14:54:41 +02:00
Paweł Chmielowski
b34291762a Remove dialyzer warning 2022-04-28 10:18:29 +02:00
Paweł Chmielowski
6fd4315a0c Guard agains erlang:system_info(logical_processors) not always returning number 2022-04-28 09:51:51 +02:00
Jérôme Sautret
f4959c8b28 Don't send ping if resource is gone 2022-04-26 18:56:38 +02:00
Badlop
f61f5beb5b Copy include/ files for ejabberd, deps and otp, as "mix release" lacks that 2022-04-21 16:01:47 +02:00
Alexey Shchepin
74e86611ab Stop empty MUC rooms 30 seconds after creation 2022-04-21 14:38:50 +03:00
Paweł Chmielowski
155261f78a Fix dialyzer warning 2022-04-20 19:20:16 +02:00
Paweł Chmielowski
e59043db2c Make oauth_revoke_token work with all backends 2022-04-20 19:07:52 +02:00
Badlop
87445bc74b Clarify mod_offline's use_mam_for_storage option 2022-04-13 17:33:08 +02:00
Badlop
d8642fc7c2 Fix syntax of some commands' result_example 2022-04-13 17:33:04 +02:00
Badlop
19019bbe32 Add support for MUC room vCard in get_vcard commands 2022-04-12 13:35:55 +02:00
Badlop
10481ed895 mod_cron from ejabberd-contrib is another possible frontend to run commands 2022-04-11 17:04:53 +02:00
Paweł Chmielowski
feb2ad0664 Don't use floor - doesn't exist in R19 2022-04-08 18:27:58 +02:00
Paweł Chmielowski
5744d44e68 Fix compatibility with older mix versions 2022-04-08 18:26:07 +02:00
Paweł Chmielowski
0870f32c59 Add rate limited delete_old_messages 2022-04-08 17:48:53 +02:00
Paweł Chmielowski
b86fe14ef0 Add rate limited delete_old_mam_messages command 2022-04-08 17:23:42 +02:00
Licaon_Kter
6dbd1118a2 mod_conversejs example, use newer dark theme
ref: https://github.com/conversejs/converse.js/releases/tag/v9.1.0
2022-04-06 18:21:43 +02:00
Badlop
170ea134d6 Set Converse auth and register options based on ejabberd configuration 2022-04-06 11:11:21 +02:00
Badlop
b405a3b61e Fix compilation with Erlang 19 2022-04-06 11:11:18 +02:00
badlop
e3ff868fcd
Merge pull request #3756 from pouriya/Add-Process-Hook-Tracing
Add process hook tracing
2022-04-06 11:10:57 +02:00
Holger Weiss
121fc716b0 domain_balancing: Allow for specifying 'type' only
Allow for specifying the 'type' of 'domain_balancing' without specifying
the 'component_number' (as per the example in the documentation).  The
balancing 'type' is then applied to the dynamic number of component
instances.
2022-04-04 00:14:32 +02:00
Badlop
152956c194 Add more configuration examples 2022-04-01 12:04:08 +02:00
Badlop
6cdb517454 New conversejs_options to setup additional options for Converse 2022-04-01 12:04:07 +02:00
Badlop
94186a36d0 The *_url options now support 'auto' 2022-04-01 12:04:05 +02:00
Badlop
f461bcb597 Improved mod_conversejs to support @HOST@, auto and conversejs_resources
Changes:
- The options can use the @HOST@ keyword
- default_domain option is @HOST@ by default, not the first defined vhost
- New conversejs_resources option to serve converse.js files (no need for web server)
- conversejs_* now support 'auto', which uses local or remote Converse files
2022-04-01 12:04:03 +02:00
Badlop
8065ec831e New mod_host_meta to serve host-meta files, see XEP-0156 2022-04-01 12:04:01 +02:00
Badlop
4c51f6e1fe Check results when test with any OTP is not skipped 2022-04-01 12:03:51 +02:00
Badlop
f19219f5a0 Terminate ejabberd_sm before everything else to ensure sessions closing (#3641) 2022-03-25 12:53:25 +01:00
Badlop
0f73d3f4d1 Don't define restart and stop in ejabberd_ctl, use the corresponding commands 2022-03-25 12:51:27 +01:00
Badlop
91c9b0446c Don't export password attribute when it's empty (it's invalid)(#3705) 2022-03-25 12:51:24 +01:00
Simon Paitrault
68762146d7
Checking users is active in SM for JWT authenticated user (#3795)
Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>
2022-03-24 17:03:50 +01:00
Alexey Shchepin
5506b838c8 Add TLS certificate authentication for MQTT connections 2022-03-14 15:41:01 +03:00
Holger Weiss
871e26a01e mix.exs: Don't allow admins to override boot flags
Add the -boot and -boot_var options via ERLANG_OPTS rather than
ERL_OPTIONS.  The difference is that administrators might override the
latter in the ejabberdctl.cfg file, which isn't desired as the boot
flags must be specified exactly that way in a Mix-generated release
(otherwise, ejabberd would fail to start up).
2022-03-10 16:29:32 +01:00
Badlop
ce8c2ca0fd Add fine-grained Elixir version requirement
1.4 is accepted in general
1.10 is required to build OTP releases
1.11 is required to run 'make relive'
lower than 1.11.4 requires Erlang lower than 24 to build releases
2022-03-10 13:09:35 +01:00
Badlop
1e1b72572f Add -boot and -boot_var in ejabberdctl instead of adding vm.args 2022-03-10 13:09:33 +01:00
Badlop
6afdf88e09 Update mix.lock, there are many unnecesary dependencies there 2022-03-10 13:09:30 +01:00
Badlop
2f92dc40df Let's assume ex_doc is no longer needed
It was added in e6f72333
2022-03-10 13:09:28 +01:00
Badlop
a846260d6e Update ejabberd to not use Distillery (#3788) 2022-03-10 13:09:24 +01:00
Stu Tomlinson
dca49f508f
Sync old-to-new schema script with reality (#3790)
Update the update_sql function to match current "new" sql schema
2022-03-08 13:56:27 +01:00
Paweł Chmielowski
3520869e36 Use correct timestamp when hibernation_time is not set at all 2022-03-07 17:38:04 +01:00
Alexey Shchepin
d5841785e1 Don't request the whole MUC room state in get_room_occupants_number command (#3684) (#1964) 2022-03-07 08:42:42 +03:00
Badlop
f721374321 Determine compile definitions based on Erlang version
This gives a clear definition of what erlang versions require each
workaround, instead of depending on the actual workaround details.
The lib module was removed in OTP 21.0,
and the formatting options were moved to erl_error.
The uri_string module was introduced in OTP 21.0.
2022-02-24 21:39:20 +01:00
Badlop
7381b9db85 Fix bug introduced in 8d8a3177 (#3782) 2022-02-24 21:39:14 +01:00
Badlop
305792f409 Test also with recent Erlang/OTP 25.0-rc1 2022-02-24 01:03:01 +01:00
Badlop
35b8a042b8 Update jiffy and p1_acme in mix.lock 2022-02-24 01:02:58 +01:00
Badlop
de8abc15a8 Use jiffy 1.1.0 when erlang < 20 because it doesn't have string:split/2 2022-02-24 01:02:55 +01:00
Badlop
265e0610a3 Update to jiffy 1.1.1 and p1_acme 1.0.18 to support Erlang/OTP 25.0-rc1 2022-02-24 01:02:53 +01:00
Badlop
231dfd776f Support Erlang 25 in "make options": returns attribute with simpler syntax
This was introduced in Erlang/OTP 25.0-rc1
https://erlang.org/download/otp_src_25.0-rc1.readme
https://github.com/erlang/otp/pull/5509

  OTP-17894    Application(s): syntax_tools
               Related Id(s): PR-5509

               The erl_syntax_lib:analyze_attribute/1 function would
               return {Name, {Name, Value}} instead of {Name, Value}
               (which is the documented return value).
2022-02-24 01:02:51 +01:00
Badlop
d4f288d3c6 Add link in mod_http_api documentation to the docs API section 2022-02-24 01:02:48 +01:00
Badlop
c407b73803 Fix WebSocket uppercase 2022-02-24 01:02:46 +01:00
Badlop
be0175fb70 Only care about CT results when CT are ran, and check fails 2022-02-24 01:02:44 +01:00
Badlop
22b469f55d The lager dependency is used only with old Erlang versions 2022-02-24 01:02:41 +01:00
Holger Weiss
aad04bba91 mix.exs: Don't forget to include epam/luerl
If --enable-lua and/or --enable-pam was specified, include the
corresponding applications with Mix releases.
2022-02-21 00:34:02 +01:00
Holger Weiss
da516d64d4 mix.exs: Be more careful while editing the version
Make sure only leading zeroes are removed while turning the ejabberd
version into SemVer format for Mix.  For example, remove the zero in
"21.04", but keep the zero in "21.12.102".
2022-02-21 00:02:31 +01:00
Holger Weiss
a6f0feb23b ejabberdctl: Remove unused environment variable
The EJABBERD_DOC_PATH variable is no longer used (cf. commit
949e71efb6).
2022-02-19 23:58:36 +01:00
Holger Weiss
7d7d08f980 mix.lock: Add missing dependencies 2022-02-19 23:53:16 +01:00
Paweł Chmielowski
2dc153751d Put esip in mix included_applications only when it's enabled 2022-02-18 21:48:26 +01:00
Paweł Chmielowski
d4bf29e3ff Improve compatibility with various db engine versions 2022-02-18 20:43:56 +01:00
Paweł Chmielowski
4247501dc6 Fix compilation on OTP < 21 and remove dialyzer warning 2022-02-18 17:21:22 +01:00
Paweł Chmielowski
b88fda9494 Fix sqlite schema 2022-02-18 16:24:34 +01:00
Paweł Chmielowski
f86055378d Optimize room_unused_* commands
Previously to check if hibernated room was old enough we had to fetch info
about all rooms from database. Now we repurpose created_at field in sql
to store that info, that allow us to have more efficient query just for it.
2022-02-18 14:02:04 +01:00
Badlop
f20e9e9b66 Check producing and starting releases 2022-02-11 09:39:29 +01:00
Badlop
0ef2624b57 Provide proper path to the compiled libraries in relive's ejabberdctl 2022-02-11 09:39:28 +01:00
Badlop
b3211b1f71 Update copyright year to 2022 2022-02-11 09:39:25 +01:00
Badlop
f7c7d784c4 Detect debug option, and maybe disable debug_info
As explained in https://hexdocs.pm/mix/1.13.2/Mix.Tasks.Compile.Erlang.html
> The option :debug_info is always added to the end of it. You can disable that using:
> erlc_options: [debug_info: false]
2022-02-11 09:39:16 +01:00
Badlop
0b9263bc15 Add forgotten option NO_CUSTOMIZE_HOSTNAME_CHECK to mix.exs 2022-02-11 09:39:15 +01:00
Badlop
ba0d5e4dcf Nowadays NEW_SQL_SCHEMA is only used to determine the default sql schema 2022-02-11 09:39:13 +01:00
Badlop
4d093ac03e ejabberd_sql_pt got USE_NEW_SCHEMA in 78dfb83 and removed in e15595d 2022-02-11 09:39:11 +01:00
Badlop
e63e8a6d38 Fix typo introduced in 99fdba0, present since 16.01 2022-02-11 09:39:09 +01:00
Badlop
37d2bdd90d Some dependencies are optional, check them in mix.exs 2022-02-11 09:39:07 +01:00
Badlop
dda60fcf0d Implement Get List of Registered/Online Users from XEP-0133 2022-02-11 09:39:05 +01:00
Badlop
9661d06334 Remove obsolete db_type defined environment
db_type as a compilation define was first introduced in 2006 in d0e2ac9,
but was removed in 2015 in 25791cf.

Nowadays: ./configure --enable-mssql will set {mssql, true} in vars.config;
That is read by ejabberd.app.src.script to set enabled_backends;
which is consulted by test/suite.erl to test only available backends.
2022-02-11 09:39:02 +01:00
Badlop
bdd1a129c0 Disable mssql in Actions: it's known mssql doesn't pass the tests 2022-02-03 20:10:01 +01:00
Badlop
965196a2e8 Ensure db_type default value is set when no mssql was defined. Fix typo 2022-02-03 19:17:16 +01:00
Badlop
a7912f5344 Fix configure when mssql option not set, and add it to --enable-all 2022-02-03 18:57:53 +01:00
Badlop
6279cac932 Reorganize and complete documentation of node start/debug commands 2022-02-03 18:21:55 +01:00
Badlop
25e0326f87 Improve explanation of s2s_access option. Add link to access_rules option 2022-02-03 18:21:53 +01:00
Badlop
c92478f7c2 Use the same wording in all the identical options db_type and ram_db_type 2022-02-03 18:21:51 +01:00
Badlop
3b30d5b0ed Fix support for MSSQL testing 2022-02-03 18:21:49 +01:00
Badlop
adbccbe852 New "make relive" similar to "ejabberdctl live" without installing
Prepare with:
  ./autogen.sh && ./configure --with-rebar=./rebar3 && make
Or use this if you installed Elixir:
  ./autogen.sh && ./configure --with-rebar=mix && make
Start without installing (it recompiles when necessary):
  make relive
It stores config, database and logs in _build/relive/
There's available the well-known script:
  _build/relive/ejabberdctl

Please note this fails immediately:
  r3:do(compile).
This crashes a few seconds later:
  rebar3:run(["compile"]).
Workaround that works correctly:
  ejabberd_admin:update().
2022-02-03 18:21:47 +01:00
Holger Weiss
67b5de05c7 mod_pubsub: Unsubscribe JID on whitelist removal
If a JID is removed from the affiliation lists of a node with access
model 'whitelist', remove it from the list of subscribers as well.
2022-02-02 22:35:28 +01:00
Paweł Chmielowski
11c725018b Make dialyzer happy 2022-02-02 18:33:45 +01:00
Paweł Chmielowski
9542cca0db One more place where we need to handle socket field not being available 2022-02-02 16:26:39 +01:00
Paweł Chmielowski
8824a912ef Don't expect that socket will be available in c2s_terminated hook
For detached connection we free socket, so let's make code account for this
(and we really need it for printing debug informations).

This makes sure we call ejabberd_sm:close_session
2022-02-02 16:19:13 +01:00
Paweł Chmielowski
cae4fbb40b Store all mucsub notifications not only message notifications
Previously we stored only message/subject change notifications, but if user
request also change notificaitons for affiliation/config/subscribers then
i don't see reason why we shouldn't store it as well.
2022-02-01 15:18:50 +01:00
Holger Weiss
52ac941034 mod_shared_roster: Adjust special group cache size
Let the size of the cache used for 'special' groups (such as @all@ or
@online@) depend on the number of virtual hosts, as the cache will
contain seperate entries per domain.

Thanks to Ingo Jrgensmann for reporting the issue.
2022-01-25 16:57:27 +01:00
Badlop
4579fd6ac7 Remove reference to the obsolete Vagrant environment 2022-01-25 13:46:27 +01:00
Badlop
7714046511 Run autoupdate to replace obsolete AC_HELP_STRING with AS_HELP_STRING
This change is required to work with autoconf 2.71 or higher,
and it works with autoconf 2.59 or higher.
2022-01-25 13:20:36 +01:00
Badlop
1b192987d2 Support MQTT subscriptions spread over the cluster (#3750) 2022-01-25 13:20:31 +01:00
Badlop
585afcbc77 Pass property name as expected in mqtt_codec (fixes login using MQTT 5) 2022-01-25 13:16:07 +01:00
badlop
78aa187067
Merge pull request #3757 from kianmeng/fix-typos
Fix typos
2022-01-25 13:13:10 +01:00
Kian-Meng Ang
adf0f87e99 Fix typos 2022-01-24 08:02:04 +08:00
Pouriya Jahanbakhsh
259876cb74 feat: event handling
run multiple event handlers
generate new events in timing event handlers

print human-readable times

output each callback time info is optional and by default is disabled
2022-01-22 18:17:11 +03:30
Pouriya Jahanbakhsh
20326e8908 feat: process hook tracing 2022-01-21 03:18:55 +03:30
Pouriya
03485f5e94
Merge branch 'processone:master' into master 2022-01-21 03:14:28 +03:30
Holger Weiss
0f2d36dc53 mod_pubsub: Allow for limiting item_expire value
If mod_pubsub's 'max_item_expire_node' option is specified, reject node
configurations with an 'item_expire' value that exceeds the specified
limit.
2022-01-17 19:08:36 +01:00
Holger Weiss
8e88fa3884 mod_shared_roster: Normalize JID on unset_presence
Don't forget to normalize the JID handed over from ejabberd_sm on
presence-unavailable.  Without normalization, mod_shared_roster might
fail to look up the storage backend for the given host name, for
example.

Fixes #3752.
2022-01-15 18:18:24 +01:00
Badlop
a9ac10e876 Document that 'unregister' command deletes data associated with the account 2022-01-13 19:34:37 +01:00
Badlop
1fb908b70f Document option subscrube_room_many_max_users introduced in fc34661b6 2022-01-13 19:34:10 +01:00
Badlop
1ce3bd256b Update section URLs in ldap documentation 2022-01-13 19:34:07 +01:00
Badlop
ce14c28faf Fix version when this command was really updated 2022-01-11 17:28:36 +01:00
Badlop
03a11c63bd Fix login when generating client id, keep connection record (#3593) 2022-01-11 17:19:12 +01:00
Paweł Chmielowski
9ba20d26cb Add better descripion of subscribe_room_many command 2022-01-05 16:44:05 +01:00
Badlop
cc7ebb86b4 Fix Dialyzer, related to Luerl API update from 0.3 to 1.0 2022-01-04 23:06:30 +01:00
Badlop
79ddde3040 Workaround to support rebar2 git tag "1.0" and rebar3 hex version "1.0.0" 2022-01-04 21:56:31 +01:00
Badlop
61dc89a068 Update Luerl to 1.0.0, now available in Hex.pm (rvirding/luerl#142) 2022-01-04 21:32:23 +01:00
Badlop
7c9b47fb78 Fix "make rel" when using mix, broken after 94a733c66 2022-01-04 17:31:30 +01:00
Paweł Chmielowski
dc81966938 Fix 'make update' when used with rebar 3.18 2022-01-03 13:51:58 +01:00
Holger Weiss
59c9500944 mod_muc_room: Fix function name typo 2021-12-30 21:17:11 +01:00
Badlop
8ccad7fada Publish CT logs and Cover on failure to an external GH Pages repo 2021-12-23 16:39:36 +01:00
Badlop
8a5d90797a Check dialyzer results in its step when using rebar 2 2021-12-23 16:39:34 +01:00
Badlop
aa580b3f6e Only care about new-schema results when new-schema tests were ran 2021-12-23 16:39:31 +01:00
Badlop
3841097428 Clean actions steps, remove redundant ones 2021-12-23 16:39:28 +01:00
Holger Weiss
5ff45e0f00 ejabberdctl: Let shellcheck ignore unused ERTS_VSN
The ERTS_VSN variable is only used for releases built with Rebar 3.
2021-12-23 14:46:53 +01:00
Holger Weiss
94a733c666 Fix ERTS path in ejabberdctl with rebar3 release
Rebar 2 expands {{erts-vsn}} to "erts-$vsn", Rebar 3 expands it to just
"$vsn".  Make sure `make rel` doesn't end up with a "$vsn" directory
next to "erts-$vsn" (which happened when using Rebar 3), and make sure
that ejabberdctl expects both "erl" and "epmd" to be installed below
"erts-$vsn" (which it didn't when using Rebar 3).
2021-12-23 14:24:27 +01:00
Badlop
e2b7717dd9 Workaround to support ShellCheck older than 0.8.0 2021-12-23 13:57:16 +01:00
Badlop
694d80b7fa Test shell scripts in CI (#3738) 2021-12-23 13:57:14 +01:00
Badlop
84d23e60d1 In POSIX sh, RANDOM is undefined: use always the other method 2021-12-23 13:57:12 +01:00
Badlop
f4e2d278ba Dollar is unnecessary on arithmetic variables 2021-12-23 13:57:10 +01:00
Badlop
d8be168cff Use dollar notation instead of legacy backticked 2021-12-23 13:57:08 +01:00
Badlop
cde089ce9c Disable some shellcheck warnings 2021-12-23 13:57:06 +01:00
Badlop
fdc664a318 The read value is useless, so use throwaway variable name 2021-12-23 13:57:04 +01:00
Badlop
4deff0513c Harmless warning, but let's prevent it anyway 2021-12-23 13:57:02 +01:00
Badlop
46324385f2 SCRIPT_DIR is used by relx releases 2021-12-23 13:57:00 +01:00
Badlop
b5d8b22486 In POSIX sh, RANDOM is undefined, use alternative 2021-12-23 13:56:58 +01:00
Badlop
1b22368f6b In POSIX sh, OSTYPE is undefined. ejabberd doesn't work natively in win anyway 2021-12-23 13:56:56 +01:00
Badlop
f88aa49913 Give hint about what ejabberd.cfg.example sourcing 2021-12-23 13:56:53 +01:00
Badlop
200a842cb0 Configure shellcheck to test with sh POSIX script 2021-12-23 13:56:51 +01:00
Badlop
66bb4cbfa9 Only provide Relx start script in dev profile
That script serves a similar purpose to ejabberdctl to start ejabberd,
but we can't guarantee it is completely equivalent to ejabberdctl.
The prod profile must provide only the well-known script.
The test profile provides the Relx script so we can experiment with it.
2021-12-23 13:54:08 +01:00
Holger Weiss
aaa053829f Revert "rebar.config: Don't create extended start script"
This reverts commit 0881c5941a.

The extended start had been enabled intentionally, as some commands
(such as 'ping', 'status', or 'pid') actually do work.
2021-12-23 07:12:02 +01:00
Holger Weiss
0881c5941a rebar.config: Don't create extended start script
We currently don't use the start script(s) generated by Relx.
2021-12-21 00:01:17 +01:00
Holger Weiss
3c46e6aba5 Merge remote-tracking branch 'processone/pr/3735'
* processone/pr/3735:
  node_pep: Add config-node and multi-items features
2021-12-20 09:37:37 +01:00
Alexey Shchepin
fc34661b6f Add subscribe_room_many command 2021-12-20 09:42:02 +03:00
Alexey Shchepin
a26c9d2475 Optimize user removal handling in mod_muc 2021-12-20 09:42:02 +03:00
Alexey Shchepin
536beedeb6 Accept more types of ejabberdctl commands arguments as JSON-encoded 2021-12-20 09:42:02 +03:00
Linus Jahn
7196f46730
node_pep: Add config-node and multi-items features
Fixes #3714.
2021-12-19 21:06:33 +01:00
Holger Weiss
42bdb501ca mod_stun_disco: Fix parsing of IPv6 listeners
Don't crash if `mod_stun_disco` is used with `offer_local_services`
and an IPv6 listener has an explicit `ip:` address configured.

Thanks to Daniel Kenzelmann for reporting the issue.
2021-12-18 17:50:26 +01:00
Badlop
24742031e9 Revert "Github Actions: use MD5 pass encryption to support PostgreSQL 14 (#3691)"
This workaround is not needed anymore, thanks to p1_pgsql 3bf645b,
included in p1_pgsql 1.1.13, and used in ejabberd 21.12.
This reverts commit 964cb3aaca.
2021-12-15 00:50:52 +01:00
Badlop
7e07cba406 Let get_all_rooms handle "global" argument, fixes rooms_unsued_... (#3726) 2021-12-15 00:50:17 +01:00
Alexey Shchepin
8b7da70b57 Handle user removal in mod_muc 2021-12-14 09:55:55 +03:00
Paweł Chmielowski
a94209a0e0 Update stun and esip dependencies 2021-12-09 12:13:48 +01:00
Badlop
ed5ba1f645 Update CHANGELOG.md to 21.12 2021-12-09 11:07:43 +01:00
Badlop
1915f29d4b Update Chinese translation (thanks to Eric and 52871299hzy) 2021-12-09 10:55:26 +01:00
Badlop
333eaef6dc Update French translation (thanks to Éfrit and ButterflyOfFire) 2021-12-09 10:55:23 +01:00
Badlop
d1bfd6c90d Annotate modules, options and command major changes in 21.12 2021-12-09 10:55:21 +01:00
Badlop
ca143c1873 Update man page 2021-12-09 10:55:19 +01:00
Badlop
e10f2a9e47 OTP 24 means whatever version provided by Actions... nowadays it's 24.1 2021-12-09 10:55:16 +01:00
Badlop
0f9a0156c6 Handle mix version when running docker-ejabberd/ecs/build.sh latest 2021-12-08 16:31:36 +01:00
Badlop
68ea5834c8 Relax strictness in mix dependency versions 2021-12-08 16:31:34 +01:00
Holger Weiss
4a52042435 Merge remote-tracking branch 'processone/pr/3724'
* processone/pr/3724:
  Remove CTLLOCKDIR (/var/lock/ejabberdctl) from Makefile.in
2021-12-07 10:19:59 +01:00
Florian Schmaus
6b1f78e87a Remove CTLLOCKDIR (/var/lock/ejabberdctl) from Makefile.in
Flock'ing /var/lock/ejabberdctl by ejabberdctl was removed with
f7d4aae64d ("Use UUID for ctl node name (#1021)"), however the
according recipies in the Makefile where never removed. This commit
does that.
2021-12-07 10:15:47 +01:00
Badlop
3f4423e996 Use P1's coveralls-erl fork to handle unicode in git commit author 2021-12-07 01:33:16 +01:00
Paweł Chmielowski
8d8a3177e1 Eliminate xref warning from last commit 2021-12-06 15:46:52 +01:00
Paweł Chmielowski
7897c3d0e1 Add workaround for bug in older erlang version in rest module 2021-12-06 15:08:10 +01:00
badlop
b173ec0a78
Merge pull request #3652 from weiss/bump-max-items
PubSub: Bump default value for 'max_items' limit
2021-12-03 16:11:18 +01:00
Badlop
7fd0eefa30 Run make options 2021-12-03 16:09:58 +01:00
Badlop
dab4c0cc10 New allow_modules option to restrict registration modules 2021-12-03 16:09:55 +01:00
Badlop
0372878ba5 Minor improvements in conversejs documentation 2021-12-03 16:09:10 +01:00
Paweł Chmielowski
ad3c91b86e Update mix deps 2021-11-29 15:36:57 +01:00
Paweł Chmielowski
75b133d968 Update deps 2021-11-29 15:20:10 +01:00
Alexey Shchepin
89ad8a5502 Add mod_conversejs 2021-11-23 08:43:54 +03:00
Badlop
15d3ebb842 Fix Dialyzer warning, old passwd tuple don't match current tuple definition 2021-11-17 17:26:44 +01:00
Badlop
689749a563 Update Jose to 1.11.1 (the last in hex.pm correctly versioned) 2021-11-17 13:22:34 +01:00
Badlop
a590e81922 Add DIAGNOSTIC to rebar3 coveralls, this fails since some days ago 2021-11-17 13:20:33 +01:00
Paweł Chmielowski
405a5172d5 Improve mod_multicast 2021-11-17 11:32:42 +01:00
Paweł Chmielowski
97b8373fd2 Better version of dialyzer fix 2021-11-16 10:59:53 +01:00
Paweł Chmielowski
bdd4e52699 Make dialyzer happy 2021-11-16 10:57:15 +01:00
Paweł Chmielowski
03817de827 Make s2s connection table cleanup more robust
Using monitors instead of doint that from terminate() makes us immune to
s2s handler processes being forcefully killed.
2021-11-16 10:25:03 +01:00
Paweł Chmielowski
132ebb8f2d Fix exception in mucsub {un}subscription events multicast handler
While those event are wrapped in mucsub envelope they doesn't
contain regular messages that require updating 'to' attribute,
so don't process in that same way as events with wrapped
message in them.
2021-11-10 17:04:50 +01:00
Holger Weiss
2cdda4cf49 mod_caps: Don't forget caps on XEP-0198 resumption
Many thanks to Thilo Molitor for spotting the issue and testing the fix.
2021-11-06 23:48:49 +01:00
Badlop
4e014d23bd Improve documentation of some commands 2021-11-05 15:58:00 +01:00
Badlop
b6a2eeebeb Mention "help" as an available ejabberdctl command 2021-11-05 15:57:57 +01:00
Badlop
684ef60ec3 Annotate support for XEP-0317: Hats, since commit 5d0e599f1 2021-11-05 15:57:53 +01:00
Holger Weiss
6e3df8e80b Update 'stun' dependency
The new 'stun' release should improve UDP performance quite a bit.
2021-11-02 12:34:19 +01:00
Holger Weiss
c4f6c9dfe7 mod_muc_room.hrl: Work around old Dialyzer bug
On Erlang/OTP versions older than 21, Dialyzer stumbles over non-empty
map type specifications for record fields (OTP-15098).
2021-10-31 21:59:00 +01:00
Holger Weiss
13cbd7c35d mod_pubsub: Remove unused check_opt_range/3 clause 2021-10-31 21:38:49 +01:00
Holger Weiss
65a900668c node_pep: Fix remove_expired_items/2 argument name 2021-10-31 21:32:45 +01:00
Holger Weiss
2f1611f918 mod_pubsub: Fix get_max_items_node/1 specification
Make it explicit that the get_max_items_node/1 function returns
?MAXITEMS if the 'max_items_node' option isn't specified.  The function
didn't actually fall back to 'undefined' (but to the 'max_items_node'
default; i.e., ?MAXITEMS) anyway.  This change just clarifies the
behavior and adjusts the function specification accordingly.
2021-10-30 13:45:10 +02:00
Holger Weiss
29dcc9b94c PubSub: Add delete_expired_pubsub_items command
Support XEP-0060's pubsub#item_expire feature by adding a command for
deleting expired PubSub items.

Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-10-30 13:19:30 +02:00
Alexey Shchepin
5d48329a3f Update 'xmpp' dependency 2021-10-29 05:48:03 +03:00
Alexey Shchepin
5d0e599f17 Support MUC hats (XEP-0317, conversejs/prosody compatible) 2021-10-29 05:35:16 +03:00
Badlop
5462a26a0a Remove obsolete cookie preparation in spool dir, it's now stored in HOME 2021-10-21 16:12:41 +02:00
Badlop
5f3c8dcca4 Use the configured user in systemd's ejabberd.service 2021-10-21 16:12:38 +02:00
Badlop
54c23a65db Fix create_room_with_opts when using SQL storage (#3700) 2021-10-21 12:44:51 +02:00
Badlop
4d384b6bf5 If tests succeed, test also new SQL schema 2021-10-15 16:59:32 +02:00
Badlop
c2db003431 When tests fail, show also error.log as it may have meaningful content 2021-10-15 16:59:28 +02:00
Badlop
d3aa329769 Fix vcard_search definition in pgsql new schema (thanks to Stu Tomlinson)(#3695)
How to update an existing database:
ALTER TABLE vcard_search DROP CONSTRAINT vcard_search_pkey;
ALTER TABLE vcard_search ADD PRIMARY KEY (server_host, lusername);
2021-10-14 15:28:00 +02:00
Badlop
db920b7d7b Only install some files when option enabled in configure (#3633) 2021-10-14 15:26:41 +02:00
Holger Weiss
6b0fa44386 Update 'xmpp' dependency
Fixes #3529.
2021-10-09 10:56:30 +02:00
Badlop
964cb3aaca Github Actions: use MD5 pass encryption to support PostgreSQL 14 (#3691) 2021-10-07 16:54:27 +02:00
Holger Weiss
1377dcf6d2 mod_mam: Declare XEP-0441 support 2021-10-06 01:13:11 +02:00
Badlop
595b016019 Use mod_register in web register form, so its restrictions are used (#3688) 2021-10-04 12:08:59 +02:00
Badlop
85408662ff Use mod_register to format some common error messages 2021-10-04 12:08:56 +02:00
Badlop
d205e6ff1f Support old scram records before xmpp's 651050f9 and ejabberd's e5cad9be6 (#3680) 2021-09-27 17:12:17 +02:00
Badlop
dd359a7328 Add indexes from 95fa43aa to the old-to-new MySQL schema update script 2021-09-27 16:33:23 +02:00
Badlop
f74a715713 Add indexes from 95fa43aa to the old-to-new schema update function 2021-09-27 13:05:18 +02:00
Badlop
af4b49f720 Update export/import of scram password to XEP-0227 1.1 (#3676) 2021-09-22 16:15:22 +02:00
Badlop
ceeba3eea1 Don't crash when exporting a module that is not enabled 2021-09-22 15:30:11 +02:00
Badlop
cfc393a12e When exporting mod_mam, MUC entries are assigned to the MUC service (#3680) 2021-09-22 11:12:28 +02:00
Alexey Shchepin
c9c5839da4 Fix roster_tests:get_items 2021-09-21 13:30:52 +03:00
Alexey Shchepin
bf068f5659 Small optimization in mod_roster_sql:get_roster 2021-09-21 12:10:00 +03:00
Alexey Shchepin
32cf44827d Use INSERT ... ON CONFLICT in SQL_UPSERT for PostgreSQL >= 9.5 2021-09-19 06:20:20 +03:00
Alexey Shchepin
0c403c0f0e Fix SQL_UPSERT in mod_push_sql:store_session 2021-09-19 06:20:20 +03:00
Pouriya
3eb795357f
Merge branch 'processone:master' into master 2021-09-18 16:09:11 +04:30
Badlop
2f5b15129a Fix previous commit: add forgotten endline blankspaces 2021-09-14 15:13:37 +02:00
Badlop
f8167fc5d0 Update documentation to match the implemented options values (#3675) 2021-09-14 13:47:41 +02:00
Alexey Shchepin
5abc03ff8f Optimize MucSub processing 2021-09-13 08:20:47 +03:00
Holger Weiss
3114ce4ed2 ejabberd_admin: Fix ejabberd_piefxis commands
These days, the ejabberd_piefxis commands expect their arguments to be
handed over as binary strings.
2021-09-08 18:34:20 +02:00
Holger Weiss
868387a405 mod_http_upload_quota: Avoid 'max_days' race
Try to spread clean-up runs for multiple hosts, rather than scheduling
them in parallel.  This should reduce I/O spikes, and avoid race
conditions where multiple processes detect and then try to delete the
same old files (if multiple hosts have the same 'docroot').

Fixes #3497.
2021-09-05 20:00:05 +02:00
Holger Weiss
caf07692db mod_register_web: Handle unknown host gracefully
Return a proper error message on registration attempts against unknown
hosts, rather than crashing.

Thanks to Ingo Jrgensmann for reporting the bug.
2021-09-05 13:24:51 +02:00
Badlop
91350ad472 Fix WebAdmin recent change 2021-08-27 13:39:06 +02:00
badlop
d967103d89
Merge pull request #3668 from longlene/master
rebar version get minor fix
2021-08-27 13:23:56 +02:00
Badlop
f77686481a Add internal links in WebAdmin Vhosts page 2021-08-27 13:23:24 +02:00
Badlop
b0da69f050 Send ping from server, not bare user JID (#3658) 2021-08-27 13:23:15 +02:00
loong0
9643e18be7 minor fix 2021-08-26 20:33:37 +08:00
Holger Weiss
ebf03a3745 node_flat: Avoid catch-all clauses for RSM
Apply the change made in the previous commit to Mnesia storage as well.
2021-08-23 22:04:03 +02:00
Holger Weiss
c952cc420b node_flat_sql: Avoid catch-all clauses for RSM
Explicitly catch invalid <before/> and <after/> timestamps specified by
clients in RSM queries, but crash on other errors, rather than silently
ignoring those.
2021-08-23 21:28:15 +02:00
Badlop
4d0503b6b3 Fix syntax in mod_disco example configuration 2021-08-23 15:49:52 +02:00
Badlop
8b6c90c2d9 Tell dialyzer that gen_tags only cares about markdown output, not html 2021-08-23 15:39:01 +02:00
Badlop
655dcbcb74 New command to produce markdown with tags and their associated commands 2021-08-23 14:04:54 +02:00
Badlop
ac4f240261 Produce module names with specific syntax, docs Makefile will convert to links 2021-08-23 14:04:52 +02:00
Badlop
506e2f3b97 Use specific syntax so modules and top-level will be links
If we use _`whatever`_ here in ejabberd man pages,
it is converted to *`whatever`* in markdown,
and docs.ejabberd.im/Makefile converts to the proper links
2021-08-23 14:04:49 +02:00
Badlop
30ae66e99e Improve formatting and add sections links 2021-08-23 14:04:46 +02:00
Badlop
f5038b86f8 Copy log_rotate_count explanation from docs site 2021-08-23 14:04:44 +02:00
Badlop
9446b251fd Export function, so ACME API commands are listed in the documentation 2021-08-23 14:04:42 +02:00
Badlop
94fb0a65b0 Change set_master command tag from mnesia to cluster 2021-08-23 14:04:40 +02:00
Badlop
69d362595e Remove obsolete mod_register_web ideas and improve documentation 2021-08-23 14:04:37 +02:00
Badlop
b7f7713fae Add example config to mod_http_api documentation 2021-08-23 14:04:35 +02:00
Badlop
8af66b0831 Update API Reference page menu name and order 2021-08-23 14:04:31 +02:00
Holger Weiss
7e9c9703dd Merge remote-tracking branch 'processone/pr/3666'
* processone/pr/3666:
  PubSub: Add delete_old_pubsub_items command
  PubSub: Optimize publishing on large nodes (SQL)
  PubSub: Support unlimited number of items
  PubSub: Support 'max_items=max' node configuration
2021-08-22 15:17:02 +02:00
Holger Weiss
8d5025076f PubSub: Add delete_old_pubsub_items command
Add a command for keeping only the specified number of items on each
node and removing all older items.  This might be especially useful if
nodes may be configured to have no 'max_items' limit.

Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-08-22 12:44:50 +02:00
Holger Weiss
29751a6174 PubSub: Optimize publishing on large nodes (SQL)
Avoid an unnecessary SQL query while publishing an item on a PubSub node
without 'max_items' limit.  The query in question can be expensive if
the node has a large number of items.

Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-08-21 20:02:58 +02:00
Holger Weiss
1b0e59bb13 PubSub: Support unlimited number of items
Allow for setting the mod_pubsub option 'max_items_node' to 'unlimited'.
If clients then request a 'max_items' limit of 'max', old items aren't
deleted when publishing new ones.

Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-08-21 12:29:37 +02:00
Holger Weiss
8f8de0403b PubSub: Support 'max_items=max' node configuration
Let clients request the maximum limit for the node configuration option
'max_items' by specifying the special value 'max' instead of an integer.
This was added to XEP-0060, revision 1.17.0 (and clarified in revision
1.20.0).

Thanks to Ammonit Measurement GmbH for sponsoring this work.
2021-08-20 20:30:11 +02:00
badlop
8afc320aba
Merge pull request #3660 from ballerburg9005/patch-1
"sort -R" command in captcha-ng.sh is not POSIX - added "shuf" and "cat" as fallback
2021-08-16 13:16:43 +02:00
badlop
545a2f0097
Merge pull request #3656 from pitchum/master
Add missing pgsql migration for table push_session
2021-08-16 12:47:45 +02:00
ballerburg9005
14bf197be1
"sort -R" command not POSIX, added "shuf" and "cat" as fallback 2021-08-12 15:14:31 +02:00
Holger Weiss
3e942bf4ac mod_mam_sql: Remove duplicated functions 2021-08-07 12:57:57 +02:00
Badlop
fdfd202a30 Determine the default handlerid at runtime
Apparently Elixir's default is not called 'default'
2021-08-05 13:53:12 +02:00
Badlop
5b0a28bbc9 Fix CHANGELOG: rebar2's elixir workaround was problematic and was reverted
Problems:
- That workaround required running "make" twice
- CEAN (used to build installers) doesn't support that make && make
- Support for Elixir in rebar3 doesn't yet exist
- Preferable path for Elixir usage: install Elixir and use --with-rebar=mix
2021-08-05 13:52:52 +02:00
Badlop
aefc374317 Fix typo when creating index (thanks to Millesimus)
Reference: 95fa43aa96 (r54157330)
2021-08-05 13:52:38 +02:00
Paweł Chmielowski
4c61ea9091 Update tests after last commit 2021-08-04 17:52:23 +02:00
Paweł Chmielowski
d7e330c8ef Allow storing non-composing x:events in offline 2021-08-04 15:30:29 +02:00
Holger Weiss
99ffd9bb95 mod_pubsub: Fix check_opt_range/3 spec 2021-08-02 21:09:55 +02:00
76c49f314f Add missing SQL migration for table push_session 2021-08-01 09:53:07 +02:00
Badlop
ab5e726176 Use the most specific tag for ejabberd commands with several ones 2021-07-30 01:14:36 +02:00
Badlop
b22779f018 Show tags and definer module in generated API document when it's a gen_mod 2021-07-30 01:14:34 +02:00
Badlop
41808a63a0 Show definer module in "ejabberdctl help" when it's a gen_mod 2021-07-30 01:14:31 +02:00
Badlop
ccb4328d06 Store who defines a command, specially when defined by ejabberd modules 2021-07-30 01:14:27 +02:00
Holger Weiss
2050cdffb4 PubSub: Use configured 'max_items' by default
If clients don't ask for a specific 'max_items' limit, use the value of
mod_pubsub's 'max_items_node' option as default, rather than the
hard-coded ?MAXITEMS value.  This makes sure clients cannot circumvent a
smaller, configured limit.
2021-07-28 18:53:15 +02:00
Holger Weiss
fce7fe8558 PubSub: Bump default value for 'max_items' limit
Bump the default value for mod_pubsub's 'max_items_node' option, which
hard-limits the 'max_items' value requested by clients.

These days, use cases such as microblogging or XEP-0402 may need a large
number of items per node.  Bumping the limit makes sure such
functionality is properly supported with the default configuration.
2021-07-28 18:29:19 +02:00
Holger Weiss
103e98b8da mod_push: Fix handling of MUC/Sub messages
Don't fail to include the sender/body of MUC/Sub messages if the
recipient is offline.

Closes #3651.
2021-07-28 18:22:39 +02:00
Badlop
8e553decb0 When vsn is an exact tag, append .0 to satisfy SemVer 2021-07-26 16:36:21 +02:00
Paweł Chmielowski
e3875482ba Remove stringprep override from mix.exs 2021-07-26 16:06:43 +02:00
Paweł Chmielowski
6e4e5a0190 Add missing fields from config inside mod_muc_admin:change_options 2021-07-23 10:14:45 +02:00
Paweł Chmielowski
c96de092fe Revert "Add workaround so rebar2 can use Elixir 1.12.0"
This reverts commit 937e1c2e37.
2021-07-22 15:51:43 +02:00
Badlop
cf72c5ee18 Remove leading zeros in ejabberd version number to satisfy Elixir SemVer 2021-07-21 21:29:04 +02:00
Badlop
69fa79b154 Add 21.07 changes to CHANGELOG 2021-07-21 17:58:35 +02:00
Badlop
ea795e4bd7 Update man page 2021-07-21 17:58:32 +02:00
Badlop
537c8b966e In "make dev" don't create link ejabberdctl, seems buggy 2021-07-21 17:58:27 +02:00
Paweł Chmielowski
142e494d52 Update mix.lock 2021-07-21 14:50:18 +02:00
Badlop
50242cec78 Annotate the srg_create command as changed in 21.07 2021-07-21 13:11:09 +02:00
Badlop
33f821d4f7 Simplify the --with-rebar example in README 2021-07-21 13:11:06 +02:00
Badlop
9a823e5a16 Update Portuguese translation from Weblate (thanks to Ssantos) 2021-07-21 13:07:31 +02:00
Badlop
686ce01534 Update Italian translation from Weblate (thanks to Alessandro Mandelli) 2021-07-21 13:07:29 +02:00
Badlop
4225f14e8b Update Indonesian translation from Weblate (thanks to Reza Almanda) 2021-07-21 13:07:26 +02:00
Paweł Chmielowski
a3478b7f0f Update pam 2021-07-21 11:37:32 +02:00
Paweł Chmielowski
bab9543c1f Update dependences 2021-07-21 11:12:54 +02:00
Paweł Chmielowski
c3169e9eea Typo 2021-07-20 17:07:40 +02:00
Badlop
c04b6b2908 Update CHANGELOG.md with 21.04 and 21.01 (#3646) 2021-07-19 17:23:50 +02:00
Badlop
937e1c2e37 Add workaround so rebar2 can use Elixir 1.12.0
Notice that Elixir 1.12.0 requires Erlang/OTP 21 or higher
BTW, this workaround works only with rebar2... unfortunately
rebar3 doesn't compile the elixir files from lib/
2021-07-16 16:43:08 +02:00
Badlop
91763bbc61 As Mix config now must be evaluated at runtime, rename to runtime.exs 2021-07-16 13:57:25 +02:00
Badlop
e0c9a6308d erlang:phash is deprecated in OTP 24, let's use phash2 2021-07-16 13:57:08 +02:00
Badlop
e14cd5dd17 Mention in README.md the updated --with-rebar and "make dev" 2021-07-16 13:36:28 +02:00
Badlop
e31919914b Add support to build release with back to old Elixir 1.10.3
However, to build a release with OTP 24 requires Elixir 1.11.4 or higher
2021-07-16 13:36:27 +02:00
Badlop
fcbd72f2d7 Add rebar3 3.15.2
Reference: https://ferd.ca/you-ve-got-to-upgrade-rebar3.html
2021-07-16 13:36:25 +02:00
Badlop
4c5641a648 Add support for mix to: ./configure --enable-rebar=mix 2021-07-16 13:36:23 +02:00
Badlop
1fd452dca9 Update setup-dev.sh to work perfectly both with rebar3 and mix 2021-07-16 13:36:22 +02:00
Badlop
f35d304582 Minor mix.exs definitions copied from the template file 2021-07-16 13:36:20 +02:00
Badlop
8ca12d4d23 Add support to build release with mix 2021-07-16 13:36:19 +02:00
Badlop
72e069d9ec Get ejabberd version from vars.config 2021-07-16 13:36:17 +02:00
Badlop
df8b0cb1a5 Add sql to package files (#3251) 2021-07-16 13:36:15 +02:00
Badlop
a00a11e38a Add vars.config to package files: version and cond_deps use it 2021-07-16 13:36:13 +02:00
Badlop
94949c9617 Sort package files 2021-07-16 13:36:10 +02:00
Badlop
e2aaca7cdd Update mix applications list to fix error "p1_utils is listed as both..." 2021-07-16 13:36:04 +02:00
Badlop
3afaacab76 With the recent changes it seems mod_mix supports 0.14.1 (#3634) 2021-07-15 17:19:32 +02:00
badlop
57be0e38d8
Merge pull request #3634 from lnjX/mix-identity-conf-mix
mod_mix: Use disco identity conference/mix
2021-07-15 17:15:48 +02:00
Paweł Chmielowski
27c69f263c Allow multicast hook registering by host 2021-07-14 13:58:53 +02:00
Badlop
e22ed8081a Provide proper error message when create_room fails with invalid_service 2021-07-13 20:43:52 +02:00
Badlop
5beaf50c67 Fix spec: xmpp:set_from_to/3 allows undefined as second argument 2021-07-13 20:43:44 +02:00
Paweł Chmielowski
a07029dcad Fix previous commit to pass all tests 2021-07-13 17:56:16 +02:00
Paweł Chmielowski
0de6f1c538 Use multicast routing for more packets generated by muc 2021-07-13 16:01:25 +02:00
Badlop
2e2667bbd7 Update documentation: mod_muc ram_db_type supports SQL since 17.04 (#3632) 2021-07-08 12:29:16 +02:00
Badlop
271a9f097d After create_room, store in DB if it's persistent (#3632) 2021-07-08 12:29:13 +02:00
Badlop
7e3276f3a8 Ignore captcha scripts copied by relx after "make dev" 2021-07-08 12:29:03 +02:00
badlop
42fdac0b41
Merge pull request #3639 from McPo/xep0033-bcc-strip-fix
Correctly strip only third-party bcc addresses
2021-07-07 19:07:21 +02:00
Emmet McPoland
509331a563 Correctly strip only other bcc addresses i.e. bcc receiver should still be able to see their bcc address element and no other bcc address element 2021-07-07 16:44:58 +01:00
Badlop
08c2d0a83e Tell relx to include src, so that the tar will contain include/ (#3633)
That's the only way to ensure that tar.gz will contain include/
of ejabberd and its dependencies, which is required to compile
ejabberd-contrib modules with "ejabberdctl module_install ..."
2021-07-06 13:37:14 +02:00
Badlop
bb0c6e1e02 Show messages with next configuration steps when installing a module 2021-07-06 13:37:04 +02:00
badlop
331a67f5f8
Merge pull request #3566 from Robbilie/feature/mqtt-shared-roster-groups-placeholder
allow shared roster group placeholder in mqtt topic
2021-07-06 13:36:41 +02:00
Paweł Chmielowski
e3e4dae583 Yet another dialyzer warning fix 2021-06-28 12:53:30 +02:00
Paweł Chmielowski
b669e4499c Fix dialyzer warning 2021-06-28 12:18:19 +02:00
Paweł Chmielowski
6e900d6a8f Add send_timeout option to listener 2021-06-28 11:31:45 +02:00
Paweł Chmielowski
795addca7d Try to limit serial access when checking api permissions 2021-06-28 11:31:43 +02:00
Badlop
774de2bdc5 Include odbc app in release only when required (#3633) 2021-06-27 17:32:09 +02:00
Badlop
b5b2ad560a Copy captcha scripts in release (#3633) 2021-06-27 17:32:06 +02:00
Badlop
b93fc4333c Let "make dev" always update SCRIPT_DIR in ejabberdctl, even if link exists 2021-06-27 17:32:04 +02:00
Linus Jahn
d7c9809c59
mod_mix: Use disco identity conference/mix
Probably someone has forgotten to update it here.
https://xmpp.org/extensions/xep-0369.html#example-5

Fixes #2901.
2021-06-27 01:20:45 +02:00
Badlop
ac06161f30 There are so many targets... add "make help" 2021-06-25 12:53:47 +02:00
Badlop
0fe2aea709 New "make dev" and "./ejabberdctl" (requires using rebar3) 2021-06-25 12:53:43 +02:00
Badlop
21b021d912 Set SCRIPT_DIR as done by the ejabberd script generated by "rebar3 release" 2021-06-25 12:53:30 +02:00
Badlop
d5adcaea61 Add support for rebar3 to "make rel" 2021-06-25 12:53:22 +02:00
Holger Weiss
9d4c01d425 mod_push_keepalive: Fix 'resume_timeout' docs
The default 'resume_timeout' value is 72 hours, not 72 minutes.
2021-06-25 01:30:10 +02:00
Badlop
ea97be9124 Don't cache rebar3 binaries... compiling is less than 2 minutes anyway 2021-06-21 11:46:10 +02:00
Paweł Chmielowski
2458f55837 Update stringprep in mix 2021-06-18 11:45:18 +02:00
Pouriya
5f8114974f ref: fix WS typos 2021-06-15 15:13:03 +04:30
badlop
1ef9f28f2d
Merge pull request #3622 from pouriya/fix-ws-typos
ref: fix WS typos
2021-06-14 17:21:33 +02:00
Badlop
3ed41e39f6 CI: don't cache dialyzer output file: when there are several, ln fails 2021-06-14 17:20:57 +02:00
Badlop
4ee10c155d Fix reverse order of items when using <before/> in Pubsub with RSM (#3621) 2021-06-14 12:22:37 +02:00
Badlop
c2d8bc7b2f Add mqtt_pub table definition for MSSQL (#3097) 2021-06-14 12:22:21 +02:00
Pouriya Jahanbakhsh
b5bafca640 ref: fix WS typos 2021-06-12 20:27:30 +04:30
Badlop
9a93562b94 Revert luerl from v0.4 which has a compilation warning; v0.3 is enough
Revert "Update luerl dependency from v0.3 to v0.4"

This reverts commit 64f3f3287a.
2021-06-08 19:00:46 +02:00
Badlop
bf8b4acf01 Return proper index when using after of before in PubSub with RSM (#3618)
This fixes Index attribute in examples from:
https://xmpp.org/extensions/xep-0059.html#forwards
https://xmpp.org/extensions/xep-0059.html#backwards
2021-06-08 19:00:44 +02:00
Badlop
41fd2afeb3 Fix index attribute when getting last page from PubSub with RSM (#3618)
This fixes Example 11 from "2.5 Requesting the Last Page in a Result Set":
https://xmpp.org/extensions/xep-0059.html#last
2021-06-08 19:00:41 +02:00
Badlop
4520d5f3c1 Support for simple limiting the number of items in PubSub with RSM (#3618)
This fixes crash in Example 1 from "2.1 Limiting the Number of Items":
https://xmpp.org/extensions/xep-0059.html#limit
2021-06-08 19:00:39 +02:00
Badlop
ccadbf45a2 Get explicitely rebar3 3.15 binary that works with Erlang 21.3 2021-06-07 12:13:22 +02:00
Badlop
2b0d724aef Workaround so coveralls website shows git commit information
References:
https://github.com/markusn/coveralls-erl/pull/36
https://github.com/deadtrickster/prometheus.erl/pull/123
2021-06-06 16:56:29 +02:00
Badlop
9010c35193 CI: Get rebar3 compatible with previous OTP, the one in Ubuntu 20.04 is not 2021-05-28 16:56:05 +02:00
Badlop
2c20414453 Update eredis dependency from v1.0.8 to v1.2.0 2021-05-28 16:54:58 +02:00
Badlop
64f3f3287a Update luerl dependency from v0.3 to v0.4 2021-05-28 16:53:09 +02:00
Badlop
1befa8d8b7 Update lager dependency from 3.6.10 to 3.9.1 to make Dialyzer happy 2021-05-28 16:51:59 +02:00
Holger Weiß
3b5ddf0254
mod_muc_room: Don't leak owner JIDs (#3615)
Avoid publishing room owner JIDs (via the muc#roominfo form) without
their explicit consent.

Closes #3609.
2021-05-28 16:43:49 +02:00
Badlop
33fd45a960 Remove .travis.yml as it's superseded by ci.yml (#3613) 2021-05-25 19:16:06 +02:00
Badlop
77ef03e104 New ci.yml with all static and dynamic testing suites (#3613)
It supports all that was already in .travis.yml and tests.yml, plus:
- exclude paths that don't affect source code
- two very distinct scenarios, ancient a recent (OTP, Rebar, Ubuntu)
- cache binaries and dialyzer for small speedup and network usage
- separated results, to view comfortably where and what failed
- use coveralls example rebar3 code, instead of custom rebar2
- upload binaries.zip that can be used with Binary Installers
2021-05-25 18:45:31 +02:00
Badlop
70640e71f1 Remove tests.yml github workflow, a new reworked one is coming (#3613) 2021-05-25 18:40:28 +02:00
Badlop
1ee64091b3 Fix extauth.py failure in test suite with Python 3 (#3612) 2021-05-25 18:39:18 +02:00
Nikat
7b33499811
MySQL Backend Patch for scram-sha512 (#3582)
* Update mysql.new.sql

scram-sha512 does not work, because serverkey is longer, then that array. All passwords was unhashed.

* Update mysql.sql
2021-05-20 13:32:50 +02:00
Badlop
d94bae241c Align numbers in WebAdmin tables to the right 2021-05-19 15:00:22 +02:00
Badlop
58a623778f Show uptime date in WebAdmin, it's easier to understand that uptime seconds 2021-05-19 15:00:19 +02:00
Badlop
494ba9a635 Show mnesia table memory in bytes, not in words 2021-05-19 15:00:16 +02:00
Paweł Chmielowski
95fa43aa96 Add missing indexes to sql sr_group tables 2021-05-18 18:29:32 +02:00
Badlop
16af8a4739 New simple webadmin pages to view mnesia tables information and content 2021-05-17 16:16:26 +02:00
Badlop
57202d958a Use G macro name for tag, as T overlapped T from translation 2021-05-17 16:14:39 +02:00
Badlop
d741f6f5f2 Update documentation references for import_prosody and export2sql 2021-05-14 16:07:03 +02:00
Badlop
20b4deffe3 Apply improvement from 29462f005 to delete/2, and fix delete/3 (#3564) 2021-05-14 16:06:59 +02:00
Badlop
ee3796b925 When exporting for SQLite, use its specific escape options (#2576) 2021-05-14 16:06:43 +02:00
Badlop
8e08703833 Tell io_lib:print to not care about line length, to avoid newlines in SQL export 2021-05-14 16:06:39 +02:00
Paweł Chmielowski
3b716d2cb0 Update econf:vcard() to generate correct vcard_temp record 2021-05-12 21:46:36 +02:00
Paweł Chmielowski
0f51a03d08 Update xmpp to bring updated vcard 2021-05-12 18:05:11 +02:00
Mickaël Rémond
20247af6f6
Use the new Github container registry 2021-05-12 11:51:40 +02:00
Mickaël Rémond
2698024b82
Use latest version of the container
This is the only image available for now
2021-05-12 11:22:45 +02:00
Mickaël Rémond
a142dc4b11
Remove set up already set in prebuilt image 2021-05-12 11:17:26 +02:00
Mickaël Rémond
2844a2d73e
Use a prebuilt image 2021-05-12 11:16:46 +02:00
Badlop
160cd11c83 Minor fixes for new_sql_schema support in SQLite (#3303) 2021-05-11 18:36:16 +02:00
Badlop
4fdebd296a Document that update_sql command only supports postgresql (#3439) 2021-05-11 18:36:14 +02:00
Badlop
b18f622984 Use the deps versions defined in rebar.config, not the latest available 2021-05-11 18:36:11 +02:00
Badlop
f61607df65 Don't add ejabberd version in API page either, following 3e4ebfae7 2021-05-11 18:36:08 +02:00
Mickaël Rémond
5d0c0eb03d Expose port label 2021-05-11 09:00:44 +00:00
Mickaël Rémond
ef1d9a0723 Ignore basic Mnesia directory 2021-05-11 08:32:44 +00:00
Mickaël Rémond
5465e7ed2f Forward XMPP legacy SSL and MQTT ports 2021-05-11 08:29:38 +00:00
Mickaël Rémond
7edd9e3766 Install Erlang and Elixir VSCode extensions as default 2021-05-11 08:06:44 +00:00
Mickaël Rémond
7a6425544c Remove file syntax deprecation 2021-05-11 08:06:16 +00:00
Mickaël Rémond
97e7f25e6e
Merge pull request #3595 from processone/codespaces
Codespaces
2021-05-11 09:50:46 +02:00
Badlop
916653e234 Cast as boolean when exporting privacy_list_data to PostgreSQL (#1773) 2021-05-10 12:04:52 +02:00
Badlop
6db228fcb3 Document that sql_ssl can be used with MySQL too 2021-05-05 11:57:08 +02:00
Badlop
c2821be94c Use the new 'note' field to annotate changes in 20.01..21.03 2021-05-05 11:57:05 +02:00
Badlop
999d0af502 New 'note' field in commands and options documentation 2021-05-05 11:57:02 +02:00
Paweł Chmielowski
78c09789f7 Fix invalid_encoding error when using extended plane characters in vcard. 2021-04-29 14:21:37 +02:00
Paweł Chmielowski
5a8f1ca528 Display extender error message in ejabberdctl
This for example makes error from register explain what account
can't be registered

For reference https://github.com/processone/ejabberd/discussions/3584
2021-04-22 11:56:58 +02:00
badlop
2d38d48a55
Merge pull request #3578 from tappytaps/srg-cache-fix
Fixed srg_create params and shared roster groups cache issues
2021-04-20 21:22:25 +02:00
Jindrich Sarson
dcc5d8704f delete cache after performing change to be sure that in cache will be up to date data 2021-04-17 19:07:21 +02:00
Jindrich Sarson
c10e4fa275 update srg_create API to use label parameter instead of name 2021-04-17 18:49:26 +02:00
Paweł Chmielowski
e462f0a584 Fix dialyzer warnings 2021-04-16 11:55:48 +02:00
Paweł Chmielowski
45bbbd0284 Fix syntax not recognized by older erlang 2021-04-16 10:46:28 +02:00
Paweł Chmielowski
5b0f0d8352 Improve database and caching in mod_shared_roster
This makes us keep cache of groups that use wildcards no matter
of cache settings, and tries to not same fetch data multiple times
in roster get operations.
2021-04-16 10:34:32 +02:00
Paweł Chmielowski
54916caf65 Use proper source for cache options in mod_shared_roster 2021-04-16 10:20:13 +02:00
Paweł Chmielowski
c8afb5ceb6 Reconfigure cache in mod_shared_roster when options change 2021-04-16 10:19:09 +02:00
Badlop
b3374e1f99 Remove SMP option from ejabberdctl.cfg, -smp was removed in OTP 21 (#3560) 2021-04-15 20:28:43 +02:00
Badlop
4914b33f8c Support the recent changes in the "ejabberdctl help" command (#3569) 2021-04-15 20:25:54 +02:00
Badlop
0ec69f0279 Major changes in ejabberdctl help output (#3569)
ejabberdctl: show list of commands
ejabberdctl some-command: if wrong number of arguments, shows command help
ejabberdctl help: show explanation of how to use "help"
ejabberdctl help tags: list tags with list of commands
ejabberdctl help commands: list tags with commands details
ejabberdctl help whatever*: filters commands and tags
2021-04-15 20:25:52 +02:00
Badlop
6f565147cb Change tag name because there's already a command called "stats" 2021-04-15 20:25:49 +02:00
Badlop
f8a02f5d9d Get the arguments definition from the record (#3569)
This fixes "ejabberdctl help help"
2021-04-15 20:25:47 +02:00
Badlop
327dc31e62 Copy a change from include file available since OTP 17.0
See:
5e575f6562
2021-04-15 20:25:44 +02:00
Mickaël Rémond
f77a163341
Update bug_report.md 2021-04-15 15:30:23 +02:00
Mickaël Rémond
c280d172b1
Update feature_request.md 2021-04-15 15:30:06 +02:00
Badlop
b860a25c82 When using OTP 24.0, use the new 'application' record definition (#3568)
This fixes "ejabberdctl update_list", "update", and the equivalent feature
on ejabberd's WebAdmin that got broken when using Erlang/OTP 24
2021-04-14 17:12:08 +02:00
Mickaël Rémond
ab2b499869
Update devcontainer.json 2021-04-13 10:25:05 +02:00
Mickaël Rémond
0a55e07326 Use Dockerfile 2021-04-13 08:24:01 +00:00
Mickaël Rémond
22cc7cedff Use Dockerfile 2021-04-12 09:54:06 +00:00
Mickaël Rémond
cdbfd91ec4
Update devcontainer.json
Disable docker compose for now
2021-04-12 11:45:59 +02:00
Mickaël Rémond
9359bab677
Create docker-compose.yml 2021-04-12 11:44:10 +02:00
Robert Schuh
0e93f70e38 allow shared roster group placeholder in mqtt topic 2021-04-08 23:21:15 +02:00
Holger Weiss
10905b0447 mod_push: Handle MUC/Sub events correctly
Unwrap MUC/Sub messages so that our check for a message body yields the
correct result.

Many thanks to Robert Schuh for pointing out the issue and suggesting a
fix.

Closes #3565.
2021-04-08 19:36:16 +02:00
Jérôme Sautret
4468c87115 Set version to 21.04 2021-04-07 17:23:30 +02:00
Badlop
4b83ec1204 New Albanian translation (thanks to Besnik Bleta) 2021-04-07 16:01:28 +02:00
Paweł Chmielowski
03e62308e2 Update deps in mix 2021-04-07 12:14:58 +02:00
badlop
c0dafc074d
Merge pull request #3558 from fdie/fix_node_get_state_return_value
fix gen_pubsub_node:get_state return value
2021-03-29 15:52:04 +02:00
Badlop
3bb89010fe Recompile man page with "ejabberdctl man" 2021-03-26 11:05:49 +01:00
Badlop
3e4ebfae7e Revert "Add ejabberd version number to man pages"
That versioning just added noise to the git log in each release.
This reverts commit aa0ed37034.
2021-03-26 11:01:45 +01:00
Badlop
c64df48978 Run "make translations", and *.msg get a warning to not edit them manually 2021-03-26 10:50:06 +01:00
Badlop
1c74bb7131 Update Japanese translation (thanks to Mako N) 2021-03-26 10:48:00 +01:00
Badlop
f577715468 Update Greek translation (thanks to Michalis and Stratos Kostidis) 2021-03-26 10:47:13 +01:00
Badlop
1cd4f730b9 Update Esperanto translation (thanks to phlostically) 2021-03-26 10:46:48 +01:00
fdie
edae3c9cc5 fix gen_pubsub_node:get_state return value 2021-03-25 14:32:24 +01:00
Badlop
815030a4f0 I think no need to be so strict in mix dependencies versions 2021-03-24 23:03:53 +01:00
Badlop
82bd7e5d5b Update rebar dependencies 2021-03-24 23:03:46 +01:00
Badlop
453d504fb7 No need to ignore ejabberd.app.src, it was recently removed, see 3c16f214 2021-03-19 15:13:20 +01:00
Badlop
627564983b No need to ignore XmppAddr*, it was removed in 2018, see 0bb14d16 2021-03-19 15:13:18 +01:00
Badlop
7e8b59a0aa No need to ignore extract_translations, it was removed in 2017, see cd098c5a 2021-03-19 15:13:15 +01:00
Badlop
9bf37d7fdf No need to ignore doc/, it was removed in 2015! See 1854b5e4 2021-03-19 15:13:04 +01:00
Badlop
02830a8b76 Tell git to ignore .deps-update/ used by tools/update-deps-releases.pl 2021-03-19 15:12:52 +01:00
Badlop
d8f01080ce Cache rebar2 deps/ dir in Travis for a 10% speedup approx. 2021-03-19 15:12:50 +01:00
Badlop
1f88a26f60 When unregistering XMPP account close its MQTT sessions (#3426) 2021-03-19 15:12:48 +01:00
Badlop
c6f2d0c3eb Improve wording of sql_pool_size option documentation (#2541) 2021-03-19 15:12:43 +01:00
Badlop
13e1307ab1 When occupant is banned, remove his subscriptions too (#2451) 2021-03-18 16:15:17 +01:00
Badlop
f6c6ff561a Document that send_stanza_c2s requires an existing sender C2S session 2021-03-18 16:15:07 +01:00
Badlop
c4d45ec08c Revert "Close pgsql ports on ejabberd_sql process termination (#2541)"
This reverts commit 404ae56e07.
2021-03-18 16:14:49 +01:00
Holger Weiss
7008ae231c Don't fail on PEP unsubscribe
Don't crash if a PEP node is explicitly unsubscribed.  This fixes a
regression introduced by 45eb49125b.

Thanks to Melvin Keskin for reporting the bug.
2021-03-16 17:26:47 +01:00
Badlop
14c8e1226f Generate enabled_backends in ejabberd.app instead of configure (#3549)
Passing a list of atoms in vars.config.in (introduced in 3c16f214)
breaks rebar2 in "make rel"
2021-03-15 10:11:05 +01:00
Badlop
8b78d27f30 Update Elixir logger, so logging should work now 2021-03-12 20:50:54 +01:00
Badlop
2fbd447f64 Update gitignore for Elixir, mnesiadb/ was renamed to database/ in ef6af11f1 2021-03-12 20:50:51 +01:00
Badlop
14d82fa600 Add mod_doc/0 to mod_presence_demo.ex so compiler stops complaining 2021-03-12 20:50:49 +01:00
Badlop
33fc320f1d Update jiffy and epam to fix compilation (#3413) 2021-03-12 20:50:46 +01:00
Badlop
9fbea40721 Sort dependencies alphabetically, it makes manual checking easier 2021-03-12 20:50:44 +01:00
Badlop
9525978f26 Fix INTRUDER and add padding to second text line
b41ce8828c (r47461104)
2021-03-12 20:50:41 +01:00
badlop
75a4e23996
Merge pull request #3458 from nosnilmot/sqlite3-macos
Remove external dependency on sqlite3 for macos
2021-03-09 01:18:00 +01:00
Badlop
404ae56e07 Close pgsql ports on ejabberd_sql process termination (#2541) 2021-03-09 00:58:36 +01:00
Badlop
2946df357c Update FORM_TYPE from captcha to register (#3045) 2021-03-09 00:58:31 +01:00
Badlop
5318bf3743 If stanza is type error, allow it passing (#3290) 2021-03-09 00:58:22 +01:00
Badlop
0f43c2c528 New command get_user_subscriptions (#3403) 2021-03-09 00:57:41 +01:00
Badlop
b5da0ffd7e Show in WebAdmin the erlang node where the room resides
https://www.ejabberd.im/forum/29687/muc-mangement#comment-67685
2021-03-09 00:57:35 +01:00
Badlop
7ee018ad23 Obtain and provide photo type in vCard LDAP (#3541) 2021-03-08 16:33:30 +01:00
Badlop
31884f6c9d Fix remove_mam_for_user_with_peer when removing room archive (#3536) 2021-03-08 16:33:23 +01:00
Badlop
c46bf7d56b Remove support for HiPE, it was experimental and Erlang/OTP 24 removes it 2021-03-08 16:33:16 +01:00
Badlop
1b155ed6e7 Add --enable-lua, and use that for luerl instead of --enable-tools (#3508)
--enable-tools is for development tools, but prosody2ejabberd is used at
runtime, so better move luerl to --enable-lua
2021-03-08 16:33:06 +01:00
Badlop
e648cd7397 Sort libraries alphabetically, so they're easier to check manually 2021-03-08 16:33:03 +01:00
Badlop
3c248745e5 crypto:hmac is removed in Erlang/OTP 24, use our wrapper 2021-03-04 16:41:27 +01:00
Badlop
c45b526ec3 Update sql_query record to handle the Erlang/OTP 24 compiler reports
As mentioned in the Erlang/OTP 24 announcement:
"Compiler warnings and errors now include column numbers
in addition to line numbers."
2021-03-04 16:41:24 +01:00
Badlop
bf1600891b Get back description and simplify processing (#3507) 2021-03-04 16:41:22 +01:00
Badlop
b139eb2fb3 Tell git to ignore rebar.lock used by rebar3 2021-03-04 16:41:19 +01:00
Badlop
9bd4f60c8a Added badges for github actions, coveralls.io and weblate 2021-03-04 16:41:15 +01:00
Paweł Chmielowski
ca5d5f3b4c Use monitors to track muc rooms
This should prevent keeping rooms that were hard killed from in
online table.
2021-03-03 11:32:05 +01:00
badlop
7209486386
Merge pull request #3507 from slezakattack/master
Allow ejabberd to be compatible as a dependency for an Erlang project…
2021-03-02 19:01:33 +01:00
Badlop
bb8bdf57b3 New Github Actions workflow to test Dialyzer, Xref, Options and Hooks 2021-02-23 19:45:53 +01:00
Badlop
c8bec07c45 Clone to the dir specified in rebar.config... useful for erlang-sqlite3 2021-02-23 19:45:41 +01:00
Holger Weiß
b41ce8828c
Add question/answer-based CAPTCHA script (#3533)
* New captcha.sh question/answer based

* Keep original CAPTCHA script

Rather than replacing the original CAPTCHA script, keep it next to the
new one, for the moment.

* CAPTCHA-ng script cleanup

* remove various bashisms
* replace all echos with printf
+ add quotations to many variables

Co-authored-by: Adrien Bourmault <neox@os-k.eu>
Co-authored-by: nico wellpott <nico@magicbroccoli.de>
2021-02-22 09:34:02 +01:00
Badlop
3720b42b0f When using rebar3, "make dialyzer" needs just a single call 2021-02-19 17:00:39 +01:00
Badlop
69be0abdba Fix Dialyzer warning about function contract that changed in fad14ff31 2021-02-19 17:00:35 +01:00
Badlop
09f5e2aa03 Improve support for rebar3 in "make translations" 2021-02-19 17:00:32 +01:00
Paweł Chmielowski
7da033f733 Fix muc tests 2021-02-17 13:09:29 +01:00
Paweł Chmielowski
14871c54ac Take in account subscriber's affiliation when checking access to moderated room
This should fix issue #3525
2021-02-17 10:45:30 +01:00
Michael Slezak
3c16f21413 Allow ejabberd to be compatible as a dependency for an Erlang project using rebar3 2021-02-16 10:28:30 -07:00
Paweł Chmielowski
14d87cb5e9 Skip reading roster in one more case in mod_caps 2021-02-16 13:39:34 +01:00
Badlop
72ecf91f08 Return modules errors in set_vcard callback (#3502) 2021-02-16 13:09:33 +01:00
Badlop
4bc57f76eb make hooks and options work with rebar3 too 2021-02-16 13:09:30 +01:00
Badlop
18c9f5eedf Create annotated tags, meant for releases, instead of lightweight (#3512) 2021-02-16 13:09:27 +01:00
Badlop
4495f0f0b9 For OTP<22 define LAGER macro in ext_mod like in rebar.config (#3493) 2021-02-16 13:09:21 +01:00
Paweł Chmielowski
fad14ff319 Make fetching roster in mod_privacy lazy 2021-02-16 10:57:55 +01:00
Paweł Chmielowski
8cb7ff7a88 Add fallback branch to last commit 2021-02-16 10:40:35 +01:00
Paweł Chmielowski
96929a5084 Don't request roster in mod_caps when not needed 2021-02-16 10:13:29 +01:00
Stu Tomlinson
1f194e417d
fix eldap certificate verification (#3528)
Reported in #3527. Add hostname matching function, and specify SNI

Also, OTP 23 dropped backwards compatibility for 0, 1, 2 values for verify, so
replace with combination of verify_none/verify_peer and fail_if_no_peer_cert
as appropriate
2021-02-15 14:29:58 +01:00
Badlop
e3fd120fd4 According to fast_tls, only atom and binary may accompany error tuple 2021-02-11 20:38:51 +01:00
Badlop
7b8bd960c6 Fix URL of CAPTCHA section 2021-02-11 20:38:45 +01:00
Paweł Chmielowski
d147c733bb Update xmpp 2021-02-10 10:10:24 +01:00
Paweł Chmielowski
3d7fa15be7 Add argument guards to roster commands 2021-02-09 13:46:23 +01:00
Stu Tomlinson
6a0b01fe7f
Move sql directory from extra_src_dirs to src_dirs (#3520)
rebar3 needs sql directory as a src dir so that tests can reference sql
files, so sql dir was added to extra_src_dirs in d9c1befb. It turns out
extra_src_dirs does unexpected unwanted extra things like copy all beam
files there too, so move sql dir to regular src_dirs
2021-02-08 13:02:50 +01:00
Frank
2d79a69719
Fix PONG responses (#3515)
Co-authored-by: Frank Diebolt <frank.diebolt@al-enterprise.com>
2021-02-04 19:57:20 +01:00
Badlop
a51e777c56 Try to fix coveralls report in Travis, related to commit 2f3f6f8b7 2021-02-04 11:27:47 +01:00
Badlop
1c3a7b7c96 Use the mysql service available in Travis
Xenial in Travis nowadays includes mysql 5.7
Reverted "Let Travis grab MySQL 5.6 from repo.mysql.com"
Reverted "Use static key for mysql repo" and related ones
2021-02-02 19:03:14 +01:00
Badlop
26ee3141a9 Improve prepare-tr so *.msg files inform to not edit them (#3484) 2021-02-02 18:58:36 +01:00
Badlop
75c0443df2 Test against newest 23.1.2, and remove useless intermediate 22.3 2021-02-02 18:58:32 +01:00
Marek
5eab8450e7
New listener for encrypted ejabberd_c2s
Add a new listener on port 5223 for the TLS-enabled ejabberd_c2s, which combined with proper SRV records allows passing the XEP-0368 compliance test.
2021-02-02 15:25:19 +01:00
Divine
22d76bd1a4
Fix specified key was too long (#3513)
* Fix specified key was too long

This adds the correct engine and sets it to utf8mb4 collate. Prevents "Specified key was too long; max key length is 1000 bytes" from happening.

* Make two import SQL files consistent 

As suggested by @prefiks
2021-02-01 22:50:33 +01:00
Badlop
bb397bb424 Fix bug handling jid:decode/1 return, introduced in cdb286d1d (#3461) 2021-02-01 00:10:33 +01:00
Badlop
b3d9c0d1f7 Fix bug in send_message introduced in 7fc500dae (#3485) 2021-02-01 00:09:18 +01:00
Badlop
d3aeed839d Fix MAM tests that now fail due to commit d6e9e0342 (#3506) 2021-02-01 00:09:10 +01:00
Badlop
c0b364839c Fix typo in Weblate URL 2021-02-01 00:08:22 +01:00
Holger Weiss
6a6b771e0b mod_mam: Add missing semicolon 2021-01-29 20:27:07 +01:00
Holger Weiss
58e28e82bb Merge remote-tracking branch 'processone/pr/3506'
* processone/pr/3506:
  Remove queryid from MAM fin element
2021-01-29 19:25:40 +01:00
Paul Fariello
d6e9e03422 Remove queryid from MAM fin element
According to xep, fin element is not supposed to have a queryid attribute.
2021-01-29 19:21:45 +01:00
Jerome Sautret
fca41796c0 Fix version number 2021-01-29 16:00:35 +01:00
Jerome Sautret
b1fec7dc29 Bump version in mix.exs 2021-01-29 10:01:29 +01:00
Paweł Chmielowski
8c5b312601 Add cache for displayed groups in ldap_shared_cache
This is based on pull request by Ivan Agarkov:
 https://github.com/processone/ejabberd/pull/952
2021-01-28 12:57:47 +01:00
Paweł Chmielowski
ee3ecc6cc0 Update mix deps 2021-01-28 11:04:53 +01:00
Paweł Chmielowski
f708bbe2e8 Update deps 2021-01-28 10:42:16 +01:00
Paweł Chmielowski
f7004f793d Fix delete_old_message when using sqlite spool table
This fixes issue #3503
2021-01-27 19:41:21 +01:00
Badlop
5c3b3d22db Other minor translation updates 2021-01-27 18:18:18 +01:00
Badlop
cfd1c710f2 Update Chinese translation (thanks to Shelley Shian) 2021-01-27 18:18:15 +01:00
Badlop
601a61249e Update Portuguese (Brazil) translation (thanks to Wellington Terumi Uemura) 2021-01-27 18:17:56 +01:00
Badlop
8180b6b54e Update Norwegian Bokmål translation (thanks to Allan Nordhøy) 2021-01-27 18:13:58 +01:00
Badlop
a260270483 Update Indonesian translation (thanks to Uira) 2021-01-27 18:12:26 +01:00
Badlop
9b9a2d380b Update German translation (thanks to Maximilian Trummer) 2021-01-27 18:10:08 +01:00
Badlop
5ec8cf9e09 Document the recent oauth_cache_rest_failure_life_time option 2021-01-27 17:44:17 +01:00
Badlop
248d8b8aff Update ejabberd man file (#3490) 2021-01-27 17:25:46 +01:00
Badlop
f1fe3ce5dc Remove old and obsolete win32/ (#3487) 2021-01-27 17:11:00 +01:00
Badlop
5eb766e2d2 Remove old and obsolete examples/transport-configs/ (#3487) 2021-01-27 17:10:56 +01:00
Badlop
6e0161470e Update newest copyright year to 2021 (#3464) 2021-01-27 17:02:06 +01:00
Paweł Chmielowski
e4225174d5 Update deps to tagged versions 2021-01-27 11:43:33 +01:00
Paweł Chmielowski
faaee94060 Add oauth_cache_rest_failure_life_time option
This allows to use shorted life time for failures in rest oauth
backend than specified in oauth_cache_life_time.
2021-01-27 11:23:39 +01:00
Paweł Chmielowski
3516d2053c Add 'ejabberdctl foreground-quiet'
This starts ejabberd without detaching process but setups
console logging to display only critical messages.
2021-01-27 09:24:05 +01:00
Paweł Chmielowski
b977320091 Don't fetch subscribers list in room_unused_* 2021-01-26 11:13:23 +01:00
Paweł Chmielowski
bb87b6f948 Rename function arguments 2021-01-25 20:00:07 +01:00
Paweł Chmielowski
07d28c3898 Skip reading pep nodes that we know won't be requested due to caps 2021-01-25 19:58:38 +01:00
Holger Weiss
6c2bd91f01 ejabberd_stun: Block loopback addresses by default
Don't accept loopback addresses as TURN peers by default.  This makes
sure the TURN service won't allow remote clients to access local UDP
services.

However, this will break the case where the 'turn_ipv4_address' was set
to 127.0.0.1 as fallback and TURN worked "by accident" if both clients
were using the same TURN service.  The service then talked to itself on
the loopback interface.
2021-01-22 16:20:24 +01:00
Holger Weiss
b6f86187f3 Update 'stun' dependency
The 'stun' application now rejects Teredo and 6to4 TURN peers
unconditionally.  Therefore, remove those networks from the default
'turn_blacklist'.
2021-01-22 16:12:48 +01:00
Badlop
8098b83114 Revert "mod_register language reworked"
This reverts commit 3906b5300c.

# Conflicts:
#	src/mod_register_web.erl
2021-01-22 14:23:05 +01:00
Badlop
e4155b6f16 Revert "ejabberd_oauth language reworked"
This reverts commit 3d1efd14dc.
2021-01-22 14:23:02 +01:00
Badlop
50ebe2e415 Revert "mod_roster language reworked"
This reverts commit 72cf63c0a8.
2021-01-22 14:22:59 +01:00
Badlop
adfcbfdcba Fix URL of ejabberd_po, use the final one 2021-01-22 13:39:02 +01:00
Badlop
cfdd3aa4f8 Those gettext PO files are now available in the new ejabberd_po repository 2021-01-22 13:32:07 +01:00
Badlop
0b55ded612 When running "make translations" use the external ejabberd_po repository 2021-01-22 13:16:42 +01:00
Jing Sun
5af7532504
mod_muc/mod_muc_room: add option limits for password and captcha_whitelist (#2255) 2021-01-21 16:58:05 +01:00
Paweł Chmielowski
e0101338af Let's update xmpp once more 2021-01-21 16:27:24 +01:00
Paweł Chmielowski
6efdbb17e4 Revert "Update xmpp"
This reverts commit a4b06df604.

Needs more work, breaks some tests.
2021-01-21 15:25:10 +01:00
Paweł Chmielowski
5212b0aaa6 Validate affiliations in set_room_affiliation command 2021-01-21 14:20:30 +01:00
Paweł Chmielowski
a4b06df604 Update xmpp
This brings memory usage optimization for detached sessions
2021-01-21 13:44:07 +01:00
badlop
c5f0dc6e5b
Merge pull request #3488 from comradekingu/patch-3
mod_roster language reworked
2021-01-18 13:32:21 +01:00
Allan Nordhøy
72cf63c0a8
mod_roster language reworked 2021-01-16 09:17:44 +01:00
Badlop
bc08e75f75 Update Greek translation (thanks to rafaila42)(#3484) 2021-01-15 19:02:40 +01:00
badlop
9b1da6f5f5
Merge pull request #3486 from comradekingu/patch-2
ejabberd_oauth language reworked
2021-01-15 17:52:33 +01:00
Badlop
2c06f48b6b Update Greek translation (thanks to rafaila42)(#3484) 2021-01-14 13:25:47 +01:00
Allan Nordhøy
3d1efd14dc
ejabberd_oauth language reworked 2021-01-14 10:21:07 +01:00
Paweł Chmielowski
7fc500dae6 Don't include empty <subject/> in messages sent by send_message
Please refer issue #3485
2021-01-13 20:58:13 +01:00
Badlop
b6d90cc55c Allow non-occupant non-subscribed service admin send private MUC message (#3474) 2021-01-13 16:49:45 +01:00
Badlop
e1a79ba1b0 Run "make translations" 2021-01-13 16:20:58 +01:00
badlop
d01cd2976b
Merge pull request #3483 from weblate/weblate-ejabberd-ejabberd
Translations update from Weblate
2021-01-13 16:19:31 +01:00
Allan Nordhøy
f98453fd28 Update Norwegian Bokmål translation
Currently Norwegian Bokmål translated at 49.5% (326 of 658 strings)
141 fuzzy + 191 not translated = 332 remaining

https://hosted.weblate.org/projects/ejabberd/ejabberd/nb_NO/
2021-01-13 16:18:21 +01:00
uira
1b559daef2 Update Indonesian translation
Currently Indonesian translated at 57.1% (376 of 658 strings)
80 fuzzy + 202 not translated = 282 remaining

https://hosted.weblate.org/projects/ejabberd/ejabberd/id/
2021-01-13 16:18:21 +01:00
Allan Nordhøy
db7197925c Update Norwegian Bokmål translation
Currently Norwegian Bokmål translated at 45.4% (299 of 658 strings)
129 fuzzy + 230 not translated = 359 remaining

https://hosted.weblate.org/projects/ejabberd/ejabberd/nb_NO/
2021-01-13 16:18:21 +01:00
Licaon Kter
8232fb767c New Romanian translation
https://hosted.weblate.org/projects/ejabberd/ejabberd/ro/
2021-01-13 16:18:21 +01:00
Badlop
59d5cf4d47 Uniformize terms create->register, delete->unregister (#3482) 2021-01-13 16:12:00 +01:00
badlop
aff1a62607
Merge pull request #3482 from comradekingu/patch-1
mod_register language reworked
2021-01-13 15:57:29 +01:00
badlop
ea253ba914
Merge pull request #3480 from Neustradamus/git
Remove .git ending from links
2021-01-13 15:53:32 +01:00
Paweł Chmielowski
95c157409b Fix handling of log_rotate_size: infinity
This should fix issue reported in #3462
2021-01-13 11:48:46 +01:00
Allan Nordhøy
3906b5300c
mod_register language reworked 2021-01-13 09:35:36 +01:00
Neustradamus
34f9eaa8e9 Remove .git ending from links
Remove .git ending from links
2021-01-13 03:22:41 +01:00
Badlop
83cea3c23e Mention gettext and weblate to update translations 2021-01-12 18:33:27 +01:00
J. Lavoie
f96502607d Update French translation
Currently French translated at 70.0% (461 of 658 strings)
72 fuzzy + 125 not translated = 197 remaining

https://hosted.weblate.org/projects/ejabberd/test-ejabberd/fr/
2021-01-12 13:15:14 +01:00
Badlop
1f492a4c8a Update Catalan translation 2021-01-12 13:01:03 +01:00
Badlop
557b9858c6 Update translatable, and translated strings 2021-01-11 21:15:13 +01:00
Badlop
50f74c932b Replace Jabber->XMPP and Ejabberd (thanks to Neustradamus)(#3469) 2021-01-11 21:11:20 +01:00
Paweł Chmielowski
446cb485ac Don't use REPLACE for upsert when there are "-" fields.
This should fix problem reported in #3476
2021-01-11 14:20:17 +01:00
Badlop
402b301eb5 Update Spanish translation 2021-01-11 13:14:41 +01:00
Badlop
3a371bfbe5 Run "make translations" 2021-01-11 13:11:14 +01:00
Badlop
a670451447 Apply cosmetic changes from documentation 2021-01-08 18:34:38 +01:00
Paweł Chmielowski
9be3d948b2 Make ext_mod compile module with debug_info flags
This should fix issue #3472
2021-01-07 15:10:39 +01:00
Paweł Chmielowski
d9588feae5 Add sql script to migrate mysql from old schema to new 2021-01-07 13:54:53 +01:00
Holger Weiss
7844d86ea3 Allow for listening on privileged ports
Let systemd give ejabberd the capability to bind to ports below 1024.
2021-01-06 18:56:08 +01:00
Holger Weiss
e919171393 ejabberd_systemd: Fix comment 2021-01-06 18:52:22 +01:00
Holger Weiss
d7087c3952 Merge remote-tracking branch 'processone/pr/3471'
* processone/pr/3471:
  Integrate nicely with systemd
2021-01-06 18:47:25 +01:00
Neustradamus
3bf51a0994
+ ejabberd mucroom logs (#3468)
+ ejabberd mucroom logs
2021-01-06 17:33:29 +01:00
Holger Weiss
6f026ca26d Integrate nicely with systemd
Support systemd's watchdog feature and enable it by default in the unit
file, so that ejabberd is auto-restarted if the VM becomes unresponsive.
Also, set the systemd startup type to 'notify', so that startup of
followup units is delayed until ejabberd signals readiness.  While at
it, also notify systemd of configuration reload and shutdown states.

Note: "NotifyAccess=all" is required as long as "ejabberdctl foreground"
runs the VM as a new child process, rather than "exec"ing it.  This way,
systemd views the ejabberdctl process itself as the main service
process, and would discard notifications from other processes by
default.
2021-01-06 00:20:12 +01:00
Neustradamus
4132aedb9c
XEP-0033 (#3467)
XEP-0033
2021-01-05 10:05:42 +01:00
Badlop
b8178c79a7 Clarify documentation of log_rotate_size option (#3462) 2021-01-04 13:05:28 +01:00
Paweł Chmielowski
aefe3f8585 Document ldap_userjidattr option 2020-12-31 10:30:12 +01:00
ethoms
cdb286d1d1
Add multi-domain support (and flexibility) to LDAP shared roster (rev2). (#3461) 2020-12-31 10:19:43 +01:00
Pouriya
c056002f7c
JWT enhancement (#3460)
* ref: run the default JWT verifier as hook callback

* ref: add system timestamp to JWT debug log
2020-12-28 10:06:45 +01:00
Stu Tomlinson
1f60f5d8af Remove external dependency on sqlite3 for macos
On macos, erlang-sqlite3 is built using amalgamated sqlite3 library, there is
no external sqlite3 dependency required
2020-12-23 12:41:13 +00:00
Paweł Chmielowski
bd08f408ca Fix invalid timezone in mod_time (issue #3454) 2020-12-22 11:37:25 +01:00
Badlop
3cf5ceb106 Document that the workaround is only needed for OTP lower than 23.2 2020-12-18 21:21:27 +01:00
Badlop
705f401961 Fix a pair of pubsub specs to please Dialyzer 2020-12-18 20:40:26 +01:00
Badlop
ac24d6ee9f Fix typo in case clause detected by Dialyzer 2020-12-18 20:40:17 +01:00
Paweł Chmielowski
cb6322a3a7 Add option to check for missing hex releases to update script 2020-12-18 16:43:20 +01:00
Paweł Chmielowski
9c221848d7 Correctly sort mixed versions vX.Y and X.Y in update-deps script 2020-12-18 16:42:41 +01:00
Stu Tomlinson
2f3063def6
Fix sqlite3 dependency version (#3452)
erlang-sqlite3 versions got messed up, causing ejabberd build to regress
to 1.1.6 from Jan 2018 when using rebar3 which fails to build with OTP23.
Update to correctly tagged version 1.1.9, which also has matching hex.pm
package, fixes this.
2020-12-18 12:42:18 +01:00
Paweł Chmielowski
9f851008f6 Update spec for get_room_pid 2020-12-18 12:36:31 +01:00
Badlop
1b7502acbc Old passwd scram tuples do not conform to current records definitions 2020-12-18 10:54:59 +01:00
Paweł Chmielowski
2ab7da1e8f Use better fallback value for room activity time when skipping room in decide_room 2020-12-17 09:55:12 +01:00
Mickaël Rémond
371c0777bb
Update Dockerfile 2020-12-16 08:40:30 +01:00
Mickaël Rémond
538eeb3d6f
Create Dockerfile 2020-12-16 08:40:05 +01:00
Mickaël Rémond
8d052fe339
Create devcontainer.json 2020-12-16 08:32:15 +01:00
Licaon_Kter
65c5208905
Reword auth_scram_hash info (#3448) 2020-12-15 17:47:56 +01:00
Paweł Chmielowski
778c84dac9 Update xmpp dep in mix 2020-12-15 17:07:06 +01:00
Paweł Chmielowski
28186ddf19 Document auth_scram_hash option 2020-12-15 15:40:16 +01:00
Paweł Chmielowski
8dfe7e977a Bump version in mix.exs 2020-12-15 15:27:16 +01:00
Paweł Chmielowski
b345632a9a Update changelog 2020-12-15 15:26:23 +01:00
Paweł Chmielowski
34e615d854 Update deps in mix 2020-12-15 15:24:57 +01:00
Paweł Chmielowski
d8d9ef32ad Make anonymous auth not override sasl mechaninsm offered by other modules
This stop overriding store_type when anonymous is enabled with other
auth modules, we don't really need that since anonymous is not taking
passwords anyway, and this was disabling scram mechanisms.

This fixes issue #2803.
2020-12-14 16:42:14 +01:00
Paweł Chmielowski
a9ed26e484 Fix getting age of newly created rooms in rooms_unused_* 2020-12-14 09:47:25 +01:00
Pouriya
a76531b90b
feat: add hook to check decoded JWT after success authentication (#3446) 2020-12-14 08:14:58 +01:00
Paweł Chmielowski
d64e453364 Update deps 2020-12-10 15:00:46 +01:00
Paweł Chmielowski
af9d642a71 Improve auth_mnesia:transform 2020-12-10 14:02:28 +01:00
Paweł Chmielowski
6a659d7475 Improve handling of old scram data in auth_mnesia 2020-12-10 14:00:13 +01:00
Paweł Chmielowski
7da81249f8 Update xmpp once more 2020-12-10 13:22:32 +01:00
Paweł Chmielowski
8214a4fa79 Update xmpp 2020-12-10 12:41:26 +01:00
Paweł Chmielowski
e048bc6712 Update deps to point to tags 2020-12-08 15:11:09 +01:00
Paweł Chmielowski
e5cad9be65 Add hash to scramed password stored in mnesia by earlier version 2020-12-08 12:18:03 +01:00
Paweł Chmielowski
1dc0ecd1e9 Allow to use different hash for storing scram passwords 2020-12-08 12:06:52 +01:00
Paweł Chmielowski
0c09599d7b Normalize names passed to destroy_room 2020-12-08 09:19:29 +01:00
badlop
e95ae66d3c
Merge pull request #3435 from fdie/fix_odbc_binary_errors
also convert embedded errors to binary
2020-12-04 13:48:13 +01:00
Paweł Chmielowski
5f9d480f6a Simplify updating disk room options in set_room_affiliation 2020-12-04 13:06:53 +01:00
Paweł Chmielowski
d34227cae1 Use specialized upsert with mysql 2020-12-04 13:03:55 +01:00
Paweł Chmielowski
72867f8d1e Fix more places that needed changes after scram.erl api modifications 2020-12-04 09:20:59 +01:00
Frank Diebolt
8f04491a4d also convert embedded errors to binary 2020-12-03 19:56:58 +01:00
Paweł Chmielowski
0371b0f664 Add support for SCRAM-SHA-{256,512}-{PLUS} authentication 2020-12-03 15:07:09 +01:00
Paweł Chmielowski
02cc212f16 Fix typo in last commit 2020-12-01 15:39:17 +01:00
Paweł Chmielowski
0fe64674ee Make decide room better handle rooms that were just hibernated 2020-12-01 15:30:23 +01:00
Paweł Chmielowski
e937ff62fe Handle unix sockets in misc:ip_to_list 2020-12-01 15:29:58 +01:00
Badlop
d75d69d5d5 Trigger user_send_packet when send_stanza API is called (#3431) 2020-12-01 13:14:24 +01:00
badlop
f48f9fee2e
Merge pull request #3429 from mtdcr/systemd-foreground
Let systemd start ejabberd in foreground
2020-11-25 13:05:14 +01:00
Andreas Oberritter
5c6ffaafd6 Let systemd start ejabberd in foreground
Daemons started by systemd shouldn't fork into the background if
possible, because if multiple forked processes exist, systemd has
a hard time determining the main process ID.

In a memory constrained environment, the OOM killer may cause
ejabberd to exit without any trace. Because epmd keeps running,
systemd wouldn't notice the error condition, and as a result it
won't restart the server.

With ejabberd running in foreground, systemd is able to obtain the
correct exit code (137 in this case, instead of 0) and schedules a
restart. The administrator can then see what happend by looking at
systemctl status ejabberd.
2020-11-19 20:43:51 +01:00
Badlop
3581d90d9d Provide name when pushing new roster item in shared roster group (#3427) 2020-11-19 17:07:23 +01:00
Paweł Chmielowski
9e1f3862cb Fix room_unused_destroy on hibernated rooms 2020-11-19 09:31:14 +01:00
Paweł Chmielowski
c2a3f037bb Update muc_room just_created timestamp when message is received
This together with last history message is used by room_unused_* command
to determine for how long room was not used, this change allow us to skip
checking history, and works even when history is disabled.
2020-11-18 17:14:28 +01:00
Paweł Chmielowski
bf1aacefcb We don't use persistent field in decide_room 2020-11-18 16:49:43 +01:00
Paweł Chmielowski
e306cb0797 Fix logic that determines room age when history_size=0 2020-11-18 16:49:43 +01:00
badlop
1c6221d8a0
Merge pull request #3402 from nosnilmot/docker-fixes
Fix docker DB initialization
2020-11-17 16:48:13 +01:00
Paweł Chmielowski
2e8023158d Allow room_unused_list/destroy work on hibernated rooms
This required adding hibernation time to data stored for room to be able
determine how old was a room, rooms that aren't stored with that
information will use node start time as timestamp for that.
2020-11-16 16:05:16 +01:00
badlop
ff98cb4e15
Merge pull request #3399 from nosnilmot/redis3-configure_deps
Improve rebar3 configure-deps plugin output
2020-11-13 17:04:22 +01:00
badlop
0f01019e06
Merge pull request #3395 from nosnilmot/rebar3
rebar3 support for main build process
2020-11-13 12:13:14 +01:00
Badlop
f9b8dfd400 Update dependencies 2020-11-11 15:53:16 +01:00
Paweł Chmielowski
81e872c110 Don't do double utf-8 conversion on translated strings in str:format
This caused garbled text in some places in webadmin when using language
that used characters > 128.

Thanks to chengshq for noticing this and providing preliminary patch.
2020-11-09 12:20:35 +01:00
Badlop
9ed2ca5079 Document sql_odbc_driver option (copied from docs site) 2020-11-06 16:39:02 +01:00
Badlop
e7e9ca54df Document outgoing_s2s_ipv4_address and ipv6 options (#3396) 2020-11-06 15:52:33 +01:00
Holger Weiss
23a18b1a60 Apply cosmetic changes to outgoing s2s IP options 2020-11-04 13:12:06 +01:00
Holger Weiss
0a88f9c8a9 Merge remote-tracking branch 'processone/pr/3396'
* processone/pr/3396:
  Add outbound s2s out interface (ipv4/ipv6)
2020-11-04 12:19:49 +01:00
Paweł Chmielowski
de51ba331e Make sure that jid used as base in mam xml_compress is bare 2020-11-04 10:56:49 +01:00
Holger Weiss
d37b2f851d mod_push: Fix log message argument 2020-11-04 10:10:20 +01:00
Holger Weiss
f40c5c304d mod_push: Fix API call return type on error
A call that yields a 'rescode' isn't supposed to return an error tuple.
2020-11-04 09:07:30 +01:00
Holger Weiss
37c75f556d mod_push: Support cache config changes on reload 2020-11-04 09:04:30 +01:00
Paweł Chmielowski
ec61c2f3dc Change split character in PROXY_USER from \x04 to :
This is clearly typo
2020-10-29 16:36:18 +01:00
Paweł Chmielowski
d02c7d3b3b Update eimp
This makes eimp compile correctly agains headers from png12
2020-10-26 16:12:58 +01:00
Paweł Chmielowski
a2dfd2e0b9 Update eimp 2020-10-26 10:53:52 +01:00
Paweł Chmielowski
b4ea1625e4 Don't use same value in cache for user don't exist and wrong password
By doing this check_password that returned info about mismatched password
caused user_exists checks performed after that to return wrongly that
account doesn't exist.
2020-10-22 11:10:22 +02:00
Paweł Chmielowski
7655e10ba4 Add better error reporting to mod_muc_admin commands 2020-10-20 17:57:19 +02:00
Badlop
b64fff1faa Document that send_direct_invitation is asynchronous 2020-10-16 15:24:58 +02:00
Badlop
f1e04639bb Support for MAM Flipped Pages (#3398) 2020-10-15 21:42:43 +02:00
Paweł Chmielowski
73dbd34f95 Store room options in create_room_with_opts only if we will start room
Previously we could overwrite existing room options and then later return
error because room was already started.
2020-10-15 16:24:50 +02:00
Jerome Sautret
6bbae4cea2 send_direct_invitation command is now asynchronous
EJABS-3593
2020-10-15 11:40:22 +02:00
Paweł Chmielowski
b95d67aefb Make websocket send put back pressure on c2s process
Previously c2s was free to generate data to send in unlimited manner, and
just generate queue of messages that are waiting to be send. This could lead to
hitting timouts in stream management ack handling (if c2s generate lot of
packages, after which <r> request was sent, client could even not receive it
before timeout was triggered on server waiting for corresponding <a>).

This changes makes c2s process wait for data being sent to tcp socket
associated with websocket connection, which should help with this problem.
2020-10-13 14:57:33 +02:00
Paweł Chmielowski
73f8aded17 Make mod_muc_admin command work correctly with hibernated rooms
This should first try to unhibernate rooms before trying to send messages
to processes handling them.
2020-10-13 13:00:57 +02:00
Jerome Sautret
fdda572c9a Added sql_odbc_driver option for mssql db
Add an option to choose the ODBC driver when sql_type is set to mssql
2020-10-08 16:23:34 +02:00
Holger Weiss
e4d6007293 ejabberd_stun: Rename Logger filter
Don't overwrite the Logger filter added by the 'stun' application (which
appends metadata to STUN/TURN log messages).

Closes processone/stun#31.
2020-10-01 16:37:36 +02:00
Holger Weiss
df58ee924f mod_register: Allow for account-removal-only setup
Since commit de91618070, it was no longer
possible to configure mod_register so that only account removal (i.e.,
no registration) is permitted.  Revert to the previous behavior which
allows admins to freely configure account registration and removal via
separate access rules.
2020-09-29 06:11:30 +02:00
Stu Tomlinson
d9c1befbfc Add sql dir to extra_src_dirs
When running ct under rebar3, add sql dir to extra_src_dirs so sql
scripts are available to run clear_sql_tables
2020-09-25 18:45:41 +01:00
Stu Tomlinson
b173ca2fd0 Fix docker DB initialization
The docker local copies of DB initialization scripts were out of sync
with the master copies. Instead of updating local copies, adjust docker
compose to reference master copies directly.

Also change docker config to use docker volumes instead of mounted
directories for all DB data.
2020-09-25 18:13:35 +01:00
Stu Tomlinson
27ed8f5647 Improve rebar3 configure-deps plugin output
Switch to using rebar_utils:sh/2 instead of os:cmd/1 to spawn ./configure
so that output can be monitored and errors detected
2020-09-23 17:56:49 +01:00
Stu Tomlinson
714bc2d329 Miscellaneous rebar3 fixes
Correct Makefile clean targets

Fix a few more include() -> include_lib() for depedency includes

Use project_app_dirs to reference elixir app from rebar3 (lib_dirs is
no longer supported)
2020-09-23 15:52:21 +01:00
Badlop
d9cb6d1af7 log_rotate_date and log_rate_limit are deprecated since e4a8afb (#3382) 2020-09-22 13:58:56 +02:00
Paweł Chmielowski
583dd15beb Make roster subscriptions work better with invalid roster state in db
Sometimes we can observer combinations of subscription/ask that shouldn't
happen normally, but can be generated with api calls, let's try to handle
that gracefully instead of crashing.
2020-09-22 13:48:49 +02:00
Daniel Kenzelmann
604cc9bb3a Add outbound s2s out interface (ipv4/ipv6)
Adding options taking IPs as string:
outgoing_s2s_ipv4_address: "1.2.3.4"
outgoing_s2s_ipv6_address: "2000:1:1:1::1"
2020-09-21 22:18:46 +02:00
Stu Tomlinson
0fc1aea379 rebar3 support for main build process
This adds support for building, and installing, ejabberd using rebar3

A --with-rebar=/path/to/rebar3 option is added to configure to specify
which rebar to use

rebar2 compatibility is maintained, and the bundled rebar2 is still
used by default
2020-09-21 15:14:12 +01:00
Stu Tomlinson
385af01587
rebar3 plugin to support configure-deps command (#3392)
* rebar3 plugin to support configure-deps command

To allow running configure on dependencies prior to compilation, add a
rebar3 plugin to support the 'configure-deps' command introduced for
rebar2 in a7639fd4

* Fix compatibility with OTP < 23

binary_to_atom/1 is new to OTP 23
2020-09-21 13:51:31 +02:00
Stu Tomlinson
d9feed54a9
Add 'gitonly_deps' list to rebar config/script (#3391)
Add list of dependencies that should only be built from git, to support
building with rebar3 where deps do not have hex packages (or where the
package versions do not directly map to git tags).

This is required for elixir and luerl deps.
2020-09-21 13:49:58 +02:00
Paweł Chmielowski
b89f3c442c Use os time instead of system time in values returned by mod_time
This timer should correctly work with time warps, and should fix
issue #3390
2020-09-15 12:11:15 +02:00
Badlop
9629601d0b Refer to the XEP for standard names (processone/docs.ejabberd.im#97) 2020-09-11 12:27:05 +02:00
Holger Weiß
e9a053f7ac
Allow for filtering outgoing s2s stanzas (#3381)
Let 's2s_send_packet' hook callbacks filter stanzas, analogous to the
's2s_receive_packet' hook.
2020-09-07 10:12:19 +02:00
Badlop
a75966f1a2 Revert "Run user_receive_packet in send_message so MAM stores also incoming (#3377)"
This reverts commit 43f813d6f8.
2020-09-04 11:37:18 +02:00
Badlop
43f813d6f8 Run user_receive_packet in send_message so MAM stores also incoming (#3377) 2020-09-03 17:47:11 +02:00
Stu Tomlinson
eada3b6e93
Fix syntax for lager dependency version (#3379)
Add 'tag' to lager dependency so that build with rebar3 will pull from
hex package instead of git checkout matching other dependencies
2020-09-03 15:35:34 +02:00
Paweł Chmielowski
90e0293df3 Update one more place where we had -include("xmpp.hrl") 2020-09-03 14:30:04 +02:00
Stu Tomlinson
bd11a00f8f
Use include_lib() to include headers from dependencies (#3369) 2020-09-03 13:45:57 +02:00
Paweł Chmielowski
54af08799d Update xmpp dep 2020-09-03 13:43:49 +02:00
Stu Tomlinson
b71708aab9
Update base64url dep for rebar3 (#3368)
Update base64url version to match available hex package to support
compilation with rebar3
2020-09-03 13:40:04 +02:00
Badlop
a3be28b5c4 Provide room disco info identity name only when title was set (#3370) 2020-08-28 14:56:25 +02:00
Badlop
743b25448a New hook to run when a room process is started (#3353) 2020-08-28 14:54:06 +02:00
Badlop
66c2f45bff Show nick also in oneself list of subscriptions (#3206) 2020-08-26 19:32:29 +02:00
Badlop
8d969a4a9f Always show MucSub subscribers nicks (#3206)(thanks to Snoopcatt) 2020-08-26 19:32:26 +02:00
Badlop
bf62cf3db6 Add link to docs about default and new database schemas 2020-08-26 11:46:23 +02:00
Holger Weiss
8daea451e3 mod_pubsub: Fix typo in 'hosts' documentation
Thanks to Melvin Keskin for spotting this.
2020-08-25 08:21:43 +02:00
Badlop
864188ad65 Mark dangerous buttons with CSS (#3363) 2020-08-24 16:44:07 +02:00
Holger Weiss
65260e2449 ejabberdctl: Avoid bashisms
Don't let the ejabberdctl script depend on non-POSIX syntax.  (Also, fix
a typo and avoid tabs.)
2020-08-24 06:42:45 +02:00
Badlop
b9926c6796 Update opt files with "make options" 2020-08-21 18:09:03 +02:00
Badlop
e7575ab63f For mod_vcard_* modules, redirect options to mod_vcard 2020-08-21 18:08:59 +02:00
Badlop
92913389a5 Fix vCard search by User when using Mnesia
Reported in
https://stackoverflow.com/questions/63499864/how-to-search-registered-user-on-ejabberd-server-from-client-side-using-smack-li
2020-08-20 16:46:06 +02:00
Holger Weiss
65be619907 mod_pubsub: Remove 'dag' node plugin documentation
Commit c9d3beb9eb removed the 'dag'
node/nodetree plugins.
2020-08-18 06:50:33 +02:00
Paweł Chmielowski
ee76581b49 Add rebar.config* files when publishing to hex from mix
This should help with issue #3354
2020-08-11 10:09:23 +02:00
Badlop
842ec1494c Fix to allow vhost admins to view WebAdmin menus (#3355) 2020-08-10 21:17:59 +02:00
Badlop
8aa0f7073f Copy Erlang compilation definitions from rebar.config to Docker (#3350) 2020-08-10 12:29:40 +02:00
Paweł Chmielowski
8a645a2d3d Don't forget not-persistent rooms in load_permanent_rooms
Only non-persistent rooms that we are storing are those that were hibernated
but also have mucsub subscribers in them. I don't think it makes sense to
destroy those rooms on restart/reload if we didn't destroy them in first
place when last member did leave room, let just handle those rooms like
they are persistent, and kill them only when all user unsubscribe from them
or they are destroyed from api.
2020-08-06 11:44:44 +02:00
Badlop
4a54395561 Improve explanations of cafile options 2020-08-03 15:18:50 +02:00
Mickael Remond
b109c5927e
Update mix.exs ejabberd version 2020-07-30 18:32:31 +02:00
Paweł Chmielowski
23beaa9fad Update mix dependencies 2020-07-30 17:57:52 +02:00
Jerome Sautret
839229b5f0 Check if TERM is set before running a remote debug shell 2020-07-30 10:33:38 +02:00
Jérôme Sautret
b89b0f140a
Merge pull request #3346 from processone/ejabberd-3343
Allow passing Erlang VM args through vm.args config file
2020-07-30 10:31:12 +02:00
Mickael Remond
09454e1658
Allow passing Erlang VM args through vm.args config file
This can be used to define the Erlang cookie in a place that feels less foreign to
non Erlang users.

Fixes #3343
2020-07-29 17:35:59 +02:00
Paweł Chmielowski
828c0ad1e0 Update deps 2020-07-28 14:38:34 +02:00
Paweł Chmielowski
87bbd9cb02 Update stun 2020-07-28 14:04:00 +02:00
Paweł Chmielowski
70507a694c Update changelog 2020-07-28 13:25:27 +02:00
Paweł Chmielowski
1b168e7d5c Add support for unix socket in listeners
To use it you just need to set port value to "unix:/path/to/socket"
2020-07-28 12:19:30 +02:00
Paweł Chmielowski
d5935fd1ad Don't log http errors when socket get closed after processing one request 2020-07-28 12:19:30 +02:00
Badlop
2bcd2c38a9 No need to check for Erlang 17, as 19 is the lowest supported anyway
This rollsback the conditional introduced years ago in c2753cd51c
2020-07-28 11:28:04 +02:00
Badlop
042cddb768 Elixir was required for quicktest, that was removed in 2018 51cbbf313 2020-07-28 11:26:41 +02:00
Badlop
e0b7fd72af Update Stun to 1.0.36, and Esip too 2020-07-28 11:25:43 +02:00
Badlop
9c5e4454e4 Sort dependencies and improve some indentation 2020-07-22 18:03:28 +02:00
Badlop
7fe0b8d274 Revert "Modify ERL_LDFLAGS of deps when compiling on R23 on rebar2"
This reverts commit 21312c79aa.
2020-07-22 10:08:14 +02:00
Badlop
90ca689123 Update dependencies, they now compile with Erlang/OTP 23.0 natively 2020-07-22 10:06:06 +02:00
Badlop
db2825342c Revert "Dirty workarounds to compile jiffy with Erlang/OTP 23 (#3282)"
This reverts commit 2ca5712507.
2020-07-15 12:12:42 +02:00
Badlop
bc1de531cc Update jiffy to 1.0.5 which supports Erlang/OTP 23 2020-07-15 12:12:39 +02:00
Badlop
2ea5f7856c In fact misc:try_url/1 is not used anymore 2020-07-15 11:41:51 +02:00
Badlop
e5b66aadaf Fix try_url/1 parsing of uri_parse result format, reported by Dialyzer 2020-07-14 12:21:37 +02:00
Holger Weiss
cff7c4c100 Update 'stun' dependency to tagged version 2020-07-11 17:53:33 +02:00
Holger Weiss
e30592c050 mod_stun_disco: Fix function specification 2020-07-11 17:51:20 +02:00
Badlop
ff92dab49e Parse also ServerHost in create_room* commands (#3326) 2020-07-10 13:06:05 +02:00
Badlop
f652f8c8d6 Fix crash when creating new MUC log file in non-ASCII lang (#3324) 2020-07-10 12:03:12 +02:00
Badlop
80a502782b Use the same leading sentence than other sections 2020-07-06 16:39:15 +02:00
Holger Weiss
3bf7fbc117 ejabberd_stun: Filter info/debug messages
Update 'stun' dependency, and drop the info/debug messages now logged by
the 'stun' application if OTP's new logging API is used.
2020-07-01 21:53:22 +02:00
Badlop
0ff5b44d15 Fix YAML syntax in example configuration (#3301) 2020-06-25 12:39:44 +02:00
Badlop
61926a44be Subscriber should not send message to moderated room (#3222) 2020-06-24 13:17:04 +02:00
Holger Weiss
ec5f369d9d ejabberd_logger: Avoid excessive stat calls
By default, the logger_std_h module shipped with OTP 21.0 and newer
reads the log file information prior to each and every write operation.
This is done to play well with external log rotation tools.

In order to minimize the performance penalty in situations where the log
file is flooded, configure logger_std_h to skip reading the file
information as long as no more than one second has passed since it was
last read.
2020-06-23 21:27:12 +02:00
Holger Weiss
dbebcd08c7 README.md: Add line breaks after feature titles 2020-06-23 00:31:22 +02:00
Paweł Chmielowski
768460b518 Correctly handle user_regexp acl rules with not matching host
This should fix issue reported in issue 3304
2020-06-22 10:24:10 +02:00
Holger Weiss
515dfc002b mod_stun_disco: Fix wording of log message 2020-06-19 18:04:26 +02:00
Badlop
16645a3c0a Document that only ejabberdctl can join and leave a local node (#3049) 2020-06-09 13:23:17 +02:00
Badlop
38949bdeea Update example config to include mod_http_upload custom headers (#3288) 2020-06-09 13:08:05 +02:00
Badlop
5f3457dbd6 Add default values so Travis config validation stops warning 2020-06-08 15:27:37 +02:00
Badlop
b9108c4650 Travis renamed redis-server to redis apparently 2020-06-08 15:27:28 +02:00
Badlop
a54c667c80 Remove old Regexp, the new Re is available since Erlang/OTP R12B-4 2020-06-08 15:27:27 +02:00
Badlop
bcd2cd7e93 Remove comment about Erlang/OTP older than R14, as we require 19.3 nowadays 2020-06-08 15:27:25 +02:00
Badlop
337ba42953 Get back some commented specs that required Erlang R12 2020-06-08 15:27:23 +02:00
Badlop
4f5c00a83d Option route_subdomains was deprecated and useless a year ago in ffe1c722 2020-06-08 15:27:18 +02:00
Holger Weiss
c6bbdafe92 Update 'yconf' dependency to fix Erlang/OTP 19.x 2020-06-05 20:24:17 +02:00
Badlop
f2e81ed2a0 When updating group in cache, first delete so insert succeeds (#3296) 2020-06-05 19:34:00 +02:00
Badlop
7efc208b9e Handle ets_cache return value in shared roster get_group_opts (#3296) 2020-06-05 19:33:52 +02:00
Holger Weiss
266691f929 Update 'yconf' dependency
Fixes #3295.
2020-06-05 17:02:06 +02:00
Paweł Chmielowski
482917348b Update deps 2020-06-03 13:43:10 +02:00
Holger Weiss
945a5cd09c misc: Don't crash on URLs without port number
Let misc:uri_parse/1 return default HTTP(S) port number if the URL
doesn't specify a port number, analogous to the behavior when
USE_OLD_HTTP_URI is defined.
2020-06-03 12:22:14 +02:00
Holger Weiss
9ea51d3295 misc: Make sure uri_parse/1 returns strings
The uri_string:parse/1 function returns the URI elements as strings or
as binaries depending on the input.  Make sure misc:uri_parse/1 returns
strings in both cases, analogous to the behavior when USE_OLD_HTTP_URI
is defined.
2020-06-03 12:02:29 +02:00
Holger Weiss
77308e6aff Merge remote-tracking branch 'processone/pr/3294'
* processone/pr/3294:
  Update example config
2020-06-03 09:41:24 +02:00
Licaon_Kter
b0c6caa60e
Update example config 2020-06-03 07:19:02 +00:00
Holger Weiss
3cfc5c9633 Update 'turn_ip' option name in test configuration
Thanks to Badlop for spotting this.
2020-06-03 06:13:43 +02:00
Holger Weiss
cd336369a5 mod_stream_mgmt: Don't kill new PID on resumption
During XEP-0198 resumption, the ejabberd_c2s process that handles the
new connection reopens the ejabberd_sm session of the old one.  Since
commit b4770815c0, the new process adds
the new session table entry before the old process removes the old one.
While adding the new one, ejabberd_sm checks for old sessions to
replace.  This check assumes old SIDs compare lower than new ones.  This
assumption didn't necessarily hold for the session resumption case,
where the old SID's timestamp was copied over to the new SID and only
the PID was updated.  Therefore, the new process was killed if the new
PID happened to be smaller than the old one.

Fix this by having mod_stream_mgmt use its own SM-ID rather than copying
over the old SID's timestamp to the new SID.

Thanks to Thilo Molitor and Friedrich Altheide for reporting the issue,
and to Thomas Leister for his help with debugging it.
2020-06-01 21:33:55 +02:00
Badlop
c62956ab7b Test 23.0 version 2020-06-01 10:35:41 +02:00
Badlop
1d7e29765e Update eimp, sqlite3 and epam to support Erlang/OTP 23 (#3282) 2020-06-01 10:35:37 +02:00
Badlop
c0f7008e96 Use old http_uri, crypto and pg2 only with old Erlang/OTP (#3284) 2020-06-01 10:35:28 +02:00
Badlop
2ca5712507 Dirty workarounds to compile jiffy with Erlang/OTP 23 (#3282)
Works for me with:
./configure --disable-pam
./rebar get-deps
./rebar configure-deps
./rebar compile
make install

changes in erlang-native-compiler used by jiffy:

src/rebar_port_compiler.erl
-     {"ERL_LDFLAGS"  , " -L$ERL_EI_LIBDIR -lerl_interface -lei"},
+     {"ERL_LDFLAGS"  , " -L$ERL_EI_LIBDIR -lei"},

src/rebar_utils.erl
--dialyzer({no_missing_calls, escript_foldl/3}).
2020-06-01 10:33:06 +02:00
Holger Weiss
7a37483307 Rename 'turn_v4_ip' and 'turn_v6_ip' options
The 'turn_ipv4_address' and 'turn_ipv6_address' option names are
probably more intuitive.
2020-05-29 18:40:19 +02:00
Paweł Chmielowski
21312c79aa Modify ERL_LDFLAGS of deps when compiling on R23 on rebar2
Newer version removed erl_interface, and default rebar2 ERL_LDFLAGS will
try to link it, this change should pass correct flags to compiler.
2020-05-26 11:01:22 +02:00
Holger Weiss
56d00e427d ejabberd_stun: Add 'turn_blacklist' option
The new 'turn_blacklist' listener option allows for specifying one or
more IP addresses and/or subnet addresses/masks.  The TURN server will
refuse to relay traffic from/to blacklisted IP addresses.  By default,
Teredo and 6to4 addresses are blacklisted, as mandated by RFC 6156
(section 9.1).
2020-05-21 21:46:02 +02:00
Holger Weiss
7bb4da2fee mod_stun_disco: Make 'services' example shorter
Omit the 'tcp' and 'stuns' services from the list of example 'services'
in the documentation.  For typical use cases, those are less interesting
than 'udp' and 'turns' services.
2020-05-19 23:23:24 +02:00
Holger Weiss
f19b975e8d mod_stun_disco: Offer local IPv6 services
Also announce local STUN/TURN services listening on IPv6 sockets (unless
the 'offer_local_services' option is set to 'false').
2020-05-19 22:55:12 +02:00
Holger Weiss
83fa637569 ejabberd_stun: Support IPv6 for TURN
The stun application now supports RFC 6156: TURN Extension for IPv6, and
therefore needs separate IPv4 and IPv6 relay addresses.
2020-05-19 21:42:41 +02:00
Holger Weiss
858bfb4b80 Let ejabberd_stun listen on IPv6 sockets
The stun application now allows IPv6 clients to perform STUN requests
and to allocate TURN relays.
2020-05-19 20:22:58 +02:00
Badlop
42c82c9e72 Fix hardcoded URL to register.css and URLS to sections (#3281) 2020-05-19 19:32:06 +02:00
Badlop
8efdd439f1 Update man page to ejabberd 20.04 2020-05-19 16:38:11 +02:00
Badlop
70977cbb13 Sort databases alphabetically in options doc (thanks to Neustradamus)(#3246) 2020-05-19 16:38:08 +02:00
Badlop
ad31fbee1e Sort alphabetically configure options (thanks to Neustradamus)(#3246) 2020-05-19 16:38:05 +02:00
Paweł Chmielowski
6f54b6ae3b Don't crash in mod_muc_log:get_url when mod_muc_log is not enabled
Disco on room can call this function even when logger is not enabled,
but this room option was enabled previously when logger was active.
2020-05-15 13:44:09 +02:00
Badlop
e94b89a57d Display installed ejabberd version in webadmin footer (#3272) 2020-05-15 11:20:53 +02:00
yuriyz-w
44528d3fef
Make SQL query more generic for MSSQL compatibility (#3271) 2020-05-15 09:19:55 +02:00
Paweł Chmielowski
4580feaa3c Increase default shaper limits, to help with jingle initiation delay
More discussion about this can be found in pull request 3255
2020-05-15 09:10:57 +02:00
Badlop
f3b8dc9c0b Update *_vcard commands help, so they are better displayed in Docs 2020-05-14 20:02:47 +02:00
Badlop
9d923e8e6d Update syntax of some options so they are better displayed in Docs 2020-05-12 21:33:00 +02:00
Badlop
c861fa6a6a Revert service_subscription_subscribers test that is iconsistent (#2696) 2020-05-11 22:25:56 +02:00
Badlop
d7d8085d3b Fix most EDoc errors, even if that's not used nowadays apparently 2020-05-11 19:53:13 +02:00
Badlop
5e70a47f20 If new session Pid exists when sm_remove is called, then keep Ping (#3260) 2020-05-11 18:22:35 +02:00
Holger Weiss
e286bb23db mod_stun_disco: Bump credentials_lifetime default
Increase the default lifetime of temporary credentials to 12 hours.
ejabberd's built-in TURN server re-queries the temporary password from
mod_stun_disco whenever a TURN client attempts to refresh an allocation,
and mod_stun_disco will only return the password as long as the
credentials didn't expire.  Therefore, the credentials lifetime
effectively limits the maximum lifetime of a TURN allocation when
ejabberd's TURN service is used, so the default value shouldn't be too
short.
2020-05-11 17:32:28 +02:00
Badlop
2c42bd07c8 Fix link in mod_sip to SIP Docs section 2020-05-09 16:10:26 +02:00
Badlop
2001540143 Provide minimal mod_bosh configuration example 2020-05-09 15:04:10 +02:00
Badlop
d88a32992a Add link in acme option to ACME section in ejabberd Docs 2020-05-09 11:45:39 +02:00
Badlop
64c09c20eb Hide false-positive warnings about mod_delegation Type atom and NS binary 2020-05-07 22:29:54 +02:00
Badlop
c990704418 Remove ancient and rather useless incode ejabberd_commands documentation 2020-05-07 19:38:12 +02:00
Badlop
edf5b3c7f0 Don't use string:take, as it isn't available in Erlang/OTP 19.3 (#3256) 2020-05-07 16:09:51 +02:00
Badlop
e5a2d42484 Fix webadmin muc room sorting broken due to trailing slash patch (#3256) 2020-05-07 11:22:43 +02:00
Paweł Chmielowski
51e45516a4 Unconditionally send presence unavailable to all pres_a recipient
Previously we only send that presence to direct presence recipients if
client also sent general self presence (without to attribute).

This should help with issue #3245
2020-05-07 10:40:18 +02:00
Badlop
41b06cb79e Show deprecation warning if ejabberd_xmlrpc is configured as listen module (#2915) 2020-05-06 14:08:43 +02:00
Badlop
d8509aec12 Remove access_commands useless lines, api_permission replaced it years ago 2020-05-06 14:08:40 +02:00
Holger Weiss
5649e35a64 ejabberd_listener: Let supervisor terminate child
If a TCP connection was closed before the socket was handed over to a
supervised child process, let the supervisor terminate the process
rather than killing it directly.  This avoids crash log entries
generated by the supervisor.
2020-05-05 17:22:52 +02:00
Holger Weiss
865074603c Set 'max_fsm_queue' default value (back) to 10000
The default value for the 'max_fsm_queue' option was set to 10000 in
commit 79685da90b, and that value is still
documented to be the default.  It was (probably unintentionally) changed
to 5000 in commit 03de853e4f.

It makes sense to keep it larger than the value of mod_stream_mgmt's
'max_ack_queue' option.
2020-05-05 01:34:12 +02:00
Holger Weiss
6d13120e69 mod_stun_disco: Log discovered services on startup
If the 'offer_local_services' option isn't set to 'false', log an [info]
message for each auto-discovered ejabberd_stun listener on startup (and
on configuration reload).
2020-05-05 01:02:50 +02:00
Badlop
e6a3b1fa68 Extract translatable strings also from the xmpp library 2020-05-04 16:25:42 +02:00
Badlop
df66fa6a48 Fix the new service_subscription_subscribers test (#2696) 2020-05-04 11:31:52 +02:00
Marc Tonnes
5d499c7173 Fix @from attribute on MucSub 'subscribers' node messages 2020-05-04 11:31:24 +02:00
Holger Weiss
b1e967eaf3 mod_stun_disco: Remove unnecessary inclusion 2020-05-03 17:27:41 +02:00
Holger Weiss
151fa2ec50 mod_stun_disco: Apply minor documentation cleanups 2020-05-03 17:20:15 +02:00
Holger Weiss
e4de03f3df mod_stun_disco: Try to resolve listener address
In some IPv6-only networks, hostnames that have no AAAA record are
resolved to an IPv6 address that's mapped to the host's IPv4 address.
This allows the IPv6-only clients to communicate with IPv4-only services
such as ejabberd's built-in STUN/TURN server.  If STUN/TURN clients try
to contact the IPv4 address directly rather than using the mapped IPv6
address, the connection will fail.

Therefore, try to resolve the IP address of local ejabberd_stun services
to the hostname and announce that hostname rather than the IP address if
(and only if) the hostname resolves back to the original IP address, and
not to any additional IPv4 or IPv6 address(es).

This can (and should) be reverted once IPv6 support is added to
ejabberd's built-in STUN/TURN server.
2020-04-30 22:40:01 +02:00
Jerome Sautret
724d09a510 Set ejabberd version to 20.04 2020-04-29 16:29:59 +02:00
Badlop
fba6a64648 Fix English typos in configure.ac 2020-04-29 12:07:35 +02:00
Jérôme Sautret
0539637d30
Merge pull request #3232 from weiss/enable-stun
Enable STUN/TURN support by default
2020-04-29 10:29:05 +02:00
Badlop
4a7d42647f Rewrite sentences in modules options examples, to not break Docs indentation 2020-04-28 21:31:35 +02:00
Paweł Chmielowski
b56663ef07 Update dependences in mix 2020-04-28 17:23:36 +02:00
Paweł Chmielowski
25597a4326 Run tests for mssql only if configured with --enable-mssql 2020-04-28 16:52:08 +02:00
Paweł Chmielowski
56c8f6b280 Update deps 2020-04-28 16:24:40 +02:00
ChaosKid42
abc3260e75
enable tests with mssql-backend (#3136) 2020-04-28 16:22:42 +02:00
Jérôme Sautret
24a11fc8e8
Merge pull request #3235 from weiss/xep-0215
Support STUN/TURN service discovery
2020-04-28 16:03:21 +02:00
Holger Weiss
6eb2f07274 ejabberd_stun: Tone down 'auth_realm' warning
These days, STUN/TURN authentication can be performed with ephemeral
credentials, where the REALM is irrelevant. Therefore, just log an
[info] message rather than a [warning] in the case where no
authentication REALM is configured but multiple virtual domains exist.
2020-04-28 10:34:43 +02:00
Holger Weiss
9cd47d7085 Add tests for mod_stun_disco 2020-04-28 10:34:43 +02:00
Holger Weiss
69d1d62add Support XEP-0215: External Service Discovery
Add the 'mod_stun_disco' module, which allows XMPP clients to discover
STUN/TURN services and to obtain temporary credentials for using them as
per XEP-0215: External Service Discovery.  The temporary credentials
handed out to clients have the format described in:

https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00

Also add the new module to the example configuration file.

Closes #2947.
2020-04-28 10:34:43 +02:00
Badlop
3db9459591 Don't offer X-OAUTH2 if the only auth method enabled is Anonymous (#3209) 2020-04-27 20:03:21 +02:00
Paweł Chmielowski
6320dfd34e Don't store caps information for direct presences of muc room
We really don't need those, and thanks to each individual room having
different hash (as one of hashed data is room description) we end with
lot of data that we really don't need.
2020-04-27 13:17:51 +02:00
Badlop
055fe744d3 Clean some unused functions in ejabberd_ctl, this makes "make hooks" happy 2020-04-24 20:36:24 +02:00
Christoph Scholz
d7c696f97c mix.exs: Update 'xmpp' and 'stun' 2020-04-23 20:05:40 +02:00
Holger Weiss
fc444ce503 rebar.config: Update 'xmpp' and 'stun'
Use the current versions of 'xmpp' (to get XEP-0215 support) and 'stun'
(to fix TURN issues).
2020-04-23 20:05:40 +02:00
Holger Weiss
88f392721b gen_mod: Reload modules after reloading listeners
Make sure modules won't be reloaded before listeners.  This is necessary
to allow the (not yet committed) 'mod_stun_disco' module to parse the
listener configuration after configuration reloads.
2020-04-23 20:05:40 +02:00
Holger Weiss
c55e7b8499 ejabberd_stun: Fix 'turn_ip' fallback
The 'turn_ip' option validator doesn't accept an inet:ip4_address()
tuple.

While at it, change the logic to only perform the fallback address
lookup if no 'turn_ip' is configured (analogous to the fallback
mechanism for the case where the 'auth_realm' is undefined).
2020-04-23 18:32:40 +02:00
ChaosKid42
1f7ca91670
use dsn-less config for mssql (#3131) 2020-04-23 13:56:41 +02:00
Licaon_Kter
d9131c854d
Bump jiffy so it compiles on older GCC (#3218)
* Update jiffy

* And here
2020-04-23 13:29:33 +02:00
Holger Weiss
09a87f5a0c ejabberd_stun: Handle hashed passwords gracefully
Don't crash when STUN/TURN authentication is performed against a
SCRAM-hashed password.
2020-04-22 00:16:03 +02:00
Holger Weiss
1db70edcf8 ejabberd_stun: Add 'stun_get_password' hook
Add a hook that allows modules to offer a password for STUN/TURN
authentication.
2020-04-22 00:09:42 +02:00
Badlop
1a3533e4a2 Fix some English typos 2020-04-21 20:58:01 +02:00
Badlop
3db9de26e9 Rephrase mod_admin_extra doc, a2x screwed the format when building Docs 2020-04-21 20:11:39 +02:00
Badlop
78f0439e78 Make a few more strings translatable in MUC and Shared Roster WebAdmin 2020-04-20 20:24:56 +02:00
Badlop
b124e911d3 Update some translated strings where only print chars had changed 2020-04-20 20:24:50 +02:00
Holger Weiss
c836dc66a8 ejabberd_stun: Set a default 'turn_ip'
Try to resolve the local hostname, use the result as the default
'turn_ip', and only log a warning if that fails.  Using the local
hostname's address by default is analogous to mod_proxy65's behavior.
2020-04-20 08:42:32 +02:00
Holger Weiss
b1b3c4cdcf Enable STUN/TURN by default
Build ejabberd with STUN/TURN support by default, and add a STUN/TURN
listener to the example configuration file.
2020-04-20 00:37:41 +02:00
Holger Weiss
b0f95975c2 Travis CI: Test against Erlang/OTP 22.3 2020-04-19 15:39:34 +02:00
Badlop
2e48c24638 Updated Spanish translation 2020-04-17 19:29:17 +02:00
Badlop
7359eb6246 Updated Catalan translation 2020-04-17 19:23:21 +02:00
Badlop
99d21bca49 Don't extract for translation strings from man pages, at least for now 2020-04-17 19:23:18 +02:00
Badlop
1b98084918 Fix previous commit 2020-04-17 19:23:13 +02:00
Badlop
d311eaf8f3 Log messages generated by msgmerge and display unexpected ones 2020-04-17 17:28:43 +02:00
Badlop
0355e15a42 Fix doc content in mod_admin_extra so it can be extracted by make translations 2020-04-17 17:28:39 +02:00
Badlop
101f7a6d63 Check if mod_muc_log is enabled before setting logging option (#3215) 2020-04-17 16:19:58 +02:00
Badlop
4aa85c538c When rescode is some unexpected, probably error message, print it 2020-04-17 16:19:55 +02:00
Paweł Chmielowski
22980ed8a5 Restart offline pop_messages when there is mismatch between select and delete
When another connection is inserting something to spool at this same time
as we do pop_messages, it's possible that insert will happen between we
fetch messages and delete them, so we effectively will delete it without
delivering it to client. This change catch this situation and restart
transaction, so we should always have consistent results.
2020-04-17 15:30:28 +02:00
Paweł Chmielowski
cb1c0a3188 Update mysql driver to get rid of warning 2020-04-16 18:26:13 +02:00
Badlop
0705695e02 Update documentation of mod_shared_roster (#3214) 2020-04-16 13:12:32 +02:00
Paweł Chmielowski
c11922e2a2 Make session iq response have from be set to server jid
It looks like old version of Smack don't accept request that are have
from sent to sender jid, but are only working when jid is set to server
address. This is also how it looks in old xmpp rfc examples.
2020-04-16 13:05:42 +02:00
Paweł Chmielowski
37226dd41f Resending unacked stanzas should send even archived msgs if mod_offline is enabled
Messages that are received when no c2s is active will be stored in offline,
even when mam archived them, so i don't think we should be doing something
different in this case.
2020-04-16 13:04:12 +02:00
Badlop
cd0b65f4d5 Fix unused variables from previous commit 2020-04-14 15:00:45 +02:00
Badlop
b7c088d4b0 Update links to the ejabberd Docs page in WebAdmin 2020-04-14 13:59:11 +02:00
Badlop
e197b25e82 Rename opts->name to label, to avoid confusion with the group name (#3214)
Also updated WebAdmin to show more meaningful explanations
Also fixed a bug that break support for group@host in Displayed
2020-04-14 13:58:53 +02:00
Jérôme Sautret
b02506eaaf
Merge pull request #3132 from area-42/publisher_mssql_text_to_varchar
change PubSub publisher from text to varchar for mssql
2020-04-10 16:20:43 +02:00
Badlop
8694517c34 Minor fixes in doc 2020-04-09 16:30:21 +02:00
Badlop
2febd1c220 Copy more option explanations from ejabberd Docs site 2020-04-08 18:49:41 +02:00
Badlop
aa0ed37034 Add ejabberd version number to man pages 2020-04-08 18:48:09 +02:00
Badlop
da18245d9a Indicate which ejabberd version is used to produce the page 2020-04-08 18:47:50 +02:00
Badlop
5cc9a1fe44 Don't make commands subsections, so Docs TOC plage is cleaner 2020-04-08 18:45:29 +02:00
Badlop
de0aead1cd Fix set_loglevel example argument documentation 2020-04-08 18:44:09 +02:00
Badlop
624ba7e94f Improve formatting of mod_announce doc 2020-04-08 18:42:45 +02:00
Paweł Chmielowski
9bb3aee0e2 Make resumed sessions try to deliver possibly queued messages to new session
Between receiving resume request and being closed by new session, it's
possible (even if not very likely) that new messages would arrive to
process that is resumed. In that case try to reroute messages that were
received after we sent resume reply to new process.
2020-04-07 14:51:49 +02:00
Paweł Chmielowski
16585713f8 Log errors that happen when retrieving http headers in ejabberd_http
It seems that ssl errors can be generated here, so lets have abily to show
them instead of swallowing them silently.
2020-04-07 13:50:01 +02:00
Holger Weiss
e01e528235 mod_carboncopy: Bump supported XEP revision
Since mod_carboncopy supports "urn:xmpp:carbons:rules:0", it implements
version 0.13.x of XEP-0280.
2020-04-05 22:52:55 +02:00
Paweł Chmielowski
eac7e3488c Remove bash-izm from ejabberdctl.template introduced recently 2020-04-03 17:28:27 +02:00
Jerome Sautret
762486d199 Limit number of atoms used by ejabberdctl ( #2977) 2020-04-02 15:51:16 +02:00
Badlop
23493ce239 Document mod_shared_roster_ldap options 2020-04-02 12:56:43 +02:00
Badlop
510ab53341 Add ejabberd_auth_http auth_opts brief description 2020-04-02 12:56:40 +02:00
Badlop
220cf73318 Document sql_prepared_statements 2020-04-02 12:56:38 +02:00
Badlop
f6d102f5e2 Quick document with forward link api_permissions 2020-04-02 12:56:36 +02:00
Badlop
05b68764cc Document some global options 2020-04-02 12:56:33 +02:00
Badlop
4e51e82ccf Add three missing mod_bosh options 2020-04-02 12:56:31 +02:00
Badlop
116fa8e9ca add missing mod_mam options 2020-04-02 12:56:28 +02:00
Badlop
ce6fd654a0 Fix mod_pubsub indentation 2020-04-02 12:56:26 +02:00
Badlop
5ee2f48aea Add mod_pubsub configuration documentation 2020-04-02 12:56:23 +02:00
Paweł Chmielowski
ccb47a67c4 Don't replace %25 in webadmin test on older erlangs
It seems that is a bug in R21+ httpc, so let's try to keep that test
working with older versions
2020-04-01 17:11:19 +02:00
Paweł Chmielowski
a2e6d8bb6b Make stop_ejabberd test also work without receiving </stream:stream> 2020-04-01 15:34:06 +02:00
Paweł Chmielowski
1bd560f3f2 Fix potential message loss in terminating c2s sessions
Calling sync version of xmpp_stream_in/out:stop could lead to messages
never being processed by c2s process if they were queued in p1_server.

This could be reproduced by when having messages in offline storage,
starting sessions, enabling stream_mgmt, sending initial presence, and then immediately
</stream:stream>, messages that mod_offline would send process would not
be bounced back by stream_mgmt.
2020-04-01 14:36:01 +02:00
Badlop
222bb1d55d Use different username than other tests, but still include the test chars 2020-04-01 12:50:52 +02:00
Paweł Chmielowski
a5ea3fa282 Better error reporting in pubsub tests 2020-04-01 11:45:01 +02:00
Paweł Chmielowski
6c52438128 Make webadmin tests use different user for changepassword/unregister
Using username that is shared with other tests causes login problems in
other places.
2020-04-01 11:44:38 +02:00
Badlop
0508dce2ed Add more webadmin tests 2020-03-31 19:28:36 +02:00
Boris Chernov
87dda1b638
sql_type should be taken for LServer, not LHost (#3202)
sql_type option should be retrieved for the main domain, not the MUC subdomain
2020-03-30 09:47:36 +02:00
Paweł Chmielowski
5ec214386e Make webadmin redirect to page that end with / 2020-03-26 14:17:48 +01:00
Paweł Chmielowski
73ba38ae35 Revert "Pass base path instead of level to support URL missing slash (#3177)"
This reverts commit e9d1201ea8.
2020-03-26 13:43:24 +01:00
Paweł Chmielowski
1ffa9a0cf5 Do not change to attribute of sent messages from bare to full jid
This is not correct per xmpp spec
2020-03-25 16:00:16 +01:00
Jerome Sautret
633b362577 Increase version to 20.3.0 2020-03-25 11:35:38 +01:00
Badlop
150b7e7219 Fix unsubscribe command result, handle_sync_event result, and dialyzer
How to reproduce the problems fixed by this commit:
Create temporary room, other account subscribes, and owner leaves
Unsubscribe that account with the command: ejabberdctl unsubscribe_room ...
2020-03-24 11:44:22 +01:00
Paweł Chmielowski
e6065bf08f Update changelog 2020-03-23 17:55:11 +01:00
Paweł Chmielowski
c2aa5f77bf Update mix.lock 2020-03-23 17:42:57 +01:00
Paweł Chmielowski
7caec56e96 Make bounce_message_queue wait for 100ms for incoming messages
There is possibilty that between c2s process unregistering itself from sm
and terminating, some other process could try to send something to c2s,
which could result in messages to triggering mam/offline hooks, and causing
them not to be stored in any way.
2020-03-23 15:16:33 +01:00
Paweł Chmielowski
97354426cf Make mod_muc_room:unsubscirbe handle that unsubscribe may stop room 2020-03-23 13:16:48 +01:00
Paweł Chmielowski
63e3fb92d1 Better handling of xml parse errors in send_stanza 2020-03-23 12:59:30 +01:00
Paweł Chmielowski
a2d1ffffe6 Add baisc tests for webadmin 2020-03-23 10:52:07 +01:00
Paweł Chmielowski
f17d4c0adc Update deps 2020-03-19 12:11:46 +01:00
Paweł Chmielowski
92a09fdb71 Also add "escape '\'" to prepared statements in pgsqllike_escape 2020-03-18 14:36:17 +01:00
Paweł Chmielowski
039d786e1f Add escape '\' to like expression in pgsql to fix problem cockroachdb
Cockroachdb doesn't properly handle escaping of _ in like expressions,
having "like ... escape '\'" makes it work, by disabling optimization that
causes this broken behaviour
2020-03-18 14:31:13 +01:00
Paweł Chmielowski
2d707cc0d2 Fix type of computed field in node_flat sql query 2020-03-18 14:05:05 +01:00
Paweł Chmielowski
0a88d03dc9 Use correct type for seconds field in mod_last sql queries 2020-03-18 14:05:05 +01:00
Paweł Chmielowski
f12ee28660 Change conversion of boolean values for cockroachdb 2020-03-18 14:05:05 +01:00
Badlop
260c289d34 Fix Dialyzer warning that jid can't be 'undefined' 2020-03-18 12:02:16 +01:00
Paweł Chmielowski
d8899ca9ac Add cache to mod_shared_roster
This should help with excessive queries that sql backend generates
Should fix issue #3158.
2020-03-17 14:35:43 +01:00
Paweł Chmielowski
1e456065f6 Fix issue with family field on cockroachdb 2020-03-17 11:35:54 +01:00
Paweł Chmielowski
82074190fb Replace mod_shared_roster:X call with just X inside that module 2020-03-16 14:57:55 +01:00
Paweł Chmielowski
6fe7c5cac5 Try to limit calls to groups_with_opts in mod_shared_roster 2020-03-16 13:29:05 +01:00
Badlop
e9d1201ea8 Pass base path instead of level to support URL missing slash (#3177) 2020-03-11 16:26:33 +01:00
Paweł Chmielowski
9a89b360c0
fix command rooms_empty_destroy (#3183) 2020-03-05 11:41:51 +01:00
Paweł Chmielowski
b39a1e2d74 Add reload handler to ejabberd_auth_ldap
This will restart ldap process with new options, and should made it
recognize new values.

This fixes issue #3181
2020-03-04 13:19:41 +01:00
Paweł Chmielowski
151b818af4 Use compilation flags used during build to compile modules in ext_mod
This fixes issue #3178
2020-03-03 11:25:17 +01:00
Paweł Chmielowski
df47e2a93f Fix list parameters in sql queries on pgsql 2020-02-27 11:10:30 +01:00
Mickaël Rémond
d0e93f9219
Merge pull request #3125 from area-42/enable_odbc_in_mix
enable odbc in mix build
2020-02-26 14:45:01 +01:00
Badlop
47c5aba1e5 Allow mod_register_web to be accessed from now-served vhosts (#3173) 2020-02-26 13:57:19 +01:00
Badlop
00abf5d42c Fix handle of 'http' atom in Headers, problem introduced in 357e7e11 2020-02-26 13:56:38 +01:00
Paweł Chmielowski
9c25d1024a Support ssl connection on mysql 2020-02-26 10:54:04 +01:00
Paweł Chmielowski
ee736b1ab7 Update mix deps 2020-02-25 16:07:22 +01:00
Jerome Sautret
065e96d24b Bump version in mix.exs 2020-02-25 14:46:44 +01:00
Paweł Chmielowski
5f075f316f Update changelog 2020-02-25 14:30:06 +01:00
Paweł Chmielowski
a5987800c7 Update dependences 2020-02-25 14:15:50 +01:00
Paweł Chmielowski
357e7e117d Make http heades passed in custom_headers override builtin headers
Previously we just appended them, so sometimes we just had duplicates

This fixes issue #3056
2020-02-21 12:19:37 +01:00
Mickaël Rémond
3947e64524
Merge pull request #3127 from area-42/allow_emojis_with_mssql
allow storage of emojis in archive on mssql
2020-02-20 16:28:24 +01:00
Badlop
e234ced107 Support ejabberd_auth_http's auth_opts (processone/ejabberd-contrib#284) 2020-02-19 13:18:39 +01:00
Badlop
f0ba506fde Update Jiffy to 1.0.1, just for coherence with p1_acme requirement (#3102) 2020-02-19 12:19:33 +01:00
Paweł Chmielowski
a19fdb717b Do read piefxis file fully before starting processing included file
Previous method of processing files, could lead to mixing events generated
by parsers for multiple files, where we could get in inconsistant state.

After this change we gather all events generated by parser for single file,
before we start parsing any included file.

This fixes issue #3166
2020-02-18 15:02:23 +01:00
Mickaël Rémond
9e1973a238
Update README.md 2020-02-18 08:53:56 +01:00
Holger Weiss
e7c84b81b2 ejabberd_admin: Fix *_config command result format
The 'reload_config' and 'dump_config' calls are expected to yield a
'rescode' result, which means they must return 'ok' (rather than a
tuple) on success.

Fixes #3170.
2020-02-14 18:52:54 +01:00
Paweł Chmielowski
66a84b8d2b Make piefxis import properly decode scram passwords
We encoded scramed password with base64 when exporting, but didn't apply
reverse operation on import, this adds base64 decoding on import.

This fixes issue #3167.
2020-02-11 12:48:19 +01:00
Badlop
5574b21dd6 Remove tweak introduced in 05c2995c for #1954 as it isn't needed anymore 2020-02-07 13:32:49 +01:00
Alexey Shchepin
b2f536ec8b Use SQL ESCAPE statement only with MSSQL and SQLite, improve compatibility with CockroachDB (#3074) 2020-02-04 04:53:54 +03:00
Paweł Chmielowski
87ea71c3c9 Add missing oauth_client table declaration in lite.new.sql 2020-01-31 16:06:27 +01:00
Paweł Chmielowski
fdb7e3e3fa Optimize sql queries in pubsub select_affiliation_subscriptions 2020-01-31 11:43:41 +01:00
Badlop
2d32c66fd7 Update copyright to 2020 (#3149) 2020-01-28 15:49:23 +01:00
Holger Weiss
20c0fed457 mod_http_upload: Document correct put_url default
Closes #3152.
2020-01-27 00:04:21 +01:00
Paweł Chmielowski
75094df25e Do not use ~ts format in string that are put in xmpp payload
We are expecting utf8 data here, and using that flag will convert those
to unicode codepoints, which aren't handled properly later.
2020-01-22 12:55:27 +01:00
Jerome Sautret
299360c8ed Fix 20.01 changelog 2020-01-21 12:31:04 +01:00
Paweł Chmielowski
ac8363095c Update changelog 2020-01-17 12:05:36 +01:00
Paweł Chmielowski
fb797fe071 Bump version in mix.exs 2020-01-17 11:42:11 +01:00
Paweł Chmielowski
eb6449506f Use tagged version of coveralls 2020-01-17 08:59:10 +01:00
Paweł Chmielowski
0ad2d2120c Update xmpp in mix 2020-01-16 15:26:20 +01:00
Paweł Chmielowski
640f4bed82 Use tagged xmpp 2020-01-16 15:08:57 +01:00
Holger Weiss
453f6b0189 Update xmpp dependency in mix.exs and mix.lock
Closes #3146.
2020-01-15 14:49:37 +01:00
Holger Weiss
243dc06733 mod_stream_mgmt: Don't crash on disabled ACK timer
Don't attempt to start an ACK timer if 'ack_timeout' is set to
'infinity'.

Thanks to Ingo Jrgensmann for reporting the bug.
2020-01-14 01:17:01 +01:00
Holger Weiss
ec035e3c41 mod_carboncopy: Omit check for undefined 'from'
These days, the 'from' of an outgoing #message is guaranteed to be set
to the sender's JID by xmpp_stream_in:process_authenticated_packet/2.
2020-01-13 00:45:33 +01:00
Holger Weiss
430b9bef38 mod_carboncopy: Don't process non-message stanzas
Avoid examining presence and IQ stanzas, as they're not eligible for
carbon-copying.

This is just an optimization and should not change the behavior.
2020-01-13 00:31:01 +01:00
Holger Weiss
ff193a1a6f mod_carboncopy: Also copy mediated MUC invitations 2020-01-13 00:13:54 +01:00
Holger Weiss
74c01caf08 mod_carboncopy: Improve is_carbon_copy() check
Make sure the hook chain is stopped early whenever a carbon copy is
processed, not just in some cases.
2020-01-12 14:04:31 +01:00
Holger Weiss
a8f6c1db1d mod_carboncopy: Support new copying rules
Support the copying rules added to XEP-0280 with version 0.13.0 under
the "urn:xmpp:carbons:rules:0" namespace.

Closes #3011.
2020-01-12 13:42:00 +01:00
Holger Weiss
919c9d6fb1 mod_sip: Omit documentation when SIP is disabled
Don't generate the actual mod_sip documentation if ejabberd is built
without SIP support.
2020-01-11 20:34:11 +01:00
Holger Weiss
6531fbb0f3 mod_sip: Fix compilation without SIP support
Make sure the T() macro is also defined when ejabberd is compiled
without SIP support.

Fixes #3143.
2020-01-11 20:27:16 +01:00
badlop
f341699250
Merge pull request #3142 from kenanilgun/master
Update Turkish Language
2020-01-10 12:46:35 +01:00
Kenan İLGÜN
9f7daad46f Update Turkish Language 2020-01-10 14:26:02 +03:00
Paweł Chmielowski
06fe5c8cfe Update deps is mix 2020-01-09 12:31:23 +01:00
Evgeny Khramtsov
51745f696f Add the man page 2020-01-08 12:47:54 +03:00
Evgeny Khramtsov
a9383597af Add install target for ejabberd.yml.5 2020-01-08 12:45:58 +03:00
Paweł Chmielowski
4c61e465ca Rename plugin to not clash with plugin from dep 2020-01-08 10:41:48 +01:00
Evgeny Khramtsov
97da380acd Generate ejabberd.yml.5 man page from source code directly
Several documentation callbacks (doc/0 and mod_doc/0) are implemented
and `ejabberdctl man` command is added to generate a man page. Note
that the command requires a2x to be installed (which is a part of
asciidoc package).
2020-01-08 12:24:51 +03:00
Paweł Chmielowski
c40d8fe11b Update deps 2020-01-08 10:18:52 +01:00
Holger Weiss
0e96d64e60 Omit push notifications if offline storage failed
This commit removes the 'store_offline_message' hook which didn't allow
mod_push to suppress notifications when storing an offline message
failed (due to the offline spool size limit being exceeded or due to
database issues).

Fixes #3120.
2020-01-05 20:08:54 +01:00
Holger Weiss
19e47375df Travis CI: Test against Erlang/OTP 22.2 2020-01-05 15:02:01 +01:00
Christoph Scholz
248cc2d013 change publisher from text to varchar for mssql 2019-12-28 15:49:37 +01:00
Christoph Scholz
00ccb119ea allow storage of emojis in archive on mssql 2019-12-27 13:06:06 +01:00
Christoph Scholz
8eccbade56 enable odbc in mix build 2019-12-25 00:38:48 +01:00
Badlop
bbe404abcc Updated Catalan translation 2019-12-24 14:05:44 +01:00
Badlop
c396271c00 Fix case clause error regarding admin_generated password (#3122) 2019-12-24 11:10:36 +01:00
Paweł Chmielowski
4b3a1ec614 Add ability to hookup config transformer 2019-12-16 12:39:56 +01:00
Badlop
869826c818 Fix mod_muc_log skipping non-Latin messages (thanks to Yandrey)(#3115) 2019-12-16 11:35:10 +01:00
Alexey Shchepin
24ac62eabd Improve compatibility with CockroachDB (#3074) 2019-12-16 06:52:06 +03:00
Alexey Shchepin
f9120f75b0 Improve compatibility with CockroachDB (#3074) 2019-12-11 17:49:02 +03:00
Badlop
fbab446c24 Update the Spanish translation 2019-12-09 16:40:49 +01:00
Badlop
142c2a2cf2 Add Hungarian translation (thanks to Balázs Úr)(#3108) 2019-12-09 16:34:44 +01:00
Badlop
86742ee528 Update translation files 2019-12-09 16:30:51 +01:00
Evgeny Khramtsov
6e68ca2211 Improve send_message command 2019-11-29 11:27:57 +03:00
Paweł Chmielowski
71c44bff8b Make convert_to_scram work with all backends 2019-11-27 10:35:52 +01:00
Alexey Shchepin
a9f3fd2179 Merge branch 'sabudaye-pg_prepared_statements' 2019-11-26 19:45:47 +03:00
Alexey Shchepin
2a35cadf80 Merge branch 'pg_prepared_statements' of https://github.com/sabudaye/ejabberd into sabudaye-pg_prepared_statements
Conflicts:
	ejabberd.yml.example
	src/ejabberd_sql.erl
2019-11-26 19:45:01 +03:00
Evgeny Khramtsov
910f6aa290 Fix previous commit 2019-11-24 16:26:03 +03:00
Evgeny Khramtsov
de91618070 Check also 'access' rule on account removal
According to the documentation we should not allow
account removal when it's forbidden by the rule
from 'access' option.
2019-11-24 16:21:01 +03:00
Evgeny Khramtsov
650bdae5d9 Make sure IQ result is correctly routed on account removal
Thanks to Philipp Hörist for spotting this
2019-11-24 15:43:38 +03:00
Evgeny Khramtsov
33a16090d3 Fix acl reloading 2019-11-15 18:21:30 +03:00
Evgeny Khramtsov
b47a2e9626 Bump yconf version 2019-11-08 11:17:45 +03:00
Evgeny Khramtsov
925998c360 Preserve order of grouped duplicates 2019-11-08 10:20:18 +03:00
Evgeny Khramtsov
f6d7af1a2b Check if error.log is empty after running test suite 2019-11-08 09:35:12 +03:00
Evgeny Khramtsov
3826a9ed58 Also group duplicated list-like options inside host_config/append_host_config 2019-11-07 12:14:08 +03:00
Evgeny Khramtsov
b7b76cc38b Group all duplicated list-like options into a single option 2019-11-07 11:33:24 +03:00
Evgeny Khramtsov
94b74c0cbe Fix loading of third-party modules at startup
Fixes #3019
2019-11-07 10:47:11 +03:00
Evgeny Khramtsov
c48e972573 Allow multiple modules section
Fixes processone/ejabberd-contrib#282
2019-11-06 13:43:30 +03:00
Evgeny Khramtsov
bb26d7c379 Accept a list in c2s_ciphers/s2s_ciphers options 2019-11-05 17:54:56 +03:00
Evgeny Khramtsov
3a46612d88 Fix unicode string formatting
Fixes #3066
2019-11-05 17:51:12 +03:00
Evgeny Khramtsov
a420eb1f72 Don't overflow 32-bit signed integer in offline tests 2019-10-31 11:46:31 +03:00
Evgeny Khramtsov
a81324fc43 Add missing quote 2019-10-31 11:18:59 +03:00
Evgeny Khramtsov
116c33f7e1 Grant all privileges on all sequences for PostgreSQL in tests 2019-10-31 11:00:02 +03:00
Evgeny Khramtsov
3e5ab8082b Revert "Escape 'family' field in SQL requests"
This reverts commit f51ba687e2.
Fixes #3072
2019-10-30 09:11:13 +03:00
Evgeny Khramtsov
72f6835feb Fix race condition in Redis/SQL supervisors startup 2019-10-29 13:36:40 +03:00
Evgeny Khramtsov
86c4f76c51 Avoid using 64-bit unsigned integers 2019-10-29 13:27:59 +03:00
Evgeny Khramtsov
f51ba687e2 Escape 'family' field in SQL requests
This is needed for compatibility with CockroachDB, because
'FAMILY' is a reserved keyword in this database.
2019-10-28 12:19:24 +03:00
Evgeny Khramtsov
e2b79ea0b6 Don't attempt to create SQL tables when running tests
Instead, only clear existing tables.
The commit assumes that the SQL schemas will be loaded
manually before running the test suite, see test/README
for the examples.
2019-10-28 12:09:14 +03:00
Evgeny Khramtsov
a202818037
Merge pull request #3069 from nosnilmot/jwt-custom-jid-field
Add option for JWT field name containing JID
2019-10-26 11:03:19 +03:00
Stu Tomlinson
b2651dae0f Add option for JWT field name containing JID 2019-10-25 16:56:18 +01:00
Evgeny Khramtsov
f981a2ef17 Improve jwt_key validator 2019-10-25 18:30:50 +03:00
Evgeny Khramtsov
02cb3d93fd Don't lowercase first letter in reason string 2019-10-25 18:18:04 +03:00
Alexey Shchepin
c7470f5107 Handle the case when JWT key file contains JWK set 2019-10-25 16:33:22 +03:00
Evgeny Khramtsov
7eda35b945 Introduce 'gc' ejabberdctl command
The command forces garbage collection of all running Erlang processes.
The return is always success.
2019-10-25 16:02:24 +03:00
Evgeny Khramtsov
e8fe68543e Stop SASL application in ejabberd_logger:flush() 2019-10-25 15:52:05 +03:00
Evgeny Khramtsov
f1a35cc9ac Avoid calling to logger module on OTP<22 2019-10-25 15:27:47 +03:00
Evgeny Khramtsov
516950fb1e TravisCI: test against Erlang/OTP 19.3 2019-10-25 14:56:19 +03:00
Evgeny Khramtsov
e3962aea6e Use lager on OTP<22.0
This also lowers Erlang/OTP minimum version requirement back to 19.3
2019-10-25 11:44:04 +03:00
Evgeny Khramtsov
c604bdb897 Limit result set of disco#items for mod_pubsub
The size of a list of nodes returned for disco#items request
is now controlled by option 'max_nodes_discoitems'. The default
value is 100. The name and the default value of the option is
chosen to be consistent with mod_muc's 'max_rooms_discoitems' option.
2019-10-24 14:59:47 +03:00
Evgeny Khramtsov
d300a87059 Fix logger initialization on OTP<21.3 2019-10-23 16:41:27 +03:00
Evgeny Khramtsov
1e30b85861 Report errors in logger initialization 2019-10-23 16:03:48 +03:00
Evgeny Khramtsov
86bb77bfc2 Make PostgreSQL schema compatible with CockroachDB 2019-10-23 14:40:32 +03:00
badlop
b5d4b86724
Merge pull request #3063 from lnjX/fix/de-comma-setting
msgs: de: Fix comma setting
2019-10-21 10:14:52 +02:00
Evgeny Khramtsov
e388805049 Log path to third-party configuration file
This should prevent confusions like the one described at
https://stackoverflow.com/q/58353491/2610053
2019-10-20 18:14:33 +03:00
Evgeny Khramtsov
7a85e51237 Fix error reporting in configuration related admin commands 2019-10-19 19:58:42 +03:00
Evgeny Khramtsov
a23b6fb7ec Don't parse obsoleted options 2019-10-19 12:14:02 +03:00
Evgeny Khramtsov
9ff6cc25dc Log supervisor reports in debug loglevel 2019-10-18 22:00:37 +03:00
Evgeny Khramtsov
e4a8afb15d Replace lager with built-in new logging API
This change requires Erlang/OTP-21.0 or higher.
The commit also deprecates the following options:
  - log_rotate_date
  - log_rate_limit

Furthermore, these options have no effect. The logger now fully
relies on log_rotate_size, that cannot be 0 anymore.

The loglevel option now accepts levels in literal formats.
Those are: none, emergency, alert, critical, error, warning, notice, info, debug.
Old integer values (0-5) are still supported and automatically converted
into literal format.
2019-10-18 19:12:32 +03:00
Badlop
b1d458999a Flatten strings in ejabberd_xmlrpc error results 2019-10-18 13:16:37 +02:00
Linus Jahn
a98e443501 msgs: de: Fix comma setting 2019-10-18 01:55:25 +02:00
Paweł Chmielowski
9822535e70 Convert oauth_expire option to accept timeout values 2019-10-15 11:28:47 +02:00
Evgeny Khramtsov
3821208bb1 Improve type spec of properties() 2019-10-11 17:57:45 +03:00
Alexey Shchepin
e7a20d9fc5 Fix dialyzer warning in #oauth_ctx 2019-10-11 17:39:11 +03:00
Evgeny Khramtsov
211cc80fd4 Implement X-OAUTH2 authentication for mod_mqtt
This will only work for MQTT 5.0 connections.
A client MUST set "Authentication Method" property of CONNECT
packet to "X-OAUTH2" and MUST set the token in "Authentication Data"
property of the same CONNECT packet.

The server responses as usual with CONNACK.
2019-10-11 16:46:16 +03:00
Paweł Chmielowski
8d571adca8 Verify http host in web admin only if authentication is missing host
This should allow access to web admin through ip address or just served
from domain not defined in ejabberd hosts
2019-10-09 10:31:02 +02:00
Mickaël Rémond
584a4b0a2b
Try removing label as bug
Many tickets submitted by users are not bugs.
2019-10-04 09:02:45 +02:00
Badlop
9df26a5740 Update ejabberd_xmlrpc to handle binaries in restuple result (#3048) 2019-10-03 16:48:22 +02:00
Alexey Shchepin
5d549dca96 Check redirect_uri for OAUTH implicit grant 2019-10-03 06:18:48 +03:00
Badlop
949e71efb6 Update Guide links in WebAdmin to website, as local file isn't included 2019-10-02 12:42:59 +02:00
Badlop
20205c66c1 Support custom base path in WebAdmin by using relative URLs (#3043) 2019-10-02 12:42:54 +02:00
Evgeny Khramtsov
7fc272918a Fix startup of supervisors for listening modules 2019-10-01 23:28:00 +03:00
Paweł Chmielowski
6ca5691792 Allow configuring proxy65 port in tests 2019-10-01 17:00:50 +02:00
Paweł Chmielowski
0673b068e0 Bump version of jose to 1.9.0
This version theoretically require rebar3 but we have plugin that can
override it by using version declared in main config file
2019-10-01 16:34:25 +02:00
Mickael Remond
00c77dadd3
Update description for Hex.pm 2019-09-30 10:10:44 +02:00
Evgeny Khramtsov
c49edaca19 Improve best match 2019-09-28 11:27:20 +03:00
Alexey Shchepin
8f7fa38949 Support OAUTH client authentication 2019-09-27 20:36:58 +03:00
Evgeny Khramtsov
47d0eed3f1 Advertise muc#roominfo_logs in disco#info of the room
The commit adds new `url` option for mod_muc_log.
Fixes #3040
2019-09-26 16:53:36 +03:00
Evgeny Khramtsov
d2f92eecd4 Re-tag xmpp dep 2019-09-26 10:22:36 +03:00
Paweł Chmielowski
8918bfb55b Update deps in mix.exs/lock 2019-09-25 14:55:32 +02:00
Jerome Sautret
ce8bd343de Bump version in mix.exs 2019-09-25 14:54:12 +02:00
Evgeny Khramtsov
2eaad21863 Don't log warning when an option is consulted for uknown vhost
Such warnings may be unappropriate in some situation, e.g.
when a virtual host is disabled in runtime but some packets
for this host are still in transit.

Fixes #3037
2019-09-25 13:58:05 +03:00
Paweł Chmielowski
9b2a44e750 Tag p1_acme and use that in deps 2019-09-25 12:46:22 +02:00
Evgeny Khramtsov
aefe2fd640 Rename to p1_acme 2019-09-25 13:10:47 +03:00
Jerome Sautret
a8f336421e Add 19.09 Changelog 2019-09-24 18:30:10 +02:00
Paweł Chmielowski
f2e8754586 Update deps 2019-09-24 11:01:43 +02:00
Evgeny Khramtsov
5770946f03 Correctly handle unicode in log messages 2019-09-23 15:17:20 +03:00
Evgeny Khramtsov
2e1e128833 Fix unicode formatting in ACME module 2019-09-22 20:11:54 +03:00
Evgeny Khramtsov
faefad746e Fix unicode processing in ejabberd.yml 2019-09-22 19:42:29 +03:00
Evgeny Khramtsov
b7e296857c Don't call to xmpp_idna 2019-09-22 13:28:14 +03:00
Evgeny Khramtsov
75fe6f44d2 Fix IDNA support in ACME requests 2019-09-22 12:44:31 +03:00
Evgeny Khramtsov
30346a56de Don't forget to log an error message on IDNA failure 2019-09-22 11:30:20 +03:00
Evgeny Khramtsov
a616cc04cb Support IDN hostnames in ACME requests 2019-09-22 11:04:38 +03:00
Evgeny Khramtsov
d5e0ccb04a Don't attempt to create acme directory on ejabberd startup 2019-09-22 01:14:29 +03:00
Evgeny Khramtsov
ea09497038 Slightly improve arg example 2019-09-22 01:03:08 +03:00
Evgeny Khramtsov
f5156390bb Don't allow requesting certificates for localhost or IP-like domains 2019-09-22 00:53:03 +03:00
Evgeny Khramtsov
12691e738b Improve warning message 2019-09-22 00:21:12 +03:00
Evgeny Khramtsov
6d9be82e1b Avoid excessive quoting in request_handlers of example config 2019-09-21 22:20:20 +03:00
Evgeny Khramtsov
fa00caced4 Bump acme version 2019-09-21 22:18:49 +03:00
Evgeny Khramtsov
bacaae7873 Comment certfiles section in example config
Rely on ACME configuration instead
2019-09-20 16:12:15 +03:00
Evgeny Khramtsov
81ae691738 Use round/0 instead of ceil/0
Because ceil/0 was introduced in OTP20.0 only
2019-09-20 15:33:08 +03:00
Evgeny Khramtsov
9805b1a73a Fix typo 2019-09-20 14:04:00 +03:00
Evgeny Khramtsov
68ba109889 Remove unused file 2019-09-20 13:08:03 +03:00
Evgeny Khramtsov
4cdb4c2090 Don't auto request certificate for localhost and IP-like domains 2019-09-20 13:03:25 +03:00
Evgeny Khramtsov
1162137d5d Add listener for ACME challenge in example config 2019-09-20 12:52:28 +03:00
Evgeny Khramtsov
e227940b85 Improve ACME implementation
Fixes #2487, fixes #2590, fixes #2638
2019-09-20 12:36:31 +03:00
Alexey Shchepin
0fe1e40a9d JWT-only authentication for some users (#3012) 2019-09-18 18:46:24 +03:00
Holger Weiss
f48b4124b1 mod_jidprep: Don't call gen_mod functions directly 2019-09-18 17:39:40 +02:00
Badlop
fd4c5edc23 Apply default role after revoking admin affiliation (#3023) 2019-09-17 12:31:14 +02:00
Holger Weiss
d8433d1644 README.md: Clean up wording
The `gsfonts` package name is specific to some Linux distributions, so
just mention the dependency on "Ghostscript fonts".
2019-09-12 12:22:30 +02:00
Holger Weiss
0f864d97f6 Merge remote-tracking branch 'processone/pr/2995'
* processone/pr/2995:
  Added gsfonts for captcha
2019-09-12 12:20:59 +02:00
Holger Weiss
b1c10d2a03 Add support for XEP-0328: JID Prep
The mod_jidprep module implements XEP-0328: JID Prep, version 0.1.
2019-09-12 09:26:45 +02:00
Evgeny Khramtsov
56b4d3902a Log Mnesia table type on creation 2019-09-10 21:57:51 +03:00
Evgeny Khramtsov
533a4eec96 Replicate Mnesia 'bosh' table when nodes are joined 2019-09-10 16:02:51 +03:00
Mickael Remond
bd83bb0790
Merge branch 'master' of github.com:processone/ejabberd 2019-09-09 12:13:27 +02:00
Mickael Remond
7b79921734
Use email field type to avoid jid capitalization on iOS 2019-09-09 12:12:54 +02:00
Holger Weiss
017f60d33c Fix typos in issue template 2019-09-09 10:46:54 +02:00
Mickaël Rémond
bf6fc75ada Update issue templates 2019-09-09 09:49:54 +02:00
Alexey Shchepin
6d83cbd1a8 Add missing ejabberd_auth_jwt:user_exists/2 function (#3012) 2019-09-09 00:57:55 +03:00
Alexey Shchepin
21aa344ed5 Fix BEGIN/COMMIT/ROLLBACK syntax for MSSQL (#2978) 2019-09-09 00:16:44 +03:00
Evgeny Khramtsov
a8c6eec28c Fix certificate selection for s2s
The bug was introduced in c2cbb4d879
Fixes #3015
2019-09-06 22:20:07 +03:00
Paweł Chmielowski
6d08ecc41f Add ejabberd_oauth:verify_resowner_scope callback back
This fixes issue #2982
2019-09-06 16:47:22 +02:00
Evgeny Khramtsov
9a8245b8e6 Fix the regression introduced in dd57950
Fixes #3010
2019-09-04 10:31:09 +03:00
Badlop
e50ecf9e96 Fix some links to Guide in WebAdmin and add new ones (#3003) 2019-08-27 15:41:37 +02:00
badlop
e14f206615
Merge pull request #3004 from Slawutich/master
Custom exit message is not broadcast
2019-08-26 13:53:42 +02:00
Vyache
c0f8e5d7c0 Custom exit message is not broadcast 2019-08-23 09:32:58 +03:00
Badlop
1fd75265d6 Use select fields to input host in WebAdmin Backup (#3000) 2019-08-22 18:35:43 +02:00
Badlop
94d50a447d Fix call to deprecated ejabberd_config:get_myhosts() (#3000) 2019-08-22 18:35:41 +02:00
Badlop
12c4dfd955 Provide meaningful error when adding non-local users to shared roster (#3000) 2019-08-22 17:13:18 +02:00
Badlop
a51aa2bc44 Check account auth provided in WebAdmin is a local host (#3000) 2019-08-22 17:13:13 +02:00
ThUnD3r|Gr33n
4a9b1e94f3
Added gsfonts for captcha
This is needed to show Captcha .if not Captcha would be empty
2019-08-18 11:19:09 +02:00
Paweł Chmielowski
07ef1775cd Add another variant of transformation of offline_msg in mod_offline_mnesia 2019-08-16 18:34:42 +02:00
Evgeny Khramtsov
9ec69b8d62 Don't treat 'Host' header as a virtual XMPP host
Fixes #2989
2019-08-13 18:30:28 +03:00
Badlop
0bb14bdc0b Revert "Affiliations other than admin and owner cannot invite to members_only rooms"
This reverts commit b010a1a0a0.
More details in #2987
2019-08-13 14:55:37 +02:00
Badlop
a157e22c2f When join new room with password, set pass and password_protected (#2668) 2019-08-13 11:37:32 +02:00
Badlop
a1dfb7fbe6 Improve rooms_* commands to accept 'global' as MUC service argument (#2976) 2019-08-12 17:03:32 +02:00
Evgeny Khramtsov
8f8f53a595 Fix typo in type spec 2019-08-12 12:28:17 +03:00
Evgeny Khramtsov
d796dcace5 Spawn SQL connections on demand only 2019-08-12 12:21:31 +03:00
Badlop
dd8c468de3 Rename MUC command arguments from Host to Service (#2976) 2019-08-08 12:32:59 +02:00
Evgeny Khramtsov
ced62e0df8 Don't use close/2: set stop_reason explicitly
Fixes #2984
2019-08-08 11:21:28 +03:00
Mickael Remond
28feb90175
Remove fast_yaml override 2019-08-06 15:47:58 +02:00
Evgeny Khramtsov
950c209310 Report connection error before waiting for resumption
In other words don't hide the reason why c2s connection has failed
2019-08-06 16:18:04 +03:00
Evgeny Khramtsov
77acbab965 Add tests for 'vcard' option 2019-08-06 14:03:23 +03:00
Evgeny Khramtsov
934392fd7e Implement reload/3 for mod_http_upload 2019-08-06 12:31:33 +03:00
Jerome Sautret
11d519677e Add 19.08 Changelog 2019-08-05 14:36:45 +02:00
Paweł Chmielowski
e520a4c78d Adopt mix task to changes in ejabberd_config 2019-08-05 10:55:30 +02:00
Paweł Chmielowski
c2d97854e3 Bump version in mix.exs 2019-08-05 10:15:06 +02:00
Paweł Chmielowski
1d2fba856e Update mix deps 2019-08-05 10:14:30 +02:00
Evgeny Khramtsov
2168489ddf Don't retain module option on gen_mod supervisor
When module's options were updated (e.g. by reloading ejabberd.yml)
and, later, the module's process crashed, gen_mod supervisor
restarts the process with outdated options. This is now fixed.
2019-08-04 21:46:18 +03:00
Paweł Chmielowski
e8fb9ab303 Use tagged version for yconf as well 2019-08-02 16:06:19 +02:00
Paweł Chmielowski
b50e7161ee Update deps to tagged versions 2019-08-02 15:12:38 +02:00
Evgeny Khramtsov
4dac9f1e6d Validate BINVAL values of vcard elements as Base64 2019-08-02 14:20:10 +03:00
Evgeny Khramtsov
5a976719fb Introduce 'vcard' option for the modules supporting vCards
The mapping between vCard's XML elements and YAML elements
of 'vcard' option is straightforward. For example, if you
want mod_muc to return the following vCard:
```
<vCard xmlns='vcard-temp'>
  <FN>Conferences</FN>
  <ADR>
    <WORK/>
    <STREET>Elm Street</STREET>
  </ADR>
</vCard>
```
you need to set the configuration as:
```
modules:
  ...
  mod_muc:
    vcard:
      fn: Conferences
      adr:
        -
          work: true
          street: Elm Street
  ...
```
2019-08-02 13:59:42 +03:00
Evgeny Khramtsov
2f51aae818 Bump pkix version 2019-08-01 12:56:23 +03:00
Badlop
66d2e6ca27 Explain requirements of the FROM argument of send_message command (#2959) 2019-08-01 11:29:42 +02:00
Evgeny Khramtsov
059cf8fed1 Don't call ejabberd_cluster from its submodules
Fixes #2971
2019-07-31 19:25:47 +03:00
Evgeny Khramtsov
465e1f5ee1 Fix db_type validation 2019-07-31 18:55:43 +03:00
Paweł Chmielowski
aa0f110afe Add test that trigger get_only_item in pubsub 2019-07-31 13:11:27 +02:00
Paweł Chmielowski
51bf552c3f For pubsub items with max_item = 1 use order by in sql queries 2019-07-31 13:06:44 +02:00
Evgeny Khramtsov
48bed43902 Don't render CAPTCHA whitelist when CAPTCHA is not configured
Fixes #2970
2019-07-31 12:35:06 +03:00
Paweł Chmielowski
a2fa52a192 Change type of server_host column in mysql.new.sql
Indexes are done only on 191 byte slice of that (to fit in index limits),
and since server_host could theoretically be bigger this causes mysql
engine don't use indexes in full potential.
2019-07-31 10:46:15 +02:00
Evgeny Khramtsov
bbee13f970 Improve SQL timeouts handling
Also improve some formatting
2019-07-31 10:39:53 +03:00
Evgeny Khramtsov
651d69fb98 Also catch 'shutdown' exit reason 2019-07-30 23:17:10 +03:00
Evgeny Khramtsov
15f50f5331 Improve pattern matching 2019-07-30 20:57:32 +03:00
Evgeny Khramtsov
3e4d7a98af Implement read-repair for session pids 2019-07-30 20:57:09 +03:00
Evgeny Khramtsov
46cc6c66ec Remove dead code 2019-07-30 15:31:44 +03:00
Evgeny Khramtsov
b4770815c0 Fix race condition when deleting c2s session record 2019-07-30 15:21:58 +03:00
Evgeny Khramtsov
209f5d32e1 Fix SQL connections leakage 2019-07-30 14:26:11 +03:00
Evgeny Khramtsov
81996b153a Fix previous commit 2019-07-30 13:40:40 +03:00
Evgeny Khramtsov
59adfcb8e0 Correctly report resume timeout 2019-07-30 12:50:31 +03:00
Evgeny Khramtsov
8a2b2668cf Expose access_model and publish_model in pubsub#metadata
Fixes #2931
2019-07-30 10:45:32 +03:00
Evgeny Khramtsov
949e4c1c59 Generate 'remote-server-not-found' stanza error for non-IDN domains
Fixes #2969
2019-07-29 22:45:38 +03:00
Evgeny Khramtsov
d64951c2b2 Improve handling of errors in tree_action/3 2019-07-29 22:24:26 +03:00
Evgeny Khramtsov
2cd930b7d5 Appropriately abort pubsub transaction 2019-07-29 21:44:30 +03:00
Badlop
630cfe26b7 mod_multicast service discovery bugfix (thanks to McPo)(#2968) 2019-07-29 19:32:26 +02:00
Evgeny Khramtsov
2da168cf05 Improve handling of errors in pubsub code 2019-07-29 17:13:16 +03:00
Frank Diebolt
cd88d342b9 Apply shaping to websocket connections 2019-07-29 14:54:25 +02:00
Evgeny Khramtsov
35576b4608 Improve hooks validator and fix bugs related to hooks registration 2019-07-29 10:46:20 +03:00
Evgeny Khramtsov
0aa004bafc Improve ejabberd halting procedure 2019-07-26 11:40:19 +03:00
Evgeny Khramtsov
a54694684d Fix default value of resume_timeout 2019-07-25 13:57:43 +03:00
Evgeny Khramtsov
3b18e7cc00 Don't attempt to restart killed lager
This is not very robust and the call may hang forever
2019-07-24 19:47:14 +03:00
Evgeny Khramtsov
ca0e53b3c5 Fix typo in log message 2019-07-24 18:56:44 +03:00
Evgeny Khramtsov
ae135e57d9 Improve SQL pool logic
Avoid using ETS table for SQL workers: rely on processes names instead
2019-07-24 14:28:43 +03:00
Holger Weiss
c3c8dffeab Revert "mod_privacy: Don't try to look up 'undefined' list"
This reverts commit 4218aecd1c.  The issue
was fixed in a0d3fb3b23 already.
2019-07-24 11:29:57 +02:00
Holger Weiss
4218aecd1c mod_privacy: Don't try to look up 'undefined' list
Don't crash if the <query/> element of an IQ of type 'set' contains
neither a <default/> nor an <active/> child.

This fixes a regression introduced in commit
8410a203ec.
2019-07-24 10:45:30 +02:00
Evgeny Khramtsov
9ef52f2b0f Fix UTF-8 support in translation files 2019-07-24 11:34:40 +03:00
Evgeny Khramtsov
052917961a Add 'certauth' command to extauth port 2019-07-24 10:13:51 +03:00
Holger Weiss
8ac4a5f792 mod_stream_mgmt: Allow flexible timeout format
Adjust mod_stream_mgmt and the related code in mod_push_keepalive to
support the flexible timeout format.
2019-07-23 00:15:40 +02:00
Christophe Romain
c0dc95d529 Fix wrong virtual host in mod_pubsub:send_stanza (#2930) 2019-07-22 10:13:27 +02:00
Evgeny Khramtsov
4be98b5aef Log an error when JWT authentication is configured without jwt_key 2019-07-19 12:01:57 +03:00
Evgeny Khramtsov
55d42b9000 Fix typo 2019-07-18 22:35:16 +03:00
Evgeny Khramtsov
6d6e3e348d Improve robustness of reading jwt_key option 2019-07-18 22:31:08 +03:00
Evgeny Khramtsov
50ef982eff Get rid of useless code 2019-07-18 21:53:22 +03:00
Evgeny Khramtsov
ad902c2e16 Don't forget to unregister route when the owning process is dead 2019-07-18 21:48:53 +03:00
Evgeny Khramtsov
3f7d9e3ad6 Remove Riak support
Reasons:
- Riak DB development is almost halted after Basho
- riak-erlang-client is abandoned and doesn't work
  correctly with OTP22
- Riak is slow in comparison to other databases
- Missing key ordering makes it impossible to implement range
  queries efficiently (e.g. MAM queries)
2019-07-18 19:31:12 +03:00
Mickaël Rémond
11e4b9d882
Mention about a few Riak tests being broken 2019-07-18 17:56:11 +02:00
Mickaël Rémond
179a9f4ca8
Explain how to kill stuck common test run 2019-07-18 17:24:13 +02:00
Mickaël Rémond
f2fd087673
Update docker test README 2019-07-18 17:14:20 +02:00
Mickaël Rémond
a351dfe0f8
Fix example on test data set deletion 2019-07-18 17:05:50 +02:00
Evgeny Khramtsov
478f69317b Report failures of changing net_ticktime 2019-07-18 13:02:13 +03:00
Evgeny Khramtsov
6397dc5d4c Reset net ticktime on config reload 2019-07-18 12:47:29 +03:00
Evgeny Khramtsov
dd301306d3 Allow flexible timeout format in session_expiry option of mod_mqtt 2019-07-17 22:58:14 +03:00
Evgeny Khramtsov
d718b35d46 Use econf:timeout() instead of econf:pos_int() wherever appropriate 2019-07-17 22:15:56 +03:00
Evgeny Khramtsov
c5305c5f9a Improve RPC calls in mod_configure 2019-07-17 20:51:33 +03:00
Evgeny Khramtsov
38b2e099d5 Fix pending nodes retrieval for SQL backend
Thanks to Christophe Romain
2019-07-17 12:34:09 +03:00
Evgeny Khramtsov
2171abf5ae Allow more flexible timeout values in the configuration
Now all timeout values can be expanded with suffixes, e.g.
```
negotiation_timeout: 30s
s2s_timeout: 10 minutes
cache_life_time: 1 hour
```
If the suffix is not given, the timeout is assumed in *seconds*
2019-07-16 23:45:44 +03:00
Evgeny Khramtsov
554f4fc851 Change time unit of hibernation_timeout option to 'second'
This is done for the sake of consistency with other options
2019-07-16 23:42:38 +03:00
Evgeny Khramtsov
15b4b3fa1b Fix typos using codespell 2019-07-16 22:07:39 +03:00
Evgeny Khramtsov
cc2f674805 Avoid record duplication 2019-07-16 18:34:05 +03:00
Evgeny Khramtsov
a7a53f601e Add econf:string/2 validator 2019-07-16 18:10:45 +03:00
Evgeny Khramtsov
0e48adb1ed Fix opt_type.sh script and re-generate options 2019-07-16 18:06:51 +03:00
Evgeny Khramtsov
76d4c178a7 Use econf:timeout/2 2019-07-16 18:02:32 +03:00
Evgeny Khramtsov
f85488583c Handle CAPTCHA forms using captcha_form codec 2019-07-16 17:51:51 +03:00
Paweł Chmielowski
6b3d0d154e Add code for hibernating inactive muc_room processes 2019-07-16 15:09:58 +02:00
Evgeny Khramtsov
4d877289fb Bump xmpp version and fix revealed bugs 2019-07-16 15:59:33 +03:00
Evgeny Khramtsov
f10de6439b Fix 'get-pending' command form generation 2019-07-16 15:09:51 +03:00
Badlop
5ecbed5eae Remove very old useless comments in ejabberd_xmlrpc.erl 2019-07-16 12:56:41 +02:00
Badlop
7079634f18 Documentation of mod_http_api moved from source code to Docs page 2019-07-16 12:53:06 +02:00
Evgeny Khramtsov
5eeb95c74f Remove modules management from mod_configure 2019-07-15 17:08:41 +03:00
Evgeny Khramtsov
e1f3526466 Don't hide errors using catch 2019-07-15 17:03:29 +03:00
Evgeny Khramtsov
a00496a38f Compile some regexps as unicode 2019-07-15 15:26:47 +03:00
Evgeny Khramtsov
2419e00a26 Bump yconf version 2019-07-15 15:22:51 +03:00
Evgeny Khramtsov
061c754c68 Fix regexp matching 2019-07-15 15:07:56 +03:00
Evgeny Khramtsov
104c4093dc Only respond with occupants list to disco#items with empty node
Fixes #2942
2019-07-15 14:10:45 +03:00
Evgeny Khramtsov
4ec78736b9 Improve handling of unexpected iq in mod_muc_room
Don't crash on an iq-set/get containing unexpected tag within
expected namespace

This further improves PR #2900
2019-07-15 13:59:41 +03:00
Evgeny Khramtsov
04dab48794 ejabberd_s2s should start after its supervisors 2019-07-15 12:59:47 +03:00
Evgeny Khramtsov
295015a8cb Fix startup order of ejabberd_sup children 2019-07-15 12:53:26 +03:00
Evgeny Khramtsov
e1eedd587d Remove processing of {wait, _} result in gen_mod
This is no longer needed
2019-07-15 12:43:55 +03:00
Evgeny Khramtsov
a4e19b7108 Increase shutdown time to 5 seconds 2019-07-15 12:43:32 +03:00
Evgeny Khramtsov
87b8344ede Attach mod_muc_room processes to a supervisor 2019-07-15 12:43:05 +03:00
Evgeny Khramtsov
1fe1322bc1 Improve some validators 2019-07-15 09:59:07 +03:00
Holger Weiss
cd36bb6eda mod_http_fileserver: Unregister 'reopen_log_hook'
Unregister the global 'reopen_log_hook' on termination if the module isn't
loaded for another host.
2019-07-14 15:16:13 +02:00
Evgeny Khramtsov
15dcff92e8 Use correct virtual host when consulting trusted_proxies 2019-07-13 12:20:06 +03:00
Evgeny Khramtsov
9c2392f6e9 Merge branch 'master' of github.com:processone/ejabberd 2019-07-13 10:35:06 +03:00
Evgeny Khramtsov
6013b4a3a6 Fix broken ejabberd_cluster:call/5 2019-07-13 10:34:59 +03:00
Paweł Chmielowski
f0bbc05b7a Make sure that configure is run before pc:compile on rebar3 2019-07-12 15:00:12 +02:00
Paweł Chmielowski
948578b55b Downgrade jose to version that works with rebar2 and del warning_as_error from it's config 2019-07-12 14:55:01 +02:00
Paweł Chmielowski
5a927049ef Bump jose version 2019-07-12 13:02:10 +02:00
Evgeny Khramtsov
f0c0e4a6fc Don't crash when attempt to get an option for unknown virtual host
Log a warning instead and retry with a global scope
2019-07-12 13:59:33 +03:00
Evgeny Khramtsov
696c64064b Add call/5 and multicall/5 to ejabberd_cluster 2019-07-12 13:58:46 +03:00
Evgeny Khramtsov
53dacb3825 Use ejabberd_cluster:call() instead of rpc:call() 2019-07-12 12:30:38 +03:00
Evgeny Khramtsov
6f5d99275b Process unexpected messages uniformly 2019-07-12 11:55:36 +03:00
Evgeny Khramtsov
19cbbf69b2 Improve previous commit 2019-07-11 00:13:39 +03:00
Evgeny Khramtsov
6fd736d496 Gracefully report invalid encoding of a translation file 2019-07-11 00:04:32 +03:00
Evgeny Khramtsov
b0379db5a1 Fix formatting 2019-07-10 23:46:42 +03:00
Evgeny Khramtsov
d1b5844d64
Merge pull request #2900 from aquarhead/protect-muc-owner
Protect against bad muc#owner requests
2019-07-10 23:46:08 +03:00
Evgeny Khramtsov
9dedbe30ba Make sure configuration file path always represented as binary()
Fixes #2936
2019-07-10 23:35:53 +03:00
Evgeny Khramtsov
bfa3125a81 Fix Elixir modules detection in the configuration file
Fixes #2937
2019-07-10 23:17:53 +03:00
Evgeny Khramtsov
5700089187 Gracefully close inbound s2s connections 2019-07-10 12:15:58 +03:00
Evgeny Khramtsov
722864666d Add/improve type specs 2019-07-10 10:31:51 +03:00
Evgeny Khramtsov
691f9e0bf7 Improve error handling/reporting when loading language translations
Also speed up loading on multi-core machines
2019-07-10 10:30:11 +03:00
Evgeny Khramtsov
04ccba0347 Fall back to map/2 and foreach/2 on single-core machines 2019-07-10 10:28:37 +03:00
Evgeny Khramtsov
01f531b3d6 Add type specs for mod_adhoc 2019-07-09 17:02:54 +03:00
Evgeny Khramtsov
f19b41fd19 Improve type specs for ejabberd_s2s
Also minor code cleanup
2019-07-09 16:42:24 +03:00
Evgeny Khramtsov
43da45cf67 Improve type specs of mod_muc_room 2019-07-09 15:21:17 +03:00
Evgeny Khramtsov
11fa02cd6c Improve type specs of mod_roster 2019-07-09 14:30:59 +03:00
Evgeny Khramtsov
590849e2c3 Avoid returning 'stopped' from ejabberd_hooks:run_fold() 2019-07-09 14:30:25 +03:00
Evgeny Khramtsov
f7ad25108c Get rid of unused API functions in ejabberd_hooks
Also improve code formatting and type specs
2019-07-09 01:26:48 +03:00
Evgeny Khramtsov
3e88a0b0b4 Don't expose internal FSM API of ejabberd_c2s 2019-07-09 01:01:56 +03:00
Evgeny Khramtsov
9cbc0685db Don't expose internal FSM API of mod_muc_room 2019-07-09 00:47:54 +03:00
Evgeny Khramtsov
cbe84eb50c Check virtual host before running the command 2019-07-08 23:14:31 +03:00
Evgeny Khramtsov
0545e0a797 Ignore late arrival of an already cancelled timer 2019-07-08 19:32:37 +03:00
Evgeny Khramtsov
e8eb6bc2b4 Avoid crashing of ejabberd_iq process on invalid callback 2019-07-08 10:45:13 +03:00
Evgeny Khramtsov
d4d352492c Debug hooks 2019-07-08 09:57:33 +03:00
Evgeny Khramtsov
83e6741117 Use maps instead of dict 2019-07-08 09:55:32 +03:00
Evgeny Khramtsov
92ab59a581 Use ets and maps instead of dict 2019-07-08 09:46:50 +03:00
Evgeny Khramtsov
80beb6d6f6 Improve formatting of exceptions 2019-07-07 22:12:14 +03:00
Evgeny Khramtsov
368858a744 Fix return type in try_set_password()
Fixes #2932
2019-07-07 12:16:04 +03:00
Evgeny Khramtsov
fd8e5ffce7 Avoid routing packets through a single process 2019-07-06 12:30:57 +03:00
Evgeny Khramtsov
1663e78cf7 Fix validator of option ejabberd_service->hosts
Fixes #2929
2019-07-06 10:38:25 +03:00
Evgeny Khramtsov
61a58f6e67 Do not call the same function twice 2019-07-06 10:21:01 +03:00
Paweł Chmielowski
756adaba55 Restore room when receiving message or generic iq for not started room 2019-07-05 13:46:48 +02:00
Paweł Chmielowski
d7e86d1d32 Limit number of rooms that we return for disco_items from muc
We will limit it to max_room_discoitems and return rsm that would allow
fetching more
2019-07-05 11:08:32 +02:00
Evgeny Khramtsov
f82de80c66 Add forgotten file 2019-07-05 10:49:27 +03:00
Evgeny Khramtsov
b3caade0a0 Distribute routing of MUC messages accross all CPU cores
Also relay as less stanzas as possible through mod_muc workers
2019-07-05 10:35:31 +03:00
Evgeny Khramtsov
05461d1686 Propagate max_fsm_queue to all modules started as gen_server 2019-07-04 10:26:59 +03:00
Evgeny Khramtsov
d411e68a2e Make return type of sql_transaction() consistent 2019-07-04 09:27:51 +03:00
Evgeny Khramtsov
4658d478b4 Don't call ejabberd_option from ejabberd_options 2019-07-03 19:23:05 +03:00
Evgeny Khramtsov
b7f6620166 Fix jwt_key option processing 2019-07-03 19:16:54 +03:00
Evgeny Khramtsov
0d0ad9d1d9 Use correct virtual host 2019-07-03 19:08:38 +03:00
Evgeny Khramtsov
8180bc22ee Fix formatting 2019-07-03 12:58:59 +03:00
Evgeny Khramtsov
6e2502ea7d Monitor routes
Clean route table from the process that died unexpectedly.
This usually may happen when the corresponding process
gets killed by OOM killer during overload.
2019-07-03 10:39:03 +03:00
Evgeny Khramtsov
0fc190e2ef Fix 'request_handlers' transformation
Fixes #2925
2019-07-03 09:54:56 +03:00
Evgeny Khramtsov
9f9e308241 Avoid using ! in ejabberd_router and mod_offline 2019-07-03 09:42:18 +03:00
Alexey Shchepin
ff6884f313 Read jwt_key from file 2019-07-03 05:33:35 +03:00
Evgeny Khramtsov
f68da70f3e Avoid last handled stanzas cache to grow indefinitely 2019-07-01 20:43:57 +03:00
Badlop
052894d608 Update Spanish and Catalan translations 2019-07-01 17:51:42 +02:00
Paweł Chmielowski
40c360c607 Invalidate proper cache when using mam for offline in pop_messages 2019-07-01 14:30:39 +02:00
Alexey Shchepin
8956b7d60d Fix a condition in ejabberd_auth_jwt 2019-07-01 14:44:28 +03:00
Paweł Chmielowski
3e8f3573a3 Make count_offline_messages cache work when offline uses mam for storage
This also replace existing cache for checking if spool is empty with this
cache.
2019-07-01 13:36:41 +02:00
Evgeny Khramtsov
c5fde9d5af Get rid of useless dialyzer instructions 2019-07-01 10:36:20 +03:00
Evgeny Khramtsov
9912f981c0 Bump cache_tab version 2019-07-01 09:26:56 +03:00
Evgeny Khramtsov
3d82a5eee6 Fix ejabberd_auth_jwt return types and regenerate ejabberd_option.erl 2019-07-01 09:05:33 +03:00
Alexey Shchepin
3e5c0a1df8 Authentication using JWT tokens 2019-07-01 05:01:55 +03:00
Evgeny Khramtsov
4aebd2fd8e Cache number of offline messages 2019-06-30 21:14:37 +03:00
Evgeny Khramtsov
253ec13971 Use new ets_cache API in ejabberd_auth 2019-06-30 17:15:43 +03:00
Evgeny Khramtsov
a2a061c1c8 Avoid using broad p1_queue:queue() type wherever possible 2019-06-28 22:16:29 +03:00
Evgeny Khramtsov
6011135d24 Use yconf validator for custom Mnesia schemas 2019-06-27 15:23:21 +03:00
Evgeny Khramtsov
39cf8d86d6 Avoid using broad map() type wherever possible 2019-06-27 15:22:27 +03:00
Evgeny Khramtsov
6b684c866b Use correct rr_type() 2019-06-27 11:35:56 +03:00
Evgeny Khramtsov
2abca350e0 Fix type specs 2019-06-27 11:32:54 +03:00
Evgeny Khramtsov
4e5daf4d72 Make sure queue bouncing doesn't yield into infinite recursion 2019-06-26 11:56:25 +03:00
Evgeny Khramtsov
ffe1c722e0 Deprecate 'route_subdomains' option
This option was introduced to fulfill requirement of RFC3920 10.3,
but in practice it was very inconvenient and many admins were
forced to change its value to 's2s' (i.e. to behaviour that
violates the RFC). Also, it seems like in RFC6120 this requirement
no longer presents.

Those admins who used this option to block s2s with their subdomains
can use 's2s_access' option for the same purpose.
2019-06-26 10:45:58 +03:00
Evgeny Khramtsov
b479fe5315 Use correct stacktrace in logging macros
By calling erlang:get_stacktrace() inside a lager function
we obtain actually a stacktrace of the lager function, not
the one we got during exception. This is not a problem for
newest Erlang versions though.
2019-06-26 00:05:41 +03:00
Evgeny Khramtsov
6697a3e3f1 Use proper loglevel to log resumption failures 2019-06-25 20:42:54 +03:00
Paweł Chmielowski
7b35690bc9 Store muc_subscribers in process dict if get_subscribed_rooms not available 2019-06-25 16:41:47 +02:00
Evgeny Khramtsov
8b300d734b Don't propagate downstream already handled message 2019-06-25 14:36:17 +03:00
Evgeny Khramtsov
28b1d88772 Call ejabberd_s2s:allow_host/2 with correct virtual host 2019-06-24 21:18:57 +03:00
Evgeny Khramtsov
49214d9cc5 Report invalid translation strings 2019-06-24 21:09:29 +03:00
Evgeny Khramtsov
a3e0cbbdd8 Make logging messages more consistent 2019-06-24 20:32:34 +03:00
Evgeny Khramtsov
370226417a Check if mod_last is loaded before calling its functions 2019-06-24 18:47:51 +03:00
Evgeny Khramtsov
2e35252aed Use "begin ... end" in logging macros 2019-06-24 18:47:19 +03:00
Evgeny Khramtsov
db9e8220ec Deprecated access_commands option 2019-06-24 17:20:29 +03:00
Evgeny Khramtsov
1d239ec6fb Make ejabberd_xmlrpc working as a listening module again
Fixes #2915
2019-06-24 17:13:34 +03:00
Evgeny Khramtsov
d0b65a3c95 Don't crash on empty avatar data 2019-06-24 17:00:51 +03:00
Evgeny Khramtsov
c2cbb4d879 Use correct virtual host for s2s options 2019-06-23 19:37:54 +03:00
Evgeny Khramtsov
4b65fcab62 Avoid code duplication in gen_mod 2019-06-23 17:06:53 +03:00
Evgeny Khramtsov
deee194522 Let it crash on unspecified option 2019-06-23 16:54:01 +03:00
Evgeny Khramtsov
abbf8dad6b Update Russian msg file 2019-06-23 14:19:57 +03:00
Evgeny Khramtsov
523a65b711 Update Russian PO file 2019-06-23 14:19:15 +03:00
Evgeny Khramtsov
83c291c064 Respond with 'Bad Request' to unexpected 'Host' header
Where "unexpected" means the host in 'Host' header is not
a registered route. The rationale is to avoid propagation
of uknown "Host" further in the code, which may lead to
nasty errors related to reading configuration values, calling
functions from ejabberd_router.erl, etc.
2019-06-23 13:12:00 +03:00
Evgeny Khramtsov
e477a8c220 Validate and set 'version' option at an earlier stage 2019-06-23 12:23:22 +03:00
Evgeny Khramtsov
e31373a86c Run "make translations" 2019-06-22 18:15:35 +03:00
Evgeny Khramtsov
e788592a88 Generate paths for poedit 2019-06-22 18:07:36 +03:00
Evgeny Khramtsov
1ca61821c6 Update extract-tr.sh script 2019-06-22 17:24:15 +03:00
Evgeny Khramtsov
00f2a736eb Improve extraction of translated strings
Now every such string MUST be encapsulated into ?T() macro.
The macro itself is defined in include/translate.hrl.
Example:

-module(foo).
-export([bar/1]).
-include("translate.hrl").

bar(Lang) ->
    translate:translate(Lang, ?T("baz")).
2019-06-22 17:08:45 +03:00
Evgeny Khramtsov
2d158671c8 Change Travis OTP platform from 19.1 to 19.3
Seems like Travis has problems with OTPs below 19.3
2019-06-22 13:15:11 +03:00
Evgeny Khramtsov
9d64e706f8 Disable Elixir in Travis tests 2019-06-22 11:03:29 +03:00
Evgeny Khramtsov
4f69325e3c Fix shaper selection in ejabberd_c2s 2019-06-22 10:19:17 +03:00
Evgeny Khramtsov
e9a78d0de7 Make option 'validate_stream' global 2019-06-21 21:06:32 +03:00
Evgeny Khramtsov
a0d3fb3b23 Don't attempt to query 'undefined' active list
Also code formatting was improved
2019-06-21 19:37:47 +03:00
Evgeny Khramtsov
72572d990a Allow multiple definitions of host_config and append_host_config 2019-06-21 15:37:51 +03:00
Evgeny Khramtsov
f3d5916236 Correct mod_mix_pam protocol version
Fixes #2913
2019-06-21 14:47:10 +03:00
Evgeny Khramtsov
be35350b9c Fix usage of TLS in mod_mqtt
Fixes #2919
2019-06-21 14:39:46 +03:00
Holger Weiss
026540f7e6 mod_pubsub: Check access_model when publishing PEP
Don't just adhere to the node's access_model when delivering the last
PEP item but also when a new item is published.

Many thanks to Philipp Hrist for spotting this.
2019-06-20 18:18:14 +02:00
Evgeny Khramtsov
27a1771deb Fix creation of type spec for map() options 2019-06-20 19:09:36 +03:00
Badlop
c318b5f8a2 Rename remaining command arguments from Server to Host (#2908) 2019-06-19 09:31:12 +02:00
Badlop
fb77e2e8c0 Add support for backwards compatibility in command argument names (#2908) 2019-06-19 09:30:53 +02:00
Badlop
ad98d4a515 Fix support for nonexistent or empty access_commands in ejabberd_xmlrpc 2019-06-19 09:19:32 +02:00
Evgeny Khramtsov
5a5f188767 Require opt_type/1 callback 2019-06-17 20:51:04 +03:00
Evgeny Khramtsov
ef3753aa86 Generate more readable exception 2019-06-17 20:49:43 +03:00
Evgeny Khramtsov
794e19aaf1 Set yconf version in mix.exs explicitly 2019-06-17 19:50:44 +03:00
Evgeny Khramtsov
91d9d076f9 Synchronize macros from rebar.config with mix.exs 2019-06-17 19:30:25 +03:00
Evgeny Khramtsov
b6f037ced6 Add yconf application to mix.exs 2019-06-17 19:19:27 +03:00
Evgeny Khramtsov
0c4818daca Reflect recent pubsub changes in configuration transformer 2019-06-17 13:42:58 +03:00
Christophe Romain
4fe995c272 Add helper to check xep implementations and versions 2019-06-17 12:02:23 +02:00
Evgeny Khramtsov
21d9bd8325 Bump supported version of XEP-0355 2019-06-17 12:53:15 +03:00
Christophe Romain
e2c954b2e0 Remote obsolete pubsub config from tests 2019-06-17 11:39:46 +02:00
Evgeny Khramtsov
50af436fad Fix component routes unregistration
Fixes #2910
2019-06-17 12:29:04 +03:00
Christophe Romain
c9d3beb9eb Remove deprecated pubsub plugins 2019-06-17 11:19:28 +02:00
Evgeny Khramtsov
e84391a6a9 Use list_to_existing_atom/1 wherever possible 2019-06-15 15:14:45 +03:00
Evgeny Khramtsov
31050f5b09 Add PostgreSQL to Travis services 2019-06-15 13:41:13 +03:00
Evgeny Khramtsov
a205ebad2b Get rid of "well-known" type 2019-06-15 12:53:16 +03:00
Evgeny Khramtsov
67fbbe7a0b Remove default_db/1 and add default_db/3
Same for default_ram_db/1 and default_ram_db/3
2019-06-15 12:10:35 +03:00
Evgeny Khramtsov
ea76b87461 Ignore beams compiled by Elixir 2019-06-14 23:35:51 +03:00
Evgeny Khramtsov
56a0e736c7 Accept output argument in tools/opt_types.sh 2019-06-14 23:19:08 +03:00
Evgeny Khramtsov
cfaed70fe3 Warn about 'service_url' option during config transformation 2019-06-14 17:38:55 +03:00
Evgeny Khramtsov
9e2e590061 Fix exception formatting on old Erlang 2019-06-14 16:58:39 +03:00
Evgeny Khramtsov
377748b688 Fix validator of mod_avatar 2019-06-14 16:42:22 +03:00
Evgeny Khramtsov
d85cf7780c Introduce option 'captcha_url'
Option 'captcha_host' is now deprecated in favor of 'captcha_url'.
However, it's not replaced automatically at startup, i.e. both options
are supported with 'captcha_url' being the preferred one.
2019-06-14 16:06:04 +03:00
Evgeny Khramtsov
a589843abd Remove mod_echo module 2019-06-14 14:47:46 +03:00
Holger Weiss
6fb8ae4d2f Travis CI: Ensure MySQL is started
It seems MySQL isn't always fully started before 'mysql_upgrade' is
called.
2019-06-14 13:08:46 +02:00
Evgeny Khramtsov
9e158a3835 Add forgotten header file 2019-06-14 13:36:28 +03:00
Paweł Chmielowski
b952c4f294 Use commit id instead of branch name to specify deps in rebar.config 2019-06-14 12:16:13 +02:00
Evgeny Khramtsov
a02cff0e78 Use new configuration validator 2019-06-14 12:33:26 +03:00
Paweł Chmielowski
d48c067681 Return jid_malformed error when sending presence without nick to conference 2019-06-13 18:42:02 +02:00
badlop
b48b6dbda5
Merge pull request #2651 from Iperity/fix-privacy-race-condition
Fix mod_privacy race condition
2019-06-13 09:34:58 +02:00
Mickaël Rémond
267ce0dde0
Debug log to help troubleshoot delegation ACLs 2019-06-11 18:52:44 +02:00
Christophe Romain
88a3e1b510 Revert "Fix pubsub compliance XEP-0060 § 7.1.3.6 (#2864)"
This reverts commit 2fff4d1ea6.
This commit broke the XEP compliance. more details here
https://xmpp.org/extensions/xep-0060.html#events
2019-06-11 10:18:36 +02:00
Nathan Bruning
8410a203ec Refactor mod_privacy patch; move logic user_receive_packet to
user_send_packet.
2019-06-10 14:10:37 +02:00
Nathan Bruning
aa489c5a8b Fix user_send_packet in mod_privacy; was failing on newly created users 2019-06-10 12:49:39 +02:00
Nathan Bruning
570800a540 Fix mod_privacy race condition
mod_privacy updates the c2s state in user_receive_packet, which
tracks the *result* of the IQ set for active privacy lists.

When a second stanza is sent directly after a privacy list request,
the second stanza will be processed using the old privacy list,
because the IQ result has not yet been routed.
2019-06-10 12:49:39 +02:00
Mickaël Rémond
34794b3c68
lock.yml defines locking policy for old issues 2019-06-09 11:47:18 +02:00
Evgeny Khramtsov
80b7d50628 Use system_time/1 instead of monotonic_time/1
The value of monotonic_time/1 may differ significantly between
nodes in a cluster due to different erlang:time_offset/0 values.

Thanks to Christoph Scholz for spotting this
2019-06-06 21:26:50 +03:00
LOU Xun
8d6455460d
Protect against bad muc#owner requests 2019-06-06 15:40:13 +00:00
Holger Weiss
6c0d6f0774 mod_register_web: Don't crash if user exists
Since commit 633b68db11,
ejabberd_auth:try_register/3 returns {error, exists} rather than
{atomic, exists}.

Thanks to Thomas Leister for reporting the issue.
2019-06-05 18:28:35 +02:00
Paweł Chmielowski
cd10d87a9c Change indentation in ejabberd.yml.example to more consistant 2019-06-04 14:51:39 +02:00
Badlop
ed1cbc2c31 Fix example argument in private_set, don't include Query element 2019-05-29 19:41:36 +02:00
Holger Weiss
274a507590 mod_stream_mgmt: Drop unused code
Revert the changes applied to mod_stream_mgmt in commit
b76f90fe39, as the new implementation of
mod_offline's 'use_mam_for_storage' feature doesn't need them.
2019-05-29 00:30:59 +02:00
Paweł Chmielowski
571a786b9b Change implementation of mod_offline use_mam_for_storage
Previous version was trying to determine range of messages that should
be fetched from mam by storing time when last user resource disconnected.

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

New version don't track user disconnects, but simply ensure that we have
timestamp of first message that is gonna be put in storage, after some
measurements cost of that check with caching on top is not that costly,
and as much more robust i decided to introduce that change.
2019-05-28 14:32:17 +02:00
Evgeny Khramtsov
4eaba13189 Don't check mod_register restrictions in 'register' command
The commit reverts behaviour introduced in
1f2b8adc28
2019-05-28 15:14:45 +03:00
Holger Weiss
8b301fc93e mod_http_upload: Avoid catch-all error handling 2019-05-27 21:56:37 +02:00
Mickaël Rémond
a06bdb1721
Improve captcha blocking alert wording 2019-05-25 11:30:04 +02:00
Mickaël Rémond
b90fe4c5c9
Improve captcha.sh script documentation 2019-05-25 11:21:30 +02:00
Paweł Chmielowski
50f93023f5 Fix last commit 2019-05-24 15:18:15 +02:00
Paweł Chmielowski
226c09f031 Make mod_admin_extra add/delete_rosteritem reuse code from mod_roster 2019-05-24 14:02:17 +02:00
Mickaël Rémond
dc126b86bb
Add data clean up suggested command 2019-05-24 10:31:51 +02:00
Christophe Romain
44e1af25e5 Prepare 19.05 2019-05-23 13:42:50 +02:00
Christophe Romain
5b62a05205 Update deps in mix.lock 2019-05-23 13:40:05 +02:00
Paweł Chmielowski
5642338a73 Update deps 2019-05-23 12:13:28 +02:00
Evgeny Khramtsov
3f7a850ae8 Use different cache tables per auth module
Fixes #2322
2019-05-23 11:32:55 +03:00
Holger Weiss
729c8b0d24 Remove 'register' access rule from example config
The 'register' access rule isn't referenced from the 'mod_register'
options, so modifying it would have no effect.
2019-05-20 20:05:20 +02:00
Evgeny Khramtsov
4424f40186 Use lager 3.6.10 2019-05-20 12:10:23 +03:00
Evgeny Khramtsov
17f9ffb7e7 Merge branch 'master' of github.com:processone/ejabberd 2019-05-19 11:23:29 +03:00
Evgeny Khramtsov
2b523030cf Report better errors on SQL terms decode failure 2019-05-19 11:22:41 +03:00
Alexey Shchepin
63e9b82a46 Fix PostgreSQL compatibility in mod_offline_sql:remove_old_messages (#2695) 2019-05-18 21:16:45 +03:00
Badlop
937f07a4cc Fix typo in Change User Password adhoc command (thanks to lovetox)(#2884) 2019-05-17 15:48:03 +02:00
Badlop
2db547b557 Vcard search doesn't support * in mnesia, fix search form (#633) 2019-05-17 15:26:44 +02:00
Evgeny Khramtsov
0ed638c7fb Check hooks correctness in Travis CI 2019-05-15 21:47:39 +03:00
Evgeny Khramtsov
7c16e29984 Write hooks_type_test.erl to correct location 2019-05-15 21:45:30 +03:00
Evgeny Khramtsov
7a03a125aa Make static hooks analyzer working again 2019-05-15 21:40:36 +03:00
Evgeny Khramtsov
2aa181658a Fix mod_legacy_auth to reflect recent changes 2019-05-15 20:55:17 +03:00
Evgeny Khramtsov
a4c3ea0dfb Don't process failed EXTERNAL authentication by mod_fail2ban
This will only lead to confusion because it's not considered
possible to brute force client certificates.
2019-05-15 18:13:31 +03:00
Evgeny Khramtsov
3c95764d1a Modify arguments of c2s_auth_result hook
The hook now accepts `true | {false, Reason :: binary()}` arguments
instead of just `true | false`
2019-05-15 17:21:09 +03:00
Badlop
e996579dd1 Preliminary support for SQL in process_rosteritems, and move code (#2448) 2019-05-15 10:57:55 +02:00
Paweł Chmielowski
122cb4b959 Don't put duplicate polling attribute in bosh payload
This fixes issue #2790
2019-05-14 17:32:19 +02:00
Holger Weiss
1452023c93 mod_http_upload: Case-insensitive host comparison
Perform a case-insensitive lookup of the host name specified by the HTTP
client.

Fixes #2827.
2019-05-12 11:57:17 +02:00
Evgeny Khramtsov
3d8711f708 Avoid late arrival of get_disco_item response 2019-05-11 19:27:56 +03:00
Evgeny Khramtsov
4b6f1195c6 Handle TCP errors in websockets 2019-05-09 22:06:23 +03:00
Mickael Remond
e427358e08
Initial Docker environment to run ejabberd test suite 2019-05-07 17:59:05 +02:00
Christophe Romain
2fff4d1ea6 Fix pubsub compliance XEP-0060 § 7.1.3.6 (#2864) 2019-05-07 16:23:36 +02:00
Mickael Remond
945c58d3db
Merge branch 'master' of github.com:processone/ejabberd 2019-05-07 14:09:22 +02:00
Mickael Remond
a04ea19f03
Put back the presence and s2s tests in the no_db section.
Tests are skipped anyway. This reverts ecce318304
2019-05-07 14:09:11 +02:00
Christophe Romain
a6f7d7ce23 Raise api hook right before performing the call 2019-05-07 11:46:04 +02:00
Paweł Chmielowski
4dc8549738 Make anonymous auth don't {de}register user when there are other resources
This should fix issue reported in #2878
2019-05-07 11:02:53 +02:00
Paweł Chmielowski
7d23cd2899 When applying limit of max msgs in spool check only spool size 2019-05-07 09:58:14 +02:00
Paweł Chmielowski
8207ea18bf Remove compiler warnings 2019-05-06 20:03:10 +02:00
Paweł Chmielowski
5b863c25ae Test offline:use_mam_for_storage, mam:user_mucsub_from_muc_archive used together 2019-05-06 19:22:18 +02:00
Paweł Chmielowski
83b790c7c9 Do not store mucsub wrapped messages with no-store hint in offline storage
We already don't store those messages in mam and we don't store messages
that aren't wrapped with that hint in offline, so it make sense to extend
it also to mucsub messages.
2019-05-06 19:22:18 +02:00
Paweł Chmielowski
3d434cfcef Handle get_subscribed_rooms call from mod_muc_room pid
Previously sometimes we tried to post message to all online rooms, and
if that was called from muc room pid, we were not able to process that
message for that room and send response, and this did lead to timeout.
2019-05-06 19:15:48 +02:00
Paweł Chmielowski
4e7bf9207e Do not declare mod_muc as dependency of mod_mam to prevent loop in deps 2019-05-06 12:22:19 +02:00
Mickael Remond
ecce318304
s2s test depend on Mnesia configuration 2019-05-06 12:00:36 +02:00
Mickael Remond
b18f53c5ce
Elixir mix build need to use xmpp 1.3.3 2019-05-06 11:59:52 +02:00
Mickael Remond
09d67a20d3
Remove deprecated calls 2019-05-03 15:58:24 +02:00
Mickael Remond
94f7bbc239
ct_formatter is not needed anymore as Elixir tests have been removed 2019-05-03 15:54:22 +02:00
Mickael Remond
be14caddf4
Use stable xmpp version 2019-05-03 15:48:12 +02:00
Mickael Remond
7a8de9cfcf
Make some standard admin command to get Mnesia info 2019-05-03 14:59:24 +02:00
Badlop
6b0f7f2a24 Fix bug that appears when importing privacy from Prosody (#2872) 2019-05-02 21:10:21 +02:00
Badlop
7a107c02a5 Store imported room in the correct ServerHost (#2874) 2019-05-02 20:32:10 +02:00
Paweł Chmielowski
cd2d62bffd Set from/to in activity marker messages 2019-05-02 13:19:54 +02:00
Christophe Romain
f7bc969729 Fix typo and remove forgotten log from 492da2ba 2019-05-02 12:05:20 +02:00
Mickaël Rémond
1ec3525ed6
Merge pull request #2869 from rstgroup/fix-elixir-umbrella-compilation
Fix #2540 Ejabberd doesnt compile as mix umbrella project dependency
2019-05-02 11:53:35 +02:00
Christophe Romain
492da2baac Remove logging from REST lib 2019-05-02 11:40:53 +02:00
Paweł Chmielowski
25f7ce0cb6 Always store ActivityMarker messages 2019-05-02 11:12:47 +02:00
Paweł Chmielowski
0d2720d7ab Don't issue count/message fetch queries for offline from mam when not needed 2019-05-02 11:12:22 +02:00
Mickael Remond
ef1a75a628
Remove Elixir tests entry points as they were removed in december:
51cbbf313f (diff-098f6bcd4621d373cade4e832627b4f6)
2019-05-01 11:51:17 +02:00
Paweł Chmielowski
7eb5a0877b Sqlite doesn't recognize concat() so use || on it instead 2019-04-30 18:33:12 +02:00
Paweł Chmielowski
2562f89005 Cleaner test cleanup 2019-04-30 17:35:25 +02:00
Paweł Chmielowski
eac7a77b6a Fix room state cleanup from db on change of persistent option change 2019-04-30 17:34:49 +02:00
Paweł Chmielowski
63c12d18cc Add tests for user mucsub mam from muc mam 2019-04-30 15:01:25 +02:00
Paweł Chmielowski
b83d30fd07 Make get_subscribed_rooms work even for non-persistant rooms
This will store info about non-persistant rooms in db, but rooms with that
that option enabled will not be restored on server restart.

This will save info about room only on subscribers change.
2019-04-30 13:41:03 +02:00
Paweł Chmielowski
b071c4906f Fix escaping for sql part of mamsub from muc mam 2019-04-30 13:36:31 +02:00
Evgeny Khramtsov
c7d04a82a2 Deprecate some listening options
Those are: captcha, register, web_admin, http_bind and xmlrpc
The option `request_handlers` should be used instead, e.g.:

listen:
  ...
  -
    module: ejabberd_http
    request_handlers:
      "/admin": ejabberd_web_admin
      "/bosh": mod_bosh
      "/captcha": ejabberd_captcha
      "/register": mod_register_web
      "/": ejabberd_xmlrpc
2019-04-30 11:14:14 +03:00
Evgeny Khramtsov
268750e3b7 Provide a suggestion when unknown request handler is detected 2019-04-30 10:31:03 +03:00
Evgeny Khramtsov
11e963aa78 Provide a suggestion when unknown command is detected 2019-04-30 10:05:06 +03:00
Evgeny Khramtsov
4af99f7b03 Rename ejabberd_config:similar_option/2 -> misc:best_match/2 2019-04-30 09:36:38 +03:00
Evgeny Khramtsov
c56209a27d Provide a suggestion when unknown module is detected 2019-04-29 21:15:52 +03:00
Evgeny Khramtsov
39bbc7cad8 Provide a suggestion when unknown option is detected 2019-04-29 20:57:59 +03:00
Paweł Chmielowski
d32a0ce566 Disable offline_from_mam tests on riak since it doesn't support mam 2019-04-29 18:34:21 +02:00
Evgeny Khramtsov
1db22c9656 Improve code for directory deletion 2019-04-29 18:50:54 +03:00
Paweł Chmielowski
a0f48cf52f Fix offline from mam on mnesia 2019-04-29 17:25:06 +02:00
Paweł Chmielowski
eff70951c5 Add tests for offline with mam storage 2019-04-29 16:40:47 +02:00
Paweł Chmielowski
c550d36581 Properly handle infinity as max number of message in mam offline storage 2019-04-29 16:37:21 +02:00
Paweł Chmielowski
aaf674160b Sort messages by stanza_id when using mam storage in mod_offline 2019-04-29 16:32:19 +02:00
Paweł Chmielowski
faf9b20ac0 Return correct value from count_offline_messages with mam storage option 2019-04-29 16:31:37 +02:00
Paweł Chmielowski
17ff62d4af Make mod_offline put msg ignored by mam in spool when mam storage is on 2019-04-29 16:30:45 +02:00
Paweł Chmielowski
b716b835c4 Add tests for offline use_mam_for_storage 2019-04-29 11:35:18 +02:00
Evgeny Khramtsov
830a2f209a Remove TLS options from the example config
The purpose is two-fold:

- To simplify the example config.
- To avoid old TLS configuration to be persistent across
  server updates: this might bring security problems, because
  what's considered "modern" now might be insecure in the future.
2019-04-28 17:50:52 +03:00
Evgeny Khramtsov
05d088b104 Remove OMEMO related configuration from force_node_config section
This doesn't work reliably and takes a lot of effort to change it back
2019-04-28 17:45:41 +03:00
Paweł Chmielowski
b76f90fe39 Add mod_offline option for fetching data from mam instead of from spool table
This commit introduces `use_mam_for_storage` option that take boolean
argument. Enabling it will make mod_offline not use spool table for storing
offline message, but instead will use mam archive to retrieve messages
stored when offline.

Enabling this option have couple drawback currently, only messages that
were stored in mam will be available, most of flexible message retrieval
queries don't work (those that allow retrieval/deletion of messages by id).
2019-04-26 19:59:06 +02:00
Paweł Chmielowski
bcfe50f817 Return "Bad request" error when origin in websocket connection doesn't match
This also allow websocket_origin option to accept multiple values instead
of just single one.
2019-04-26 15:29:43 +02:00
Paweł Chmielowski
17444ba84e Allow non-moderator subscribers to get list of room subscribers 2019-04-25 14:52:47 +02:00
Paweł Dorofiejczyk
7ab7390b9c Fix #2540 Ejabberd doesnt compile as mix umbrella project dependency 2019-04-25 13:31:08 +02:00
Evgeny Khramtsov
a0c8c70c9c Use binary framing in MQTT WebSockets 2019-04-25 14:30:42 +03:00
Evgeny Khramtsov
5819733de6
Merge pull request #2868 from rstgroup/fix-rfc-6455-violation
Fix #2821 RFC6454 violation on websocket connection when validating Origin
2019-04-24 18:21:58 +03:00
Paweł Dorofiejczyk
cc5829bc33 Fix RFC6454 violation on websocket connection when validating Origin header 2019-04-24 16:59:54 +02:00
Paweł Chmielowski
8b501f5fe6 Catch potential exceptions in gen_mod:wait_for_process
Seems that at ejabberd shutdown, process may terminate before that function
is called, and in that case erlang:monitor throws exception.
2019-04-24 13:46:16 +02:00
Evgeny Khramtsov
fc043dd8cf Reformat try_set_password/4 function 2019-04-23 21:25:10 +03:00
Evgeny Khramtsov
cbf3fec2c8 Don't call to mod_register when it's not loaded
Fixes #2828
2019-04-23 21:05:21 +03:00
Evgeny Khramtsov
edba1aebb5 Add WebSockets support to mod_mqtt
Example configuration:

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

modules:
  ...
  mod_mqtt: {}
2019-04-23 19:18:22 +03:00
Paweł Chmielowski
d2ea905926 Fix handling of list arguments on pgsql 2019-04-23 17:46:42 +02:00
Evgeny Khramtsov
feb4c7f5e9 Support other socket modules for MQTT 2019-04-23 16:22:27 +03:00
Evgeny Khramtsov
5faae61bef Move websocket options 2019-04-23 16:21:06 +03:00
Evgeny Khramtsov
cc892ddc01 Improve request_handlers validator 2019-04-23 16:19:26 +03:00
Evgeny Khramtsov
e623678747 Bump pkix version 2019-04-19 16:26:58 +03:00
Evgeny Khramtsov
7c45b52c86 Correctly support cache tags in ejabberd_auth 2019-04-19 15:42:24 +03:00
Evgeny Khramtsov
0789a145fc Allow returning HTTP headers in REST responses 2019-04-19 15:16:47 +03:00
Evgeny Khramtsov
7f14826564 Use new ets_cache api in ejabberd_auth 2019-04-19 15:08:41 +03:00
Paweł Chmielowski
875b2daff1 Add hook room_destroyed called when room gets destroyed 2019-04-17 18:56:25 +02:00
Paweł Chmielowski
4e2c95fe58 Change implementation of misc:unique_timestamp() 2019-04-16 11:20:55 +02:00
Paweł Chmielowski
83653c0338 Handle cdata in initial data probe of ws module 2019-04-16 10:56:11 +02:00
Paweł Chmielowski
3706e35b86 Make misc:unique_timestamp not overflow microsecond part.
This should fix issue #2860
2019-04-16 10:24:28 +02:00
Paweł Chmielowski
c96a925fde Add hooks for tracking mucsub subscriptions changes 2019-04-15 12:03:30 +02:00
Evgeny Khramtsov
009b9a1fd0 Feed whole image to eimp:identify/1
Fixes #2859
2019-04-14 17:05:16 +03:00
Mickael Remond
6dac0a602e
Fix syntax in Elixir config file 2019-04-12 10:40:46 +02:00
Paweł Chmielowski
8761e6e0e0 Handle correctly case where ExtraUsername is empty 2019-04-11 12:00:13 +02:00
Paweł Chmielowski
c5a06e9d06 When making mucsub message from mam archive check for subject 2019-04-09 11:17:14 +02:00
Evgeny Khramtsov
2e007f1607 Use xml:lang from stanza when it's missing in <command/> element
Thanks to Philipp Hörist for spotting this
2019-04-06 18:27:28 +03:00
Evgeny Khramtsov
9f3ccd604e Add 'sessionid' attribute when required
Fixes #2852
2019-04-06 16:52:22 +03:00
Evgeny Khramtsov
909a505d65 Update mod_muc_riak 2019-04-03 16:04:58 +03:00
Evgeny Khramtsov
3013f1b9bc Update mod_mam dependencies 2019-04-03 15:01:20 +03:00
Evgeny Khramtsov
17b9dc6035 Decrease ugliness of the ugly code 2019-04-03 14:50:56 +03:00
Evgeny Khramtsov
e66f594901 Change mucsub API for database backends 2019-04-03 14:20:37 +03:00
Badlop
4e591a73c5 Add ext_mod paths before checking config (processone/ejabberd-contrib#263) 2019-04-03 13:10:11 +02:00
Paweł Chmielowski
623a9ec3ba Return proper error message for duplicate or missing args in http_api call 2019-04-03 12:05:39 +02:00
Paweł Chmielowski
65a6532cd9 Log message when trying to execute http_api command with extra arguments 2019-04-03 11:50:15 +02:00
Paweł Chmielowski
33c10867e3 Formating fix 2019-04-03 11:48:59 +02:00
Paweł Chmielowski
d085fff14b Make http_api command execution exception catcher log also command and args 2019-04-03 11:33:07 +02:00
Badlop
cbac8a604a cache_size not applied to mod_roster on reload_config (#2769) 2019-04-02 19:52:07 +02:00
Evgeny Khramtsov
d96ab48c6b Fix previous commit
Fixes #2847
2019-04-02 09:58:12 +03:00
Evgeny Khramtsov
ed2abe471a Rename listening callback from start/2 to start/3
This will prevent conflicts in callback names in mod_mqtt
Old callback function is still supported.
2019-04-01 16:53:28 +03:00
Paweł Chmielowski
7eef966a04 Fix issue with creating HostMatch in mod_mam_sql
This fixes issue #2844
2019-04-01 10:56:03 +02:00
Evgeny Khramtsov
5c69122bbe Use xmpp:get_subtags/2 2019-04-01 10:47:29 +03:00
Paweł Chmielowski
9b040f65a3 Don't use deprecated gen_mod:db_type 2019-03-29 18:41:51 +01:00
Paweł Chmielowski
24b9b69783 Fix issue with mam tests
Too much copy/paste...
2019-03-29 17:18:30 +01:00
Paweł Chmielowski
0c78e01088 Implement mod_muc_sql:select_with_mucsub
This allows us to limit number of issued queries required by
user_mucsub_from_muc_archive option
2019-03-29 16:11:50 +01:00
Paweł Chmielowski
a7310ffea1 Make misc:add_delay_info properly handle multiple delay tags in element 2019-03-29 11:25:35 +01:00
Paweł Chmielowski
8e05fd1d24 Add option user_mucsub_from_muc_archive to mod_muc
This option disable storing separate mucsub message for each individual
subscriber but instead when user fetches archive virtual mucsub messages
are generated from muc archives.
2019-03-28 17:42:25 +01:00
Paweł Chmielowski
063869603a Include id in mucsub notification message 2019-03-28 14:43:28 +01:00
Badlop
ee2b441b0f Add 'config' tag to the reload_config command 2019-03-27 11:51:43 +01:00
Badlop
1f2b8adc28 Fix Register command to respect mod_register's Access option (#2837) 2019-03-22 15:02:51 +01:00
Christophe Romain
51e7ccc16d Update mysql driver in mix.lock also 2019-03-20 13:46:43 +01:00
Paweł Chmielowski
cf733b0913 Update mysql driver 2019-03-20 13:28:13 +01:00
Badlop
6545d55473 Fix crash in mod_muc_admin:web_page_main/2 caused by just_created (#2830) 2019-03-18 17:11:00 +01:00
Paweł Dorofiejczyk
6129720838 Origin header validation on websocket connection (#2821) 2019-03-15 12:19:14 +01:00
Paweł Chmielowski
291c05715b Update mysql dependency 2019-03-15 11:59:18 +01:00
Christophe Romain
4a920dca5a Add newline to error_logger log format 2019-03-15 11:51:48 +01:00
Paweł Chmielowski
5077d39600 Add check for ljid when setting up subscribers 2019-03-14 15:54:51 +01:00
Paweł Chmielowski
3b16afeda7 Flip default bounce_groupchat flag value, muc will drop bounces anyway 2019-03-14 15:40:34 +01:00
Paweł Chmielowski
89db022da4 Add option to mod_offline to make it not bounce mucsub/groupchat messages 2019-03-14 15:17:25 +01:00
Evgeny Khramtsov
0715e62a41 Use jid() instead of ljid() 2019-03-14 14:34:15 +03:00
Evgeny Khramtsov
7a622c3392 Improve formatting of hook crashes 2019-03-14 12:28:37 +03:00
Badlop
629e568294 Delete the ping timer only when timeout_action=kill (#2820) 2019-03-13 11:28:31 +01:00
Holger Weiss
333b010d54 mod_muc: Simplify room creation checks 2019-03-12 00:05:59 +01:00
Holger Weiss
1af2b2cfc7 Merge remote-tracking branch 'processone/pr/2811'
* processone/pr/2811:
  allow room recreate for admins even if nonempty
2019-03-11 23:30:22 +01:00
Holger Weiss
328553ea3f mod_push: Check for payload in encrypted messages
While distinguishing actual chat messages from other message types,
don't classify all <encrypted/> messages as chat messages, but only
those that have a <payload/> element.
2019-03-11 22:58:53 +01:00
Christophe Romain
946baa972d Fix cond_options with new options 2019-03-11 16:58:26 +01:00
Alexey Shchepin
e921b43754 Fix transaction aborting and restarting in ejabberd_sql 2019-03-07 22:14:13 +03:00
Christoph Scholz
b5fa3b0e2b allow room recreate for admins even if nonempty 2019-03-05 16:51:57 +01:00
Badlop
a4222fe9b3 Handle info log level when using MySQL (#2541) 2019-03-04 18:02:02 +01:00
Holger Weiss
652858c7fe Fix incorrect capitalization in German translation 2019-03-01 00:17:29 +01:00
Holger Weiss
93cebbf4a3 Document required Erlang/OTP version bump 2019-02-28 01:08:52 +01:00
Holger Weiss
598e00e80f Bump required Erlang/OTP version to 19.1
Since 538f35d05a, Erlang/OTP 19.1 is
required.
2019-02-28 01:00:05 +01:00
Holger Weiss
2f46aebca2 mod_http_upload: Log nicer warning on unknown host
If an HTTP client issues a request against an unknown host, log a
readable warning (rather than an unreadable error) and respond with a
404 (rather than a 500) status.
2019-02-28 00:28:46 +01:00
Christophe Romain
9bfe5bb618 Add mqtree in included_applications 2019-02-27 14:35:07 +01:00
Evgeny Khramtsov
7511da0f26 Add SQL schemas for MQTT tables 2019-02-27 13:06:17 +03:00
Paweł Chmielowski
456e87e8b2 Copy p1_time_compat:unique_timestamp() to misc and make use of it 2019-02-27 11:00:02 +01:00
Paweł Chmielowski
538f35d05a Replace code using p1_time_compat wrapper with native functions
Since we now require R19, we shouldn't need that anymore.

There are still couple places where p1_time_compat:unique_timestamp() is
used as there is no direct equivalent.
2019-02-27 09:56:31 +01:00
Paweł Chmielowski
77ac0584ed Remove now() calls that sneaked in in pull requests 2019-02-27 09:56:31 +01:00
Christophe Romain
0c0862475f Add MQTT listener and module in example config 2019-02-26 14:53:05 +01:00
Christophe Romain
683ca31375 Prepare 19.02 2019-02-26 14:40:21 +01:00
Holger Weiss
90dc8ea1e5 MySQL: Increase index prefix length for PEP nodes
For PEP nodes, the "host" column holds the user JID, where the first 20
characters may well not be unique.
2019-02-26 13:13:04 +01:00
Paweł Chmielowski
ab2197c455 Update mqtree 2019-02-26 12:16:48 +01:00
Paweł Chmielowski
a40eb79cd0 Commit back, change reverted by mistake 2019-02-26 12:16:48 +01:00
Paweł Chmielowski
b887133566 Update deps in mix.lock 2019-02-26 12:16:48 +01:00
Evgeny Khramtsov
0250826cf9 Update mod_mqtt_mnesia.erl 2019-02-26 13:45:53 +03:00
Paweł Chmielowski
daf9c99728 Update deps 2019-02-26 10:32:02 +01:00
Paweł Chmielowski
65b94ae9c8 Improve update-deps-releases 2019-02-26 10:32:02 +01:00
Holger Weiss
fb068557b2 Merge branch 'pr/2764'
* pr/2764:
  acl for mam_preferences
2019-02-25 22:22:02 +01:00
Christoph Scholz
e257bc3d32 acl for mam_preferences 2019-02-25 22:21:30 +01:00
Paweł Chmielowski
bc38afa8b8 Updated fast_tls 2019-02-25 16:42:38 +01:00
Paweł Chmielowski
d04a2454cc Add Accept header to requests issued by rest.erl 2019-02-25 16:18:13 +01:00
Paweł Chmielowski
db9435942f Pull never fast_tls version 2019-02-25 16:10:48 +01:00
Badlop
de20395cf8 Run "make translations" 2019-02-25 15:22:56 +01:00
Badlop
2f4fff2441 Update the Catalan translation 2019-02-25 15:19:55 +01:00
Badlop
fd82f1440a Update the Spanish translation 2019-02-25 15:19:30 +01:00
Evgeny Khramtsov
a3df791373 Add MQTT support 2019-02-25 11:42:09 +03:00
Holger Weiss
3491fa3fea mod_muc_admin: Fix indentation 2019-02-23 23:50:14 +01:00
Holger Weiss
1aeb507114 Merge remote-tracking branch 'processone/pr/2805'
* processone/pr/2805:
  only destroy rooms if mam is enabled
2019-02-23 23:46:08 +01:00
Christoph Scholz
dd7754bc59 only destroy rooms if mam is enabled
when using ejabberdctl rooms_empty_list or rooms_empty_destroy only
select rooms that are have mam enabled. Otherwise you may accidently
destroy rooms which seem to be unsused due to archive being empty
2019-02-23 22:48:15 +01:00
Badlop
4947e97ccd Provide source code filename in *.po, so editors can show the source code 2019-02-22 12:31:02 +01:00
Badlop
17a59b795f Fix "make translations", got broken in 446e6e6f3 2019-02-22 12:30:05 +01:00
Holger Weiss
f63dcdb790 mod_mam_sql: Improve check for empty archive
Avoid counting the messages of an archive to check whether it's empty.
2019-02-21 23:50:16 +01:00
Holger Weiss
9a3a7369cb mod_mam_mnesia: Fix check for empty archive
Don't return 'true' if the key exists but points to an empty archive.
Also, avoid looking up all keys.
2019-02-21 22:19:29 +01:00
Evgeny Khramtsov
1684436bfe Merge branch 'mix' 2019-02-21 12:36:33 +03:00
Holger Weiss
68614f25f8 Travis CI: Update MySQL APT repository key
The old key expired on February 17, 2019.
2019-02-20 17:09:56 +01:00
Holger Weiss
9c66cc5885 Merge remote-tracking branch 'processone/pr/2763'
* processone/pr/2763:
  disallow room creation if archive not empty and clear_archive_on_room_destroy is false
  check if mod_mam is loaded before calling mod_mam:is_empty_for_room
  added cmds to list and destroy empty rooms by ejabberdctl
  allow check if archive is empty for or user or room
  option to prevent archive removal on room destroy
2019-02-20 17:01:34 +01:00
Evgeny Khramtsov
8def827f9c Don't crash on malformed 'modules' section 2019-02-19 12:31:18 +03:00
Christoph Scholz
5e7f234ac8 disallow room creation if archive not empty and
clear_archive_on_room_destroy is false
2019-02-18 13:42:45 +01:00
Christoph Scholz
f987db5a39 check if mod_mam is loaded before calling mod_mam:is_empty_for_room 2019-02-18 13:42:45 +01:00
Christoph Scholz
a47c566b39 added cmds to list and destroy empty rooms by ejabberdctl 2019-02-18 13:42:45 +01:00
Christoph Scholz
2e586000d7 allow check if archive is empty for or user or room 2019-02-18 13:42:45 +01:00
Christoph Scholz
89b9e25588 option to prevent archive removal on room destroy 2019-02-18 13:42:45 +01:00
Paweł Chmielowski
b30775a357 Don't perform roster push for non-local contacts in mod_shared_roster
If group have member with jid from external server we tried to make
mod_roster sent roster push to it, and it sometimes didn't like to get
bogus data like that, so let's check if it's local user before doing this.
2019-02-18 12:37:42 +01:00
Holger Weiss
abdbc5df13 mod_push: Improve notification error handling
Don't disable push notifications if the app server returned a temporary
error, and log the app server's notification response.
2019-02-11 22:29:49 +01:00
Badlop
e18522f74c Once just_created isn't true, use it to keep room process creation (#2787) 2019-02-11 16:56:33 +01:00
Paweł Chmielowski
ea32d3f02c Send mucsub subscriber notification events with from set to room jid 2019-02-11 13:04:06 +01:00
Badlop
2819e26c8f Add notice about rooms_unused_destroy using the room history (#2787) 2019-02-06 16:34:02 +01:00
Badlop
6cd458d205 Don't consider room's lack of history when history_size is zero (#2787) 2019-02-06 16:33:59 +01:00
Badlop
c41c5b2185 Fix support to restart module with live options in WebAdmin 2019-02-06 13:30:30 +01:00
Badlop
7074a39ff3 Handle versioning result when shared roster group has remote account (#2692) 2019-02-06 12:36:01 +01:00
Badlop
8baced0d8b Merge branch 'mod_ping_no_kill' of https://github.com/fdie/ejabberd into 3 2019-02-01 16:21:58 +01:00
Frank Diebolt
4ff4711d4f catch badarg exceptions on invalid callback procs 2019-01-31 18:14:36 +01:00
Christophe Romain
9577fe3ba8 Fix argument name consistency 2019-01-31 18:05:39 +01:00
Frank Diebolt
9b66894dda ! may raise exceptions on invalid proc 2019-01-31 17:44:11 +01:00
Christophe Romain
ae7b391657 Do not overwrite odbc config file (#2295) 2019-01-31 13:25:56 +01:00
Paweł Chmielowski
bbffd396f6 Produce better error for http_api request with extra parameters 2019-01-30 16:35:06 +01:00
Paweł Chmielowski
56baa07d48 Reject request http_api request that have malformed Authentication header 2019-01-30 16:34:29 +01:00
Paweł Chmielowski
096b4a50e5 Require that both tag and module matched in from of api_permission 2019-01-30 13:09:06 +01:00
Paweł Chmielowski
62ad1e5e4f Allow specifying tag for listener for api_permission purposes
This commit will allow adding tag to http listeners:

listener:
  - port: 4000
  - module: ejabberd_http
  - tag: "magic_listener"

that later can be used to have special api_permission just for it:

api_permissions:
  "magic_access":
    from:
      - tag: "magic_listener"
    who: all
    what: "*"
2019-01-30 12:57:03 +01:00
Frank Diebolt
7df03ef56f Revert "Apply shaping to websocket connections"
This reverts commit dda89aeda0.
2019-01-30 10:37:26 +01:00
Frank Diebolt
dda89aeda0 Apply shaping to websocket connections 2019-01-30 09:57:17 +01:00
Frank Diebolt
dd57950103 Fix ping IQ reply/timeout processing ("mod_ping" regression since 17.x that may cause resources leakage) 2019-01-29 18:13:28 +01:00
Evgeny Khramtsov
23e5b3756c
Merge pull request #2622 from aquarhead/rename-functions
Rename two presence functions
2019-01-27 23:06:21 +03:00
AquarHEAD Lou
3f3e04812b
Rename two presence functions
send_self_presence is actually implementing XEP-0115, while
send_initial_presence is implementing the "self-presence" step as
described in XEP-0045
2019-01-27 16:48:05 +00:00
Paweł Chmielowski
9e0baef233 Make last commit compile on R19 2019-01-22 14:40:01 +01:00
Paweł Chmielowski
74731a5816 Make sure that room_destroyed is called even when some code throws in terminate
We observed that some code was throwing exception in muc_room:terminate()
and that make this room not properly unregister itself from muc_online
table.
2019-01-22 14:22:23 +01:00
Badlop
0c794c105f Fix crash when running reload_config and sql_pool_size option is used
Fixes #2541
2019-01-21 13:35:21 +01:00
Evgeny Khramtsov
5e9945f060 Improve validation of configured language options 2019-01-19 11:29:45 +03:00
Paweł Chmielowski
a8b1a58cc8 Add os_mon to included_application, but start it in ej_system_monitor 2019-01-16 15:40:10 +01:00
Paweł Chmielowski
a30bfefb98 Move some apps back to included_applications 2019-01-16 15:01:32 +01:00
Paweł Chmielowski
3f2265d457 Update xmpp in mix 2019-01-16 09:58:24 +01:00
Paweł Chmielowski
0d952abe7d Start ejabberd_mnesia before starting mnesia 2019-01-15 18:34:19 +01:00
Paweł Chmielowski
8b76fdd035 And another typo... 2019-01-15 16:25:23 +01:00
Paweł Chmielowski
182786948f Typo 2019-01-15 16:23:38 +01:00
Paweł Chmielowski
893f656df2 Reintroduce change removed in last commit by mistake 2019-01-15 16:22:58 +01:00
Paweł Chmielowski
9bd38eff1e Use tag for xmpp dependency 2019-01-15 16:18:10 +01:00
Paweł Chmielowski
604856eeb9 Update list of applications in mix.exs
We now use normal application for starting dependencies, so we no longer
should put them in included_applications
2019-01-15 16:17:45 +01:00
Paweł Chmielowski
2a24011b3b Update xmpp dep 2019-01-15 15:15:56 +01:00
Paweł Chmielowski
7183fe6b80 Guard agains sm:get_user_info returning offline
This fixes issue #2765
2019-01-15 10:04:15 +01:00
Evgeny Khramtsov
63259f5cc9 Improve private and MAM tests in order to reflect
database backends with limited capabilities
2019-01-14 19:33:23 +03:00
Evgeny Khramtsov
1b0d481f41 Don't produce a crash on config reload when SQL is not configured 2019-01-12 23:40:33 +03:00
Paweł Chmielowski
7e8bd484d5 Update muc room state after adding extra access field to it 2019-01-10 15:07:10 +01:00
Christophe Romain
e4067df85e
Merge pull request #2748 from area-42/add_acl_for_mam_in_mod_muc
add acl for mam in mod_muc
2019-01-10 14:29:02 +01:00
Christophe Romain
67cfdf1d20 Fix typo in comment 2019-01-10 11:07:24 +01:00
Paweł Chmielowski
5bbb4da397 Start ejabberd_logger also when ejabberd:start() is not called 2019-01-09 19:03:36 +01:00
Paweł Chmielowski
aee53332bf Change a way that tests start ejabberd 2019-01-09 18:33:39 +01:00
Paweł Chmielowski
d47bc1efdb Use OTP application startup infrastructure for starting dependencies 2019-01-09 18:14:50 +01:00
badlop
325877446a
Merge pull request #2680 from Iperity/fix-privacy-check-on-presence-probe
Privacy lists: set from/to on packet *before* calling privacy_check_p…
2019-01-09 16:31:14 +01:00
Christophe Romain
3fa68b17d9 Remove slash producing url /admin//additions.js 2019-01-09 11:55:42 +01:00
Badlop
55417dfb37 Update copyright to 2019 (#2756) 2019-01-08 22:53:27 +01:00
Badlop
f0cf63de15 Manually update 2017 copyright dates (#2756) 2019-01-08 22:52:26 +01:00
Holger Weiss
c3a807832d mod_private: Hardcode item ID for PEP bookmarks
Set the item ID to "current" when publishing bookmarks via PEP.
XEP-0060 says: For singleton nodes, "it is RECOMMENDED for the publisher
to specify an ItemID of 'current' to ensure that the publication of a
new item will overwrite the existing item."
2019-01-08 21:23:21 +01:00
Evgeny Khramtsov
edf03b0f3d mod_offline: make some database callbacks optional 2019-01-08 13:41:16 +03:00
Paweł Chmielowski
06d69c5277 Fix decompressing of custom elements with custom namespace 2019-01-07 16:08:58 +01:00
Christoph Scholz
7e4287ff83 add acl for mam in mod_muc 2019-01-04 15:56:41 +01:00
badlop
9631baaa63
Merge pull request #2599 from gardenia/master
Eliminate some repeated SQL queries [Issue #1656]
2019-01-04 12:20:50 +01:00
Evgeny Khramtsov
9af70913b5 mod_mam: more checks for database failure 2019-01-02 21:11:22 +03:00
Paweł Chmielowski
b318c70401 Try to remove syntax error on old elixir 2019-01-02 13:22:35 +01:00
Paweł Chmielowski
fb681828d6 Remove iconv from vars.config.in 2019-01-02 13:11:34 +01:00
Paweł Chmielowski
768d37a29c Remove no longer used deps 2019-01-02 13:02:20 +01:00
Christophe Romain
126e4d70f7 Update distillery 2019-01-02 10:30:29 +01:00
Mickael Remond
749fa95011
Remove most Elixir warnings 2018-12-26 17:32:39 +01:00
Mickael Remond
b8d4da9792
Update ejabberd version for mix 2018-12-26 16:49:01 +01:00
Badlop
1246a7a50f Add no-store hint to CAPTCHA challenge stanzas (#2730) 2018-12-26 14:04:36 +01:00
Holger Weiss
34eed5064b Travis CI: Bump Erlang/OTP 21.x version 2018-12-22 19:45:28 +01:00
Evgeny Khramtsov
d5fab856f4 mod_mam: Additional checks for database failures 2018-12-21 22:29:20 +03:00
Paweł Chmielowski
51cbbf313f Remove elixir tests
Our regular suite cover most of those cases, and it get trickier and
tricker to keep those working after changes in ejabberd.
2018-12-21 15:58:02 +01:00
Badlop
740ea3a047 Handle Prosody storage attributes key, when, with (#2724) 2018-12-21 15:15:02 +01:00
Badlop
011cf55eb5 Handle persist=false in roster items (#2722) 2018-12-21 15:15:00 +01:00
Paweł Chmielowski
e9d537527c We are handling groupchat in other branch now 2018-12-20 13:51:05 +01:00
Paweł Chmielowski
69a986a09e Add option to mod_offline that would allow storing group chat messages 2018-12-20 13:28:18 +01:00
Badlop
788d829823 Fix PIEFXIS export of user when password is scrammed (#2721) 2018-12-19 13:17:28 +01:00
Badlop
590bb0e64a Search also for _jid when importing room from prosody (#2723) 2018-12-19 12:11:59 +01:00
Badlop
0b151f5902 Parse persistent and archiving room options importing from prosody (#2720) 2018-12-19 12:11:56 +01:00
Paweł Chmielowski
52e77e3d75 Remove workaround for old erlang versions 2018-12-13 11:46:53 +01:00
Paweł Chmielowski
c88a2d0569 Add code for handling deprecations of get_stacktrace() 2018-12-13 11:46:53 +01:00
Evgeny Khramtsov
34ac21e66b Add HTTP listener on port 5280 for admin web interface 2018-12-13 12:06:29 +03:00
Badlop
b43b8edb67 Fix a pair of small typos 2018-12-12 16:23:07 +01:00
Evgeny Khramtsov
48f3d5858f
Merge pull request #2718 from paulmenzel/strip-trailing-space-in-readme
README: Strip trailing space
2018-12-12 17:32:41 +03:00
Paul Menzel
b3dfe35846 README: Strip trailing space 2018-12-12 14:10:53 +01:00
Evgeny Khramtsov
000621114d Remove outdated MIX tests 2018-12-11 17:14:51 +03:00
Christophe Romain
f6a557ec86 Add hook on api call 2018-12-11 11:07:07 +01:00
Holger Weiss
38726a5510 Increase MAX_PAYLOAD_SIZE for PubSub items
Some PubSub payloads (such as PEP avatars) can easily exceed the old
MAX_PAYLOAD_SIZE.  Use a higher limit, but stay below the default
max_stanza_size value.
2018-12-10 22:54:18 +01:00
Holger Weiss
114cc8c093 Bump xmpp version 2018-12-10 22:38:50 +01:00
Holger Weiss
1c1694c6bf mod_roster: Don't set version to "not_found"
Don't include a "ver" attribute with roster pushes if no roster version
is available.
2018-12-10 21:38:14 +01:00
Badlop
446ff9257c Don't require a full JID as argument, instead set a dummy resource (#2710) 2018-12-10 21:06:26 +01:00
Badlop
f2bd2f6e37 When unknown roster version, return an acceptable version ID binary (#2709) 2018-12-10 20:30:42 +01:00
Evgeny Khramtsov
33202d59c0 Merge branch 'master' into mix 2018-12-10 17:07:28 +03:00
Evgeny Khramtsov
8295bcebec Fix (un)setting of priority 2018-12-10 17:06:21 +03:00
Evgeny Khramtsov
e568dc3866 Get rid of outdated mod_mix module 2018-12-10 16:50:13 +03:00
Evgeny Khramtsov
74e8c0376f Merge branch 'master' into mix 2018-12-10 11:57:04 +03:00
Evgeny Khramtsov
6cd8d1025c Don't lose carbons on presence change or session resumption 2018-12-10 11:53:27 +03:00
Evgeny Khramtsov
a5ac1d15e7 Avoid badfun in multicast/6 2018-12-07 21:34:49 +03:00
Evgeny Khramtsov
0e954da3fa Fix wording 2018-12-07 20:48:13 +03:00
Evgeny Khramtsov
4f5552128b Fix mod_mix_mnesia get_participants/3 callback 2018-12-07 20:41:37 +03:00
Paweł Chmielowski
f02f44ad3f Change default ciphers to intermediate 2018-12-07 14:38:54 +01:00
Paweł Chmielowski
7713edc6bb Define default ciphers/protocol_option in example config 2018-12-07 12:54:18 +01:00
Paweł Chmielowski
0ef1c215b7 Add CHANGELOG.md file 2018-12-07 10:28:56 +01:00
Evgeny Khramtsov
6afefd7bbf Fix submission-id and channel resource 2018-12-07 11:06:26 +03:00
Evgeny Khramtsov
c4858a7020 Bump xmpp version 2018-12-06 18:28:18 +03:00
Paweł Chmielowski
3b1c0dc27f Normalize hostname when processing host_config 2018-12-06 15:12:23 +01:00
Paweł Chmielowski
157e9c04f6 Bump version of xmpp in mix.lock 2018-12-06 14:09:37 +01:00
Paweł Chmielowski
755f34d3ef Start fast_tls before pkix 2018-12-06 13:42:08 +01:00
Paweł Chmielowski
d6fa657624 Bump xmpp dep 2018-12-06 13:40:08 +01:00
Holger Weiss
d1402fc48d configure.ac: Bump required Erlang/OTP version 2018-12-06 12:43:20 +01:00
Paweł Chmielowski
ea47790807 Update mix packaging 2018-12-06 10:21:51 +01:00
Holger Weiss
160ffce090 mod_private: Add "bookmarks_to_pep" command
The "bookmarks_to_pep" command exports the bookmarks of the specified
user from private XML storage to PEP.
2018-12-05 22:04:40 +01:00
Holger Weiss
074ebd80f6 mod_pubsub: Improve PEP behavior for 'whitelist'
If a PEP node's access_model is set to 'whitelist' (or 'authorize'),
send last PEP notifications to the node owner.
2018-12-05 18:25:40 +01:00
Christophe Romain
1ed788d00c Remove useless config file (#2665)
Config file should be generated at packaging/installation stage
/ejabberd.yml.example is the default template which can be used
as default configuration
2018-12-05 17:17:52 +01:00
Paweł Chmielowski
45eb08d05c Add auth:which_user_exist to bulk checking existence of list of users 2018-12-05 14:22:09 +01:00
Paweł Chmielowski
a6c06964e1 Add list types to sql_pt 2018-12-05 13:11:52 +01:00
Badlop
0ae3f624ca Revert "Let deliver unsubscribe stanza when no roster push is required (#2598)"
This reverts commit 86048f8a25.
2018-12-05 12:17:16 +01:00
Badlop
86048f8a25 Let deliver unsubscribe stanza when no roster push is required (#2598) 2018-12-05 11:45:54 +01:00
Evgeny Khramtsov
d5e4da54cf Update MIX code to reflect newest specification
Note that support for older specification is completely dropped,
i.e. no backward compatibility is provided since the XEPs are
still very experimental and being changed drastically
2018-12-05 13:14:29 +03:00
Paweł Chmielowski
2b9c7ed407 Use tagged version of pkix dependency 2018-12-05 10:11:37 +01:00
Alexey Shchepin
8ebcba4d08 Fix PostgreSQL compatibility in mod_offline_sql:remove_old_messages (#2695) 2018-12-05 01:56:39 +03:00
Paweł Chmielowski
e85fa96cf7 Proxy protocol may send additional data after addresses 2018-12-04 15:23:28 +01:00
Paweł Chmielowski
0e081ba73e Update deps 2018-12-04 14:40:37 +01:00
Paweł Chmielowski
6845896d12 Add support for proxy protocol
This add support for version 1 and 2 of protocol specified in
http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt

To enable it you need add option use_proxy_protocol: true to listener.
2018-12-04 14:22:45 +01:00
Paweł Chmielowski
9139ea86fb Format list of {{name,string}, {value, _}} as json struct name/val 2018-12-03 13:53:07 +01:00
Paweł Chmielowski
59a148d80b Make mod_http_api assume that missing args of type list are empty list 2018-12-03 13:53:07 +01:00
Evgeny Khramtsov
109ed8f2f6 Keep info about carbons inside session table
Accordingly, Mnesia/SQL/Riak table 'carboncopy' is not used anymore
and can be safely removed.

As a consequence, the commit deprecates the following options of
mod_carboncopy:
- ram_db_type
- use_cache
- cache_size
- cache_missed
- cache_life_time

Fixes #2663
2018-12-01 13:33:44 +03:00
Holger Weiss
a9539fef22 ejabberd_s2s_in: Check for subdomain configuration
If an incoming s2s connection to a subdomain such as
conference.example.com is accepted, check for host-specific
configuration settings for that subdomain rather than for example.com.
This is for consistency with ejabberd_s2s_out, and with my previous
commit.
2018-12-01 10:14:04 +01:00
Holger Weiss
122dfec03d ejabberd_s2s_in: Check for subdomain certificate
If an incoming s2s connection to a subdomain such as
conference.example.com is accepted and a separate certificate is
available for that subdomain, offer that certificate instead of the one
for example.com.

Thanks to Mike Kuketz for reporting the bug.
2018-12-01 10:08:28 +01:00
Holger Weiss
2eb907dc7f mod_register: Don't advertise IBR unconditionally
Don't advertise the IBR stream feature if registration is disabled in
the configuration.
2018-12-01 07:21:41 +01:00
Evgeny Khramtsov
59ce0ba6c8 Apply new cache options on mod_stream_mgmt reload 2018-11-30 18:12:27 +03:00
Evgeny Khramtsov
5d27c975dc Keep last handled stanzas number in cache rather than session table 2018-11-30 16:19:00 +03:00
Badlop
b8883b5a61 New command unban_ip (#2620) 2018-11-30 13:36:10 +01:00
Paweł Chmielowski
53ae25ad8f Update deps 2018-11-29 14:45:13 +01:00
Evgeny Khramtsov
b07b10bdaa Drop some macros related to OTP<19 2018-11-29 13:01:00 +03:00
Evgeny Khramtsov
624485fe26 Implement XEP-0410: MUC Self-Ping optimization
Fixes #2630
2018-11-29 12:16:12 +03:00
Evgeny Khramtsov
3f901b3793 Advertise disco#info and disco#items by MUC room
Fixes #2661
2018-11-29 10:35:03 +03:00
Paweł Chmielowski
0b31aa490b Add xml compression to sql backend of mam 2018-11-28 11:25:16 +01:00
Badlop
e37a1a73f1 Add specific Var names to CAPTCHA fallback form fields (#2672) 2018-11-27 19:10:42 +01:00
Christophe Romain
932d995a1d Revert "Upgrade Elixir to 1.6.6 (#2653)"
This reverts commit d3a9fbf62f.
rebar2 (which is still used) is not able to cope with this change
it should check lib/elixir/src/elixir.app.src instead of src/elixir.app.src
as src/elixir.app.src moved away, currently check fails and this breaks
jenkins tests.

options: use rebar3, or drop rebar completely to rely only on mix.
2018-11-27 11:01:52 +01:00
Christophe Romain
d3a9fbf62f Upgrade Elixir to 1.6.6 (#2653) 2018-11-27 09:57:59 +01:00
Evgeny Khramtsov
94ef57721b Merge branch 'master' of github.com:processone/ejabberd 2018-11-23 16:25:02 +03:00
Evgeny Khramtsov
207c0eebe4 Improve tests for mod_private 2018-11-23 16:24:44 +03:00
Badlop
133bc764cd Fix typo in recent PR commit (#2697) 2018-11-23 13:23:00 +01:00
Christophe Romain
8ebf31d949 Bump lager version in mix as well 2018-11-23 13:00:19 +01:00
badlop
cc9a1a0917
Merge pull request #2697 from Snowmanko/master
Update - fixed ejabberdctl push_roster description
2018-11-23 12:55:44 +01:00
Evgeny Khramtsov
a84be928ef Fix test case for invalid language 2018-11-23 14:11:14 +03:00
Evgeny Khramtsov
fcff3c60b1 Only advertise conversion feature when mod_pubsub is loaded 2018-11-23 14:01:06 +03:00
Evgeny Khramtsov
d79ddd7b5c Bump lager version 2018-11-23 13:34:21 +03:00
Evgeny Khramtsov
1cdca1ab99 Support for XEP-0411: Bookmarks Conversion 2018-11-23 13:33:29 +03:00
Evgeny Khramtsov
87f8355908
Merge pull request #2690 from nosnilmot/stopping-hook
Add ejabberd_stopping hook
2018-11-22 23:21:45 +03:00
Snowman
9ed5ba01b2
Update - fixed ejabberdctl push_roster description 2018-11-22 16:32:05 +01:00
Christophe Romain
4b3db3a9cb Relax result matching to fix pgsql keepalive (#2632) 2018-11-21 18:06:32 +01:00
Mickael Remond
8a960f77d4
Remove unused link 2018-11-21 11:54:02 +01:00
Stu Tomlinson
d4cd3ddc32 Add ejabberd_stopping hook
This hook allows modules to detect when ejabberd is stopping and adjust
behaviour if desired
2018-11-19 15:11:33 +00:00
Holger Weiss
88749e2cdb CONTRIBUTORS: UTF-8 encode my name 2018-11-19 15:23:35 +01:00
Paweł Chmielowski
1214a83cca Use never version of meck 2018-11-19 14:15:29 +01:00
Paweł Chmielowski
8e3bbcac9f Another attempt for db access on travis 2018-11-19 13:53:06 +01:00
Paweł Chmielowski
0ad319e288 Third time's the charm? Let load scheme before changing permissions 2018-11-19 13:17:46 +01:00
Mickaël Rémond
9a351c0aff
Update CONTRIBUTING.md 2018-11-19 13:12:35 +01:00
Paweł Chmielowski
d642a9db88 Fix command for loading pgsql schema 2018-11-19 12:58:45 +01:00
Paweł Chmielowski
0c4f5dbb7e Try to load db schemas externally on travis 2018-11-19 12:49:29 +01:00
Mickael Remond
181019198c
Thank you, contributors 2018-11-19 11:38:44 +01:00
Mickaël Rémond
61dcab13a4
Expand contribution document 2018-11-19 11:17:08 +01:00
Mickaël Rémond
9c1c854138
Initial contributing document 2018-11-19 11:03:10 +01:00
Mickael Remond
912d4e2165
Merge branch 'master' of github.com:processone/ejabberd 2018-11-19 10:40:05 +01:00
Mickael Remond
41a24a8f8e
Markdown version is the main README version 2018-11-19 10:39:54 +01:00
Mickaël Rémond
3c3dd80ea9 Update issue templates 2018-11-19 10:37:04 +01:00
Mickael Remond
68f8194886
Use new naming for Github issue templates 2018-11-19 10:35:07 +01:00
Badlop
06e9d34018 Handle some malformed URL requests in ejabberd_http (#2687) 2018-11-16 12:13:17 +01:00
Evgeny Khramtsov
1d80addb7d Get rid of 'catch-all' statements 2018-11-15 15:07:58 +03:00
Evgeny Khramtsov
43498b39c1 Replace dict with maps
This will improve performance and memory consumptions of large MUCs
2018-11-15 14:13:45 +03:00
badlop
2b09d6a761
Merge pull request #2683 from paulmenzel/use-https-url-in-readme
Use HTTPS URL for docs.ejabberd.im in `README`
2018-11-13 10:30:09 +01:00
Paul Menzel
a5eabcea35 README: Use HTTPS URL for docs.ejabberd.im
Directly use the HTTPS URL.

    $ curl -I http://docs.ejabberd.im
    HTTP/1.1 301 Moved Permanently
    Server: Cowboy
    Connection: keep-alive
    Location: https://docs.ejabberd.im/
    Date: Mon, 12 Nov 2018 14:31:07 GMT
    Content-Type: text/plain; charset=utf-8
    Via: 1.1 vegur

    $ curl -I https://docs.ejabberd.im
    HTTP/1.1 200 OK
    Server: Cowboy
    Connection: keep-alive
    Set-Cookie: main-session=MTU0MjAzMzA1NnxOd3dBTkZWWVNrbEVRVkUwUVZvM1JGcEtTakpKTTA1RlYxQk1TelZKTmxkUlNGRk5Sa0ZVV0VSS1dVNHpSMDh6VEUxSVJFTkRVMEU9fHnVvedfnvRp4MtnGBKYfXIDSBTPilUvIp6Kz559FNKg; Path=/; Expires=Mon, 12 Nov 2018 22:30:56 GMT; Max-Age=28800; HttpOnly
    Date: Mon, 12 Nov 2018 14:30:56 GMT
    Content-Type: text/html; charset=utf-8
    Via: 1.1 vegur
2018-11-12 15:30:22 +01:00
Badlop
78d4e90d47 Remove references in configs to http_poll; it was removed in ba69c469b5 2018-11-12 14:26:00 +01:00
Holger Weiss
133c45ce2b Don't suppress notifications on PEP node removal
Send node deletion notifications (as per XEP-0060, #8.4.2) also for PEP
nodes.
2018-11-12 12:54:53 +01:00
Nathan Bruning
e965119c0e Privacy lists: set from/to on packet *before* calling privacy_check_packet 2018-11-10 16:56:34 +01:00
Paweł Chmielowski
d43d9ff0e2 Fix mod_http_apt_test 2018-11-09 14:55:19 +01:00
Badlop
da9bcc3370 Recover logging of user joining room, lost in 32de9a56 (thanks to elexis1) 2018-11-09 13:21:35 +01:00
Alexey Shchepin
48594544ed Fix for the previous commit 2018-11-09 14:18:48 +03:00
Alexey Shchepin
d16b99d830 Track presences sent via a multicast service 2018-11-09 03:27:24 +03:00
Holger Weiss
7d9c2b77f2 Merge remote-tracking branch 'processone/pr/2675'
* processone/pr/2675:
  Fix another typo in ejabberd.yml
  Fix tiny typo in configuration file
2018-11-07 12:51:32 +01:00
Ave
d11d9db3d6
Fix another typo in ejabberd.yml 2018-11-07 14:44:27 +03:00
Ave
2001418edd
Fix tiny typo in configuration file 2018-11-07 14:41:16 +03:00
Badlop
9f7d3520aa Fix unused variable warning 2018-11-06 00:08:45 +01:00
Badlop
602bfa3c3c Local stanzas are routed one by one, not by multicast 2018-11-06 00:07:34 +01:00
badlop
9253f3d113
Merge pull request #2655 from hamano/missing_redis_sm.lua
missing priv/lua/redis_sm.lua
2018-10-31 11:54:43 +01:00
Holger Weiss
dd93c0b457 ejabberd_logger: Disable debug logging properly
Don't forget to disable xmpp's debug logging when reducing the log level
from 5 to a lower value.
2018-10-31 02:42:54 +01:00
Badlop
a73aac691e Don't preprocess arguments, format_args verifies and prepares them (#2629) 2018-10-31 01:34:04 +01:00
Badlop
36891175ec Don't hide result of mod_*:set_* calls 2018-10-30 23:07:30 +01:00
Paweł Chmielowski
cb2b927085 Add send_ws_ping to c2s 2018-10-29 12:30:59 +01:00
HAMANO Tsukasa
3438f22de5 missing priv/lua/redis_sm.lua 2018-10-29 18:25:04 +09:00
Holger Weiss
30393bb690 Move unwrap_mucsub_message/1 into misc 2018-10-25 01:22:57 +02:00
Holger Weiss
a8b11b6474 Move some functions from xmpp back into ejabberd 2018-10-25 01:05:45 +02:00
Paweł Chmielowski
432ca80db6 Do no add 127.0.0.1 address to trusted_proxies list by default 2018-10-24 15:16:32 +02:00
Paweł Chmielowski
e369a93809 Use newer fast_tls that fixes some issues with tls1.3 2018-10-24 10:13:05 +02:00
Paweł Chmielowski
74e96afc10 Use tagged version of p1_mysql 2018-10-19 10:57:22 +02:00
Paweł Chmielowski
5181983d97 Recognize not_exists error in http_api 2018-10-19 10:30:05 +02:00
Paweł Chmielowski
0352b97f50 Update p1_mysql 2018-10-19 10:15:48 +02:00
Badlop
b010a1a0a0 Affiliations other than admin and owner cannot invite to members_only rooms
This is explained in the paragraph:
 If the room is members-only, the service MAY also add the invitee to the
 member list. (Note: Invitation privileges in members-only rooms SHOULD be
 restricted to room admins; if a member without privileges to edit the
 member list attempts to invite another user, the service SHOULD return
 a <forbidden/> error to the occupant; for details, see the Modifying the
 Member List section of this document.)
https://xmpp.org/extensions/xep-0045.html#invite-mediated
2018-10-17 12:57:18 +02:00
Holger Weiss
9a99284dfd Merge remote-tracking branch 'processone/pr/2636'
* processone/pr/2636:
  Config template recommend "open" access_model
2018-10-16 09:53:26 +02:00
Licaon_Kter
ae88be2011
Config template recommend "open" access_model
...instead of "comment out", as many seem to misunderstand what and why should be or not be commented out
2018-10-15 23:15:51 +00:00
Holger Weiss
7f97f3ae75 Enable mod_proxy65 by default 2018-10-15 23:09:52 +02:00
Holger Weiss
3d4f65812e ejabberd_s2s_in: Fix indentation 2018-10-15 23:03:53 +02:00
Paweł Chmielowski
914fae3d3e Change logic for archiving mucsub messages
This change should apply usual logic for message wrapped in mucsub except
check for groupchat message, so messages without bodies for example
should be rejected
2018-10-10 18:12:35 +02:00
Christophe Romain
d1e072821e Fix version in mix.exs 2018-10-09 12:23:27 +02:00
Paweł Chmielowski
989da356c4 Add pkix to included_applications 2018-10-09 11:33:39 +02:00
Paweł Chmielowski
c1521d3f13 Add pkix to mix.exs 2018-10-09 10:15:10 +02:00
Paweł Chmielowski
a16acd77ed Archive messages with type=normal and pubsub payload (like mucsub messages) 2018-10-08 15:56:44 +02:00
Evgeny Khramtsov
510925c9a1 Avoid using * in 'certfiles' option of default config 2018-10-04 15:00:43 +03:00
Evgeny Khramtsov
ed2b07fc10 Bump ejabberd version in the issue template 2018-10-04 14:42:11 +03:00
Evgeny Khramtsov
ebd50f8a69 Report available options in lexical order 2018-10-04 14:31:41 +03:00
Evgeny Khramtsov
d8f831de09 Run ejabberd_started hook earlier 2018-09-29 23:06:34 +03:00
Evgeny Khramtsov
73af98a8dc Add forgotten TURN options to validator
Fixes #2621
2018-09-29 23:05:41 +03:00
Evgeny Khramtsov
984a00195a Fix bugs introduced by previous commit 2018-09-28 00:28:34 +03:00
Evgeny Khramtsov
39fa1a810d Move certificates processing code to pkix application
==== WARNING: MUST BE ADDED TO RELEASE NOTES =====
The commit introduces the following incompatibility:
- Option 'ca_path' is deprecated and has no effect anymore:
  option 'ca_file' should be used instead if needed.
==================================================
2018-09-27 20:37:27 +03:00
Holger Weiss
e3a03394c7 mod_avatar: Reduce log level for too large avatars
Log a warning rather than an error when publishing an avatar fails due
to its size exceeding the ?MAX_PAYLOAD_SIZE for PubSub items.
2018-09-26 21:00:52 +02:00
Holger Weiss
aa162f30df ejabberd_regexp: Support Unicode 2018-09-26 19:10:32 +02:00
Holger Weiss
5dcf2cde9c MySQL: Use MEDIUMTEXT for PubSub payload
Let MySQL/MariaDB accept PubSub payloads with a size of up to 16 MiB,
rather than truncating at 64 KiB.
2018-09-26 19:01:45 +02:00
Paweł Chmielowski
b72ed7afa4 Update mix.lock 2018-09-26 15:01:27 +02:00
Christophe Romain
c109d3eff0 Add odbc connection robustness (#2428) 2018-09-25 16:59:49 +02:00
Paweł Chmielowski
0d743da595 Update xmpp 2018-09-25 16:18:16 +02:00
Paweł Chmielowski
ef57067edc Update deps in mix.lock 2018-09-25 14:31:22 +02:00
Badlop
e054c2800b Allow a subscribed owner/admin to kick lower-affiliation moderator 2018-09-25 10:55:57 +02:00
Badlop
49f1b4a691 Allow an occupant owner/admin to kick lower-affiliation moderator 2018-09-25 10:55:56 +02:00
Badlop
8b61c7fe4b Allow a subscribed owner/admin to kick participants and visitors 2018-09-25 10:55:54 +02:00
Badlop
9bac2fa185 Allow a subscribed owner/admin to change participant<->visitor 2018-09-25 10:55:51 +02:00
Paweł Chmielowski
c3f62c037d Update deps once more 2018-09-24 15:49:26 +02:00
Paweł Chmielowski
4ddee2d89b Increase validity of generated test ca cert and regenerate all certs 2018-09-24 15:19:19 +02:00
Paweł Chmielowski
054426072e Update deps 2018-09-24 14:37:54 +02:00
Evgeny Khramtsov
f28200b6de
Update ISSUE_TEMPLATE 2018-09-21 19:20:23 +03:00
Evgeny Khramtsov
8c16400332
Update ISSUE_TEMPLATE 2018-09-21 19:02:14 +03:00
Paweł Chmielowski
0394baaa7a Allow changing invitation message from muc_invite hook 2018-09-21 16:37:52 +02:00
Paweł Chmielowski
1b3a6dd54a Recognize more fields that aren't atom in format_room_option 2018-09-20 18:02:47 +02:00
Evgeny Khramtsov
6d1ea222c0 Remove forgotten debug line 2018-09-19 23:17:04 +03:00
Evgeny Khramtsov
08f3d066b1 Switch more log message to warning level
The commit is supposed to improve logging at loglevel 3, which
is the recommended level for high loaded ejabberd servers
2018-09-19 23:12:14 +03:00
Evgeny Khramtsov
ddca2e8b4a Switch mod_fail2ban log messages to warning level 2018-09-19 19:33:33 +03:00
Evgeny Khramtsov
a2b2a27bb6 Resize SQL pool on configuration reload
Fixes #2541
2018-09-19 11:55:40 +03:00
Evgeny Khramtsov
d60d72d7bf Don't hide 'undef' exceptions during config validation 2018-09-19 01:00:50 +03:00
Evgeny Khramtsov
7ff5f2d3fa Fail early when loading unavailable SIP or STUN modules 2018-09-18 18:19:42 +03:00
Evgeny Khramtsov
1866b56e3b Report real address of a listener 2018-09-18 14:51:42 +03:00
Evgeny Khramtsov
e96bfbdbfa Remove useless type specs 2018-09-18 13:24:06 +03:00
Evgeny Khramtsov
3cc964fbcc Fix listeners child specs creation 2018-09-18 13:22:34 +03:00
Evgeny Khramtsov
29f6c43ae3 Remove forgotten debug line 2018-09-18 12:58:29 +03:00
Evgeny Khramtsov
03de853e4f Refactor ejabberd_listener 2018-09-18 12:53:36 +03:00
Paweł Chmielowski
fb367469d4 Add ability to configure test to use new sql schema 2018-09-18 09:44:54 +02:00
Holger Weiss
d2cdfa66f9 mod_http_upload: Log error if 'put_url' is reused
Log a proper [error] message if a single 'put_url' is used for multiple
virtual hosts.
2018-09-17 21:46:37 +02:00
Badlop
d5c1174385 Revert "New option tombstone_expiry locks recent room creation after destroy (#2546)"
This reverts commit efb4fd0d10.
2018-09-17 12:28:39 +02:00
Evgeny Khramtsov
dd888f90ec Improve error formatting 2018-09-17 12:08:04 +03:00
Badlop
bb9593dd12 Remove unused variables 2018-09-17 10:42:29 +02:00
Evgeny Khramtsov
de385591d0 Refactor ejabberd listener API 2018-09-17 11:21:02 +03:00
Paweł Chmielowski
78dae4036e Reintroduce change removed by mistake in 'Improve match macro' 2018-09-17 09:34:15 +02:00
Holger Weiss
dafea66c0f Increase 'max_stanza_size' limit for c2s listener
Specify a larger 'max_stanza_size' limit for c2s connections in the
default configuration in order to reduce the risk of this limit being
hit by legitimate traffic (such as avatar uploads).
2018-09-17 00:18:38 +02:00
Holger Weiss
c851f9608a Set a 'max_stanza_size' for incoming s2s listener
Specify a 'max_stanza_size' limit for incoming s2s connections in the
example configuration, but use a relatively large value in order to
minimize the risk of this limit being hit by legitimate traffic.
2018-09-16 23:57:44 +02:00
Holger Weiss
3367c5b120 MySQL: Use MEDIUMTEXT for MAM/offline messages
Let MySQL/MariaDB accept message stanzas with a size of up to 16 MiB,
rather than truncating at 64 KiB.
2018-09-16 20:42:37 +02:00
Paweł Chmielowski
d4579d2a20 [test] Improve match macro 2018-09-14 20:27:59 +02:00
Paweł Chmielowski
410ac9b966 [tests] Update stream_id from stream:stream after auth 2018-09-14 20:27:33 +02:00
Holger Weiss
adf0d7de91 mod_muc_room: Fix the room's CAPS hash
Don't forget the room's xdata when calculating the CAPS hash.
2018-09-14 00:18:17 +02:00
Evgeny Khramtsov
8c03427c25
Merge pull request #2605 from af8a524db1/remove_unused_error
mod_register: Remove unused error 'too_many_users'
2018-09-13 22:36:59 +03:00
Marc Schink
c156eabb24 mod_register: Remove unused error 'too_many_users' 2018-09-13 21:34:12 +02:00
Badlop
1d6cbd2561 Trigger hook for user_send_packet in send_message command (#2604) 2018-09-13 18:21:30 +02:00
Evgeny Khramtsov
a7a1e7be94
Merge pull request #2602 from aquarhead/expect-mnesia-up
Expect mnesia_up event when joining cluster
2018-09-12 17:15:04 +03:00
AquarHEAD Lou
8673d2926d
Expect mnesia_up event when joining cluster 2018-09-12 11:01:05 +00:00
colm
b0b188aa68 remove some chatty SQL queries by pulling back all groups with opts and filtering in memory. move a call to get_group_name outside of a loop to eliminate redundant repeated queries 2018-09-10 00:08:00 +01:00
Evgeny Khramtsov
2d246f61dd Fix some dialyzer warnings 2018-09-09 09:59:08 +03:00
Evgeny Khramtsov
9de2ca4568
Merge pull request #2597 from dmitryDemchenko/master
fix for freetds UTF-8 corruption
2018-09-07 22:50:16 +03:00
root
b545301f63 fix for freetds UTF-8 corruption 2018-09-07 19:56:39 +03:00
Evgeny Khramtsov
145c0116bf Bump lager version
This is needed for OTP-21 compatibility
2018-09-07 18:03:36 +03:00
Paweł Chmielowski
79c511a441 Add information about real sender to mucsub message meta 2018-09-06 13:36:59 +02:00
Paweł Chmielowski
90b22da880 Use newere fast_tls 2018-09-05 11:14:19 +02:00
Paweł Chmielowski
57936bfa4e Don't stop sending pings when receiving timeout for timeout_action=none 2018-09-04 09:52:41 +02:00
Evgeniy Khramtsov
5c931d7004 Correctly handle empty result with RSM
Fixes #2588
2018-09-02 00:37:07 +03:00
Evgeniy Khramtsov
88d0b71d58 Get stacktrace out of lager context
Calling erlang:get_stacktrace() inside lager functions produces
stacktraces of the logging function itself, not the function which has failed.
2018-09-01 19:37:26 +03:00
Evgeniy Khramtsov
b416527e4f Don't set termination reason into presence-unavailable status
Fixes https://github.com/processone/xmpp/issues/35
2018-09-01 17:39:39 +03:00
Holger Weiss
8c8c480477 ejabberd_s2s_in: Log message on connection close
Log a message when an incoming s2s connection is closed, analogous to
the message on outgoing s2s connection close.
2018-08-29 16:23:56 +02:00
Paweł Chmielowski
66132353df Sign certs used by tests with sha256
Seems that openssl1.1.1 (at least debian version) rejects certs signed with
md5 or sha1, so lets use something that works.
2018-08-28 11:27:44 +02:00
Evgeniy Khramtsov
b30a9f2f75 Better formatting of unexpected return from Module:start/2 2018-08-28 10:41:57 +03:00
Badlop
0cbd41fbdc Fix max_user_conferences in Mnesia to consider only one MUC service (#2556) 2018-08-20 15:47:53 +02:00
Evgeniy Khramtsov
5b055d7eec Use "localhost" as a default host 2018-08-17 18:42:09 +03:00
Evgeniy Khramtsov
01a1f929b4 Bump xmpp version 2018-08-17 18:16:14 +03:00
Evgeniy Khramtsov
f0f3ec211e Disable cache for anonymous auth backend
Fixes #2566
2018-08-17 17:56:23 +03:00
Paweł Chmielowski
fd76bc9242 Update xmpp 2018-08-16 11:59:26 +02:00
Badlop
6cd70947be Third attempt to fix the typo! 2018-08-15 12:56:41 +02:00
Badlop
8cefe58a89 Fix typo from commit 0bf93eefc 2018-08-15 12:40:39 +02:00
Badlop
c3361bab95 Handle get_presence(Pid) when session doesn't exist (#2547) 2018-08-15 12:16:01 +02:00
Badlop
f3f3b1586e Fix typo in command description 2018-08-13 16:42:16 +02:00
Badlop
0bf93eefcb Try to update tests to handle recent MUC subscriptions change (#2272) 2018-08-13 15:26:40 +02:00
Badlop
10e01b7bfc Return human error messages when calling export2sql with wrong path (#2480) 2018-08-13 13:56:29 +02:00
Badlop
8f0e066135 In response with list of room subscriptions include also events (#2272) 2018-08-13 12:52:33 +02:00
Badlop
dfd96b6037 Remove num_active_users as it uses calls to last_activity mnesia table (#2448) 2018-08-08 14:18:49 +02:00
Badlop
5b373470ac Remove direct calls to muc_room mnesia table in mod_muc_admin (#2448) 2018-08-08 14:18:34 +02:00
Badlop
0146189b65 Add markdown options as specified in the docs git repo 2018-08-07 16:59:26 +02:00
Badlop
4c4c82897c Add import_prosody explanation from docs git repo 2018-08-07 16:58:53 +02:00
Badlop
5509e648ad Allow acme and oauth commands to be read by gen_markdown_doc_for_commands 2018-08-07 16:58:48 +02:00
Badlop
c9ba0e83d2 Handle ejabberd_captcha error reports in mod_register_web (#2553) 2018-08-02 18:36:41 +02:00
Evgeny Khramtsov
b56c012407
Merge pull request #2551 from MarcelWaldvogel/configurable-extauth-pool
Make it possible to join extauth pools
2018-07-31 07:52:06 +03:00
Marcel Waldvogel
9b48dc9cc3 Make it possible to join extauth pools 2018-07-30 22:49:18 +02:00
Badlop
efb4fd0d10 New option tombstone_expiry locks recent room creation after destroy (#2546)
Setting the new mod_muc option tombstone_expiry to a positive integer
will make that any room destroyed gets replaced with a room tombstone.
That tombstone cannot be joined, so it blocks accessing the old room JID
until the expiry seconds have passed.
The default value is 0 seconds, so tombstones are not created.
2018-07-30 19:24:35 +02:00
Holger Weiss
83e2462853 mod_mam: Don't strip offline message stanza IDs
As mod_offline currently doesn't preserve metadata, add an explicit
check for messages retrieved from offline storage to avoid stripping
their stanza IDs.

Thanks to Zuglufttier for spotting this.
2018-07-27 00:27:10 +02:00
Holger Weiss
cdfd0cce7b mod_mam: Make sure stanza IDs aren't reused
Strip the stanza ID from the metadata of outgoing messages to make sure
it's not reused for the (local) recipient's MAM archive.
2018-07-27 00:14:48 +02:00
Holger Weiss
2d45832a39 ejabberd_auth: Restore lost case clause
Let check_password_with_authmodule/6 handle the case where
validate_credentials/2 returns an error.  This got lost in commit
4f8af723c6.
2018-07-26 22:37:25 +02:00
Paweł Chmielowski
1af2cf37ea Wait for more data than just <stream:stream> before sending in bosh
This fixes issue #2545
2018-07-26 18:56:05 +02:00
Paweł Chmielowski
ca022b6d1f Make sure that we always start inactivity timer from drop_holding_receiver 2018-07-26 17:29:35 +02:00
Paweł Chmielowski
e54f1a8485 Set wait_timer to undefined when timer was triggered 2018-07-26 17:29:35 +02:00
Badlop
1be2112634 Fix search for User in vjud
See https://stackoverflow.com/questions/51478247/ejabberd-search-module-failed-to-handle-the-query
2018-07-24 20:01:22 +02:00
Paweł Chmielowski
6dc452e7f5 Update xmpp 2018-07-23 17:23:11 +02:00
Holger Weiss
57a3512dcc mod_http_upload: Adjust default value of 'put_url'
Let the default 'put_url' point to the HTTPS listener specified in the
new default configuration.
2018-07-18 19:44:56 +02:00
Evgeny Khramtsov
1de69174ef
Merge pull request #2538 from weiss/tls-by-default
Enable TLS by default (and require it for c2s)
2018-07-18 19:38:13 +03:00
Holger Weiss
26b9d25f32 Enable TLS by default (and require it for c2s) 2018-07-18 18:22:24 +02:00
Holger Weiss
8ad6afd652 mod_http_upload: Deprecate 'service_url' option
Users should migrate to the 'external_secret' interface.
2018-07-18 18:16:42 +02:00
Evgeny Khramtsov
7fed5a3eb6
Merge pull request #2537 from rouen-sk/patch-1
Update mssql.sql
2018-07-18 18:37:30 +03:00
rouen-sk
b199b68380
Update mssql.sql
Fixed:
- conflicting clustered indexes on 2 tables
- semicolon type
- Azure SQL incompatibility
2018-07-18 17:12:17 +02:00
Holger Weiss
e433a63105 mod_http_upload: Avoid function-like macros 2018-07-17 22:28:31 +02:00
Holger Weiss
68c9328a9c Move cancel_timer/1 function into 'misc' module 2018-07-17 20:50:58 +02:00
Holger Weiss
6601f182c4 mod_http_upload: Add "Allow" to OPTIONS response
RFC 2616 says: "A 200 response SHOULD include any header fields that
indicate optional features implemented by the server and applicable to
that resource (e.g., Allow) [...]."
2018-07-17 19:42:57 +02:00
Holger Weiss
326db5535c mod_muc: Don't set default for muc#roomconfig_lang
For the muc#roomconfig_lang setting, no default is preferable over a
possibly incorrect default value.
2018-07-16 15:15:36 +02:00
Holger Weiss
2539be1a04 mod_http_upload: Avoid timers from timer module
Use erlang:start_timer/3 instead of timer:send_after/2, as the former is
more efficient.
2018-07-16 00:17:11 +02:00
Holger Weiss
4e9930597d mod_http_upload: Don't store "external" slots
Don't store requested upload slots if an 'external_secret' is
configured.
2018-07-15 21:53:50 +02:00
Evgeniy Khramtsov
2dfb5a6a5c Note about Redis requirement in the test suite README 2018-07-15 10:14:47 +03:00
Evgeniy Khramtsov
8faa6afa67 Require Redis version >= 3.2.0
Since we now use Lua scripting for cleaning up c2s sessions
the minimum supported Redis version is 3.2.0 or above because
we need to work correctly with Redis replication mechanism.

****** BACKWARD INCOMPATIBILITY WARNING *******
** THIS SHOULD BE ADDED TO THE RELEASE NOTES **
*** PACKAGE MAINTAINERS SHOULD BE INFORMED  ***
***********************************************
2018-07-15 09:52:03 +03:00
Holger Weiss
12e537c43f Avoid "ejabberdctl status" crash 2018-07-14 20:27:30 +02:00
Evgeniy Khramtsov
4394ec38b6 Don't forget to remove Lua scripts on uninstall 2018-07-14 18:02:50 +03:00
Evgeniy Khramtsov
420e05fa0d Clean up contributed code for Redis SM 2018-07-14 17:53:00 +03:00
Evgeny Khramtsov
e2fb154fe9
Merge pull request #2525 from satish-olx/master
Use lua scripting to clear redis sessions.
2018-07-14 16:53:45 +03:00
Evgeniy Khramtsov
e9f219a0ac Improve wording 2018-07-14 16:52:09 +03:00
Evgeny Khramtsov
711c5c0d54
Merge pull request #2526 from nosnilmot/enforce-pubsub-option-attributes
Enforce pubsub option required/rejected attributes
2018-07-14 16:42:15 +03:00
Stu Tomlinson
f9ed34db4d Enforce pubsub option required/rejected attributes
XEP-0060 states that 'node' and 'jid' attributes to <options> element MUST NOT
be included when <options> are specified at same time as <subscribe> :

https://xmpp.org/extensions/xep-0060.html#subscriber-configure-subandconfig

mod_pubsub will require 'node' and 'jid' attributes on standalone pubsub
options requests, and reject subscribe requests that have options that include
either 'node' or 'jid'
2018-07-14 11:55:38 +01:00
Evgeny Khramtsov
9a895058e7
Merge pull request #2522 from weiss/bump-max-user-conferences
mod_muc: Increase default 'max_user_conferences' value
2018-07-14 08:51:11 +03:00
Paweł Chmielowski
e76a57e144 Ensure that returned priority in a number in mod_admin_extra 2018-07-13 09:51:19 +02:00
satish-olx
6fc6bdefc2
Update ejabberd_sm_redis.erl 2018-07-12 16:14:26 +05:30
satish-olx
96e35a3248
Lua script for cleaning redis sessions
Changes:
1. Added extra keys for tracking node -> session mapping
2. Lua script for clearing the sessions in redis itself.
2018-07-12 16:10:24 +05:30
Paweł Chmielowski
48be8e7b1e Adopt code that uses parse_listener_portip after result change 2018-07-11 14:07:24 +02:00
Badlop
f40f3a9da7 Fix piefxis import of privacy lists (thanks to crosser)(#2412) 2018-07-11 12:56:57 +02:00
Badlop
f81b49fe44 Fix piefxis import of vCard elements (#2514) 2018-07-11 12:56:38 +02:00
Evgeniy Khramtsov
395d2e86bc Improve listener errors formatting 2018-07-11 09:29:55 +03:00
Holger Weiss
5b3af9d4cd Fix compiler warnings regarding test cases 2018-07-11 00:07:57 +02:00
Holger Weiss
7e5d766a02 pubsub_tests: Fix race condition 2018-07-10 21:25:06 +02:00
Holger Weiss
c5dd1bdd9d mod_http_upload_quota: Fix process name lookup
Fix mod_http_upload_quota's process name lookup for the case where a
slot is requested by a JID whose domain part is not the virtual host the
mod_http_upload_quota process is running on.
2018-07-10 21:19:15 +02:00
Evgeniy Khramtsov
d03432a956 Fix regression: list SASL EXTERNAL mechanism for inbound s2s 2018-07-10 10:14:08 +03:00
Holger Weiss
4b747c2c78 mod_muc: Increase 'max_user_conferences' default
Let up to 100 clients of a given account join MUC rooms by default.  The
old default value can be too small, e.g., when users join many (private)
rooms with multiple devices.
2018-07-10 01:00:06 +02:00
Holger Weiss
3a566e3cdf mod_stream_mgmt: Remove dead case clauses 2018-07-10 00:52:27 +02:00
Holger Weiss
b915469f5e mod_stream_mgmt: Add descriptive text to errors
Closes #2485.
2018-07-10 00:46:48 +02:00
Evgeniy Khramtsov
8b9166d067 Improve value formatting 2018-07-09 20:32:01 +03:00
Paweł Chmielowski
dc6861eb73 Use ejabberd_config:get_version in ejabberdctl status 2018-07-09 17:11:40 +02:00
Evgeny Khramtsov
90a4aafec0
Merge pull request #2516 from licaon-kter/patch-6
Remove vcard search default value
2018-07-09 10:08:00 +03:00
Licaon_Kter
4c06f13d18
Remove vcard search default value 2018-07-08 23:48:08 +00:00
Evgeniy Khramtsov
8c796ed027 Better format invalid values when logging them 2018-07-08 20:42:53 +03:00
Evgeniy Khramtsov
68d12017cc Better detection of duplicated routes/hosts 2018-07-08 20:28:11 +03:00
Evgeniy Khramtsov
491993d401 Reload internal room's configuration when mod_muc is reloaded
Fixes #2513
2018-07-08 14:52:12 +03:00
Evgeny Khramtsov
a981bf9a59
Merge pull request #2511 from licaon-kter/patch-5
Remove stats and time from template
2018-07-08 10:43:25 +03:00
Evgeny Khramtsov
920e4512b6
Merge pull request #2515 from ChaosKid42/fix_HMAC_in_http_upload
fix generation of HMAC for external_secret
2018-07-08 10:42:55 +03:00
Christoph Scholz
fbdcc44fd9 fix HMAC for external_secret 2018-07-07 17:01:39 +02:00
Paweł Chmielowski
b2b29269ec Remove cyrsasl elixir tests, we no longer have it 2018-07-06 09:49:30 +02:00
Evgeniy Khramtsov
11811e5f48 Only lookup FQDN at configuration (re)loading 2018-07-06 09:18:27 +03:00
Licaon_Kter
b7f62a4fa7
Remove stats and time from template
Are these important for a new admin?
2018-07-06 01:33:41 +00:00
Evgeniy Khramtsov
0bb14d16c7 Move XMPP stream and SASL processing to xmpp repo 2018-07-06 01:07:36 +03:00
Evgeniy Khramtsov
59f5a098b5 Use p1_rand in the test suite 2018-07-05 11:53:04 +03:00
Evgeniy Khramtsov
ed1ee6061e Move move randoms module to p1_utils repo 2018-07-05 11:51:49 +03:00
Evgeniy Khramtsov
50b645aa92 Move shaper to p1_utils repo 2018-07-05 09:31:55 +03:00
Evgeniy Khramtsov
52f2a7de4b Set 'from' attribute for client connections when it is absent 2018-07-04 08:59:14 +03:00
Evgeniy Khramtsov
bce8922e5d Don't set from/to attributes in resource binding iq 2018-07-04 08:57:28 +03:00
Evgeniy Khramtsov
86236431b9 mod_http_upload: Treat file and network errors differently 2018-07-04 08:55:52 +03:00
badlop
c0d4d31b5b
Merge pull request #2495 from rodrigues/update_ptbr
Update pt-br translations
2018-07-03 16:50:29 +02:00
Evgeniy Khramtsov
295bec8551 Don't ignore send() result 2018-07-03 13:44:58 +03:00
Evgeniy Khramtsov
b341a3cef3 Increase default buffer size for mod_proxy65 2018-07-03 13:38:49 +03:00
Evgeniy Khramtsov
fface33d54 HTTP Upload: introduce new option 'external_secret'
The option makes it possible to offload all HTTP Upload processing
to a separate HTTP server. Both ejabberd and the HTTP server
should share this secret and behave exactly as described at
at https://modules.prosody.im/mod_http_upload_external.html
in the 'Implementation' section. Example configuration:

modules:
  ...
  mod_http_upload:
    ...
    put_url: "http://separate.http.server/upload"
    external_secret: "foo bar baz"
  ...
2018-07-02 16:53:44 +03:00
Evgeniy Khramtsov
fbf6ba2738 Merge branch 'master' of github.com:processone/ejabberd 2018-07-02 01:08:09 +03:00
Evgeniy Khramtsov
38ec3f66c7 Enable Roster Versioning in the default config file 2018-07-02 01:08:02 +03:00
Evgeny Khramtsov
56dc625f9a
Merge pull request #2502 from licaon-kter/patch-4
Default config example fix reversed text
2018-07-02 00:20:46 +03:00
Licaon_Kter
7c5ee93c88
Default config example fix reversed text
...in enable OMEMO
2018-07-01 21:18:18 +00:00
Evgeniy Khramtsov
77163c43d2 Simplify the default configuration file
After some discussion with the community it was decided to
clean the configuration file from excessive comments and
explicitly configured default values. Also, mod_mam and
mod_http_upload have been added.

The rationale for this is to have a clean and not bloated
configuration file which doesn't scare away newcomers and
which has all features from the Compliance Suite 2018 (XEP-0387)
enabled by default.

For further configuration an admin is encouraged to read the
documentation at https://docs.ejabberd.im/admin/configuration
2018-07-01 23:57:27 +03:00
Victor Rodrigues
d1d02e2f26 Update pt-br translations 2018-07-01 15:15:41 +02:00
Evgeniy Khramtsov
6b8bc811ac Don't crash on most common gen_server:call errors 2018-07-01 14:26:49 +03:00
Evgeniy Khramtsov
b662ec2a78 Accept IP address as a return value from resolve/2 callback 2018-06-30 10:19:58 +03:00
Paweł Chmielowski
8ca035496e Update fast_xml and xmpp in mix.lock 2018-06-29 15:41:37 +02:00
Evgeniy Khramtsov
a463f5a25a Replace hardcoded disco features with macros 2018-06-29 14:48:07 +03:00
Paweł Chmielowski
dce4e4de6d Add check for files missing in hex packaging 2018-06-29 12:51:20 +02:00
Paweł Chmielowski
9b70177fd5 Update xmpp 2018-06-29 12:50:57 +02:00
Paweł Chmielowski
1fbb36c34a Fix misc:try_url for erlang < R20 2018-06-29 11:13:29 +02:00
Christophe Romain
46abf7cfab Rename obsolete type in comments 2018-06-29 11:10:35 +02:00
Paweł Chmielowski
62cb398734 Convert test that used moka, and drop that dependancy 2018-06-29 10:52:47 +02:00
Evgeniy Khramtsov
dff940b89e Support both filenames and URLs in 'cssfile' option of mod_muc_log
If filename is provided, its content is inserted into the HTML page.
If URL is provided, it's used as a value of 'href' HTML attribute.
2018-06-29 11:34:53 +03:00
Evgeniy Khramtsov
66591b1c0d Improve URLs validation 2018-06-29 11:06:24 +03:00
Evgeniy Khramtsov
b094ce8ea5 HTTP Upload: increase gen_server call timeout 2018-06-29 10:32:53 +03:00
Evgeniy Khramtsov
9c82c2f6d0 HTTP Upload: put more info in log messages 2018-06-29 09:58:33 +03:00
Evgeniy Khramtsov
0a40ab93c8 Don't crash when encoding {xmlcdata, _}
Fixes #2493
2018-06-28 15:04:46 +03:00
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
304dd8f81e

Thanks to Stu Tomlinson for spotting the issue.

Fixes #2488
2018-06-27 19:40:03 +03:00
Evgeniy Khramtsov
644873dae9 Don't check packets sent to self 2018-06-27 15:02:03 +03:00
Evgeniy Khramtsov
9a11db91f9 Use lists:foldl/3 2018-06-27 13:36:58 +03:00
Evgeniy Khramtsov
af8c6d2428 Generate HTTP Upload form using xdata codec 2018-06-27 13:29:38 +03:00
Evgeniy Khramtsov
87357c700f Do not ignore a certificate containing no domain names
Log a warning instead and assign it to an "empty" domain
2018-06-27 11:27:39 +03:00
Evgeniy Khramtsov
7881c5670c Don't replace valid certificates with invalid ones
When building the certificates chains, if several certificates
are found matching the same domain their validity is checked:

* the invalid one is ignored and the valid one is picked
* if both are valid or both are invalid, then the one with
  sooner expiration is ignored.

Fixes #2454
2018-06-27 10:55:37 +03:00
Evgeniy Khramtsov
881e02632b Improve error formatting in mod_http_upload 2018-06-26 19:32:29 +03:00
Evgeniy Khramtsov
47d117c1bf Support SASL PLAIN by xmpp_stream_out
Also, SASL mechanisms chaining is now supported:
if several mechanisms are supported and authentication
fails, next mechanism in the list is picked, until the
list is exhausted. In the case of a failure, the latest
SASL failure reason is returned within handle_auth_failure/3
callback.
2018-06-25 19:16:33 +03:00
Evgeniy Khramtsov
cf6f540d53 Don't pass sockmod to xmpp_stream_out 2018-06-25 15:28:02 +03:00
Evgeniy Khramtsov
557e6ecdd0 Introduce resolve/2 and connect_options/3 callbacks for xmpp_stream_out 2018-06-25 15:19:49 +03:00
Evgeniy Khramtsov
5dd3f4c22b Allow gen_server process registration 2018-06-25 14:55:33 +03:00
Evgeniy Khramtsov
e7c3b57b8b Allow reconnecting from disconnected state 2018-06-25 14:52:33 +03:00
Evgeniy Khramtsov
c907915695 Intercept EXIT signal 2018-06-25 14:46:31 +03:00
Evgeniy Khramtsov
911ed4a7ca Add Resource Binding support to xmpp_stream_out 2018-06-25 13:50:35 +03:00
Evgeniy Khramtsov
499ae96254 Don't use 'unsupported-version' inside SM <failed/> element
This error condition is defined within stream errors, however,
XEP-0198 says:

> This element SHOULD contain an error condition, which MUST
> be one of the **stanza** error conditions defined in RFC 6120.
2018-06-25 09:56:44 +03:00
Evgeniy Khramtsov
ac31c85866 Use error formatting functions from xmpp library 2018-06-25 09:45:45 +03:00
Evgeniy Khramtsov
c4c91cc956 Generate SASL failures on unencrypted connections only for s2s 2018-06-23 20:31:01 +03:00
Evgeniy Khramtsov
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 vcardupdate 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 c26b56679e (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 jabberevent 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
Johan Oudinet
d364eab74b Merge remote-tracking branch 'upstream/master' 2016-11-23 11:45:13 +01: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
s.budaev
026394a314 Added option to disable prepared statements (postgresql only) 2016-10-05 04:27:08 +04:00
692 changed files with 112921 additions and 116549 deletions

1
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1 @@
FROM ghcr.io/processone/devcontainer:latest

View File

@ -0,0 +1,7 @@
{
"name": "ejabberd",
"build": {"dockerfile": "Dockerfile"},
"extensions": ["erlang-ls.erlang-ls"],
"postCreateCommand": ".devcontainer/prepare-container.sh",
"remoteUser": "vscode"
}

View File

@ -0,0 +1,3 @@
echo "export PATH=/workspaces/ejabberd/_build/relive:$PATH" >>$HOME/.bashrc
echo "COOKIE" >$HOME/.erlang.cookie
chmod 400 $HOME/.erlang.cookie

View File

@ -1,3 +1,46 @@
.git
.win32
.examples
*.swp
*~
\#*#
.#*
.edts
*.dump
/Makefile
/config.log
/config.status
/config/releases.exs
/configure
/aclocal.m4
/*.cache
/deps/
/.deps-update/
/ebin/
/ejabberd.init
/ejabberd.service
/ejabberdctl
/ejabberdctl.example
/rel/ejabberd/
/rel/overlays/
/src/eldap_filter_yecc.erl
/vars.config
/dialyzer/
/test/*.beam
/test/*.ctc
/logs/
/priv/bin/captcha*sh
/priv/sql
/rel/ejabberd
/_build
/database/
/.rebar
/rebar.lock
/log/
Mnesia.nonode@nohost/
# Binaries created with tools/make-{binaries,installers,packages}:
/ejabberd_*.deb
/ejabberd-*.rpm
/ejabberd-*.run
/ejabberd-*.tar.gz
/.github/container/Dockerfile

View File

@ -1,15 +0,0 @@
> 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?

31
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
assignees: ''
---
Before creating a ticket, please consider if this should fit the [discussion forum](https://github.com/processone/ejabberd/discussions) better.
## Environment
- ejabberd version: 18.09
- Erlang version: `erl +V`
- OS: Linux (Debian)
- Installed from: source | distro package | official deb/rpm | official binary installer | other
## Configuration (only if needed): grep -Ev '^$|^\s*#' ejabberd.yml
```yaml
loglevel: 4
...
```
## Errors from error.log/crash.log
No errors
## Bug description
Please, give us a precise description (what does not work, what is expected, etc.)

View File

@ -0,0 +1,26 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: Kind:Feature
assignees: ''
---
Before creating a ticket, please consider if this should fit the [discussion forum](https://github.com/processone/ejabberd/discussions) better.
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when...
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

192
.github/container/Dockerfile vendored Normal file
View File

@ -0,0 +1,192 @@
#' Define default build variables
## specifc ARGs for METHOD='direct'
ARG OTP_VSN='26.2'
ARG ELIXIR_VSN='1.16.2'
## specifc ARGs for METHOD='package'
ARG ALPINE_VSN='3.19'
## general ARGs
ARG UID='9000'
ARG USER='ejabberd'
ARG HOME="opt/$USER"
ARG METHOD='direct'
ARG BUILD_DIR="/$USER"
ARG VERSION='master'
################################################################################
#' METHOD='direct' - build and install ejabberd directly from source
FROM docker.io/erlang:${OTP_VSN}-alpine AS direct
RUN apk -U add --no-cache \
autoconf \
automake \
bash \
build-base \
curl \
expat-dev \
file \
gd-dev \
git \
jpeg-dev \
libpng-dev \
libwebp-dev \
linux-pam-dev \
openssl-dev \
sqlite-dev \
yaml-dev \
zlib-dev
ARG ELIXIR_VSN
RUN wget -O - https://github.com/elixir-lang/elixir/archive/v$ELIXIR_VSN.tar.gz \
| tar -xzf -
WORKDIR elixir-$ELIXIR_VSN
RUN make install clean
RUN mix local.hex --force \
&& mix local.rebar --force
ARG BUILD_DIR
COPY / $BUILD_DIR/
WORKDIR $BUILD_DIR
RUN mv .github/container/ejabberdctl.template . \
&& ./autogen.sh \
&& ./configure --with-rebar=mix --enable-all \
&& make deps \
&& make rel
WORKDIR /rootfs
ARG VERSION
ARG HOME
RUN mkdir -p $HOME $HOME-$VERSION \
&& cp -r $BUILD_DIR/_build/prod/rel/ejabberd/* $HOME-$VERSION \
&& mv $HOME-$VERSION/conf $HOME/conf
RUN cp -p $BUILD_DIR/tools/captcha*.sh $HOME-$VERSION/lib
RUN find "$HOME-$VERSION/bin" -name 'ejabberd' -delete \
&& find "$HOME-$VERSION/releases" -name 'COOKIE' -delete
RUN wget -O "$HOME/conf/cacert.pem" 'https://curl.se/ca/cacert.pem' \
&& sed -i '/^loglevel:/a \ \
\nca_file: /opt/ejabberd/conf/cacert.pem \
\ncertfiles: \
\n - /opt/ejabberd/conf/server.pem' "$HOME/conf/ejabberd.yml"
################################################################################
#' METHOD='package' - install ejabberd from binary tarball package
FROM docker.io/alpine:${ALPINE_VSN} AS package
COPY tarballs/ejabberd-*-linux-musl-*.tar.gz /tmp/
WORKDIR /rootfs
ARG HOME
RUN home_root_dir=$(echo $HOME | sed 's|\(.*\)/.*|\1 |') \
&& mkdir -p $home_root_dir \
&& ARCH=$(uname -m | sed -e 's/x86_64/x64/;s/aarch64/arm64/') \
&& tar -xzf /tmp/ejabberd-*-linux-musl-$ARCH.tar.gz -C $home_root_dir
################################################################################
#' Prepare ejabberd for runtime
FROM ${METHOD} AS ejabberd
RUN apk -U add --no-cache \
git \
libcap \
openssl
WORKDIR /rootfs
ARG HOME
RUN mkdir -p usr/local/bin $HOME/conf $HOME/database $HOME/logs $HOME/upload
ARG BUILD_DIR
RUN if [ ! -d $HOME/.ejabberd-modules ]; \
then \
if [ -d $BUILD_DIR/.ejabberd-modules ]; \
then cp -r $BUILD_DIR/.ejabberd-modules $HOME; \
else git clone https://github.com/processone/ejabberd-contrib --depth 1 \
$HOME/.ejabberd-modules/sources/ejabberd-contrib; \
fi \
fi
RUN export PEM=$HOME/conf/server.pem \
&& openssl req -x509 \
-batch \
-nodes \
-newkey rsa:4096 \
-keyout $PEM \
-out $PEM \
-days 3650 \
-subj "/CN=localhost"
RUN home_root_dir=$(echo $HOME | sed 's|\(.*\)/.*|\1 |') \
&& setcap 'cap_net_bind_service=+ep' $(find $home_root_dir -name beam.smp) \
&& echo -e \
"#!/bin/sh \
\n[ -z \$ERLANG_NODE_ARG ] && export ERLANG_NODE_ARG=ejabberd@localhost \
\nexport CONFIG_DIR=/$HOME/conf \
\nexport LOGS_DIR=/$HOME/logs \
\nexport SPOOL_DIR=/$HOME/database \
\nexec /$(find $home_root_dir -name ejabberdctl) \"\$@\"" \
> usr/local/bin/ejabberdctl \
&& chmod +x usr/local/bin/* \
&& scanelf --needed --nobanner --format '%n#p' --recursive $home_root_dir \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e $home_root_dir" $1 " ]") == 0 { next } { print "so:" $1 }' \
| sed -e "s|so:libc.so|so:libc.musl-$(uname -m).so.1|" \
> /tmp/runDeps
ARG UID
RUN chown -R $UID:$UID $HOME
################################################################################
#' METHOD='direct' - Remove erlang/OTP & rebar3
FROM docker.io/erlang:${OTP_VSN}-alpine AS runtime-direct
RUN apk del .erlang-rundeps \
&& rm -f $(which rebar3) \
&& find /usr -type d -name 'erlang' -exec rm -rf {} + \
&& find /usr -type l -exec test ! -e {} \; -delete
################################################################################
#' METHOD='package' - define runtime base image
FROM docker.io/alpine:${ALPINE_VSN} AS runtime-package
################################################################################
#' Update alpine, finalize runtime environment
FROM runtime-${METHOD} AS runtime
COPY --from=ejabberd /tmp/runDeps /tmp/runDeps
RUN apk -U upgrade --available --no-cache \
&& apk add --no-cache \
$(cat /tmp/runDeps) \
so:libcap.so.2 \
so:libtdsodbc.so.0 \
tini \
&& ln -fs /usr/lib/libtdsodbc.so.0 /usr/lib/libtdsodbc.so
ARG USER
ARG UID
ARG HOME
RUN addgroup $USER -g $UID \
&& adduser -s /sbin/nologin -D -u $UID -h /$HOME -G $USER $USER
################################################################################
#' Build together production image
FROM scratch AS prod
ARG USER
ARG HOME
COPY --from=runtime / /
COPY --from=ejabberd /rootfs /
HEALTHCHECK \
--interval=1m \
--timeout=5s \
--start-period=5s \
--retries=10 \
CMD ejabberdctl status
WORKDIR /$HOME
USER $USER
VOLUME ["/$HOME"]
EXPOSE 1883 4369-4399 5210 5222 5269 5280 5443
ENTRYPOINT ["/sbin/tini","--","ejabberdctl"]
CMD ["foreground"]

View File

@ -0,0 +1,294 @@
@echo off
::
:: ejabberd container installer for Windows
:: -------------------------------------
:: v0.4
::
:: This batch script downloads an ejabberd container image
:: and setups a docker container to run ejabberd.
::
:: 1. Download and install Docker:
::
:: If you use Windows 10, download Docker Desktop from:
:: https://www.docker.com/
::
:: If you use Windows 7 or 8, download Docker Toolbox from:
:: https://github.com/docker/toolbox/releases
:: After installation, run Docker Quickstart Installer
::
::
:: 2. Edit those options:
:: Directory where your ejabberd deployment files will be installed
:: (configuration, database, logs, ...)
::
:: In Windows 10 you can configure the path:
set INSTALL_DIR_WINDOWS10=C:\ejabberd
:: In older Windows, not configurable, it will be installed in:
:: C:\Users\%USERNAME%\ejabberd
:: Please enter the desired ejabberd domain name.
:: The domain is the visible attribute that is added to the username
:: to form the Jabber Identifier (for example: user@example.net).
:: This computer must be known on the network with this address name.
:: You can later add more in conf/ejabberd.yml
set HOST=localhost
:: Please enter the administrator username for the current
:: ejabberd installation. A Jabber account with this username
:: will be created and granted administrative privileges.
:: Don't use blankspaces in the username.
set USER=admin
:: Please provide a password for that new administrator account
set PASSWORD=
:: By default this downloads 'latest' ejabberd version,
:: but you can set a specific version, for example '22.05'
:: or the bleeding edge 'master'. See available tags in
:: https://github.com/processone/ejabberd/pkgs/container/ejabberd
set VERSION=latest
:: This tells docker what ports ejabberd will use.
:: You can later configure them in conf/ejabberd.yml
set PORTS=5180 5222 5269 5443
::
:: 3. Now save this script and run it.
::
::
:: 4. When installation is completed:
::
:: If using Windows 10, open Docker Desktop and you can:
::
:: - (>) START the ejabberd container
:: - Enter WebAdmin: click the ([->]) OPEN IN BROWSER button
:: - To try ejabberdctl, click the (>_) CLI button, then: ejabberdctl
:: - ([]) STOP the ejabberd container
::
:: If using an old Windows, open Kitematic and you can:
::
:: - START the ejabberd container
:: - Open your configuration, logs, ... in Settings > Volumes
:: - Enter WebAdmin in Settings > Hostname/Ports > click on the 5180 port
:: - Try ejabberdctl in EXEC, then: ejabberdctl
:: - STOP the ejabberd container
::
:: You can delete the container and create it again running this script,
:: the configuration and database are maintained.
::
::===============================================================
:: Check Windows version
::
::===============================================================
set INSTALL_DIR_DOCKER=c/Users/%USERNAME%/ejabberd
for /f "tokens=4-5 delims=. " %%i in ('ver') do set WVERSION=%%i.%%j
if "%wversion%" == "10.0" (
echo === Preparing paths to install in Windows 10...
set INSTALL_DIR=%INSTALL_DIR_WINDOWS10%
set VC=-v %INSTALL_DIR_WINDOWS10%\conf:/opt/ejabberd/conf
set VD=-v %INSTALL_DIR_WINDOWS10%\database:/opt/ejabberd/database
set VL=-v %INSTALL_DIR_WINDOWS10%\logs:/opt/ejabberd/logs
set VM=-v %INSTALL_DIR_WINDOWS10%\ejabberd-modules:/opt/ejabberd/.ejabberd-modules
set DOCKERDOWNLOAD="First download and install Docker Desktop from https://www.docker.com/"
) else (
echo === Preparing paths to install in Windows older than 10...
set INSTALL_DIR=C:\Users\%USERNAME%\ejabberd
set VC=-v "/%INSTALL_DIR_DOCKER%/conf:/opt/ejabberd/conf"
set VD=-v "/%INSTALL_DIR_DOCKER%/database:/opt/ejabberd/database"
set VL=-v "/%INSTALL_DIR_DOCKER%/logs:/opt/ejabberd/logs"
set VM=-v "/%INSTALL_DIR_DOCKER%/ejabberd-modules:/opt/ejabberd/.ejabberd-modules"
set DOCKERDOWNLOAD="First download and install Docker Toolbox from https://github.com/docker/toolbox/releases"
)
set VOLUMES=%VC% %VD% %VL% %VM%
::===============================================================
:: Check docker is installed
::
::===============================================================
docker version >NUL
if %ERRORLEVEL% NEQ 0 (
echo.
echo === ERROR: It seems docker is not installed!!!
echo.
echo %DOCKERDOWNLOAD%
echo === Then try to run this script again.
echo.
pause
exit 1
)
::===============================================================
:: Check install options are correctly set
::
::===============================================================
if [%PASSWORD%]==[] (
echo.
echo === ERROR: PASSWORD not set!!!
echo.
echo === Please edit this script and set the PASSWORD.
echo === Then try to run this script again.
echo.
pause
exit 1
)
::===============================================================
:: Download Docker image
::
::===============================================================
set IMAGE=ghcr.io/processone/ejabberd:%VERSION%
echo.
echo === Checking if the '%IMAGE%' container image was already downloaded...
docker image history %IMAGE% >NUL
if %ERRORLEVEL% NEQ 0 (
echo === The '%IMAGE%' container image was not downloaded yet.
echo.
echo === Downloading the '%IMAGE%' container image, please wait...
docker pull %IMAGE%
) else (
echo === The '%IMAGE%' container image was already downloaded.
)
::===============================================================
:: Create preliminary container
::
::===============================================================
echo.
echo === Checking if the 'ejabberd' container already exists...
docker container logs ejabberd
if %ERRORLEVEL% EQU 0 (
echo.
echo === The 'ejabberd' container already exists.
echo === Nothing to do, so installation finishes now.
echo === You can go to Docker Desktop and start the 'ejabberd' container.
echo.
pause
exit 1
) else (
echo === The 'ejabberd' container doesn't yet exist,
echo === so let's continue the installation process.
)
echo.
if exist %INSTALL_DIR% (
echo === The INSTALL_DIR %INSTALL_DIR% already exists.
echo === No need to create the preliminary 'ejabberd-pre' image.
) else (
echo === The INSTALL_DIR %INSTALL_DIR% doesn't exist.
echo === Let's create the preliminary 'ejabberd-pre' image.
CALL :create-ejabberd-pre
)
::===============================================================
:: Create final container
::
::===============================================================
echo.
echo === Creating the final 'ejabberd' container using %IMAGE% image...
setlocal EnableDelayedExpansion
set PS=
for %%a in (%PORTS%) do (
set PS=!PS! -p %%a:%%a
)
docker create --name ejabberd --hostname localhost %PS% %VOLUMES% %IMAGE%
echo.
echo === Installation completed.
echo.
pause
EXIT /B %ERRORLEVEL%
::===============================================================
:: Function to create preliminary container
::
::===============================================================
:create-ejabberd-pre
echo.
echo === Creating a preliminary 'ejabberd-pre' container using %IMAGE% image...
docker create --name ejabberd-pre --hostname localhost %IMAGE%
echo.
echo === Now 'ejabberd-pre' will be started.
docker container start ejabberd-pre
echo.
echo === Waiting ejabberd to be running...
set /A timeout = 10
set status=4
goto :while
:statusstart
docker exec -it ejabberd-pre ejabberdctl status
goto :statusend
:while
if %status% GTR 0 (
echo.
timeout /t 1 /nobreak >NUL
set /A timeout = timeout - 1
if %timeout% EQU 0 (
set status=-1
) else (
goto :statusstart
:statusend
set status=%ERRORLEVEL%
)
goto :while
)
echo.
echo === Setting a few options...
docker exec -it ejabberd-pre sed -i "s!- localhost!- %HOST%!g" conf/ejabberd.yml
docker exec -it ejabberd-pre sed -i "s!^acl:!acl:\n admin:\n user:\n - \"%USER%@%HOST%\"!g" conf/ejabberd.yml
docker exec -it ejabberd-pre sed -i "s!5280!5180!g" conf/ejabberd.yml
docker exec -it ejabberd-pre sed -i "s!/admin!/!g" conf/ejabberd.yml
docker exec -it ejabberd-pre ejabberdctl reload_config
echo.
echo === Registering the administrator account...
docker exec -it ejabberd-pre ejabberdctl register %USER% %HOST% %PASSWORD%
docker exec -it ejabberd-pre ejabberdctl stop
echo.
echo === Copying conf, database, logs...
mkdir %INSTALL_DIR%
mkdir %INSTALL_DIR%\conf
mkdir %INSTALL_DIR%\database
mkdir %INSTALL_DIR%\logs
mkdir %INSTALL_DIR%\ejabberd-modules
docker cp ejabberd-pre:/opt/ejabberd/conf/ %INSTALL_DIR%
docker cp ejabberd-pre:/opt/ejabberd/database/ %INSTALL_DIR%
docker cp ejabberd-pre:/opt/ejabberd/logs/ %INSTALL_DIR%
echo.
echo === Deleting the preliminary 'ejabberd-pre' container...
docker stop ejabberd-pre
docker rm ejabberd-pre
EXIT /B 0

466
.github/container/ejabberdctl.template vendored Executable file
View File

@ -0,0 +1,466 @@
#!/bin/sh
# define default configuration
POLL=true
ERL_MAX_PORTS=32000
ERL_PROCESSES=250000
ERL_MAX_ETS_TABLES=1400
FIREWALL_WINDOW=""
INET_DIST_INTERFACE=""
ERLANG_NODE=ejabberd@localhost
# define default environment variables
[ -z "$SCRIPT" ] && SCRIPT=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd -P)"
# shellcheck disable=SC2034
ERTS_VSN="{{erts_vsn}}"
ERL="{{erl}}"
EPMD="{{epmd}}"
IEX="{{iexpath}}"
COOKIE_FILE="$HOME"/.erlang.cookie
[ -n "$ERLANG_COOKIE" ] && [ ! -f "$COOKIE_FILE" ] && echo "$ERLANG_COOKIE" > "$COOKIE_FILE" && chmod 400 "$COOKIE_FILE"
# 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
;;
*)
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
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) CONFIG_DIR=$2; shift 2;;
-t|--no-timeout) NO_TIMEOUT="--no-timeout"; shift;;
*) break;;
esac
done
# define ejabberd variables if not already defined from the command line
: "${CONFIG_DIR:="{{config_dir}}"}"
: "${LOGS_DIR:="{{logs_dir}}"}"
: "${EJABBERD_CONFIG_PATH:="$CONFIG_DIR/ejabberd.yml"}"
: "${EJABBERDCTL_CONFIG_PATH:="$CONFIG_DIR/ejabberdctl.cfg"}"
# Allows passing extra Erlang command-line arguments in vm.args file
: "${VMARGS:="$CONFIG_DIR/vm.args"}"
# shellcheck source=ejabberdctl.cfg.example
[ -f "$EJABBERDCTL_CONFIG_PATH" ] && . "$EJABBERDCTL_CONFIG_PATH"
[ -n "$ERLANG_NODE_ARG" ] && ERLANG_NODE="$ERLANG_NODE_ARG"
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && S="-s"
: "${SPOOL_DIR:="{{spool_dir}}"}"
: "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}"
# define erl parameters
ERLANG_OPTS="+K $POLL +P $ERL_PROCESSES $ERL_OPTIONS"
if [ -n "$FIREWALL_WINDOW" ] ; then
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_listen_min ${FIREWALL_WINDOW%-*} inet_dist_listen_max ${FIREWALL_WINDOW#*-}"
fi
if [ -n "$INET_DIST_INTERFACE" ] ; then
INET_DIST_INTERFACE2=$("$ERL" $ERLANG_OPTS -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
if [ "$(echo "$INET_DIST_INTERFACE2" | grep -o "," | wc -l)" -eq 7 ] ; then
INET_DIST_INTERFACE2="$INET_DIST_INTERFACE2 -proto_dist inet6_tcp"
fi
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_use_interface $INET_DIST_INTERFACE2"
fi
fi
[ -n "$ERL_DIST_PORT" ] && ERLANG_OPTS="$ERLANG_OPTS -erl_epmd_port $ERL_DIST_PORT -start_epmd false"
# if vm.args file exists in config directory, pass it to Erlang VM
[ -f "$VMARGS" ] && ERLANG_OPTS="$ERLANG_OPTS -args_file $VMARGS"
ERL_LIBS='{{libdir}}'
ERL_CRASH_DUMP="$LOGS_DIR"/erl_crash_$(date "+%Y%m%d-%H%M%S").dump
ERL_INETRC="$CONFIG_DIR"/inetrc
# define ejabberd parameters
EJABBERD_OPTS="\
$(sed '/^log_rotate_size/!d;s/:[ \t]*\([0-9]\{1,\}\).*/ \1/;s/:[ \t]*\(infinity\).*/ \1 /;s/^/ /' "$EJABBERD_CONFIG_PATH")\
$(sed '/^log_rotate_count/!d;s/:[ \t]*\([0-9]*\).*/ \1 /;s/^/ /' "$EJABBERD_CONFIG_PATH")\
$(sed '/^log_burst_limit_count/!d;s/:[ \t]*\([0-9]*\).*/ \1 /;s/^/ /' "$EJABBERD_CONFIG_PATH")\
$(sed '/^log_burst_limit_window_time/!d;s/:[ \t]*\([0-9]*[a-z]*\).*/ \1 /;s/^/ /' "$EJABBERD_CONFIG_PATH")\
$EJABBERD_OPTS"
[ -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_LOG_PATH
export EJABBERD_PID_PATH
export ERL_CRASH_DUMP
export ERL_EPMD_ADDRESS
export ERL_DIST_PORT
export ERL_INETRC
export ERL_MAX_PORTS
export ERL_MAX_ETS_TABLES
export CONTRIB_MODULES_PATH
export CONTRIB_MODULES_CONF_DIR
export ERL_LIBS
export SCRIPT_DIR
set_dist_client()
{
[ -n "$ERL_DIST_PORT" ] && ERLANG_OPTS="$ERLANG_OPTS -dist_listen false"
}
# run command either directly or via su $INSTALLUSER
run_cmd()
{
case $EXEC_CMD in
as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
as_current_user) "$@" ;;
esac
}
exec_cmd()
{
case $EXEC_CMD in
as_current_user) exec "$@" ;;
as_install_user) su -s /bin/sh -c 'exec "$0" "$@"' "$INSTALLUSER" -- "$@" ;;
esac
}
run_erl()
{
NODE=$1; shift
run_cmd "$ERL" ${S:--}name "$NODE" $ERLANG_OPTS "$@"
}
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" "$@"
}
# usage
debugwarning()
{
if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then
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 exit and detach this shell from ejabberd, press:"
echo " control+g and then q"
echo ""
#vt100 echo "Please do NOT use control+c in this debug shell !"
#vt100 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 _
echo ""
fi
}
livewarning()
{
if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then
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 and detach this shell from ejabberd, press:"
echo " control+g and then q"
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 _
echo ""
fi
}
check_etop_result()
{
result=$?
if [ $result -eq 1 ] ; then
echo ""
echo "It seems there was some problem running 'ejabberdctl etop'."
echo "Is the error message something like this?"
echo " Failed to load module 'etop' because it cannot be found..."
echo "Then probably ejabberd was compiled with development tools disabled."
echo "To use 'etop', recompile ejabberd with: ./configure --enable-tools"
echo ""
exit $result
fi
}
check_iex_result()
{
result=$?
if [ $result -eq 127 ] ; then
echo ""
echo "It seems there was some problem finding 'iex' binary from Elixir."
echo "Probably ejabberd was compiled with Rebar3 and Elixir disabled, like:"
echo " ./configure"
echo "which is equivalent to:"
echo " ./configure --with-rebar=rebar3 --disable-elixir"
echo "To use 'iex', recompile ejabberd enabling Elixir or using Mix:"
echo " ./configure --enable-elixir"
echo " ./configure --with-rebar=mix"
echo ""
exit $result
fi
}
help()
{
echo ""
echo "Commands to start an ejabberd node:"
echo " start Start in server mode"
echo " foreground Start in server mode (attached)"
echo " foreground-quiet Start in server mode (attached), show only critical messages"
echo " live Start in interactive mode, with Erlang shell"
echo " iexlive Start in interactive mode, with Elixir shell"
echo ""
echo "Commands to interact with a running ejabberd node:"
echo " debug Attach an interactive Erlang shell to a running node"
echo " iexdebug Attach an interactive Elixir shell to a running node"
echo " etop Attach to a running node and start Erlang Top"
echo " ping Send ping to the node, returns pong or pang"
echo " started|stopped Wait for the node to fully start|stop"
echo ""
echo "Optional parameters when starting an ejabberd node:"
echo " --config-dir dir Config ejabberd: $CONFIG_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: $SPOOL_DIR"
echo " --node nodename ejabberd node name: $ERLANG_NODE"
echo ""
}
# dynamic node name helper
uid() {
ERTSVERSION="$("$ERL" -version 2>&1 | sed 's|.*\([0-9][0-9]\).*|\1|g')"
if [ $ERTSVERSION -lt 11 ] ; then # otp 23.0 includes erts 11.0
# Erlang/OTP lower than 23, which doesn's support dynamic node code
N=1
PF=$(( $$ % 97 ))
while
case $# in
0) NN="${PF}-${N}-${ERLANG_NODE}"
;;
1) NN="${PF}-${N}-${1}-${ERLANG_NODE}"
;;
2) NN="${PF}-${N}-${1}@${2}"
;;
esac
N=$(( N + 1 + ( $$ % 5 ) ))
"$EPMD" -names 2>/dev/null | grep -q " ${NN%@*} "
do :; done
echo $NN
else
# Erlang/OTP 23 or higher: use native dynamic node code
# https://www.erlang.org/patches/otp-23.0#OTP-13812
if [ "$ERLANG_NODE" != "${ERLANG_NODE%.*}" ]; then
echo "undefined@${ERLANG_NODE#*@}"
else
echo "undefined"
fi
fi
}
# stop epmd if there is no other running node
stop_epmd()
{
[ -n "$ERL_DIST_PORT" ] && return
"$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()
{
[ -n "$ERL_DIST_PORT" ] && return
"$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
}
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
}
}
post_waiter_fork()
{
(FIRST_RUN=$FIRST_RUN "$0" post_waiter)&
}
post_waiter_waiting()
{
$0 started
[ -n "$FIRST_RUN" ] && [ -n "$CTL_ON_CREATE" ] && (post_waiter_loop $CTL_ON_CREATE)
[ -n "$CTL_ON_START" ] && post_waiter_loop $CTL_ON_START
}
post_waiter_loop()
{
LIST=$@
HEAD=${LIST%% ; *}
TAIL=${LIST#* ; }
HEAD2=${HEAD#\! *}
echo ":> ejabberdctl $HEAD2"
$0 $HEAD2
ctlstatus=$?
if [ $ctlstatus -ne 0 ] ; then
if [ "$HEAD" != "$HEAD2" ] ; then
echo ":> FAILURE in command '$HEAD2' !!! Ignoring result"
else
echo ":> FAILURE in command '$HEAD' !!! Stopping ejabberd..."
$0 halt > /dev/null
exit $ctlstatus
fi
fi
[ "$HEAD" = "$TAIL" ] || post_waiter_loop $TAIL
}
# allow sync calls
wait_status()
{
# args: status try delay
# return: 0 OK, 1 KO
timeout="$2"
status=4
while [ "$status" -ne "$1" ] ; do
sleep "$3"
timeout=$((timeout - 1))
if [ $timeout -eq 0 ] ; then
status="$1"
else
run_erl "$(uid ctl)" -hidden -noinput \
-eval 'net_kernel:connect_node('"'$ERLANG_NODE'"')' \
-s ejabberd_ctl \
-extra "$ERLANG_NODE" $NO_TIMEOUT status > /dev/null
status="$?"
fi
done
[ $timeout -gt 0 ]
}
# ensure we can change current directory to SPOOL_DIR
[ -f "$SPOOL_DIR/schema.DAT" ] || FIRST_RUN=true
[ -d "$SPOOL_DIR" ] || run_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
post_waiter_fork
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS -noinput
;;
foreground-quiet)
check_start
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS -noinput -ejabberd quiet true
;;
live)
livewarning
check_start
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS
;;
debug)
debugwarning
set_dist_client
exec_erl "$(uid debug)" -hidden -remsh "$ERLANG_NODE"
;;
etop)
set_dist_client
exec_erl "$(uid top)" -hidden -remsh "$ERLANG_NODE" \
-eval 'net_kernel:connect_node('"'$ERLANG_NODE'"')' \
-s etop \
-output text
check_etop_result
;;
iexdebug)
debugwarning
set_dist_client
exec_iex "$(uid debug)" --remsh "$ERLANG_NODE"
check_iex_result
;;
iexlive)
livewarning
exec_iex "$ERLANG_NODE" --erl "$EJABBERD_OPTS"
check_iex_result
;;
ping)
PEER=${2:-$ERLANG_NODE}
[ "$PEER" = "${PEER%.*}" ] && PS="-s"
set_dist_client
exec_cmd "$ERL" ${PS:--}name "$(uid ping "$(hostname $PS)")" $ERLANG_OPTS \
-noinput -hidden \
-eval 'net_kernel:connect_node('"'$PEER'"')' \
-eval 'io:format("~p~n",[net_adm:ping('"'$PEER'"')])' \
-s erlang halt -output text
;;
started)
set_dist_client
wait_status 0 30 2 # wait 30x2s before timeout
;;
stopped)
set_dist_client
wait_status 3 30 2 && stop_epmd # wait 30x2s before timeout
;;
post_waiter)
post_waiter_waiting
;;
*)
set_dist_client
run_erl "$(uid ctl)" -hidden -noinput \
-eval 'net_kernel:connect_node('"'$ERLANG_NODE'"')' \
-s ejabberd_ctl \
-extra "$ERLANG_NODE" $NO_TIMEOUT "$@"
result=$?
case $result in
2|3) help;;
*) :;;
esac
exit $result
;;
esac

38
.github/lock.yml vendored Normal file
View File

@ -0,0 +1,38 @@
# Configuration for Lock Threads - https://github.com/dessant/lock-threads
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 365
# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: false
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: []
# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false
# Comment to post before locking. Set to `false` to disable
lockComment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: true
# Limit to only `issues` or `pulls`
# only: issues
# Optionally, specify configuration settings just for `issues` or `pulls`
# issues:
# exemptLabels:
# - help-wanted
# lockLabel: outdated
# pulls:
# daysUntilLock: 30
# Repository to extend settings from
# _extends: repo

329
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,329 @@
name: CI
on:
push:
paths-ignore:
- '.devcontainer/**'
- 'examples/**'
- 'lib/**'
- 'man/**'
- 'priv/**'
- '**.md'
pull_request:
paths-ignore:
- '.devcontainer/**'
- 'examples/**'
- 'lib/**'
- 'man/**'
- 'priv/**'
- '**.md'
jobs:
tests:
name: Tests
strategy:
fail-fast: false
matrix:
otp: ['20.0', '25', '26', '27']
runs-on: ubuntu-20.04
services:
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- name: Test shell scripts
if: matrix.otp == '26'
run: |
shellcheck test/ejabberd_SUITE_data/gencerts.sh
shellcheck tools/captcha.sh
shellcheck ejabberd.init.template
shellcheck -x ejabberdctl.template
- name: Get specific Erlang/OTP
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
- name: Get a compatible Rebar3
if: matrix.otp < 24
run: |
rm rebar3
wget https://github.com/processone/ejabberd/raw/21.12/rebar3
chmod +x rebar3
- name: Install MS SQL Server
run: |
docker run -d -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=ejabberd_Test1" \
-v $(pwd)/test/docker/db/mssql/initdb/initdb_mssql.sql:/initdb_mssql.sql:ro \
-v $(pwd)/sql/mssql.sql:/mssql.sql:ro \
-v $(pwd)/sql/mssql.new.sql:/mssql.new.sql:ro \
-p 1433:1433 --name ejabberd-mssql "mcr.microsoft.com/mssql/server:2019-latest"
sleep 10
- name: Prepare databases
run: |
docker exec ejabberd-mssql /opt/mssql-tools18/bin/sqlcmd -C -U SA -P ejabberd_Test1 -S localhost -i /initdb_mssql.sql
docker exec ejabberd-mssql /opt/mssql-tools18/bin/sqlcmd -C -U SA -P ejabberd_Test1 -S localhost -d ejabberd_test -i /mssql.sql
sudo systemctl start mysql.service
sudo systemctl start postgresql.service
mysql -u root -proot -e "CREATE DATABASE ejabberd_test;"
mysql -u root -proot -e "CREATE USER 'ejabberd_test'@'localhost'
IDENTIFIED BY 'ejabberd_test';"
mysql -u root -proot -e "GRANT ALL ON ejabberd_test.*
TO 'ejabberd_test'@'localhost';"
pg_isready
sudo -u postgres psql -c "CREATE DATABASE ejabberd_test;"
sudo -u postgres psql -c "CREATE USER ejabberd_test
WITH PASSWORD 'ejabberd_test';"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES
ON DATABASE ejabberd_test TO ejabberd_test;"
sudo -u postgres psql ejabberd_test -c "GRANT ALL PRIVILEGES ON ALL
TABLES IN SCHEMA public
TO ejabberd_test;"
sudo -u postgres psql ejabberd_test -c "GRANT ALL PRIVILEGES ON ALL
SEQUENCES IN SCHEMA public
TO ejabberd_test;"
- name: Prepare libraries
run: |
sudo apt-get -qq update
sudo apt-get -y purge libgd3 nginx
sudo apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \
libsqlite3-dev libwebp-dev libyaml-dev
- name: Remove syntax_tools from release
run: sed -i 's|, syntax_tools||g' src/ejabberd.app.src.script
- name: Cache Hex.pm
uses: actions/cache@v4
with:
path: |
~/.cache/rebar3/
key: ${{matrix.otp}}-${{hashFiles('rebar.config')}}
- name: Download test logs
if: matrix.otp == '26' && github.repository == 'processone/ejabberd'
continue-on-error: true
run: |
mkdir -p _build/test
curl -sSL https://github.com/processone/ecil/tarball/gh-pages |
tar -C _build/test --strip-components=1 --wildcards -xzf -
rm -rf _build/test/logs/last/
- name: Compile
run: |
./autogen.sh
./configure --with-rebar=./rebar3 \
--prefix=/tmp/ejabberd \
--enable-all \
--disable-elixir \
--disable-mssql \
--disable-odbc
make
- run: make install -s
- run: make hooks
- run: make options
- run: make xref
- run: make dialyzer
- run: make test-eunit
- run: make elvis
if: matrix.otp >= 23
- name: Check Production Release
run: |
make rel
RE=_build/prod/rel/ejabberd
$RE/bin/ejabberdctl start
$RE/bin/ejabberdctl started
$RE/bin/ejabberdctl stop
$RE/bin/ejabberdctl stopped
cat $RE/logs/ejabberd.log
grep -q "is stopped in" $RE/logs/ejabberd.log
- name: Start Development Release
run: |
make dev
RE=_build/dev/rel/ejabberd
sed -i 's/starttls_required: true/starttls_required: false/g' $RE/conf/ejabberd.yml
$RE/bin/ejabberdctl start
$RE/bin/ejabberdctl started
$RE/bin/ejabberdctl register admin localhost admin
grep -q "is started in" $RE/logs/ejabberd.log
- name: Run XMPP Interoperability Tests against CI server.
if: matrix.otp == '26'
continue-on-error: true
uses: XMPP-Interop-Testing/xmpp-interop-tests-action@v1.4.0
with:
domain: 'localhost'
adminAccountUsername: 'admin'
adminAccountPassword: 'admin'
disabledSpecifications: RFC6121,XEP-0030,XEP-0045,XEP-0054,XEP-0060,XEP-0080,XEP-0115,XEP-0118,XEP-0215,XEP-0347,XEP-0363,XEP-0384
- name: Stop Development Release
if: always()
run: |
RE=_build/dev/rel/ejabberd
$RE/bin/ejabberdctl stop
$RE/bin/ejabberdctl stopped
cat $RE/logs/ejabberd.log
grep -q "is stopped in" $RE/logs/ejabberd.log
- name: Run tests
id: ct
run: |
(cd priv && ln -sf ../sql)
sed -i -e 's/ct:pal/ct:log/' test/suite.erl
COMMIT=`echo $GITHUB_SHA | cut -c 1-7`
DATE=`date +%s`
REF_NAME=`echo $GITHUB_REF_NAME | tr "/" "_"`
NODENAME=$DATE@$GITHUB_RUN_NUMBER-$GITHUB_ACTOR-$REF_NAME-$COMMIT
LABEL=`git show -s --format=%s | cut -c 1-30`
./rebar3 ct --name $NODENAME --label "$LABEL"
./rebar3 cover
- name: Check results
if: always() && (steps.ct.outcome != 'skipped' || steps.ct2.outcome != 'skipped')
id: ctresults
run: |
[[ -d _build ]] && ln -s _build/test/logs/last/ logs || true
ln `find logs/ -name suite.log` logs/suite.log
grep 'TEST COMPLETE' logs/suite.log
grep -q 'TEST COMPLETE,.* 0 failed' logs/suite.log
test $(find logs/ -empty -name error.log)
- name: View logs failures
if: failure() && steps.ctresults.outcome == 'failure'
run: |
cat logs/suite.log | awk \
'BEGIN{RS="\n=case";FS="\n"} /=result\s*failed/ {print "=case" $0}'
find logs/ -name error.log -exec cat '{}' ';'
find logs/ -name exunit.log -exec cat '{}' ';'
- name: Send to coveralls
if: matrix.otp == '26'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
DIAGNOSTIC=1 ./rebar3 as test coveralls send
curl -v -k https://coveralls.io/webhook \
--header "Content-Type: application/json" \
--data '{"repo_name":"$GITHUB_REPOSITORY",
"repo_token":"$GITHUB_TOKEN",
"payload":{"build_num":$GITHUB_RUN_ID,
"status":"done"}}'
- name: Upload test logs
if: always() && steps.ct.outcome == 'failure' && github.repository == 'processone/ejabberd'
uses: peaceiris/actions-gh-pages@v4
with:
publish_dir: _build/test
exclude_assets: '.github,lib,plugins'
external_repository: processone/ecil
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
keep_files: true
- name: View ECIL address
if: always() && steps.ct.outcome == 'failure' && github.repository == 'processone/ejabberd'
run: |
CTRUN=`ls -la _build/test/logs/last | sed 's|.*-> ||'`
echo "::notice::View CT results: https://processone.github.io/ecil/logs/$CTRUN/"
- name: Check for changes to trigger schema upgrade test
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
sql:
- 'sql/**'
- 'src/mod_admin_update_sql.erl'
- name: Prepare for schema upgrade test
id: prepupgradetest
if: ${{ steps.filter.outputs.sql == 'true' }}
run: |
[[ -d logs ]] && rm -rf logs
[[ -d _build/test/logs ]] && rm -rf _build/test/logs || true
sed -i 's|update_sql, false|update_sql, true|g' test/suite.erl
- name: Run DB tests on upgraded schema (mssql, mysql, pgsql)
run: CT_BACKENDS=mssql,mysql,pgsql make test
if: always() && steps.prepupgradetest.outcome != 'skipped'
id: ctupgradedschema
- name: Check results
if: always() && steps.ctupgradedschema.outcome != 'skipped'
run: |
[[ -d _build ]] && ln -s _build/test/logs/last/ logs || true
ln `find logs/ -name suite.log` logs/suite.log
grep 'TEST COMPLETE' logs/suite.log
grep -q 'TEST COMPLETE,.* 0 failed' logs/suite.log
test $(find logs/ -empty -name error.log)
- name: View logs failures
if: failure() && steps.ctupgradedschema.outcome != 'skipped'
run: |
cat logs/suite.log | awk \
'BEGIN{RS="\n=case";FS="\n"} /=result\s*failed/ {print "=case" $0}'
find logs/ -name error.log -exec cat '{}' ';'
find logs/ -name exunit.log -exec cat '{}' ';'
- name: Prepare new schema
run: |
[[ -d logs ]] && rm -rf logs
[[ -d _build/test/logs ]] && rm -rf _build/test/logs || true
docker exec ejabberd-mssql /opt/mssql-tools18/bin/sqlcmd -C -U SA -P ejabberd_Test1 -S localhost -Q "drop database [ejabberd_test];"
docker exec ejabberd-mssql /opt/mssql-tools18/bin/sqlcmd -C -U SA -P ejabberd_Test1 -S localhost -Q "drop login [ejabberd_test];"
mysql -u root -proot -e "DROP DATABASE ejabberd_test;"
sudo -u postgres psql -c "DROP DATABASE ejabberd_test;"
docker exec ejabberd-mssql /opt/mssql-tools18/bin/sqlcmd -C -U SA -P ejabberd_Test1 -S localhost -i /initdb_mssql.sql
docker exec ejabberd-mssql /opt/mssql-tools18/bin/sqlcmd -C -U SA -P ejabberd_Test1 -S localhost -d ejabberd_test -i /mssql.new.sql
mysql -u root -proot -e "CREATE DATABASE ejabberd_test;"
mysql -u root -proot -e "GRANT ALL ON ejabberd_test.*
TO 'ejabberd_test'@'localhost';"
sudo -u postgres psql -c "CREATE DATABASE ejabberd_test;"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES
ON DATABASE ejabberd_test TO ejabberd_test;"
sudo -u postgres psql ejabberd_test -c "GRANT ALL PRIVILEGES ON ALL
TABLES IN SCHEMA public
TO ejabberd_test;"
sudo -u postgres psql ejabberd_test -c "GRANT ALL PRIVILEGES ON ALL
SEQUENCES IN SCHEMA public
TO ejabberd_test;"
sed -i 's|new_schema, false|new_schema, true|g' test/suite.erl
- name: Run DB tests on new schema (mssql, mysql, pgsql)
run: CT_BACKENDS=mssql,mysql,pgsql make test
id: ctnewschema
- name: Check results
if: always() && steps.ctnewschema.outcome != 'skipped'
run: |
[[ -d _build ]] && ln -s _build/test/logs/last/ logs || true
ln `find logs/ -name suite.log` logs/suite.log
grep 'TEST COMPLETE' logs/suite.log
grep -q 'TEST COMPLETE,.* 0 failed' logs/suite.log
test $(find logs/ -empty -name error.log)
- name: View logs failures
if: failure() && steps.ctnewschema.outcome != 'skipped'
run: |
cat logs/suite.log | awk \
'BEGIN{RS="\n=case";FS="\n"} /=result\s*failed/ {print "=case" $0}'
find logs/ -name error.log -exec cat '{}' ';'
find logs/ -name exunit.log -exec cat '{}' ';'
- name: Upload CT logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: ejabberd-ct-logs-${{matrix.otp}}
#
# Appending the wildcard character ("*") is a trick to make
# "ejabberd-packages" the root directory of the uploaded ZIP file:
#
# https://github.com/actions/upload-artifact#upload-using-multiple-paths-and-exclusions
#
path: _build/test/logs
retention-days: 14

123
.github/workflows/container.yml vendored Normal file
View File

@ -0,0 +1,123 @@
name: Container
on:
schedule:
- cron: '22 2 */6 * *' # every 6 days to avoid gha cache being evicted
push:
paths-ignore:
- '.devcontainer/**'
- 'examples/**'
- 'lib/**'
- 'man/**'
- 'priv/**'
- '**.md'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
container:
name: Container
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache build directory
uses: actions/cache@v4
with:
path: ~/build/
key: ${{runner.os}}-ctr-ct-ng-1.26.0
- name: Get erlang/OTP version for bootstrapping
run: |
echo "OTP_VSN=$(awk '/^otp_vsn=/ {{gsub(/[^0-9.rc-]/, ""); print}}' tools/make-binaries)" >> $GITHUB_ENV
echo "ELIXIR_VSN=$(awk '/^elixir_vsn=/ {{gsub(/[^0-9.]/, ""); print}}' tools/make-binaries)" >> $GITHUB_ENV
- name: Install prerequisites
run: |
sudo apt-get -qq update
sudo apt-get -qq install makeself
# https://github.com/crosstool-ng/crosstool-ng/blob/master/testing/docker/ubuntu21.10/Dockerfile
sudo apt-get -qq install build-essential autoconf bison flex gawk
sudo apt-get -qq install help2man libncurses5-dev libtool libtool-bin
sudo apt-get -qq install python3-dev texinfo unzip
- name: Install erlang/OTP
uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VSN }}
elixir-version: ${{ env.ELIXIR_VSN }}
version-type: strict
- name: Remove Elixir Matchers
run: |
echo "::remove-matcher owner=elixir-mixCompileWarning::"
echo "::remove-matcher owner=elixir-credoOutputDefault::"
echo "::remove-matcher owner=elixir-mixCompileError::"
echo "::remove-matcher owner=elixir-mixTestFailure::"
echo "::remove-matcher owner=elixir-dialyzerOutputDefault::"
- name: Build musl-libc based binary archives
run: |
sed -i "s|targets='.*'|targets='x86_64-linux-musl aarch64-linux-musl'|" tools/make-binaries
mv .github/container/ejabberdctl.template .
CHECK_DEPS=false tools/make-binaries
- name: Collect packages
run: |
mkdir tarballs
mv ejabberd-*.tar.gz tarballs
- name: Checkout ejabberd-contrib
uses: actions/checkout@v4
with:
repository: processone/ejabberd-contrib
path: .ejabberd-modules/sources/ejabberd-contrib
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get git describe
id: gitdescribe
run: echo "ver=$(git describe --tags)" >> $GITHUB_OUTPUT
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: |
org.opencontainers.image.revision=${{ steps.gitdescribe.outputs.ver }}
org.opencontainers.image.licenses=GPL-2.0
org.opencontainers.image.vendor=ProcessOne
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
build-args: |
METHOD=package
VERSION=${{ steps.gitdescribe.outputs.ver }}
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
file: .github/container/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}

84
.github/workflows/installers.yml vendored Normal file
View File

@ -0,0 +1,84 @@
name: Installers
on:
push:
paths-ignore:
- '.devcontainer/**'
- 'examples/**'
- 'lib/**'
- 'man/**'
- 'priv/**'
- '**.md'
pull_request:
paths-ignore:
- '.devcontainer/**'
- 'examples/**'
- 'lib/**'
- 'man/**'
- 'priv/**'
- '**.md'
jobs:
binaries:
name: Binaries
runs-on: ubuntu-22.04
steps:
- name: Cache build directory
uses: actions/cache@v4
with:
path: ~/build/
key: ${{runner.os}}-ct-ng-1.26.0
- name: Install prerequisites
run: |
sudo apt-get -qq update
sudo apt-get -qq install makeself
# https://github.com/crosstool-ng/crosstool-ng/blob/master/testing/docker/ubuntu21.10/Dockerfile
sudo apt-get -qq install build-essential autoconf bison flex gawk
sudo apt-get -qq install help2man libncurses5-dev libtool libtool-bin
sudo apt-get -qq install python3-dev texinfo unzip
- name: Install FPM
run: |
gem install --no-document --user-install fpm
echo $HOME/.local/share/gem/ruby/*/bin >> $GITHUB_PATH
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build binary archives
run: CHECK_DEPS=false tools/make-binaries
- name: Build DEB and RPM packages
run: tools/make-packages
- name: Build installers
run: tools/make-installers
- name: Collect packages
run: |
mkdir ejabberd-packages
mv ejabberd_*.deb ejabberd-*.rpm ejabberd-*.run ejabberd-packages
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: ejabberd-packages
#
# Appending the wildcard character ("*") is a trick to make
# "ejabberd-packages" the root directory of the uploaded ZIP file:
#
# https://github.com/actions/upload-artifact#upload-using-multiple-paths-and-exclusions
#
path: ejabberd-packages*
retention-days: 14
release:
name: Release
needs: [binaries]
runs-on: ubuntu-22.04
if: github.ref_type == 'tag'
steps:
- name: Download packages
uses: actions/download-artifact@v4
with:
name: ejabberd-packages
- name: Draft Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: ejabberd-packages/*

454
.github/workflows/runtime.yml vendored Normal file
View File

@ -0,0 +1,454 @@
name: Runtime
on:
push:
paths:
- '*'
- '!*.md'
- '.github/workflows/runtime.yml'
- 'checkouts/**'
- 'config/**'
- 'lib/**'
- 'm4/**'
- 'plugins/**'
- 'rel/**'
pull_request:
paths:
- '*'
- '!*.md'
- '.github/workflows/runtime.yml'
- 'checkouts/**'
- 'config/**'
- 'lib/**'
- 'm4/**'
- 'plugins/**'
- 'rel/**'
jobs:
rebars:
name: Rebars
strategy:
fail-fast: false
matrix:
otp: ['20', '25', '26', '27']
rebar: ['rebar', 'rebar3']
exclude:
- otp: '27'
rebar: 'rebar'
runs-on: ubuntu-22.04
container:
image: erlang:${{ matrix.otp }}
steps:
- uses: actions/checkout@v4
- name: Get compatible Rebar binaries
if: matrix.otp < 24
run: |
rm rebar
rm rebar3
wget https://github.com/processone/ejabberd/raw/21.12/rebar
wget https://github.com/processone/ejabberd/raw/21.12/rebar3
chmod +x rebar
chmod +x rebar3
- name: Prepare libraries
run: |
apt-get -qq update
apt-get purge -y libgd3 nginx
apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \
libsqlite3-dev libwebp-dev libyaml-dev
- name: Cache Hex.pm
uses: actions/cache@v4
with:
path: |
~/.cache/rebar3/
key: ${{matrix.otp}}-${{hashFiles('rebar.config')}}
- name: Compile
run: |
./autogen.sh
./configure --with-rebar=./${{ matrix.rebar }} \
--prefix=/tmp/ejabberd \
--enable-all \
--disable-elixir \
--disable-tools \
--disable-odbc
make
- run: make xref
- name: Prepare rel (rebar2)
if: matrix.rebar == 'rebar'
run: |
mkdir -p _build/prod && ln -s `pwd`/rel/ _build/prod/rel
mkdir -p _build/dev && ln -s `pwd`/rel/ _build/dev/rel
- name: Run rel
run: |
make rel
_build/prod/rel/ejabberd/bin/ejabberdctl start \
&& _build/prod/rel/ejabberd/bin/ejabberdctl started
_build/prod/rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
_build/prod/rel/ejabberd/bin/ejabberdctl registered_users localhost > registered.log
_build/prod/rel/ejabberd/bin/ejabberdctl stop \
&& _build/prod/rel/ejabberd/bin/ejabberdctl stopped
- name: Run dev
run: |
make dev
_build/dev/rel/ejabberd/bin/ejabberdctl start \
&& _build/dev/rel/ejabberd/bin/ejabberdctl started
_build/dev/rel/ejabberd/bin/ejabberdctl register user2 localhost s0mePass
_build/dev/rel/ejabberd/bin/ejabberdctl registered_users localhost >> registered.log
_build/dev/rel/ejabberd/bin/ejabberdctl stop \
&& _build/dev/rel/ejabberd/bin/ejabberdctl stopped
- name: Run install
run: |
make install
/tmp/ejabberd/sbin/ejabberdctl start \
&& /tmp/ejabberd/sbin/ejabberdctl started
/tmp/ejabberd/sbin/ejabberdctl register user3 localhost s0mePass
/tmp/ejabberd/sbin/ejabberdctl registered_users localhost >> registered.log
/tmp/ejabberd/sbin/ejabberdctl stop \
&& /tmp/ejabberd/sbin/ejabberdctl stopped
- name: View logs
run: |
echo "===> Registered:"
cat registered.log
echo "===> Prod:"
cat _build/prod/rel/ejabberd/logs/*
echo "===> Dev:"
cat _build/dev/rel/ejabberd/logs/*
echo "===> Install:"
cat /tmp/ejabberd/var/log/ejabberd/*
- name: Check logs
run: |
grep -q '^user1$' registered.log
grep -q '^user2$' registered.log
grep -q '^user3$' registered.log
grep -q 'is started' _build/prod/rel/ejabberd/logs/ejabberd.log
grep -q 'is stopped' _build/prod/rel/ejabberd/logs/ejabberd.log
test $(find _build/prod/rel/ -empty -name error.log)
grep -q 'is started' _build/dev/rel/ejabberd/logs/ejabberd.log
grep -q 'is stopped' _build/dev/rel/ejabberd/logs/ejabberd.log
test $(find _build/dev/rel/ -empty -name error.log)
grep -q 'is started' /tmp/ejabberd/var/log/ejabberd/ejabberd.log
grep -q 'is stopped' /tmp/ejabberd/var/log/ejabberd/ejabberd.log
test $(find /tmp/ejabberd/var/log/ejabberd/ -empty -name error.log)
- name: View logs failures
if: always()
run: |
cat _build/prod/rel/ejabberd/logs/ejabberd.log
cat _build/prod/rel/ejabberd/logs/error.log
cat _build/dev/rel/ejabberd/logs/ejabberd.log
cat _build/dev/rel/ejabberd/logs/error.log
cat /tmp/ejabberd/var/log/ejabberd/ejabberd.log
cat /tmp/ejabberd/var/log/ejabberd/error.log
rebar3-elixir:
name: Rebar3+Elixir
strategy:
fail-fast: false
matrix:
otp: ['23.0', '25', '26', '27']
elixir: ['1.13', '1.15', '1.16', '1.17']
exclude:
- otp: '23.0'
elixir: '1.15'
- otp: '23.0'
elixir: '1.16'
- otp: '23.0'
elixir: '1.17'
- otp: '26'
elixir: '1.13'
- otp: '27'
elixir: '1.13'
- otp: '27'
elixir: '1.15'
- otp: '27'
elixir: '1.16'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Get specific Erlang/OTP
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Get compatible Rebar binaries
if: matrix.otp < 24
run: |
rm rebar
rm rebar3
wget https://github.com/processone/ejabberd/raw/21.12/rebar
wget https://github.com/processone/ejabberd/raw/21.12/rebar3
chmod +x rebar
chmod +x rebar3
- name: Prepare libraries
run: |
sudo apt-get -qq update
sudo apt-get -y purge libgd3 nginx
sudo apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \
libsqlite3-dev libwebp-dev libyaml-dev
- name: Enable ModPresenceDemo and an Elixir dependency
run: |
sed -i "s|^modules:|modules:\n 'ModPresenceDemo': {}|g" ejabberd.yml.example
cat ejabberd.yml.example
sed -i 's|^{deps, \[\(.*\)|{deps, [{decimal, ".*", {git, "https://github.com/ericmj/decimal", {branch, "main"}}},\n \1|g' rebar.config
cat rebar.config
- name: Cache Hex.pm
uses: actions/cache@v4
with:
path: |
~/.cache/rebar3/
key: ${{matrix.otp}}-${{hashFiles('rebar.config')}}
- name: Compile
run: |
./autogen.sh
./configure --with-rebar=./rebar3 \
--prefix=/tmp/ejabberd \
--enable-all \
--disable-odbc
make
- run: make xref
- name: Run rel
run: |
make rel
_build/prod/rel/ejabberd/bin/ejabberdctl start \
&& _build/prod/rel/ejabberd/bin/ejabberdctl started
_build/prod/rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
_build/prod/rel/ejabberd/bin/ejabberdctl registered_users localhost > registered.log
_build/prod/rel/ejabberd/bin/ejabberdctl stop \
&& _build/prod/rel/ejabberd/bin/ejabberdctl stopped
- name: Run dev
run: |
make dev
_build/dev/rel/ejabberd/bin/ejabberdctl start \
&& _build/dev/rel/ejabberd/bin/ejabberdctl started
_build/dev/rel/ejabberd/bin/ejabberdctl register user2 localhost s0mePass
_build/dev/rel/ejabberd/bin/ejabberdctl registered_users localhost >> registered.log
_build/dev/rel/ejabberd/bin/ejabberdctl stop \
&& _build/dev/rel/ejabberd/bin/ejabberdctl stopped
- name: Run install
run: |
make install
/tmp/ejabberd/sbin/ejabberdctl start \
&& /tmp/ejabberd/sbin/ejabberdctl started
/tmp/ejabberd/sbin/ejabberdctl register user3 localhost s0mePass
/tmp/ejabberd/sbin/ejabberdctl registered_users localhost >> registered.log
/tmp/ejabberd/sbin/ejabberdctl stop \
&& /tmp/ejabberd/sbin/ejabberdctl stopped
- name: View logs
if: always()
run: |
echo "===> Registered:"
cat registered.log
echo "===> Prod:"
cat _build/prod/rel/ejabberd/logs/*
echo "===> Dev:"
cat _build/dev/rel/ejabberd/logs/*
echo "===> Install:"
cat /tmp/ejabberd/var/log/ejabberd/*
- name: Check logs
if: always()
run: |
grep -q '^user1$' registered.log
grep -q '^user2$' registered.log
grep -q '^user3$' registered.log
grep -q 'is started' _build/prod/rel/ejabberd/logs/ejabberd.log
grep -q 'is stopped' _build/prod/rel/ejabberd/logs/ejabberd.log
grep -q 'module Presence Demo' _build/prod/rel/ejabberd/logs/ejabberd.log
test $(find _build/prod/ -empty -name error.log)
grep -q 'is started' _build/dev/rel/ejabberd/logs/ejabberd.log
grep -q 'is stopped' _build/dev/rel/ejabberd/logs/ejabberd.log
grep -q 'module Presence Demo' _build/dev/rel/ejabberd/logs/ejabberd.log
test $(find _build/dev/ -empty -name error.log)
grep -q 'is started' /tmp/ejabberd/var/log/ejabberd/ejabberd.log
grep -q 'is stopped' /tmp/ejabberd/var/log/ejabberd/ejabberd.log
grep -q 'module Presence Demo' /tmp/ejabberd/var/log/ejabberd/ejabberd.log
test $(find /tmp/ejabberd/var/log/ejabberd/ -empty -name error.log)
- name: View logs failures
if: failure()
run: |
cat _build/prod/rel/ejabberd/logs/ejabberd.log
cat _build/prod/rel/ejabberd/logs/error.log
cat _build/dev/rel/ejabberd/logs/ejabberd.log
cat _build/dev/rel/ejabberd/logs/error.log
cat /tmp/ejabberd/var/log/ejabberd/ejabberd.log
cat /tmp/ejabberd/var/log/ejabberd/error.log
mix:
name: Mix
strategy:
fail-fast: false
matrix:
otp: ['23.0', '25', '26', '27']
elixir: ['1.13', '1.15', '1.16', '1.17']
exclude:
- otp: '23.0'
elixir: '1.15'
- otp: '23.0'
elixir: '1.16'
- otp: '23.0'
elixir: '1.17'
- otp: '26'
elixir: '1.13'
- otp: '27'
elixir: '1.13'
- otp: '27'
elixir: '1.15'
- otp: '27'
elixir: '1.16'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Get specific Erlang/OTP
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Prepare libraries
run: |
sudo apt-get -qq update
sudo apt-get -y purge libgd3 nginx
sudo apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \
libsqlite3-dev libwebp-dev libyaml-dev
- name: Remove Elixir Matchers
run: |
echo "::remove-matcher owner=elixir-mixCompileWarning::"
echo "::remove-matcher owner=elixir-credoOutputDefault::"
echo "::remove-matcher owner=elixir-mixCompileError::"
echo "::remove-matcher owner=elixir-mixTestFailure::"
echo "::remove-matcher owner=elixir-dialyzerOutputDefault::"
- name: Enable ModPresenceDemo and an Elixir dependency
run: |
sed -i "s|^modules:|modules:\n 'ModPresenceDemo': {}|g" ejabberd.yml.example
cat ejabberd.yml.example
sed -i 's|^{deps, \(.*\)|{deps, \1\n {decimal, ".*", {git, "https://github.com/ericmj/decimal", {branch, "main"}}}, |g' rebar.config
cat rebar.config
- name: Unlock Jose dependency on older Erlang
if: matrix.otp < 24
run: |
mix deps.unlock jose
- name: Cache Hex.pm
uses: actions/cache@v4
with:
path: |
~/.hex/
key: ${{matrix.otp}}-${{hashFiles('mix.exs')}}
- name: Compile
run: |
./autogen.sh
./configure --with-rebar=mix \
--prefix=/tmp/ejabberd \
--enable-all
make
- run: make xref
- run: make dialyzer
- run: make edoc
- name: Run rel
run: |
make rel
_build/prod/rel/ejabberd/bin/ejabberdctl start \
&& _build/prod/rel/ejabberd/bin/ejabberdctl started
_build/prod/rel/ejabberd/bin/ejabberdctl register user1 localhost s0mePass
_build/prod/rel/ejabberd/bin/ejabberdctl registered_users localhost > registered.log
_build/prod/rel/ejabberd/bin/ejabberdctl stop \
&& _build/prod/rel/ejabberd/bin/ejabberdctl stopped
- name: Run dev
run: |
make dev
_build/dev/rel/ejabberd/bin/ejabberdctl start \
&& _build/dev/rel/ejabberd/bin/ejabberdctl started
_build/dev/rel/ejabberd/bin/ejabberdctl register user2 localhost s0mePass
_build/dev/rel/ejabberd/bin/ejabberdctl registered_users localhost >> registered.log
_build/dev/rel/ejabberd/bin/ejabberdctl stop \
&& _build/dev/rel/ejabberd/bin/ejabberdctl stopped
- name: Run install
run: |
make install
/tmp/ejabberd/sbin/ejabberdctl start \
&& /tmp/ejabberd/sbin/ejabberdctl started
/tmp/ejabberd/sbin/ejabberdctl register user3 localhost s0mePass
/tmp/ejabberd/sbin/ejabberdctl registered_users localhost >> registered.log
/tmp/ejabberd/sbin/ejabberdctl stop \
&& /tmp/ejabberd/sbin/ejabberdctl stopped
- name: View logs
if: always()
run: |
echo "===> Registered:"
cat registered.log
echo "===> Prod:"
cat _build/prod/rel/ejabberd/logs/*
echo "===> Dev:"
cat _build/dev/rel/ejabberd/logs/*
echo "===> Install:"
cat /tmp/ejabberd/var/log/ejabberd/*
- name: Check logs
if: always()
run: |
grep -q '^user1$' registered.log
grep -q '^user2$' registered.log
grep -q '^user3$' registered.log
grep -q 'is started' _build/prod/rel/ejabberd/logs/ejabberd.log
grep -q 'is stopped' _build/prod/rel/ejabberd/logs/ejabberd.log
grep -q 'module Presence Demo' _build/prod/rel/ejabberd/logs/ejabberd.log
test $(find _build/prod/ -empty -name error.log)
grep -q 'is started' _build/dev/rel/ejabberd/logs/ejabberd.log
grep -q 'is stopped' _build/dev/rel/ejabberd/logs/ejabberd.log
grep -q 'module Presence Demo' _build/dev/rel/ejabberd/logs/ejabberd.log
test $(find _build/dev/ -empty -name error.log)
grep -q 'is started' /tmp/ejabberd/var/log/ejabberd/ejabberd.log
grep -q 'is stopped' /tmp/ejabberd/var/log/ejabberd/ejabberd.log
grep -q 'module Presence Demo' /tmp/ejabberd/var/log/ejabberd/ejabberd.log
test $(find /tmp/ejabberd/var/log/ejabberd/ -empty -name error.log)
- name: View logs failures
if: failure()
run: |
cat _build/prod/rel/ejabberd/logs/ejabberd.log
cat _build/prod/rel/ejabberd/logs/error.log
cat _build/dev/rel/ejabberd/logs/ejabberd.log
cat _build/dev/rel/ejabberd/logs/error.log
cat /tmp/ejabberd/var/log/ejabberd/ejabberd.log
cat /tmp/ejabberd/var/log/ejabberd/error.log

38
.gitignore vendored
View File

@ -5,45 +5,45 @@
\#*#
.#*
.edts
.tool-versions
*.dump
/Makefile
/doc
/config.log
/config.status
/config/releases.exs
/configure
/aclocal.m4
/contrib/extract_translations/extract_translations.beam
/*.cache
/deps/
/doc/*.aux
/doc/*.haux
/doc/*.html
/doc/*.htoc
/doc/*.idx
/doc/*.ilg
/doc/*.ind
/doc/*.log
/doc/*.out
/doc/*.pdf
/doc/*.toc
/doc/contributed_modules.tex
/doc/version.tex
/.deps-update/
/.ejabberd-modules/
/ebin/
/ejabberd.init
/ejabberd.service
/ejabberdctl
/ejabberdctl.example
XmppAddr.hrl
/rel/ejabberd/
/src/XmppAddr.asn1db
/src/XmppAddr.erl
/src/ejabberd.app.src
/rel/overlays/
/src/eldap_filter_yecc.erl
/vars.config
/dialyzer/
/test/*.beam
/test/*.ctc
/logs/
/priv/bin/captcha*sh
/priv/sql
/rel/ejabberd
/recompile.log
/_build
/mnesiadb
/database/
/.rebar
/log/
Mnesia.nonode@nohost/
/TAGS
/tags
# Binaries created with tools/make-{binaries,installers,packages}:
/ejabberd_*.deb
/ejabberd-*.rpm
/ejabberd-*.run
/ejabberd-*.tar.gz

4
.shellcheckrc Normal file
View File

@ -0,0 +1,4 @@
disable=SC2016,SC2086,SC2089,SC2090
external-sources=true
source=ejabberdctl.cfg.example
shell=sh

View File

@ -1,72 +0,0 @@
language: erlang
otp_release:
- 17.5
- 18.3
- 19.2
services:
- riak
- 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-5.6
# /END MYSQL 5.6
- pip install --user coveralls-merge
install:
- sudo apt-get -qq install libexpat1-dev libyaml-dev libpam0g-dev libsqlite3-dev
before_script:
# Ulimit: See Travis-CI issue report: https://github.com/travis-ci/travis-ci/issues/3328
- echo 'ulimit -n 4096' > riak
- sudo mv riak /etc/default/riak
- mkdir "$PWD/ebin"
- echo "[{riak_kv, [{add_paths, [\"$PWD/ebin/\"]}]}]." > advanced.config
- sudo mv advanced.config /etc/riak/advanced.config
- sudo service riak restart
- sudo riak-admin wait-for-service riak_kv 'riak@127.0.0.1'
- sudo riak-admin test
- 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
- make
- make install
- make xref
- sed -i -e 's/ct:pal/ct:log/' test/suite.erl
- ln -sf ../sql priv/
- escript ./rebar skip_deps=true ct -v
- grep -q 'TEST COMPLETE, \([[:digit:]]*\) ok, .* of \1 ' logs/raw.log
after_script:
- find logs -name suite.log -exec cat '{}' ';'
after_failure:
- find logs -name exunit.log -exec cat '{}' ';'
# Try checking Riak database logs
- tail -n 100000 /var/log/riak/*.log
- find logs -name ejabberd.log -exec cat '{}' ';'
after_success:
- coveralls-merge erlang.json
notifications:
email: false

View File

@ -1,432 +0,0 @@
-----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-----

5
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"recommendations": [
"erlang-ls.erlang-ls"
]
}

66
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,66 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Relive (Vim)",
"type": "erlang",
"request": "launch",
"runinterminal": [
"./rebar3", "shell",
"--apps", "ejabberd",
"--config", "rel/relive.config",
"--script", "rel/relive.escript",
"--name", "ejabberd@localhost",
"--setcookie", "COOKIE"
],
"projectnode": "ejabberd@localhost",
"cookie": "COOKIE",
"timeout": 900,
"cwd": "."
},
{
"name": "Relive",
"type": "erlang",
"request": "launch",
"runinterminal": [
".vscode/relive.sh"
],
"projectnode": "ejabberd@localhost",
"cookie": "COOKIE",
"timeout": 300,
"cwd": "${workspaceRoot}"
},
{
"name": "Relive (alternate)",
"type": "erlang",
"request": "launch",
"runinterminal": [
"./rebar3", "shell",
"--apps", "ejabberd",
"--config", "rel/relive.config",
"--script", "rel/relive.escript",
"--name", "ejabberd@localhost",
"--setcookie", "COOKIE"
],
"projectnode": "ejabberd@localhost",
"cookie": "COOKIE",
"timeout": 300,
"cwd": "${workspaceRoot}"
},
{
"name": "Attach",
"type": "erlang",
"request": "attach",
"runinterminal": [
"./rebar3", "shell",
"--sname", "clean@localhost",
"--setcookie", "COOKIE",
"--start-clean"
],
"projectnode": "ejabberd@localhost",
"cookie": "COOKIE",
"timeout": 300,
"cwd": "${workspaceRoot}"
}
]
}

6
.vscode/relive.sh vendored Executable file
View File

@ -0,0 +1,6 @@
[ ! -f Makefile ] \
&& ./autogen.sh \
&& ./configure --with-rebar=rebar3 \
&& make deps
make relive

13
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,13 @@
{
"editor.tabSize": 8,
"remote.portsAttributes": {
"1883": {"label": "MQTT", "onAutoForward": "silent"},
"4369": {"label": "EPMD", "onAutoForward": "silent"},
"5222": {"label": "XMPP C2S", "onAutoForward": "silent"},
"5223": {"label": "XMPP C2S (legacy)", "onAutoForward": "silent"},
"5269": {"label": "XMPP S2S", "onAutoForward": "silent"},
"5280": {"label": "HTTP", "onAutoForward": "silent"},
"5443": {"label": "HTTPS", "onAutoForward": "silent"},
"7777": {"label": "XMPP SOCKS5 (proxy65)", "onAutoForward": "silent"}
}
}

1366
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

61
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,61 @@
# 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
## Guidelines for Respectful and Efficient Communication on Issues, Discussions, and PRs
To ensure that our maintainers can efficiently manage issues and provide timely updates, we kindly ask that all comments on GitHub tickets remain relevant to the topic of the issue. Please avoid posting comments solely to ping maintainers or ask for updates. If you need information on the status of an issue, consider the following:
- **Check the Issue Timeline:** Review the existing comments and updates on the issue before posting.
- **Use Reactions:** If you want to show that you are interested in an issue, use GitHub's reaction feature (e.g., thumbs up) instead of commenting.
- **Be Patient:** Understand that maintainers may be working on multiple tasks and will provide updates as soon as possible.
Additionally, please be aware that:
- **User Responses:** Users who report issues may no longer be using the software, may have switched to other projects, or may simply be busy. It is their right not to respond to follow-up questions or comments.
- **Maintainer Priorities:** Maintainers have the right to define their own priorities and schedule. They will address issues based on their availability and the project's needs.
By following these guidelines, you help us maintain a productive and respectful environment for everyone involved.
## 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 the email address: conduct AT 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/

122
COMPILE.md Normal file
View File

@ -0,0 +1,122 @@
Compile and Install ejabberd
============================
This document explains how to compile and install ejabberd
from source code.
For a more detailed explanation, please check the
ejabberd Docs: [Source Code Installation][docs-source].
[docs-source]: https://docs.ejabberd.im/admin/install/source/
Requirements
------------
To compile ejabberd you need:
- GNU Make
- GCC
- Libexpat ≥ 1.95
- Libyaml ≥ 0.1.4
- Erlang/OTP ≥ 20.0
- OpenSSL ≥ 1.0.0
Other optional libraries are:
- Zlib ≥ 1.2.3, for Stream Compression support (XEP-0138)
- PAM library, for Pluggable Authentication Modules (PAM)
- ImageMagick's Convert program and Ghostscript fonts, for CAPTCHA
challenges
- Elixir ≥ 1.10.3, for Elixir support. It is recommended Elixir 1.13.4 or higher
and Erlang/OTP 23.0 or higher.
If your system splits packages in libraries and development headers,
install the development packages too.
Download Source Code
--------------------
There are several ways to obtain the ejabberd source code:
- Source code archive from [ProcessOne Downloads][p1dl]
- Source code package from [ejabberd GitHub Releases][ghr]
- Latest development code from [ejabberd Git repository][gitrepo]
[p1dl]: https://www.process-one.net/en/ejabberd/downloads/
[ghr]: https://github.com/processone/ejabberd/releases
[gitrepo]: https://github.com/processone/ejabberd
Compile
-------
The general instructions to compile ejabberd are:
./configure
make
If the source code doesn't contain a `configure` script,
first of all install `autoconf` and run this to generate it:
./autogen.sh
To configure the compilation, features, install paths...
./configure --help
Install in the System
---------------------
To install ejabberd in the system, run this with system administrator rights (root user):
sudo make install
This 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/`
Build an OTP Release
--------------------
Instead of installing ejabberd in the system, you can build an OTP release
that includes all necessary to run ejabberd in a subdirectory:
./configure
make prod
Check the full list of targets:
make help
Start ejabberd
--------------
You can use the `ejabberdctl` command line administration script to
start and stop ejabberd. Some examples, depending on your installation method:
- When installed in the system:
```
ejabberdctl start
/sbin/ejabberdctl start
```
- When built an OTP production release:
```
_build/prod/rel/ejabberd/bin/ejabberdctl start
_build/prod/rel/ejabberd/bin/ejabberdctl live
```
- Start interactively without installing or building OTP release:
```
make relive
```

457
CONTAINER.md Normal file
View File

@ -0,0 +1,457 @@
[![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/processone/ejabberd?sort=semver&logo=embarcadero&label=&color=49c0c4)](https://github.com/processone/ejabberd/tags)
[![ejabberd Container on GitHub](https://img.shields.io/github/v/tag/processone/ejabberd?label=ejabberd&sort=semver&logo=docker)](https://github.com/processone/ejabberd/pkgs/container/ejabberd)
[![ecs Container on Docker](https://img.shields.io/docker/v/ejabberd/ecs?label=ecs&sort=semver&logo=docker)](https://hub.docker.com/r/ejabberd/ecs/)
`ejabberd` Container Image
==========================
[ejabberd][home] is an open-source,
robust, scalable and extensible realtime platform built using [Erlang/OTP][erlang],
that includes [XMPP][xmpp] Server, [MQTT][mqtt] Broker and [SIP][sip] Service.
[home]: https://ejabberd.im/
[erlang]: https://www.erlang.org/
[xmpp]: https://xmpp.org/
[mqtt]: https://mqtt.org/
[sip]: https://en.wikipedia.org/wiki/Session_Initiation_Protocol
This document explains how to use the `ejabberd` container image available in
[ghcr.io/processone/ejabberd](https://github.com/processone/ejabberd/pkgs/container/ejabberd),
built using the files in `.github/container/`.
This image is based in Alpine 3.19, includes Erlang/OTP 26.2 and Elixir 1.16.1.
Alternatively, there is also the `ecs` container image available in
[docker.io/ejabberd/ecs](https://hub.docker.com/r/ejabberd/ecs/),
built using the
[docker-ejabberd/ecs](https://github.com/processone/docker-ejabberd/tree/master/ecs)
repository.
Check the [differences between `ejabberd` and `ecs` images](https://github.com/processone/docker-ejabberd/blob/master/ecs/HUB-README.md#alternative-image-in-github).
If you are using a Windows operating system, check the tutorials mentioned in
[ejabberd Docs > Docker Image](https://docs.ejabberd.im/admin/install/container/#ejabberd-container-image).
Start ejabberd
--------------
### With default configuration
Start ejabberd in a new container:
```bash
docker run --name ejabberd -d -p 5222:5222 ghcr.io/processone/ejabberd
```
That runs the container as a daemon,
using ejabberd default configuration file and XMPP domain "localhost".
Stop the running container:
```bash
docker stop ejabberd
```
Restart the stopped ejabberd container:
```bash
docker restart ejabberd
```
### Start with Erlang console attached
Start ejabberd with an Erlang console attached using the `live` command:
```bash
docker run --name ejabberd -it -p 5222:5222 ghcr.io/processone/ejabberd live
```
That uses the default configuration file and XMPP domain "localhost".
### Start with your configuration and database
Pass a configuration file as a volume
and share the local directory to store database:
```bash
mkdir database
chown ejabberd database
cp ejabberd.yml.example ejabberd.yml
docker run --name ejabberd -it \
-v $(pwd)/ejabberd.yml:/opt/ejabberd/conf/ejabberd.yml \
-v $(pwd)/database:/opt/ejabberd/database \
-p 5222:5222 ghcr.io/processone/ejabberd live
```
Notice that ejabberd runs in the container with an account named `ejabberd`,
and the volumes you mount must grant proper rights to that account.
Next steps
----------
### Register the administrator account
The default ejabberd configuration does not grant admin privileges
to any account,
you may want to register a new account in ejabberd
and grant it admin rights.
Register an account using the `ejabberdctl` script:
```bash
docker exec -it ejabberd ejabberdctl register admin localhost passw0rd
```
Then edit conf/ejabberd.yml and add the ACL as explained in
[ejabberd Docs: Administration Account](https://docs.ejabberd.im/admin/install/next-steps/#administration-account)
### Check ejabberd log files
Check the content of the log files inside the container,
even if you do not put it on a shared persistent drive:
```bash
docker exec -it ejabberd tail -f logs/ejabberd.log
```
### Inspect the container files
The container uses Alpine Linux. Start a shell inside the container:
```bash
docker exec -it ejabberd sh
```
### Open ejabberd debug console
Open an interactive debug Erlang console attached to a running ejabberd in a running container:
```bash
docker exec -it ejabberd ejabberdctl debug
```
### CAPTCHA
ejabberd includes two example CAPTCHA scripts.
If you want to use any of them, first install some additional required libraries:
```bash
docker exec --user root ejabberd apk add imagemagick ghostscript-fonts bash
```
Now update your ejabberd configuration file, for example:
```bash
docker exec -it ejabberd vi conf/ejabberd.yml
```
and add this option:
```yaml
captcha_cmd: /opt/ejabberd-22.04/lib/captcha.sh
```
Finally, reload the configuration file or restart the container:
```bash
docker exec ejabberd ejabberdctl reload_config
```
If the CAPTCHA image is not visible, there may be a problem generating it
(the ejabberd log file may show some error message);
or the image URL may not be correctly detected by ejabberd,
in that case you can set the correct URL manually, for example:
```yaml
captcha_url: https://localhost:5443/captcha
```
For more details about CAPTCHA options, please check the
[CAPTCHA](https://docs.ejabberd.im/admin/configuration/basic/#captcha)
documentation section.
Advanced Container Configuration
--------------------------------
### Ports
This container image exposes the ports:
- `5222`: The default port for XMPP clients.
- `5269`: For XMPP federation. Only needed if you want to communicate with users on other servers.
- `5280`: For admin interface.
- `5443`: With encryption, used for admin interface, API, CAPTCHA, OAuth, Websockets and XMPP BOSH.
- `1883`: Used for MQTT
- `4369-4399`: EPMD and Erlang connectivity, used for `ejabberdctl` and clustering
- `5210`: Erlang connectivity when `ERL_DIST_PORT` is set, alternative to EPMD
### Volumes
ejabberd produces two types of data: log files and database spool files (Mnesia).
This is the kind of data you probably want to store on a persistent or local drive (at least the database).
The volumes you may want to map:
- `/opt/ejabberd/conf/`: Directory containing configuration and certificates
- `/opt/ejabberd/database/`: Directory containing Mnesia database.
You should back up or export the content of the directory to persistent storage
(host storage, local storage, any storage plugin)
- `/opt/ejabberd/logs/`: Directory containing log files
- `/opt/ejabberd/upload/`: Directory containing uploaded files. This should also be backed up.
All these files are owned by `ejabberd` user inside the container.
It's possible to install additional ejabberd modules using volumes,
[this comment](https://github.com/processone/docker-ejabberd/issues/81#issuecomment-1036115146)
explains how to install an additional module using docker-compose.
### Commands on start
The ejabberdctl script reads the `CTL_ON_CREATE` environment variable
the first time the container is started,
and reads `CTL_ON_START` every time the container is started.
Those variables can contain one ejabberdctl command,
or several commands separated with the blankspace and `;` characters.
By default failure of any of commands executed that way would
abort start, this can be disabled by prefixing commands with `!`
Example usage (or check the [full example](#customized-example)):
```yaml
environment:
- CTL_ON_CREATE=! register admin localhost asd
- CTL_ON_START=stats registeredusers ;
check_password admin localhost asd ;
status
```
### Clustering
When setting several containers to form a
[cluster of ejabberd nodes](https://docs.ejabberd.im/admin/guide/clustering/),
each one must have a different
[Erlang Node Name](https://docs.ejabberd.im/admin/guide/security/#erlang-node-name)
and the same
[Erlang Cookie](https://docs.ejabberd.im/admin/guide/security/#erlang-cookie).
For this you can either:
- edit `conf/ejabberdctl.cfg` and set variables `ERLANG_NODE` and `ERLANG_COOKIE`
- set the environment variables `ERLANG_NODE_ARG` and `ERLANG_COOKIE`
Example to connect a local `ejabberdctl` to a containerized ejabberd:
1. When creating the container, export port 5210, and set `ERLANG_COOKIE`:
```sh
docker run --name ejabberd -it \
-e ERLANG_COOKIE=`cat $HOME/.erlang.cookie` \
-p 5210:5210 -p 5222:5222 \
ghcr.io/processone/ejabberd
```
2. Set `ERL_DIST_PORT=5210` in ejabberdctl.cfg of container and local ejabberd
3. Restart the container
4. Now use `ejabberdctl` in your local ejabberd deployment
To connect using a local `ejabberd` script:
```sh
ERL_DIST_PORT=5210 _build/dev/rel/ejabberd/bin/ejabberd ping
```
Example using environment variables (see full example [docker-compose.yml](https://github.com/processone/docker-ejabberd/issues/64#issuecomment-887741332)):
```yaml
environment:
- ERLANG_NODE_ARG=ejabberd@node7
- ERLANG_COOKIE=dummycookie123
```
Build a Container Image
-----------------------
This container image includes ejabberd as a standalone OTP release built using Elixir.
That OTP release is configured with:
- `mix.exs`: Customize ejabberd release
- `vars.config`: ejabberd compilation configuration options
- `config/runtime.exs`: Customize ejabberd paths
- `ejabberd.yml.template`: ejabberd default config file
### Direct build
Build ejabberd Community Server container image from ejabberd master git repository:
```bash
docker buildx build \
-t personal/ejabberd \
-f .github/container/Dockerfile \
.
```
### Podman build
It's also possible to use podman instead of docker, just notice:
- `EXPOSE 4369-4399` port range is not supported, remove that in Dockerfile
- It mentions that `healthcheck` is not supported by the Open Container Initiative image format
- to start with command `live`, you may want to add environment variable `EJABBERD_BYPASS_WARNINGS=true`
```bash
podman build \
-t ejabberd \
-f .github/container/Dockerfile \
.
podman run --name eja1 -d -p 5222:5222 localhost/ejabberd
podman exec eja1 ejabberdctl status
podman exec -it eja1 sh
podman stop eja1
podman run --name eja1 -it -e EJABBERD_BYPASS_WARNINGS=true -p 5222:5222 localhost/ejabberd live
```
### Package build for `arm64`
By default, `.github/container/Dockerfile` builds this container by directly compiling ejabberd,
it is a fast and direct method.
However, a problem with QEMU prevents building the container in QEMU using Erlang/OTP 25
for the `arm64` architecture.
Providing `--build-arg METHOD=package` is an alternate method to build the container
used by the Github Actions workflow that provides `amd64` and `arm64` container images.
It first builds an ejabberd binary package, and later installs it in the image.
That method avoids using QEMU, so it can build `arm64` container images, but is extremely
slow the first time it's used, and consequently not recommended for general use.
In this case, to build the ejabberd container image for arm64 architecture:
```bash
docker buildx build \
--build-arg METHOD=package \
--platform linux/arm64 \
-t personal/ejabberd:$VERSION \
-f .github/container/Dockerfile \
.
```
Composer Examples
-----------------
### Minimal Example
This is the barely minimal file to get a usable ejabberd.
Store it as `docker-compose.yml`:
```yaml
services:
main:
image: ghcr.io/processone/ejabberd
container_name: ejabberd
ports:
- "5222:5222"
- "5269:5269"
- "5280:5280"
- "5443:5443"
```
Create and start the container with the command:
```bash
docker-compose up
```
### Customized Example
This example shows the usage of several customizations:
it uses a local configuration file,
stores the mnesia database in a local path,
registers an account when it's created,
and checks the number of registered accounts every time it's started.
Download or copy the ejabberd configuration file:
```bash
wget https://raw.githubusercontent.com/processone/ejabberd/master/ejabberd.yml.example
mv ejabberd.yml.example ejabberd.yml
```
Create the database directory and allow the container access to it:
```bash
mkdir database
sudo chown 9000:9000 database
```
Now write this `docker-compose.yml` file:
```yaml
version: '3.7'
services:
main:
image: ghcr.io/processone/ejabberd
container_name: ejabberd
environment:
- CTL_ON_CREATE=register admin localhost asd
- CTL_ON_START=registered_users localhost ;
status
ports:
- "5222:5222"
- "5269:5269"
- "5280:5280"
- "5443:5443"
volumes:
- ./ejabberd.yml:/opt/ejabberd/conf/ejabberd.yml:ro
- ./database:/opt/ejabberd/database
```
### Clustering Example
In this example, the main container is created first.
Once it is fully started and healthy, a second container is created,
and once ejabberd is started in it, it joins the first one.
An account is registered in the first node when created (and
we ignore errors that can happen when doing that - for example
whenn account already exists),
and it should exist in the second node after join.
Notice that in this example the main container does not have access
to the exterior; the replica exports the ports and can be accessed.
```yaml
version: '3.7'
services:
main:
image: ghcr.io/processone/ejabberd
container_name: ejabberd
environment:
- ERLANG_NODE_ARG=ejabberd@main
- ERLANG_COOKIE=dummycookie123
- CTL_ON_CREATE=! register admin localhost asd
replica:
image: ghcr.io/processone/ejabberd
container_name: replica
depends_on:
main:
condition: service_healthy
ports:
- "5222:5222"
- "5269:5269"
- "5280:5280"
- "5443:5443"
environment:
- ERLANG_NODE_ARG=ejabberd@replica
- ERLANG_COOKIE=dummycookie123
- CTL_ON_CREATE=join_cluster ejabberd@main
- CTL_ON_START=registered_users localhost ;
status
```

149
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,149 @@
# Contributing to ejabberd
We'd love for you to contribute to our source code and to make ejabberd even better than it is
today! Here are the guidelines we'd like you to follow:
* [Code of Conduct](#code-of-conduct)
* [Questions and Problems](#questions-bugs-features)
* [Issues and Bugs](#found-an-issue-or-bug)
* [Feature Requests](#missing-a-feature)
* [Issue Submission Guidelines](#issue-submission-guidelines)
* [Pull Request Submission Guidelines](#pull-request-submission-guidelines)
* [Signing the CLA](#signing-the-contributor-license-agreement-cla)
## Code of Conduct
Help us keep ejabberd community open-minded and inclusive. Please read and follow our [Code of Conduct][coc].
## Questions, Bugs, Features
### Got a Question or Problem?
Do not open issues for general support questions as we want to keep GitHub issues for bug reports
and feature requests. You've got much better chances of getting your question answered on dedicated
support platforms, the best being [Stack Overflow][stackoverflow].
Stack Overflow is a much better place to ask questions since:
- there are thousands of people willing to help on Stack Overflow
- questions and answers stay available for public viewing so your question / answer might help
someone else
- Stack Overflow's voting system assures that the best answers are prominently visible.
To save your and our time, we will systematically close all issues that are requests for general
support and redirect people to the section you are reading right now.
Other channels for support are:
- ejabberd XMPP room: [ejabberd@conference.process-one.net][muc]
- [ejabberd XMPP room logs][logs]
- [ejabberd Mailing List][list]
### Found an Issue or Bug?
If you find a bug in the source code, you can help us by submitting an issue to our
[GitHub Repository][github]. Even better, you can submit a Pull Request with a fix.
### Missing a Feature?
You can request a new feature by submitting an issue to our [GitHub Repository][github-issues].
If you would like to implement a new feature then consider what kind of change it is:
* **Major Changes** that you wish to contribute to the project should be discussed first in an
[GitHub issue][github-issues] that clearly outlines the changes and benefits of the feature.
* **Small Changes** can directly be crafted and submitted to the [GitHub Repository][github]
as a Pull Request. See the section about [Pull Request Submission Guidelines](#pull-request-submission-guidelines).
## Issue Submission Guidelines
Before you submit your issue search the archive, maybe your question was already answered.
If your issue appears to be a bug, and hasn't been reported, open a new issue. Help us to maximize
the effort we can spend fixing issues and adding new features, by not reporting duplicate issues.
The "[new issue][github-new-issue]" form contains a number of prompts that you should fill out to
make it easier to understand and categorize the issue.
## Pull Request Submission Guidelines
By submitting a pull request for a code or doc contribution, you need to have the right
to grant your contribution's copyright license to ProcessOne. Please check [ProcessOne CLA][cla]
for details.
Before you submit your pull request consider the following guidelines:
* Search [GitHub][github-pr] for an open or closed Pull Request
that relates to your submission. You don't want to duplicate effort.
* Create the [development environment][developer-setup]
* Make your changes in a new git branch:
```shell
git checkout -b my-fix-branch master
```
* Test your changes and, if relevant, expand the automated test suite.
* Create your patch commit, including appropriate test cases.
* If the changes affect public APIs, change or add relevant [documentation][doc-repo].
* Commit your changes using a descriptive commit message.
```shell
git commit -a
```
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
* Push your branch to GitHub:
```shell
git push origin my-fix-branch
```
* In GitHub, send a pull request to `ejabberd:master`. This will trigger the automated testing.
We will also notify you if you have not yet signed the [contribution agreement][cla].
* If you find that the tests have failed, look into the logs to find out
if your changes caused test failures, the commit message was malformed etc. If you find that the
tests failed or times out for unrelated reasons, you can ping a team member so that the build can be
restarted.
* If we suggest changes, then:
* Make the required updates.
* Test your changes and test cases.
* Commit your changes to your branch (e.g. `my-fix-branch`).
* Push the changes to your GitHub repository (this will update your Pull Request).
You can also amend the initial commits and force push them to the branch.
```shell
git rebase master -i
git push origin my-fix-branch -f
```
This is generally easier to follow, but separate commits are useful if the Pull Request contains
iterations that might be interesting to see side-by-side.
That's it! Thank you for your contribution!
## Signing the Contributor License Agreement (CLA)
Upon submitting a Pull Request, we will ask you to sign our CLA if you haven't done
so before. It's a quick process, we promise, and you will be able to do it all online
You can read [ProcessOne Contribution License Agreement][cla] in PDF.
This is part of the legal framework of the open-source ecosystem that adds some red tape,
but protects both the contributor and the company / foundation behind the project. It also
gives us the option to relicense the code with a more permissive license in the future.
[coc]: https://github.com/processone/ejabberd/blob/master/CODE_OF_CONDUCT.md
[stackoverflow]: https://stackoverflow.com/questions/tagged/ejabberd?sort=newest
[list]: https://lists.jabber.ru/mailman/listinfo/ejabberd
[muc]: xmpp:ejabberd@conference.process-one.net
[logs]: https://process-one.net/logs/ejabberd@conference.process-one.net/
[github]: https://github.com/processone/ejabberd
[github-issues]: https://github.com/processone/ejabberd/issues
[github-new-issue]: https://github.com/processone/ejabberd/issues/new
[github-pr]: https://github.com/processone/ejabberd/pulls
[doc-repo]: https://github.com/processone/docs.ejabberd.im
[developer-setup]: https://docs.ejabberd.im/developer/
[cla]: https://www.process-one.net/resources/ejabberd-cla.pdf

37
CONTRIBUTORS.md Normal file
View File

@ -0,0 +1,37 @@
# Contributors
We would like to thanks official ejabberd source code contributors:
- Sergey Abramyan
- Badlop
- Ludovic Bocquet
- Emilio Bustos
- Thiago Camargo
- Juan Pablo Carlino
- Paweł Chmielowski
- Gabriel Gatu
- Tsukasa Hamano
- Konstantinos Kallas
- Evgeny Khramtsov
- Ben Langfeld
- Peter Lemenkov
- Anna Mukharram
- Johan Oudinet
- Pablo Polvorin
- Mickaël Rémond
- Matthias Rieber
- Rafael Roemhild
- Christophe Romain
- Jérôme Sautret
- Sonny Scroggin
- Alexey Shchepin
- Shelley Shyan
- Radoslaw Szymczyszyn
- Stu Tomlinson
- Christian Ulrich
- Holger Weiß
Please, if you think we are missing your contribution, do not hesitate to contact us at ProcessOne.
In case you do not want to appear in this list, please, let us know as well.
Thanks !

View File

@ -1,25 +0,0 @@
FROM debian:jessie
MAINTAINER Rafael Römhild <rafael@roemhild.de>
ENV XMPP_DOMAIN=localhost \
EJABBERD_HOME=/opt/ejabberd \
PATH=/opt/ejabberd/bin:/usr/sbin:/usr/bin:/sbin:/bin \
LC_ALL=C.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8
# bootstrap
COPY . /tmp/ejabberd
RUN /tmp/ejabberd/docker/bootstrap.sh
# Continue as user
USER ejabberd
# Set workdir to ejabberd root
WORKDIR /opt/ejabberd
VOLUME ["/opt/ejabberd/conf", "/opt/ejabberd/database", "/opt/ejabberd/ssl", "/opt/ejabberd/backup", "/opt/ejabberd/upload", "/opt/ejabberd/modules"]
EXPOSE 4560 5222 5269 5280 5443
ENTRYPOINT ["/opt/ejabberd/docker/start.sh"]

View File

@ -1,7 +1,22 @@
REBAR = @ESCRIPT@ rebar
#.
#' definitions
#
ESCRIPT = @ESCRIPT@
REBAR = @rebar@
MIX = @rebar@
AWK = @AWK@
INSTALL = @INSTALL@
MKDIR_P = @MKDIR_P@
SED = @SED@
ERL = @ERL@
EPMD = @EPMD@
IEX = @IEX@
INSTALLUSER=@INSTALLUSER@
INSTALLGROUP=@INSTALLGROUP@
REBAR_ENABLE_ELIXIR = @elixir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@ -9,24 +24,27 @@ exec_prefix = @exec_prefix@
DESTDIR =
# /etc/ejabberd/
ETCDIR = $(DESTDIR)@sysconfdir@/ejabberd
ETCDIR = @sysconfdir@/ejabberd
# /bin/
BINDIR = $(DESTDIR)@bindir@
BINDIR = @bindir@
# /sbin/
SBINDIR = $(DESTDIR)@sbindir@
SBINDIR = @sbindir@
# /lib/
LIBDIR = $(DESTDIR)@libdir@
LIBDIR = @libdir@
# /lib/ejabberd/
EJABBERDDIR = $(DESTDIR)@libdir@/ejabberd
EJABBERDDIR = @libdir@/ejabberd
# /share/doc/ejabberd
PACKAGE_TARNAME = @PACKAGE_TARNAME@
datarootdir = @datarootdir@
DOCDIR = $(DESTDIR)@docdir@
DOCDIR = @docdir@
# /share/doc/man/man5
MANDIR = @mandir@/man5
# /usr/lib/ejabberd/ebin/
BEAMDIR = $(EJABBERDDIR)/ebin
@ -46,22 +64,31 @@ 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
# /usr/lib/ejabberd/priv/lua
LUADIR = $(PRIVDIR)/lua
# /var/lib/ejabberd/
SPOOLDIR = $(DESTDIR)@localstatedir@/lib/ejabberd
# /var/lock/ejabberdctl
CTLLOCKDIR = $(DESTDIR)@localstatedir@/lock/ejabberdctl
# /var/lib/ejabberd/.erlang.cookie
COOKIEFILE = $(SPOOLDIR)/.erlang.cookie
SPOOLDIR = @localstatedir@/lib/ejabberd
# /var/log/ejabberd/
LOGDIR = $(DESTDIR)@localstatedir@/log/ejabberd
LOGDIR = @localstatedir@/log/ejabberd
#.
#' install user
#
INSTALLUSER=@INSTALLUSER@
# if no user was enabled, don't set privileges or ownership
ifeq ($(INSTALLUSER),)
O_USER=
@ -77,87 +104,254 @@ else
INIT_USER=$(INSTALLUSER)
endif
all: deps src
# if no group was enabled, don't set privileges or ownership
ifneq ($(INSTALLGROUP),)
G_USER=-g $(INSTALLGROUP)
endif
deps: deps/.got
#.
#' rebar / rebar3 / mix
#
deps/.got:
rm -rf deps/.got
rm -rf deps/.built
$(REBAR) get-deps && :> deps/.got
ifeq "$(notdir $(MIX))" "mix"
REBAR_VER:=6
REBAR_VER_318:=0
else
REBAR_VER:=$(shell $(REBAR) --version | $(AWK) -F '[ .]' '/rebar / {print $$2}')
REBAR_VER_318:=$(shell $(REBAR) --version | $(AWK) -F '[ .]' '/rebar / {print ($$2 == 3 && $$3 >= 18 ? 1 : 0)}')
endif
deps/.built: deps/.got
$(REBAR) compile && :> deps/.built
ifeq "$(REBAR_VER)" "6"
REBAR=$(MIX)
SKIPDEPS=
LISTDEPS=deps.tree
UPDATEDEPS=deps.update
DEPSPATTERN="s/.*─ \([a-z0-9_]*\) .*/\1/p;"
DEPSBASE=_build
DEPSDIR=$(DEPSBASE)/dev/lib
GET_DEPS= deps.get
CONFIGURE_DEPS=(cd deps/eimp; ./configure)
EBINDIR=$(DEPSDIR)/ejabberd/ebin
XREFOPTIONS=graph
EDOCPRE=MIX_ENV=edoc
EDOCTASK=docs --proglang erlang
CLEANARG=--deps
ELIXIR_LIBDIR_RAW=$(shell elixir -e "IO.puts(:filename.dirname(:code.lib_dir(:elixir)))" -e ":erlang.halt")
ELIXIR_LIBDIR=":$(ELIXIR_LIBDIR_RAW)"
REBARREL=MIX_ENV=prod $(REBAR) release --overwrite
REBARDEV=MIX_ENV=dev $(REBAR) release --overwrite
RELIVECMD=$(ESCRIPT) rel/relive.escript && MIX_ENV=dev RELIVE=true $(IEX) --name ejabberd@localhost -S mix run
REL_LIB_DIR = _build/dev/rel/ejabberd/lib
COPY_REL_TARGET = dev
GET_DEPS_TRANSLATIONS=MIX_ENV=translations $(REBAR) $(GET_DEPS)
DEPSDIR_TRANSLATIONS=deps
else
ifeq ($(REBAR_ENABLE_ELIXIR),true)
ELIXIR_LIBDIR_RAW=$(shell elixir -e "IO.puts(:filename.dirname(:code.lib_dir(:elixir)))" -e ":erlang.halt")
ELIXIR_LIBDIR=":$(ELIXIR_LIBDIR_RAW)"
EXPLICIT_ELIXIR_COMPILE=MIX_ENV=default mix compile.elixir
EXPLICIT_ELIXIR_COMPILE_DEV=MIX_ENV=dev mix compile.elixir
PREPARE_ELIXIR_SCRIPTS=$(MKDIR_P) rel/overlays; cp $(ELIXIR_LIBDIR_RAW)/../bin/iex rel/overlays/; cp $(ELIXIR_LIBDIR_RAW)/../bin/elixir rel/overlays/; sed -i 's|ERTS_BIN=$$|ERTS_BIN=$$SCRIPT_PATH/../../erts-{{erts_vsn}}/bin/|' rel/overlays/elixir
endif
ifeq "$(REBAR_VER)" "3"
SKIPDEPS=
LISTDEPS=tree
ifeq "$(REBAR_VER_318)" "1"
UPDATEDEPS=upgrade --all
else
UPDATEDEPS=upgrade
endif
DEPSPATTERN="s/ (.*//; /^ / s/.* \([a-z0-9_]*\).*/\1/p;"
DEPSBASE=_build
DEPSDIR=$(DEPSBASE)/default/lib
GET_DEPS= get-deps
CONFIGURE_DEPS=$(REBAR) configure-deps
EBINDIR=$(DEPSDIR)/ejabberd/ebin
XREFOPTIONS=
CLEANARG=--all
REBARREL=$(REBAR) as prod tar
REBARDEV=$(REBAR) as dev release
RELIVECMD=$(REBAR) as dev relive
REL_LIB_DIR = _build/dev/rel/ejabberd/lib
COPY_REL_TARGET = dev
GET_DEPS_TRANSLATIONS=$(REBAR) as translations $(GET_DEPS)
DEPSDIR_TRANSLATIONS=_build/translations/lib
else
SKIPDEPS=skip_deps=true
LISTDEPS=-q list-deps
UPDATEDEPS=update-deps
DEPSPATTERN="/ TAG / s/ .*// p; / REV / s/ .*// p; / BRANCH / s/ .*// p;"
DEPSBASE=deps
DEPSDIR=$(DEPSBASE)
GET_DEPS= get-deps
CONFIGURE_DEPS=$(REBAR) configure-deps
EBINDIR=ebin
XREFOPTIONS=
CLEANARG=
REBARREL=$(REBAR) generate
REBARDEV=
RELIVECMD=@echo "Rebar2 detected... relive not supported.\
\nTry: ./configure --with-rebar=rebar3 ; make relive"
REL_LIB_DIR = rel/ejabberd/lib
COPY_REL_TARGET = rel
endif
endif
src: deps/.built
$(REBAR) skip_deps=true compile
#.
#' main targets
#
all: scripts deps src
deps: $(DEPSDIR)/.got
$(DEPSDIR)/.got:
rm -rf $(DEPSDIR)/.got
rm -rf $(DEPSDIR)/.built
$(MKDIR_P) $(DEPSDIR)
$(REBAR) $(GET_DEPS) && :> $(DEPSDIR)/.got
$(CONFIGURE_DEPS)
$(DEPSDIR)/.built: $(DEPSDIR)/.got
$(REBAR) compile && :> $(DEPSDIR)/.built
src: $(DEPSDIR)/.built
$(REBAR) $(SKIPDEPS) compile
$(EXPLICIT_ELIXIR_COMPILE)
update:
rm -rf deps/.got
rm -rf deps/.built
$(REBAR) update-deps && :> deps/.got
rm -rf $(DEPSDIR)/.got
rm -rf $(DEPSDIR)/.built
$(REBAR) $(UPDATEDEPS) && :> $(DEPSDIR)/.got
$(CONFIGURE_DEPS)
xref: all
$(REBAR) skip_deps=true xref
$(REBAR) $(SKIPDEPS) xref $(XREFOPTIONS)
hooks: all
tools/hook_deps.sh $(EBINDIR)
options: all
tools/opt_types.sh ejabberd_option $(EBINDIR)
translations:
contrib/extract_translations/prepare-translation.sh -updateall
$(GET_DEPS_TRANSLATIONS)
tools/prepare-tr.sh $(DEPSDIR_TRANSLATIONS)
edoc:
$(ERL) -noinput +B -eval \
'case edoc:application(ejabberd, ".", []) of ok -> halt(0); error -> halt(1) end.'
doap:
tools/generate-doap.sh
#.
#' edoc
#
edoc: edoc_files edoc_compile
$(EDOCPRE) $(REBAR) $(EDOCTASK)
edoc_compile: deps
$(EDOCPRE) $(REBAR) compile
edoc_files: _build/edoc/docs.md _build/edoc/logo.png
_build/edoc/docs.md: edoc_compile
echo "For much more detailed and complete ejabberd documentation, " \
"go to the [ejabberd Docs](https://docs.ejabberd.im/) site." \
> _build/edoc/docs.md
_build/edoc/logo.png: edoc_compile
wget https://docs.ejabberd.im/assets/img/footer_logo_e.png -O _build/edoc/logo.png
#.
#' format / indent
#
format:
tools/rebar3-format.sh $(REBAR)
indent:
tools/emacs-indent.sh
#.
#' copy-files
#
JOIN_PATHS=$(if $(wordlist 2,1000,$(1)),$(firstword $(1))/$(call JOIN_PATHS,$(wordlist 2,1000,$(1))),$(1))
VERSIONED_DEP=$(if $(DEP_$(1)_VERSION),$(DEP_$(1)_VERSION),$(1))
DEPIX:=$(words $(subst /, ,$(DEPSDIR)))
LIBIX:=$(shell expr "$(DEPIX)" + 2)
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)))))
TO_DEST_SINGLE=$(if $(subst X$(DEPSBASE)X,,X$(word 1,$(1))X),$(call MAIN_TO_DEST,$(1)),$(if $(subst XlibX,,X$(word $(LIBIX),$(1))X),$(call DEPS_TO_DEST,$(wordlist $(DEPIX),1000,$(1))),$(call ELIXIR_TO_DEST,$(wordlist $(DEPIX),1000,$(1)))))
TO_DEST=$(foreach path,$(1),$(call JOIN_PATHS,$(DESTDIR)$(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) list-deps|$(SED) -e '/^=/d;s/ .*//'))
DEPS:=$(sort $(shell QUIET=1 $(REBAR) $(LISTDEPS) | $(SED) -ne $(DEPSPATTERN) ))
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)/lib/*/ebin/*.beam deps/$(DEP)/lib/*/ebin/*.app))
DEPS_FILES_FILTERED=$(filter-out %/epam deps/elixir/ebin/elixir.app,$(DEPS_FILES))
DEPS_DIRS=$(sort deps/ $(foreach DEP,$(DEPS),deps/$(DEP)/) $(dir $(DEPS_FILES)))
DEPS_FILES=$(call FILES_WILDCARD,$(foreach DEP,$(DEPS),$(DEPSDIR)/$(DEP)/ebin/*.beam $(DEPSDIR)/$(DEP)/ebin/*.app $(DEPSDIR)/$(DEP)/priv/* $(DEPSDIR)/$(DEP)/priv/lib/* $(DEPSDIR)/$(DEP)/priv/bin/* $(DEPSDIR)/$(DEP)/include/*.hrl $(DEPSDIR)/$(DEP)/COPY* $(DEPSDIR)/$(DEP)/LICENSE* $(DEPSDIR)/$(DEP)/lib/*/ebin/*.beam $(DEPSDIR)/$(DEP)/lib/*/ebin/*.app))
MAIN_FILES=$(filter-out %/configure.beam,$(call FILES_WILDCARD,ebin/*.beam ebin/*.app priv/msgs/*.msg priv/lib/* include/*.hrl))
MAIN_DIRS=$(sort $(dir $(MAIN_FILES)) priv/bin priv/sql)
BINARIES=$(DEPSDIR)/epam/priv/bin/epam $(DEPSDIR)/eimp/priv/bin/eimp $(DEPSDIR)/fs/priv/mac_listener
DEPS_FILES_FILTERED=$(filter-out $(BINARIES) $(DEPSDIR)/elixir/ebin/elixir.app,$(DEPS_FILES))
DEPS_DIRS=$(sort $(DEPSDIR)/ $(foreach DEP,$(DEPS),$(DEPSDIR)/$(DEP)/) $(dir $(DEPS_FILES)))
MAIN_FILES=$(filter-out %/configure.beam,$(call FILES_WILDCARD,$(EBINDIR)/*.beam $(EBINDIR)/*.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 priv/lua)
define DEP_VERSION_template
DEP_$(1)_VERSION:=$(shell $(SED) -e '/vsn/!d;s/.*, *"/$(1)-/;s/".*//' $(2) 2>/dev/null)
endef
$(foreach DEP,$(DEPS),$(eval $(call DEP_VERSION_template,$(DEP),deps/$(DEP)/ebin/$(DEP).app)))
$(eval $(call DEP_VERSION_template,ejabberd,ebin/ejabberd.app))
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),$(DEPSDIR)/$(DEP)/ebin/$(DEP).app)))
$(eval $(call DEP_VERSION_template,ejabberd,$(EBINDIR)/ejabberd.app))
define COPY_template
$(call TO_DEST,$(1)): $(1) $(call TO_DEST,$(dir $(1))) ; $$(INSTALL) -m 644 $(1) $(call TO_DEST,$(1))
$(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,deps/epam/priv/bin/epam): $(LIBDIR)/%: deps/epam/priv/bin/epam $(call TO_DEST,deps/epam/priv/bin/)
$(INSTALL) -m 750 $(O_USER) $< $@
$(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 750 $(O_USER) $< $@
$(call TO_DEST,priv/sql/lite.new.sql): sql/lite.new.sql $(call TO_DEST,priv/sql)
$(INSTALL) -m 644 $< $@
copy-files-sub2: $(call TO_DEST,$(DEPS_FILES) $(MAIN_FILES) priv/bin/captcha.sh priv/sql/lite.sql)
$(call TO_DEST,priv/bin/captcha.sh): tools/captcha.sh $(call TO_DEST,priv/bin)
$(INSTALL) -m 755 $(O_USER) $< $@
$(call TO_DEST,priv/lua/redis_sm.lua): priv/lua/redis_sm.lua $(call TO_DEST,priv/lua)
$(INSTALL) -m 644 $< $@
ifeq (@sqlite@,true)
SQLITE_FILES = priv/sql/lite.sql priv/sql/lite.new.sql
endif
ifeq (@redis@,true)
REDIS_FILES = priv/lua/redis_sm.lua
endif
copy-files-sub2: $(call TO_DEST,$(DEPS_FILES) $(MAIN_FILES) priv/bin/captcha.sh $(SQLITE_FILES) $(REDIS_FILES))
.PHONY: $(call TO_DEST,$(DEPS_FILES) $(MAIN_DIRS) $(DEPS_DIRS))
endif
@ -166,147 +360,265 @@ copy-files:
copy-files-sub: copy-files-sub2
install: all copy-files
#.
#' copy-files-rel
#
# Configuration files
$(INSTALL) -d -m 750 $(G_USER) $(ETCDIR)
[ -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 \
|| $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
$(INSTALL) -b -m 644 $(G_USER) inetrc $(ETCDIR)/inetrc
copy-files-rel: $(COPY_REL_TARGET)
#
# 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
# Libraries
(cd $(REL_LIB_DIR) && find . -follow -type f ! -executable -exec $(INSTALL) -vDm 640 $(G_USER) {} $(DESTDIR)$(LIBDIR)/{} \;)
#
# Init script
# *.so:
(cd $(REL_LIB_DIR) && find . -follow -type f -executable -name *.so -exec $(INSTALL) -vDm 640 $(G_USER) {} $(DESTDIR)$(LIBDIR)/{} \;)
#
# Executable files
(cd $(REL_LIB_DIR) && find . -follow -type f -executable ! -name *.so -exec $(INSTALL) -vDm 550 $(G_USER) {} $(DESTDIR)$(LIBDIR)/{} \;)
#.
#' uninstall-librel
#
uninstall-librel:
(cd $(REL_LIB_DIR) && find . -follow -type f -exec rm -fv -v $(DESTDIR)$(LIBDIR)/{} \;)
(cd $(REL_LIB_DIR) && find . -follow -depth -type d -exec rm -dv -v $(DESTDIR)$(LIBDIR)/{} \;)
#.
#' relive
#
relive:
$(EXPLICIT_ELIXIR_COMPILE_DEV)
$(RELIVECMD)
relivelibdir=$(shell pwd)/$(DEPSDIR)
relivedir=$(shell pwd)/_build/relive
CONFIG_DIR = ${relivedir}/conf
SPOOL_DIR = ${relivedir}/database
LOGS_DIR = ${relivedir}/logs
#.
#' scripts
#
ejabberdctl.relive:
$(SED) -e "s*{{installuser}}*${INSTALLUSER}*g" \
-e "s*{{config_dir}}*${CONFIG_DIR}*g" \
-e "s*{{logs_dir}}*${LOGS_DIR}*g" \
-e "s*{{spool_dir}}*${SPOOL_DIR}*g" \
-e "s*{{bindir}}*${BINDIR}*g" \
-e "s*{{libdir}}*${relivelibdir}${ELIXIR_LIBDIR}*g" \
-e "s*ERTS_VSN*# ERTS_VSN*g" \
-e "s*{{iexpath}}*${IEX}*g" \
-e "s*{{erl}}*${ERL}*g" \
-e "s*{{epmd}}*${EPMD}*g" ejabberdctl.template \
> ejabberdctl.relive
ejabberd.init:
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
-e "s*@installuser@*$(INIT_USER)*g" ejabberd.init.template \
> ejabberd.init
chmod 755 ejabberd.init
#
# Service script
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" ejabberd.service.template \
ejabberd.service:
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
-e "s*@installuser@*$(INIT_USER)*g" ejabberd.service.template \
> ejabberd.service
chmod 644 ejabberd.service
ejabberdctl.example: vars.config
$(SED) -e "s*{{installuser}}*${INSTALLUSER}*g" \
-e "s*{{config_dir}}*${ETCDIR}*g" \
-e "s*{{logs_dir}}*${LOGDIR}*g" \
-e "s*{{spool_dir}}*${SPOOLDIR}*g" \
-e "s*{{bindir}}*${BINDIR}*g" \
-e "s*{{libdir}}*${LIBDIR}${ELIXIR_LIBDIR}*g" \
-e "s*ERTS_VSN*# ERTS_VSN*g" \
-e "s*{{iexpath}}*${IEX}*g" \
-e "s*{{erl}}*${ERL}*g" \
-e "s*{{epmd}}*${EPMD}*g" ejabberdctl.template \
> ejabberdctl.example
scripts: ejabberd.init ejabberd.service ejabberdctl.example
#.
#' install
#
install: copy-files install-main
install-rel: copy-files-rel install-main
install-main:
#
# Configuration files
$(INSTALL) -d -m 750 $(G_USER) $(DESTDIR)$(ETCDIR)
[ -f $(DESTDIR)$(ETCDIR)/ejabberd.yml ] \
&& $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(DESTDIR)$(ETCDIR)/ejabberd.yml-new \
|| $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(DESTDIR)$(ETCDIR)/ejabberd.yml
[ -f $(DESTDIR)$(ETCDIR)/ejabberdctl.cfg ] \
&& $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(DESTDIR)$(ETCDIR)/ejabberdctl.cfg-new \
|| $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(DESTDIR)$(ETCDIR)/ejabberdctl.cfg
$(INSTALL) -b -m 644 $(G_USER) inetrc $(DESTDIR)$(ETCDIR)/inetrc
#
# Administration script
[ -d $(DESTDIR)$(SBINDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(SBINDIR)
$(INSTALL) -m 550 $(G_USER) ejabberdctl.example $(DESTDIR)$(SBINDIR)/ejabberdctl
# Elixir binaries
[ -d $(DESTDIR)$(BINDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)
[ -f $(DEPSDIR)/elixir/bin/iex ] && $(INSTALL) -m 550 $(G_USER) $(DEPSDIR)/elixir/bin/iex $(DESTDIR)$(BINDIR)/iex || true
[ -f $(DEPSDIR)/elixir/bin/elixir ] && $(INSTALL) -m 550 $(G_USER) $(DEPSDIR)/elixir/bin/elixir $(DESTDIR)$(BINDIR)/elixir || true
[ -f $(DEPSDIR)/elixir/bin/mix ] && $(INSTALL) -m 550 $(G_USER) $(DEPSDIR)/elixir/bin/mix $(DESTDIR)$(BINDIR)/mix || true
#
# Spool directory
$(INSTALL) -d -m 750 $(O_USER) $(SPOOLDIR)
$(CHOWN_COMMAND) -R @INSTALLUSER@ $(SPOOLDIR) >$(CHOWN_OUTPUT)
chmod -R 750 $(SPOOLDIR)
[ ! -f $(COOKIEFILE) ] || { $(CHOWN_COMMAND) @INSTALLUSER@ $(COOKIEFILE) >$(CHOWN_OUTPUT) ; chmod 400 $(COOKIEFILE) ; }
#
# ejabberdctl lock directory
$(INSTALL) -d -m 750 $(O_USER) $(CTLLOCKDIR)
$(CHOWN_COMMAND) -R @INSTALLUSER@ $(CTLLOCKDIR) >$(CHOWN_OUTPUT)
chmod -R 750 $(CTLLOCKDIR)
$(INSTALL) -d -m 750 $(O_USER) $(DESTDIR)$(SPOOLDIR)
$(CHOWN_COMMAND) -R $(INSTALLUSER) $(DESTDIR)$(SPOOLDIR) >$(CHOWN_OUTPUT)
chmod -R 750 $(DESTDIR)$(SPOOLDIR)
#
# Log directory
$(INSTALL) -d -m 750 $(O_USER) $(LOGDIR)
$(CHOWN_COMMAND) -R @INSTALLUSER@ $(LOGDIR) >$(CHOWN_OUTPUT)
chmod -R 750 $(LOGDIR)
$(INSTALL) -d -m 750 $(O_USER) $(DESTDIR)$(LOGDIR)
$(CHOWN_COMMAND) -R $(INSTALLUSER) $(DESTDIR)$(LOGDIR) >$(CHOWN_OUTPUT)
chmod -R 750 $(DESTDIR)$(LOGDIR)
#
# Documentation
$(INSTALL) -d $(DOCDIR)
[ -f doc/guide.html ] \
&& $(INSTALL) -m 644 doc/guide.html $(DOCDIR) \
|| echo "Documentation not included in sources"
$(INSTALL) -m 644 COPYING $(DOCDIR)
$(INSTALL) -d $(DESTDIR)$(MANDIR)
$(INSTALL) -d $(DESTDIR)$(DOCDIR)
[ -f man/ejabberd.yml.5 ] \
&& $(INSTALL) -m 644 man/ejabberd.yml.5 $(DESTDIR)$(MANDIR) \
|| echo "Man page not included in sources"
$(INSTALL) -m 644 COPYING $(DESTDIR)$(DOCDIR)
#.
#' uninstall
#
uninstall: uninstall-binary
uninstall-rel: uninstall-binary uninstall-librel
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
rm -fr $(BEAMDIR)
rm -f $(INCLUDEDIR)/*.hrl
rm -fr $(INCLUDEDIR)
rm -fr $(PBINDIR)
rm -f $(SODIR)/*.so
rm -fr $(SODIR)
rm -f $(MSGSDIR)/*.msgs
rm -fr $(MSGSDIR)
rm -f $(SQLDIR)/*.sql
rm -fr $(SQLDIR)
rm -fr $(PRIVDIR)
rm -fr $(EJABBERDDIR)
rm -f $(DESTDIR)$(SBINDIR)/ejabberdctl
rm -f $(DESTDIR)$(BINDIR)/iex
rm -f $(DESTDIR)$(BINDIR)/elixir
rm -f $(DESTDIR)$(BINDIR)/mix
rm -fr $(DESTDIR)$(DOCDIR)
rm -f $(DESTDIR)$(BEAMDIR)/*.beam
rm -f $(DESTDIR)$(BEAMDIR)/*.app
rm -fr $(DESTDIR)$(BEAMDIR)
rm -f $(DESTDIR)$(INCLUDEDIR)/*.hrl
rm -fr $(DESTDIR)$(INCLUDEDIR)
rm -fr $(DESTDIR)$(PBINDIR)
rm -f $(DESTDIR)$(SODIR)/*.so
rm -fr $(DESTDIR)$(SODIR)
rm -f $(DESTDIR)$(MSGSDIR)/*.msg
rm -fr $(DESTDIR)$(MSGSDIR)
rm -f $(DESTDIR)$(CSSDIR)/*.css
rm -fr $(DESTDIR)$(CSSDIR)
rm -f $(DESTDIR)$(IMGDIR)/*.png
rm -fr $(DESTDIR)$(IMGDIR)
rm -f $(DESTDIR)$(JSDIR)/*.js
rm -fr $(DESTDIR)$(JSDIR)
rm -f $(DESTDIR)$(SQLDIR)/*.sql
rm -fr $(DESTDIR)$(SQLDIR)
rm -fr $(DESTDIR)$(LUADIR)/*.lua
rm -fr $(DESTDIR)$(LUADIR)
rm -fr $(DESTDIR)$(PRIVDIR)
rm -fr $(DESTDIR)$(EJABBERDDIR)
rm -f $(DESTDIR)$(MANDIR)/ejabberd.yml.5
uninstall-all: uninstall-binary
rm -rf $(ETCDIR)
rm -rf $(EJABBERDDIR)
rm -rf $(SPOOLDIR)
rm -rf $(CTLLOCKDIR)
rm -rf $(LOGDIR)
rm -rf $(DESTDIR)$(ETCDIR)
rm -rf $(DESTDIR)$(EJABBERDDIR)
rm -rf $(DESTDIR)$(SPOOLDIR)
rm -rf $(DESTDIR)$(LOGDIR)
#.
#' clean
#
clean:
rm -rf deps/.got
rm -rf deps/.built
rm -rf $(DEPSDIR)/.got
rm -rf $(DEPSDIR)/.built
rm -rf test/*.beam
$(REBAR) clean
rm -f rebar.lock
rm -f ejabberdctl.example ejabberd.init ejabberd.service
$(REBAR) clean $(CLEANARG)
clean-rel:
rm -rf rel/ejabberd
distclean: clean clean-rel
rm -f aclocal.m4
rm -f config.status
rm -f config.log
rm -rf autom4te.cache
rm -rf $(EBINDIR)
rm -rf $(DEPSBASE)
rm -rf deps
rm -rf ebin
rm -f Makefile
rm -f vars.config
rm -f src/ejabberd.app.src
[ ! -f ../ChangeLog ] || rm -f ../ChangeLog
rel: all
$(REBAR) generate
#.
#' releases
#
rel: prod
prod:
$(PREPARE_ELIXIR_SCRIPTS)
$(REBARREL)
DEV_CONFIG = _build/dev/rel/ejabberd/conf/ejabberd.yml
dev $(DEV_CONFIG):
$(PREPARE_ELIXIR_SCRIPTS)
$(REBARDEV)
#.
#' tags
#
TAGS:
etags *.erl
etags src/*.erl
#.
#' makefile
#
Makefile: Makefile.in
deps := $(wildcard deps/*/ebin)
#.
#' dialyzer
#
ifeq "$(REBAR_VER)" "6" # Mix
dialyzer:
MIX_ENV=test $(REBAR) dialyzer
else
ifeq "$(REBAR_VER)" "3" # Rebar3
dialyzer:
$(REBAR) dialyzer
else # Rebar2
deps := $(wildcard $(DEPSDIR)/*/ebin)
dialyzer/erlang.plt:
@mkdir -p dialyzer
@$(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 \
runtime_tools asn1 observer xmerl et gs wx syntax_tools; \
public_key ssl mnesia inets odbc compiler erts \
os_mon asn1 syntax_tools; \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
dialyzer/deps.plt:
@mkdir -p dialyzer
@$(MKDIR_P) dialyzer
@dialyzer --build_plt --output_plt dialyzer/deps.plt \
-o dialyzer/deps.log $(deps); \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
dialyzer/ejabberd.plt:
@mkdir -p dialyzer
@$(MKDIR_P) dialyzer
@dialyzer --build_plt --output_plt dialyzer/ejabberd.plt \
-o dialyzer/ejabberd.log ebin; \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
@ -327,17 +639,79 @@ dialyzer: erlang_plt deps_plt ejabberd_plt
@dialyzer --plts dialyzer/*.plt --no_check_plt \
--get_warnings -o dialyzer/error.log ebin; \
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
endif
endif
#.
#' elvis
#
elvis:
$(REBAR) lint
#.
#' test
#
test:
@echo "************************** NOTICE ***************************************"
@cat test/README
@echo "*************************************************************************"
@cd priv && ln -sf ../sql
$(REBAR) skip_deps=true ct
$(REBAR) $(SKIPDEPS) ct
quicktest:
$(REBAR) skip_deps=true ct suites=elixir
test-eunit:
$(REBAR) $(SKIPDEPS) eunit --verbose
.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
#.
#' phony
#
.PHONY: src edoc dialyzer Makefile TAGS clean clean-rel distclean prod rel \
install uninstall uninstall-binary uninstall-all translations deps test test-eunit \
all dev doap help install-rel relive scripts uninstall-rel update \
erlang_plt deps_plt ejabberd_plt xref hooks options format indent
#.
#' help
#
help:
@echo ""
@echo " [all] "
@echo " scripts Prepare ejabberd start scripts"
@echo " deps Get and configure dependencies"
@echo " src Compile dependencies and ejabberd"
@echo " update Update dependencies source code"
@echo " clean Clean binary files"
@echo " distclean Clean completely the development files"
@echo ""
@echo " install Install ejabberd to /usr/local"
@echo " install-rel Install ejabberd to /usr/local (using release)"
@echo " uninstall Uninstall ejabberd (buggy)"
@echo " uninstall-rel Uninstall ejabberd (using release)"
@echo " uninstall-all Uninstall also configuration, logs, mnesia... (buggy)"
@echo ""
@echo " prod Build a production release"
@echo " dev Build a development release"
@echo " relive Start a live ejabberd in _build/relive/"
@echo ""
@echo " doap Generate DOAP file"
@echo " edoc Generate EDoc documentation [mix]"
@echo " options Generate ejabberd_option.erl"
@echo " translations Extract translation files"
@echo " TAGS Generate tags file for text editors"
@echo ""
@echo " format Format source code using rebar3_format [rebar3]"
@echo " indent Indent source code using erlang-mode [emacs]"
@echo ""
@echo " dialyzer Run Dialyzer static analyzer"
@echo " elvis Run Elvis source code style reviewer [rebar3]"
@echo " hooks Run hooks validator"
@echo " test Run Common Tests suite [rebar3]"
@echo " test-eunit Run EUnit suite [rebar3]"
@echo " xref Run cross reference analysis [rebar3]"
#.
#'
# vim: foldmarker=#',#. foldmethod=marker:

174
README
View File

@ -1,174 +0,0 @@
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).
- IRC transport.
- Component support: interface with networks such as AIM, ICQ and MSN.
Quickstart guide
----------------
### 0. Requirements
To compile ejabberd you need:
- GNU Make.
- GCC.
- Libexpat 1.95 or higher.
- Libyaml 0.1.4 or higher.
- Erlang/OTP 17.1 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.
### 1. Compile and install on *nix systems
To compile ejabberd, execute the following commands. The first one is only
necessary if your source tree didn't come with a `configure` script.
./autogen.sh
./configure
make
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/`
### 2. Start ejabberd
You can use the `ejabberdctl` command line administration script to
start and stop ejabberd. For example:
ejabberdctl start
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

View File

@ -1 +0,0 @@
README

132
README.md Normal file
View File

@ -0,0 +1,132 @@
<p align="center">
<img src="https://www.process-one.net/wp-content/uploads/2022/05/ejabberd-logo-rounded-index.png">
</p>
<p align="center">
<a href="https://github.com/processone/ejabberd/tags" alt="GitHub tag (latest SemVer)">
<img src="https://img.shields.io/github/v/tag/processone/ejabberd?sort=semver&logo=embarcadero&label=&color=3fb0d2&logoWidth=20" /></a>
<a href="https://hex.pm/packages/ejabberd" alt="Hex version">
<img src="https://img.shields.io/hexpm/v/ejabberd.svg" /></a>
<a href="https://formulae.brew.sh/formula/ejabberd" alt="homebrew version">
<img src="https://img.shields.io/homebrew/v/ejabberd" /></a>
<a href="https://hub.docker.com/r/ejabberd/ecs/" alt="Docker Image Version (latest semver)">
<img src="https://img.shields.io/docker/v/ejabberd/ecs?label=ecs&logo=docker" /></a>
<a href="https://github.com/processone/ejabberd/pkgs/container/ejabberd" alt="GitHub Container">
<img src="https://img.shields.io/github/v/tag/processone/ejabberd?label=ejabberd&sort=semver&logo=docker" /></a>
<br />
<a href="https://github.com/processone/ejabberd/actions/workflows/ci.yml" alt="CI">
<img src="https://github.com/processone/ejabberd/actions/workflows/ci.yml/badge.svg" /></a>
<a href="https://coveralls.io/github/processone/ejabberd?branch=master" alt="Coverage Status">
<img src="https://coveralls.io/repos/github/processone/ejabberd/badge.svg?branch=master" /></a>
<a href="https://hosted.weblate.org/projects/ejabberd/ejabberd-po/" alt="Translation status">
<img src="https://hosted.weblate.org/widgets/ejabberd/-/ejabberd-po/svg-badge.svg" /></a>
<a href="https://docs.ejabberd.im/" alt="ejabberd Docs">
<img src="https://img.shields.io/github/v/tag/processone/docs.ejabberd.im?sort=semver&logo=&label=docs&logoWidth=0" /></a>
</p>
[ejabberd][im] is an open-source,
robust, scalable and extensible realtime platform built using [Erlang/OTP][erlang],
that includes [XMPP][xmpp] Server, [MQTT][mqtt] Broker and [SIP][sip] Service.
Check the features in [ejabberd.im][im], [ejabberd Docs][features],
[ejabberd at ProcessOne][p1home], and the list of [supported protocols in ProcessOne][xeps]
and [XMPP.org][xmppej].
Installation
------------
There are several ways to install ejabberd:
- Source code: compile yourself, see [COMPILE](COMPILE.md)
- Installers: [ProcessOne Download][p1download] and [GitHub Releases][releases] for releases, [GitHub Actions](https://github.com/processone/ejabberd/actions/workflows/installers.yml) for master branch (run/deb/rpm for x64 and arm64)
- `ecs` container image: [Docker Hub][hubecs] and [Github Packages][packagesecs], see [ecs README][docker-ecs-readme] (for x64)
- `ejabberd` container image: [Github Packages][packages] for releases and master branch, see [CONTAINER](CONTAINER.md) (for x64 and arm64)
- Using your [Operating System package][osp]
- Using the [Homebrew][homebrew] package manager
Documentation
-------------
Please check the [ejabberd Docs][docs] website.
When compiling from source code, you can get some help with:
./configure --help
make help
Once ejabberd is installed, try:
ejabberdctl help
man ejabberd.yml
Development
-----------
Bug reports and features are tracked using [GitHub Issues][issues],
please check [CONTRIBUTING](CONTRIBUTING.md) for details.
Translations can be improved online [using Weblate][weblate]
or in your local machine as explained in [Localization][localization].
Documentation for developers is available in [ejabberd docs: Developers][docs-dev].
There are nightly builds of ejabberd, both for `master` branch and for Pull Requests:
- Installers: go to [GitHub Actions: Installers](https://github.com/processone/ejabberd/actions/workflows/installers.yml), open the most recent commit, on the bottom of that commit page, download the `ejabberd-packages.zip` artifact.
- `ejabberd` container image: go to [ejabberd Github Packages][packages]
Security reports or concerns should preferably be reported privately,
please send an email to the address: contact at process-one dot net
or some other method from [ProcessOne Contact][p1contact].
For commercial offering and support, including [ejabberd Business Edition][p1home]
and [Fluux (ejabberd in the Cloud)][fluux], please check [ProcessOne ejabberd page][p1home].
Community
---------
There are several places to get in touch with other ejabberd developers and administrators:
- ejabberd XMPP chatroom: [ejabberd@conference.process-one.net][muc]
- [GitHub Discussions][discussions]
- [Stack Overflow][stackoverflow]
License
-------
ejabberd is released under the GNU General Public License v2 (see [COPYING](COPYING)),
and [ejabberd translations](https://github.com/processone/ejabberd-po/) under MIT License.
[discussions]: https://github.com/processone/ejabberd/discussions
[docker-ecs-readme]: https://github.com/processone/docker-ejabberd/tree/master/ecs#readme
[docs-dev]: https://docs.ejabberd.im/developer/
[docs]: https://docs.ejabberd.im
[erlang]: https://www.erlang.org/
[features]: https://docs.ejabberd.im/admin/introduction/
[fluux]: https://fluux.io/
[homebrew]: https://docs.ejabberd.im/admin/install/homebrew/
[hubecs]: https://hub.docker.com/r/ejabberd/ecs/
[im]: https://ejabberd.im/
[issues]: https://github.com/processone/ejabberd/issues
[localization]: https://docs.ejabberd.im/developer/extending-ejabberd/localization/
[mqtt]: https://mqtt.org/
[muc]: xmpp:ejabberd@conference.process-one.net
[osp]: https://docs.ejabberd.im/admin/install/os-package/
[p1contact]: https://www.process-one.net/en/company/contact/
[p1download]: https://www.process-one.net/en/ejabberd/downloads/
[p1home]: https://www.process-one.net/en/ejabberd/
[packages]: https://github.com/processone/ejabberd/pkgs/container/ejabberd
[packagesecs]: https://github.com/processone/docker-ejabberd/pkgs/container/ecs
[releases]: https://github.com/processone/ejabberd/releases
[sip]: https://en.wikipedia.org/wiki/Session_Initiation_Protocol
[stackoverflow]: https://stackoverflow.com/questions/tagged/ejabberd?sort=newest
[weblate]: https://hosted.weblate.org/projects/ejabberd/ejabberd-po/
[xeps]: https://www.process-one.net/en/ejabberd/protocols/
[xmpp]: https://xmpp.org/
[xmppej]: https://xmpp.org/software/servers/ejabberd/

View File

@ -0,0 +1,2 @@
{erl_opts, [debug_info]}.
{deps, []}.

View File

@ -0,0 +1,9 @@
{application, configure_deps,
[{description, "A rebar3 plugin to explicitly run configure on dependencies"},
{vsn, "0.0.1"},
{registered, []},
{applications, [kernel, stdlib]},
{env,[]},
{modules, []},
{links, []}
]}.

View File

@ -0,0 +1,8 @@
-module(configure_deps).
-export([init/1]).
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
init(State) ->
{ok, State1} = configure_deps_prv:init(State),
{ok, State1}.

View File

@ -0,0 +1,54 @@
-module(configure_deps_prv).
-export([init/1, do/1, format_error/1]).
-define(PROVIDER, 'configure-deps').
-define(DEPS, [install_deps]).
%% ===================================================================
%% Public API
%% ===================================================================
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
init(State) ->
Provider = providers:create([
{namespace, default},
{name, ?PROVIDER}, % The 'user friendly' name of the task
{module, ?MODULE}, % The module implementation of the task
{bare, true}, % The task can be run by the user, always true
{deps, ?DEPS}, % The list of dependencies
{example, "rebar3 configure-deps"}, % How to use the plugin
{opts, []}, % list of options understood by the plugin
{short_desc, "Explicitly run ./configure for dependencies"},
{desc, "A rebar plugin to allow explicitly running ./configure on dependencies. Useful if dependencies might change prior to compilation when configure is run."}
]),
{ok, rebar_state:add_provider(State, Provider)}.
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
do(State) ->
Apps = rebar_state:project_apps(State) ++ lists:usort(rebar_state:all_deps(State)),
lists:foreach(fun do_app/1, Apps),
{ok, State}.
exec_configure({'configure-deps', Cmd}, Dir) ->
rebar_utils:sh(Cmd, [{cd, Dir}, {use_stdout, true}]);
exec_configure(_, Acc) -> Acc.
parse_pre_hooks({pre_hooks, PreHooks}, Acc) ->
lists:foldl(fun exec_configure/2, Acc, PreHooks);
parse_pre_hooks(_, Acc) -> Acc.
parse_additions({add, App, Additions}, {MyApp, Dir}) when App == MyApp ->
lists:foldl(fun parse_pre_hooks/2, Dir, Additions),
{MyApp, Dir};
parse_additions(_, Acc) -> Acc.
do_app(App) ->
Dir = rebar_app_info:dir(App),
Opts = rebar_app_info:opts(App),
Overrides = rebar_opts:get(Opts, overrides),
lists:foldl(fun parse_additions/2, {binary_to_atom(rebar_app_info:name(App), utf8), Dir}, Overrides).
-spec format_error(any()) -> iolist().
format_error(Reason) ->
io_lib:format("~p", [Reason]).

View File

@ -1,14 +0,0 @@
XmppAddr { iso(1) identified-organization(3)
dod(6) internet(1) security(5) mechanisms(5) pkix(7)
id-on(8) id-on-xmppAddr(5) }
DEFINITIONS EXPLICIT TAGS ::=
BEGIN
id-on-xmppAddr OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
dod(6) internet(1) security(5) mechanisms(5) pkix(7)
id-on(8) 5 }
XmppAddr ::= UTF8String
END

View File

@ -1,10 +0,0 @@
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: 'mnesiadb/'

View File

@ -4,17 +4,15 @@ defmodule Ejabberd.ConfigFile do
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]
shaper: shaper(),
acl: acl(),
access: access()]
end
defp shaper do
@ -61,7 +59,6 @@ defmodule Ejabberd.ConfigFile do
@opts [
port: 5280,
web_admin: true,
http_poll: true,
http_bind: true,
captcha: true]
end
@ -84,7 +81,7 @@ defmodule Ejabberd.ConfigFile do
module :mod_client_state do
@opts [
drop_chat_states: true,
queue_chat_states: true,
queue_presence: false]
end
@ -94,9 +91,6 @@ defmodule Ejabberd.ConfigFile do
module :mod_disco do
end
module :mod_irc do
end
module :mod_http_bind do
end
@ -135,9 +129,10 @@ defmodule Ejabberd.ConfigFile do
module :mod_register do
@opts [welcome_message: [
subject: "Welcome!",
body: "Hi.\nWelcome to this XMPP Server",
body: "Hi.\nWelcome to this XMPP server"
],
ip_access: :trusted_network,
access: :register]]
access: :register]
end
module :mod_roster do

View File

@ -1,667 +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/
### 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:
drop_chat_states: true
queue_presence: false
mod_configure: {} # requires mod_adhoc
mod_disco: {}
## mod_echo: {}
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
## 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

15
config/runtime.exs Normal file
View File

@ -0,0 +1,15 @@
import Config
rootdefault = case System.get_env("RELIVE", "false") do
"true" -> "_build/relive"
"false" -> ""
end
rootpath = System.get_env("RELEASE_ROOT", rootdefault)
config :ejabberd,
file: Path.join(rootpath, "conf/ejabberd.yml"),
log_path: Path.join(rootpath, "logs/ejabberd.log")
config :mnesia,
dir: Path.join(rootpath, "database/")
config :exsync,
reload_callback: {:ejabberd_admin, :update, []}

View File

@ -1,16 +1,18 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
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.1 (Erlang/OTP 17.1)"
REQUIRE_ERLANG_MAX="9.0.0 (No Max)"
AC_PREREQ(2.59)
AC_INIT(ejabberd, m4_esyscmd([echo `git describe --tags 2>/dev/null || echo 24.10` | sed 's/-g.*//;s/-/./' | tr -d '\012']), [ejabberd@process-one.net], [ejabberd])
REQUIRE_ERLANG_MIN="9.0.5 (Erlang/OTP 20.0)"
REQUIRE_ERLANG_MAX="100.0.0 (No Max)"
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_MAKE_SET
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_MKDIR_P
AC_PROG_SED
if test "x$GCC" = "xyes"; then
@ -19,8 +21,7 @@ fi
# Checks Erlang runtime and compiler
AC_ARG_WITH(erlang,
AC_HELP_STRING([--with-erlang=dir],
[search for erlang in dir]),
AS_HELP_STRING([--with-erlang=dir],[search for erlang in dir]),
[if test "$withval" = "yes" -o "$withval" = "no" -o "X$with_erlang" = "X"; then
extra_erl_path=""
else
@ -28,25 +29,46 @@ else
fi
])
AC_ARG_WITH(rebar,
AS_HELP_STRING([--with-rebar=bin],[use as build tool the rebar/rebar3/mix binary specified]),
[if test "$withval" = "yes" -o "$withval" = "no" -o "X$with_rebar" = "X"; then
rebar="rebar3"
else
rebar="$with_rebar"
fi
], [rebar="unconfigured"])
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_PATH_TOOL(REBAR, rebar, , [${extra_erl_path}$PATH])
AC_PATH_TOOL(REBAR3, rebar3, , [${extra_erl_path}$PATH])
AC_PATH_TOOL(ELIXIR, elixir, , [${extra_erl_path}$PATH])
AC_PATH_TOOL(IEX, iex, , [${extra_erl_path}$PATH])
AC_PATH_TOOL(MIX, mix, , [${extra_erl_path}$PATH])
if test "$rebar" = unconfigured; then
if test "x$ELIXIR" = "x" -o "x$IEX" = "x" -o "x$MIX" = "x"; then
if test "x$REBAR3" = "x"; then
rebar="rebar3"
else
rebar=$REBAR3
fi
else
rebar=$MIX
fi
fi
if test "x$rebar" = "xrebar" -a "x$REBAR" = "x" ; then
rebar="./rebar"
fi
if test "x$rebar" = "xrebar3" -a "x$REBAR3" = "x" ; then
rebar="./rebar3"
fi
AC_ERLANG_NEED_ERL
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
yes|'')
ERLANG_VERSION_CHECK([$REQUIRE_ERLANG_MIN],[$REQUIRE_ERLANG_MAX])
;;
no)
ERLANG_VERSION_CHECK([$REQUIRE_ERLANG_MIN],[$REQUIRE_ERLANG_MAX],[warn])
;;
esac
# Checks and sets ERLANG_ROOT_DIR and ERLANG_LIB_DIR variable
AC_ERLANG_SUBST_ROOT_DIR
# AC_ERLANG_SUBST_LIB_DIR
@ -66,159 +88,191 @@ 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)])],
[case "${enableval}" in
yes) hipe=true ;;
no) hipe=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-hipe) ;;
esac],[hipe=false])
AC_ARG_ENABLE(roster_gateway_workaround,
[AC_HELP_STRING([--enable-roster-gateway-workaround], [turn on workaround for processing gateway subscriptions (default: no)])],
[case "${enableval}" in
yes) roster_gateway_workaround=true ;;
no) roster_gateway_workaround=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-roster-gateway-workaround) ;;
esac],[roster_gateway_workaround=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)])],
[case "${enableval}" in
yes) full_xml=true ;;
no) full_xml=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-full-xml) ;;
esac],[full_xml=false])
AC_ARG_ENABLE(mssql,
[AC_HELP_STRING([--enable-mssql], [use Microsoft SQL Server database (default: no, requires --enable-odbc)])],
[case "${enableval}" in
yes) db_type=mssql ;;
no) db_type=generic ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-mssql) ;;
esac],[db_type=generic])
AC_CONFIG_FILES([Makefile
vars.config])
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-debug --enable-tools (useful for Dialyzer checks, default: no)])],
[AS_HELP_STRING([--enable-all],[same as --enable-odbc --enable-mssql --enable-mysql --enable-pgsql --enable-sqlite --enable-pam --enable-zlib --enable-redis --enable-elixir --enable-stun --enable-sip --enable-debug --enable-lua --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 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 debug=false tools=false ;;
yes) odbc=true mssql=true mysql=true pgsql=true sqlite=true pam=true zlib=true redis=true elixir=true stun=true sip=true debug=true lua=true tools=true ;;
no) odbc=false mssql=false mysql=false pgsql=false sqlite=false pam=false zlib=false redis=false elixir=false stun=false sip=false debug=false lua=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 (default: no)])],
[case "${enableval}" in
yes) tools=true ;;
no) tools=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-tools) ;;
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)])],
[case "${enableval}" in
yes) odbc=true ;;
no) odbc=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-odbc) ;;
esac],[if test "x$odbc" = "x"; then odbc=false; fi])
AC_ARG_ENABLE(mysql,
[AC_HELP_STRING([--enable-mysql], [enable MySQL support (default: no)])],
[case "${enableval}" in
yes) mysql=true ;;
no) mysql=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-mysql) ;;
esac],[if test "x$mysql" = "x"; then mysql=false; fi])
AC_ARG_ENABLE(pgsql,
[AC_HELP_STRING([--enable-pgsql], [enable PostgreSQL support (default: no)])],
[case "${enableval}" in
yes) pgsql=true ;;
no) pgsql=false ;;
*) 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
yes) pam=true ;;
no) pam=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pam) ;;
esac],[if test "x$pam" = "x"; then pam=false; fi])
AC_ARG_ENABLE(zlib,
[AC_HELP_STRING([--enable-zlib], [enable Stream Compression (XEP-0138) using zlib (default: yes)])],
[case "${enableval}" in
yes) zlib=true ;;
no) zlib=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-zlib) ;;
esac],[if test "x$zlib" = "x"; then zlib=true; fi])
AC_ARG_ENABLE(riak,
[AC_HELP_STRING([--enable-riak], [enable Riak support (default: no)])],
[case "${enableval}" in
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(redis,
[AC_HELP_STRING([--enable-redis], [enable Redis support (default: no)])],
[case "${enableval}" in
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)])],
[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])
AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-debug], [enable debug information (default: yes)])],
[AS_HELP_STRING([--enable-debug],[enable debug information (default: yes)])],
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],[if test "x$debug" = "x"; then debug=true; fi])
AC_ARG_ENABLE(elixir,
[AS_HELP_STRING([--enable-elixir],[enable Elixir support in Rebar3 (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(erlang-version-check,
[AS_HELP_STRING([--enable-erlang-version-check],[Check Erlang/OTP version (default: yes)])])
case "$enable_erlang_version_check" in
yes|'')
ERLANG_VERSION_CHECK([$REQUIRE_ERLANG_MIN],[$REQUIRE_ERLANG_MAX])
;;
no)
ERLANG_VERSION_CHECK([$REQUIRE_ERLANG_MIN],[$REQUIRE_ERLANG_MAX],[warn])
;;
esac
AC_ARG_ENABLE(full_xml,
[AS_HELP_STRING([--enable-full-xml],[use XML features in XMPP stream (ex: CDATA) (default: no, requires XML compliant clients)])],
[case "${enableval}" in
yes) full_xml=true ;;
no) full_xml=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-full-xml) ;;
esac],[full_xml=false])
ENABLEGROUP=""
AC_ARG_ENABLE(group,
[AS_HELP_STRING([--enable-group[[=GROUP]]], [specify the group of the account defined in --enable-user (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_ARG_ENABLE(latest_deps,
[AC_HELP_STRING([--enable-latest-deps], [makes rebar use latest commits for dependences instead of tagged versions (default: no)])],
[AS_HELP_STRING([--enable-latest-deps],[makes rebar use latest commits for dependencies instead of tagged versions (default: no)])],
[case "${enableval}" in
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_CONFIG_FILES([Makefile
vars.config
src/ejabberd.app.src])
AC_ARG_ENABLE(lua,
[AS_HELP_STRING([--enable-lua],[enable Lua support, to import from Prosody (default: no)])],
[case "${enableval}" in
yes) lua=true ;;
no) lua=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-lua) ;;
esac],[if test "x$lua" = "x"; then lua=false; fi])
AC_ARG_ENABLE(mssql,
[AS_HELP_STRING([--enable-mssql],[use Microsoft SQL Server database (default: no, requires --enable-odbc)])],
[case "${enableval}" in
yes) mssql=true ;;
no) mssql=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-mssql) ;;
esac],[if test "x$mssql" = "x"; then mssql=false; fi])
AC_ARG_ENABLE(mysql,
[AS_HELP_STRING([--enable-mysql],[enable MySQL support (default: no)])],
[case "${enableval}" in
yes) mysql=true ;;
no) mysql=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-mysql) ;;
esac],[if test "x$mysql" = "x"; then mysql=false; fi])
AC_ARG_ENABLE(new_sql_schema,
[AS_HELP_STRING([--enable-new-sql-schema],[use new SQL schema by default (default: no)])],
[case "${enableval}" in
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(odbc,
[AS_HELP_STRING([--enable-odbc],[enable pure ODBC support (default: no)])],
[case "${enableval}" in
yes) odbc=true ;;
no) odbc=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-odbc) ;;
esac],[if test "x$odbc" = "x"; then odbc=false; fi])
AC_ARG_ENABLE(pam,
[AS_HELP_STRING([--enable-pam],[enable PAM support (default: no)])],
[case "${enableval}" in
yes) pam=true ;;
no) pam=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pam) ;;
esac],[if test "x$pam" = "x"; then pam=false; fi])
AC_ARG_ENABLE(pgsql,
[AS_HELP_STRING([--enable-pgsql],[enable PostgreSQL support (default: no)])],
[case "${enableval}" in
yes) pgsql=true ;;
no) pgsql=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pgsql) ;;
esac],[if test "x$pgsql" = "x"; then pgsql=false; fi])
AC_ARG_ENABLE(redis,
[AS_HELP_STRING([--enable-redis],[enable Redis support (default: no)])],
[case "${enableval}" in
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(roster_gateway_workaround,
[AS_HELP_STRING([--enable-roster-gateway-workaround],[turn on workaround for processing gateway subscriptions (default: no)])],
[case "${enableval}" in
yes) roster_gateway_workaround=true ;;
no) roster_gateway_workaround=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-roster-gateway-workaround) ;;
esac],[roster_gateway_workaround=false])
AC_ARG_ENABLE(sip,
[AS_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_ARG_ENABLE(sqlite,
[AS_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(stun,
[AS_HELP_STRING([--enable-stun],[enable STUN/TURN support (default: yes)])],
[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=true; fi])
AC_ARG_ENABLE(system_deps,
[AS_HELP_STRING([--enable-system-deps],[makes rebar use locally installed dependencies instead of downloading them (default: no)])],
[case "${enableval}" in
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(tools,
[AS_HELP_STRING([--enable-tools],[include debugging/development tools (default: no)])],
[case "${enableval}" in
yes) tools=true ;;
no) tools=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-tools) ;;
esac],[if test "x$tools" = "x"; then tools=false; fi])
ENABLEUSER=""
AC_ARG_ENABLE(user,
[AS_HELP_STRING([--enable-user[[[[=USER]]]]], [allow this system user to start ejabberd (default: no)])],
[AS_HELP_STRING([--enable-user[[=USER]]], [allow this system user to start ejabberd (default: no)])],
[case "${enableval}" in
yes) ENABLEUSER=`whoami` ;;
no) ENABLEUSER="" ;;
@ -230,34 +284,77 @@ if test "$ENABLEUSER" != ""; then
AC_SUBST([INSTALLUSER], [$ENABLEUSER])
fi
ERLANG_DEPRECATED_TYPES_CHECK
AC_ARG_ENABLE(zlib,
[AS_HELP_STRING([--enable-zlib],[enable Stream Compression (XEP-0138) using zlib (default: yes)])],
[case "${enableval}" in
yes) zlib=true ;;
no) zlib=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-zlib) ;;
esac],[if test "x$zlib" = "x"; then zlib=true; fi])
case "`uname`" in
"Darwin")
# Darwin (macos) erlang-sqlite is built using amalgamated lib, so no external dependency
;;
*)
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
;;
esac
AC_MSG_RESULT([build tool to use (change using --with-rebar): $rebar])
AC_SUBST(hipe)
AC_SUBST(roster_gateway_workaround)
AC_SUBST(new_sql_schema)
AC_SUBST(full_xml)
AC_SUBST(db_type)
AC_SUBST(odbc)
AC_SUBST(mssql)
AC_SUBST(mysql)
AC_SUBST(pgsql)
AC_SUBST(sqlite)
AC_SUBST(pam)
AC_SUBST(zlib)
AC_SUBST(riak)
AC_SUBST(rebar)
AC_SUBST(redis)
AC_SUBST(elixir)
AC_SUBST(iconv)
AC_SUBST(stun)
AC_SUBST(sip)
AC_SUBST(debug)
AC_SUBST(lua)
AC_SUBST(tools)
AC_SUBST(latest_deps)
AC_SUBST(system_deps)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_OUTPUT
AS_CASE([$rebar],
[*rebar3], [
deps=""
AS_IF([test "x$stun" = "xfalse"], [deps="stun,$deps"])
AS_IF([test "x$sqlite" = "xfalse"], [deps="sqlite3,$deps"])
AS_IF([test "x$pgsql" = "xfalse"], [deps="p1_pgsql,$deps"])
AS_IF([test "x$mysql" = "xfalse"], [deps="p1_mysql,$deps"])
AS_IF([test "x$zlib" = "xfalse"], [deps="ezlib,$deps"])
AS_IF([test "x$sip" = "xfalse"], [deps="esip,$deps"])
AS_IF([test "x$redis" = "xfalse"], [deps="eredis,$deps"])
AS_IF([test "x$pam" = "xfalse"], [deps="epam,$deps"])
AS_IF([test "x$deps" = "x"], [],
[AC_MSG_NOTICE([unlocking disabled rebar3 dependencies: $deps])
$rebar unlock "$deps"])
deps=""
ERLANG_VERSION=m4_esyscmd([erl -noinput -noshell -eval 'erlang:display(list_to_integer(erlang:system_info(otp_release))), halt().'])
AS_IF([test "$ERLANG_VERSION" -lt "21"], [deps="luerl,$deps"])
AS_IF([test "$ERLANG_VERSION" -lt "22"], [deps="lager,$deps"])
AS_IF([test "$ERLANG_VERSION" -le "23"], [deps="jose,$deps"])
AS_IF([test "$ERLANG_VERSION" -ge "27"], [deps="jiffy,$deps"])
AS_IF([test "x$deps" = "x"], [],
[AC_MSG_NOTICE([unlocking rebar3 dependencies for old Erlang/OTP: $deps])
$rebar unlock "$deps"])
])

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.

View File

@ -1,307 +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});
{match,
_,
{var, _, Name},
{bin,Line,[{bin_element,_,{string,_,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),
print_po_header(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(Language, LastTranslator, AdditionalTranslatorsList) ->
AdditionalTranslatorsString = build_additional_translators(AdditionalTranslatorsList),
HeaderString =
"msgid \"\"\n"
"msgstr \"\"\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]).

View File

@ -1,366 +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 ../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 ../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
echo "%% -*- coding: latin-1 -*-" >$MSGS_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

View File

@ -1,360 +0,0 @@
ejabberd container
- [Introduction](#introduction)
- [Quick Start](#quick-start)
- [Usage](#usage)
- [Persistence](#persistence)
- [SSL Certificates](#ssl-certificates)
- [Base Image](#base-image)
- [Ejabberd Configuration](#ejabberd-configuration)
- [Served Hostnames](#served-hostnames)
- [Authentication](#authentication)
- [Admins](#admins)
- [Users](#users)
- [SSL](#ssl)
- [Modules](#modules)
- [Logging](#logging)
- [Mount Configurations](#mount-configurations)
- [Erlang Configuration](#erlang-configuration)
- [Maintenance](#maintenance)
- [Register Users](#register-users)
- [Creating Backups](#creating-backups)
- [Restoring Backups](#restoring-backups)
- [Debug](#debug)
- [Erlang Shell](#erlang-shell)
- [System Shell](#system-shell)
- [System Commands](#system-commands)
- [Exposed Ports](#exposed-ports)
# Introduction
Dockerfile to build an [ejabberd](https://www.ejabberd.im/) container image.
Docker Tag Names are based on ejabberd versions in git [tags][]. The image tag `:latest` is based on the master branch.
[tags]: https://github.com/rroemhild/ejabberd/tags
# Quick Start
You can start of with the following container:
```bash
docker run -d \
--name "ejabberd" \
-p 5222:5222 \
-p 5269:5269 \
-p 5280:5280 \
-h 'xmpp.example.de' \
-e "XMPP_DOMAIN=example.de" \
-e "ERLANG_NODE=nodename" \
-e "EJABBERD_ADMINS=admin@example.de admin2@example.de" \
-e "EJABBERD_USERS=admin@example.de:password1234 admin2@example.de" \
-e "TZ=Europe/Berlin" \
rroemhild/ejabberd
```
# Usage
## Persistence
For storage of the application data, you can mount volumes at
* `/opt/ejabberd/ssl`
* `/opt/ejabberd/backup`
* `/opt/ejabberd/upload`
* `/opt/ejabberd/database`
or use a data container
```bash
docker create --name ejabberd-data rroemhild/ejabberd-data
docker run -d --name ejabberd --volumes-from processone-data rroemhild/ejabberd
```
## SSL Certificates
TLS is enabled by default and the run script will auto-generate two snake-oil certificates during boot if you don't provide your SSL certificates.
To use your own certificates, there are two options.
1. Mount the volume `/opt/ejabberd/ssl` to a local directory with the `.pem` files:
* /tmp/ssl/host.pem (SERVER_HOSTNAME)
* /tmp/ssl/xmpp_domain.pem (XMPP_DOMAIN)
Make sure that the certificate and private key are in one `.pem` file. If one file is missing it will be auto-generated. I.e. you can provide your certificate for your **XMMP_DOMAIN** and use a snake-oil certificate for the `SERVER_HOSTNAME`.
2. Specify the certificates via environment variables: **EJABBERD_SSLCERT_HOST** and **EJABBERD_SSLCERT_EXAMPLE_COM**. For the
domain certificates, make sure you match the domain names given in **XMPP_DOMAIN** and replace dots and dashes with underscore.
## Base Image
Build your own ejabberd container image and add your config templates, certificates or [extend](#cluster-example) it for your needs.
```
FROM rroemhild/ejabberd
ADD ./ejabberd.yml.tpl /opt/ejabberd/conf/ejabberd.yml.tpl
ADD ./ejabberdctl.cfg.tpl /opt/ejabberd/conf/ejabberdctl.cfg.tpl
ADD ./example.com.pem /opt/ejabberd/ssl/example.com.pem
```
If you need root privileges switch to `USER root` and go back to `USER ejabberd` when you're done.
# Ejabberd Configuration
You can additionally provide extra runtime configuration in a downstream image by replacing the config template `ejabberd.yml.tpl` with one based on this image's template and include extra interpolation of environment variables. The template is parsed by Jinja2 with the runtime environment (equivalent to Python's `os.environ` available as `env`).
## Served Hostnames
By default the container will serve the XMPP domain `localhost`. In order to serve a different domain at runtime, provide the **XMPP_DOMAIN** variable with a domain name. You can add more domains separated with whitespace.
```
XMPP_DOMAIN=example.ninja xyz.io test.com
```
## Authentication
Authentication methods can be set with the **EJABBERD_AUTH_METHOD** environment variable. The default authentication mode is `internal`.
Supported authentication methods:
* anonymous
* internal
* external
* ldap
Internal and anonymous authentication example:
```
EJABBERD_AUTH_METHOD=internal anonymous
```
[External authentication](http://docs.ejabberd.im/admin/guide/configuration/#external-script) example:
```
EJABBERD_AUTH_METHOD=external
EJABBERD_EXTAUTH_PROGRAM="/opt/ejabberd/scripts/authenticate-user.sh"
EJABBERD_EXTAUTH_INSTANCES=3
EJABBERD_EXTAUTH_CACHE=600
```
**EJABBERD_EXTAUTH_INSTANCES** must be an integer with a minimum value of 1. **EJABBERD_EXTAUTH_CACHE** can be set to "false" or an integer value representing cache time in seconds. Note that caching should not be enabled if internal auth is also enabled.
### MySQL Authentication
Set `EJABBERD_AUTH_METHOD=external` and `EJABBERD_EXTAUTH_PROGRAM=/opt/ejabberd/scripts/lib/auth_mysql.py` to enable MySQL authentication. Use the following environment variables to configure the database connection and the layout of the database. Password changing, registration, and unregistration are optional features and are enabled only if the respective queries are provided.
- **AUTH_MYSQL_HOST**: The MySQL host
- **AUTH_MYSQL_USER**: Username to connect to the MySQL host
- **AUTH_MYSQL_PASSWORD**: Password to connect to the MySQL host
- **AUTH_MYSQL_DATABASE**: Database name where to find the user information
- **AUTH_MYSQL_HASHALG**: Format of the password in the database. Default is cleartext. Options are `crypt`, `md5`, `sha1`, `sha224`, `sha256`, `sha384`, `sha512`. `crypt` is recommended, as it is salted. When setting the password, `crypt` uses SHA-512 (prefix `$6$`).
- **AUTH_MYSQL_QUERY_GETPASS**: Get the password for a user. Use the placeholders `%(user)s`, `%(host)s`. Example: `SELECT password FROM users WHERE username = CONCAT(%(user)s, '@', %(host)s)`
- **AUTH_MYSQL_QUERY_SETPASS**: Update the password for a user. Leave empty to disable. Placeholder `%(password)s` contains the hashed password. Example: `UPDATE users SET password = %(password)s WHERE username = CONCAT(%(user)s, '@', %(host)s)`
- **AUTH_MYSQL_QUERY_REGISTER**: Register a new user. Leave empty to disable. Example: `INSERT INTO users ( username, password ) VALUES ( CONCAT(%(user)s, '@', %(host)s), %(password)s )`
- **AUTH_MYSQL_QUERY_UNREGISTER**: Removes a user. Leave empty to disable. Example: `DELETE FROM users WHERE username = CONCAT(%(user)s, '@', %(host)s)`
Note that the MySQL authentication script writes a debug log into the file `/var/log/ejabberd/extauth.log`. To get its content, execute the following command:
```bash
docker exec -ti ejabberd tail -n50 -f /var/log/ejabberd/extauth.log
```
To find out more about the mysql authentication script, check out the [ejabberd-auth-mysql](https://github.com/rankenstein/ejabberd-auth-mysql) repository.
### LDAP Auth
Full documentation http://docs.ejabberd.im/admin/guide/configuration/#ldap.
Connection
- **EJABBERD_LDAP_SERVERS**: List of IP addresses or DNS names of your LDAP servers. This option is required.
- **EJABBERD_LDAP_ENCRYPT**: The value `tls` enables encryption by using LDAP over SSL. The default value is: `none`.
- **EJABBERD_LDAP_TLS_VERIFY**: `false|soft|hard` This option specifies whether to verify LDAP server certificate or not when TLS is enabled. The default is `false` which means no checks are performed.
- **EJABBERD_LDAP_TLS_CACERTFILE**: Path to file containing PEM encoded CA certificates.
- **EJABBERD_LDAP_TLS_DEPTH**: Specifies the maximum verification depth when TLS verification is enabled. The default value is 1.
- **EJABBERD_LDAP_PORT**: The default port is `389` if encryption is disabled; and `636` if encryption is enabled.
- **EJABBERD_LDAP_ROOTDN**: Bind DN. The default value is "" which means anonymous connection.
- **EJABBERD_LDAP_PASSWORD**: Bind password. The default value is "".
- **EJABBERD_LDAP_DEREF_ALIASES**: `never|always|finding|searching`
Whether or not to dereference aliases. The default is `never`.
Authentication
- **EJABBERD_LDAP_BASE**: LDAP base directory which stores users accounts. This option is required.
- **EJABBERD_LDAP_UIDS**: `ldap_uidattr:ldap_uidattr_format` The default attributes are `uid:%u`.
- **EJABBERD_LDAP_FILTER**: RFC 4515 LDAP filter. The default Filter value is undefined.
- **EJABBERD_LDAP_DN_FILTER**: `{ Filter: FilterAttrs }` This filter is applied on the results returned by the main filter. By default ldap_dn_filter is undefined.
## Admins
Set one or more admin user (seperated by whitespace) with the **EJABBERD_ADMINS** environment variable. You can register admin users with the **EJABBERD_USERS** environment variable during container startup, use you favorite XMPP client or the `ejabberdctl` command line utility.
```
EJABBERD_ADMINS=admin@example.ninja
```
## Users
Automatically register users during container startup. Uses random password if you don't provide a password for the user. Format is `JID:PASSWORD`. Register more users separated with whitespace.
Register the admin user from **EJABBERD_ADMINS** with a give password:
```
EJABBERD_USERS=admin@example.ninja:password1234
```
Or without a random password printed to stdout (check container logs):
```
EJABBERD_USERS=admin@example.ninja
```
Register more than one user:
```
EJABBERD_USERS=admin@example.ninja:password1234 user1@test.com user1@xyz.io
```
## SSL
- **EJABBERD_SSLCERT_HOST**: SSL Certificate for the hostname.
- **EJABBERD_SSLCERT_EXAMPLE_COM**: SSL Certificates for XMPP domains.
- **EJABBERD_STARTTLS**: Set to `false` to disable StartTLS for client to server connections. Default: `true`.
- **EJABBERD_S2S_SSL**: Set to `false` to disable SSL in server 2 server connections. Default: `true`.
- **EJABBERD_HTTPS**: If your proxy terminates SSL you may want to disable HTTPS on port 5280 and 5443. Default: `true`.
- **EJABBERD_PROTOCOL_OPTIONS_TLSV1**: Allow TLSv1 protocol. Default: `false`.
- **EJABBERD_PROTOCOL_OPTIONS_TLSV1_1**: Allow TLSv1.1 protocol. Default: `true`.
- **EJABBERD_CIPHERS**: Cipher suite. Default: `HIGH:!aNULL:!3DES`.
- **EJABBERD_DHPARAM**: Set to `true` to use or generate custom DH parameters. Default: `false`.
## Modules
- **EJABBERD_SKIP_MODULES_UPDATE**: If you do not need to update ejabberd modules specs, skip the update task and speedup start. Default: `false`.
- **EJABBERD_MOD_MUC_ADMIN**: Activate the mod_muc_admin module. Default: `false`.
- **EJABBERD_MOD_ADMIN_EXTRA**: Activate the mod_muc_admin module. Default: `true`.
- **EJABBERD_REGISTER_TRUSTED_NETWORK_ONLY**: Only allow user registration from the trusted_network access rule. Default: `true`.
- **EJABBERD_MOD_VERSION**: Activate the mod_version module. Default: `true`.
## Logging
Use the **EJABBERD_LOGLEVEL** environment variable to set verbosity. Default: `4` (Info).
```
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
```
## Mount Configurations
If you prefer to use your own configuration files and avoid passing docker environment variables (```-e```), you can do so by mounting a host directory.
Pass in an additional ```-v``` to the ```docker run``` command, like so:
```
docker run -d \
--name "ejabberd" \
-p 5222:5222 \
-p 5269:5269 \
-p 5280:5280 \
-h 'xmpp.example.de' \
-v /<host_path>/conf:/opt/ejabberd/conf \
rroemhild/ejabberd
```
Your ```/<host_path>/conf``` folder should look like so:
```
/<host_path>/conf/
├── ejabberdctl.cfg
├── ejabberd.yml
└── inetrc
```
Example configuration files can be downloaded from the ejabberd [github](https://github.com/rroemhild/ejabberd) page.
When these files exist in ```/opt/ejabberd/conf```, the run script will ignore the configuration templates.
## Erlang Configuration
With the following environment variables you can configure options that are passed by ejabberdctl to the erlang runtime system when starting ejabberd.
- **POLL**: Set to `false` to disable Kernel polling. Default: `true`.
- **SMP**: SMP support `enable`, `auto`, `disable`. Default: `auto`.
- **ERL_MAX_PORTS**: Maximum number of simultaneously open Erlang ports. Default: `32000`.
- **FIREWALL_WINDOW**: Range of allowed ports to pass through a firewall. Default: `not defined`.
- **INET_DIST_INTERFACE**: IP address where this Erlang node listens other nodes. Default: `0.0.0.0`.
- **ERL_EPMD_ADDRESS**: IP addresses where epmd listens for connections. Default: `0.0.0.0`.
- **ERL_PROCESSES**: Maximum number of Erlang processes. Default: `250000`.
- **ERL_MAX_ETS_TABLES**: Maximum number of Erlang processes. Default: `1400`.
- **ERLANG_OPTIONS**: Overwrite additional options passed to erlang while starting ejabberd. Default: `-noshell`
- **ERLANG_NODE**: Allows to explicitly specify erlang node for ejabberd. Set to `nodename` lets erlang add the hostname. Default: `ejabberd@localhost`.
- **EJABBERD_CONFIG_PATH**: ejabberd configuration file. Default: `/opt/ejabberd/conf/ejabberd.yml`.
- **CONTRIB_MODULES_PATH**: contributed ejabberd modules path. Default: `/opt/ejabberd/modules`.
- **CONTRIB_MODULES_CONF_DIR**: configuration directory for contributed modules. Default: `/opt/ejabberd/modules/conf`.
- **ERLANG_COOKIE**: Set erlang cookie. Default is to auto-generated cookie.
# Maintenance
The `ejabberdctl` command is in the search path and can be run by:
```bash
docker exec CONTAINER ejabberdctl help
```
## Register Users
```bash
docker exec CONTAINER ejabberdctl register user XMPP_DOMAIN PASSWORD
```
## Creating Backups
Create a backupfile with ejabberdctl and copy the file from the container to localhost
```bash
docker exec CONTAINER ejabberdctl backup /opt/ejabberd/backup/ejabberd.backup
docker cp CONTAINER:/opt/ejabberd/backup/ejabberd.backup /tmp/ejabberd.backup
```
## Restoring Backups
Copy the backupfile from localhost to the running container and restore with ejabberdctl
```bash
docker cp /tmp/ejabberd.backup CONTAINER:/opt/ejabberd/backup/ejabberd.backup
docker exec CONTAINER ejabberdctl restore /opt/ejabberd/backup/ejabberd.backup
```
# Debug
## Erlang Shell
Set `-i` and `-t` option and append `live` to get an interactive erlang shell:
```bash
docker run -i -t -P rroemhild/ejabberd live
```
You can terminate the erlang shell with `q().`.
## System Shell
```bash
docker run -i -t rroemhild/ejabberd shell
```
## System Commands
```bash
docker run -i -t rroemhild/ejabberd env
```
# Exposed Ports
* 4560 (XMLRPC)
* 5222 (Client 2 Server)
* 5269 (Server 2 Server)
* 5280 (HTTP admin/websocket/http-bind)
* 5443 (HTTP Upload)

View File

@ -1,75 +0,0 @@
#!/bin/sh
set -ex
export DEBIAN_FRONTEND="noninteractive"
readonly buildDeps='
git-core
build-essential
automake
libssl-dev
zlib1g-dev
libexpat-dev
libyaml-dev
libsqlite3-dev
erlang-src erlang-dev'
readonly requiredAptPackages='
locales
ldnsutils
python2.7
python-jinja2
ca-certificates
libyaml-0-2
erlang-base erlang-snmp erlang-ssl erlang-ssh erlang-webtool
erlang-tools erlang-xmerl erlang-corba erlang-diameter erlang-eldap
erlang-eunit erlang-ic erlang-odbc erlang-os-mon
erlang-parsetools erlang-percept erlang-typer
python-mysqldb
imagemagick'
apt-key adv \
--keyserver keys.gnupg.net \
--recv-keys 434975BD900CCBE4F7EE1B1ED208507CA14F4FCA
apt-get update
apt-get install -y $buildDeps $requiredAptPackages --no-install-recommends
dpkg-reconfigure locales && locale-gen C.UTF-8
/usr/sbin/update-locale LANG=C.UTF-8
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen
locale-gen
# add ejabberd user
useradd --home $EJABBERD_HOME -M --system ejabberd
mkdir $EJABBERD_HOME
cd /tmp/ejabberd
chmod +x ./autogen.sh
./autogen.sh
./configure --enable-user=ejabberd \
--enable-all \
--disable-tools \
--disable-pam
make debug=$EJABBERD_DEBUG_MODE
make install
cd $EJABBERD_HOME
mkdir -p logs ssl backup upload module_source modules/conf
mv /tmp/ejabberd/docker $EJABBERD_HOME
# Move config to homedir
mv /etc/ejabberd conf
ln -s $EJABBERD_HOME/conf /etc/ejabberd
# rename original configs
mv conf/ejabberd.yml conf/ejabberd.yml.orig
mv conf/ejabberdctl.cfg conf/ejabberdctl.cfg.orig
# clean up
rm -rf /tmp/ejabberd
rm -rf /var/lib/apt/lists/*
apt-get purge -y --auto-remove $buildDeps
# change owner for ejabberd home
chown -R ejabberd $EJABBERD_HOME

View File

@ -1,434 +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/
### =======
### LOGGING
loglevel: {{ env['EJABBERD_LOGLEVEL'] or 4 }}
log_rotate_size: 10485760
log_rotate_count: 0
log_rate_limit: 100
## watchdog_admins:
## - "bob@example.com"
### ================
### SERVED HOSTNAMES
hosts:
{%- for xmpp_domain in env['XMPP_DOMAIN'].split() %}
- "{{ xmpp_domain }}"
{%- endfor %}
##
## 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:
-
port: 5222
module: ejabberd_c2s
{%- if env['EJABBERD_STARTTLS'] == "true" %}
starttls_required: true
{%- endif %}
protocol_options:
- "no_sslv3"
{%- if env.get('EJABBERD_PROTOCOL_OPTIONS_TLSV1', "false") == "false" %}
- "no_tlsv1"
{%- endif %}
{%- if env.get('EJABBERD_PROTOCOL_OPTIONS_TLSV1_1', "true") == "false" %}
- "no_tlsv1_1"
{%- endif %}
max_stanza_size: 65536
shaper: c2s_shaper
access: c2s
ciphers: "{{ env.get('EJABBERD_CIPHERS', 'HIGH:!aNULL:!3DES') }}"
{%- if env.get('EJABBERD_DHPARAM', false) == "true" %}
dhfile: "/opt/ejabberd/ssl/dh.pem"
{%- endif %}
-
port: 5269
module: ejabberd_s2s_in
-
port: 4560
module: ejabberd_xmlrpc
access_commands:
configure:
all: []
-
port: 5280
module: ejabberd_http
request_handlers:
"/websocket": ejabberd_http_ws
## "/pub/archive": mod_http_fileserver
web_admin: true
http_bind: true
## register: true
captcha: true
{%- if env['EJABBERD_HTTPS'] == "true" %}
tls: true
certfile: "/opt/ejabberd/ssl/host.pem"
{% endif %}
-
port: 5443
module: ejabberd_http
request_handlers:
"": mod_http_upload
{%- if env['EJABBERD_HTTPS'] == "true" %}
tls: true
certfile: "/opt/ejabberd/ssl/host.pem"
{% endif %}
### SERVER TO SERVER
### ================
{%- if env['EJABBERD_S2S_SSL'] == "true" %}
s2s_use_starttls: required
s2s_certfile: "/opt/ejabberd/ssl/host.pem"
s2s_protocol_options:
- "no_sslv3"
{%- if env.get('EJABBERD_PROTOCOL_OPTIONS_TLSV1', "false") == "false" %}
- "no_tlsv1"
{%- endif %}
{%- if env.get('EJABBERD_PROTOCOL_OPTIONS_TLSV1_1', "true") == "false" %}
- "no_tlsv1_1"
{%- endif %}
s2s_ciphers: "{{ env.get('EJABBERD_CIPHERS', 'HIGH:!aNULL:!3DES') }}"
{%- if env.get('EJABBERD_DHPARAM', false) == "true" %}
s2s_dhfile: "/opt/ejabberd/ssl/dh.pem"
{%- endif %}
{% endif %}
### ==============
### AUTHENTICATION
auth_method:
{%- for auth_method in env.get('EJABBERD_AUTH_METHOD', 'internal').split() %}
- {{ auth_method }}
{%- endfor %}
{%- if 'anonymous' in env.get('EJABBERD_AUTH_METHOD', 'internal').split() %}
anonymous_protocol: login_anon
allow_multiple_connections: true
{%- endif %}
## LDAP authentication
{%- if 'ldap' in env.get('EJABBERD_AUTH_METHOD', 'internal').split() %}
ldap_servers:
{%- for ldap_server in env.get('EJABBERD_LDAP_SERVERS', 'internal').split() %}
- "{{ ldap_server }}"
{%- endfor %}
ldap_encrypt: {{ env.get('EJABBERD_LDAP_ENCRYPT', 'none') }}
ldap_tls_verify: {{ env.get('EJABBERD_LDAP_TLS_VERIFY', 'false') }}
{%- if env['EJABBERD_LDAP_TLS_CACERTFILE'] %}
ldap_tls_cacertfile: "{{ env['EJABBERD_LDAP_TLS_CACERTFILE'] }}"
{%- endif %}
ldap_tls_depth: {{ env.get('EJABBERD_LDAP_TLS_DEPTH', 1) }}
{%- if env['EJABBERD_LDAP_PORT'] %}
ldap_port: {{ env['EJABBERD_LDAP_PORT'] }}
{%- endif %}
{%- if env['EJABBERD_LDAP_ROOTDN'] %}
ldap_rootdn: "{{ env['EJABBERD_LDAP_ROOTDN'] }}"
{%- endif %}
{%- if env['EJABBERD_LDAP_PASSWORD'] %}
ldap_password: "{{ env['EJABBERD_LDAP_PASSWORD'] }}"
{%- endif %}
ldap_deref_aliases: {{ env.get('EJABBERD_LDAP_DEREF_ALIASES', 'never') }}
ldap_base: "{{ env['EJABBERD_LDAP_BASE'] }}"
{%- if env['EJABBERD_LDAP_UIDS'] %}
ldap_uids:
{%- for ldap_uid in env['EJABBERD_LDAP_UIDS'].split() %}
"{{ ldap_uid.split(':')[0] }}": "{{ ldap_uid.split(':')[1] }}"
{%- endfor %}
{%- endif %}
{%- if env['EJABBERD_LDAP_FILTER'] %}
ldap_filter: "{{ env['EJABBERD_LDAP_FILTER'] }}"
{%- endif %}
{%- if env['EJABBERD_LDAP_DN_FILTER'] %}
ldap_dn_filter:
{%- for dn_filter in env['EJABBERD_LDAP_DN_FILTER'].split() %}
"{{ dn_filter.split(':')[0] }}": ["{{ dn_filter.split(':')[1] }}"]
{%- endfor %}
{%- endif %}
{%- endif %}
{%- if 'external' in env.get('EJABBERD_AUTH_METHOD', 'internal').split() %}
{%- if env['EJABBERD_EXTAUTH_PROGRAM'] %}
extauth_program: "{{ env['EJABBERD_EXTAUTH_PROGRAM'] }}"
{%- endif %}
{%- if env['EJABBERD_EXTAUTH_INSTANCES'] %}
extauth_instances: {{ env['EJABBERD_EXTAUTH_INSTANCES'] }}
{%- endif %}
{%- if 'internal' in env.get('EJABBERD_AUTH_METHOD').split() %}
extauth_cache: false
{%- elif env['EJABBERD_EXTAUTH_CACHE'] %}
extauth_cache: {{ env['EJABBERD_EXTAUTH_CACHE'] }}
{%- endif %}
{% endif %}
### ===============
### TRAFFIC SHAPERS
shaper:
normal: 1000
fast: 50000
max_fsm_queue: 1000
### ====================
### ACCESS CONTROL LISTS
acl:
admin:
user:
{%- if env['EJABBERD_ADMINS'] %}
{%- for admin in env['EJABBERD_ADMINS'].split() %}
- "{{ admin.split('@')[0] }}": "{{ admin.split('@')[1] }}"
{%- endfor %}
{%- else %}
- "admin": "{{ env['XMPP_DOMAIN'].split()[0] }}"
{%- endif %}
local:
user_regexp: ""
### ============
### 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, or only admins can create rooms, depending on environment variable:
muc_create:
{%- if env['EJABBERD_MUC_CREATE_ADMIN_ONLY'] == "true" %}
admin: allow
{% else %}
local: allow
{% endif %}
## 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.
register:
{%- if env['EJABBERD_REGISTER_ADMIN_ONLY'] == "true" %}
all: deny
admin: allow
{% else %}
all: allow
{% endif %}
## Only allow to register from localhost
trusted_network:
loopback: allow
soft_upload_quota:
all: 400 # MiB
hard_upload_quota:
all: 500 # MiB
language: "en"
### =======
### MODULES
modules:
mod_adhoc: {}
{%- if env['EJABBERD_MOD_ADMIN_EXTRA'] == "true" %}
mod_admin_extra: {}
{% endif %}
mod_announce: # recommends mod_adhoc
access: announce
mod_blocking: {} # requires mod_privacy
mod_caps: {}
mod_carboncopy: {}
mod_client_state:
drop_chat_states: true
queue_presence: false
mod_configure: {} # requires mod_adhoc
mod_disco: {}
## mod_echo: {}
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
history_size: 50
default_room_options:
persistent: true
{%- if env['EJABBERD_MOD_MUC_ADMIN'] == "true" %}
mod_muc_admin: {}
{% endif %}
## 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
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.
##
## Only clients in the server machine can register accounts
##
{%- if env['EJABBERD_REGISTER_TRUSTED_NETWORK_ONLY'] == "true" %}
ip_access: trusted_network
{% endif %}
access: register
mod_roster: {}
mod_shared_roster: {}
mod_stats: {}
mod_time: {}
mod_vcard: {}
{% if env.get('EJABBERD_MOD_VERSION', true) == "true" %}
mod_version: {}
{% endif %}
mod_http_upload:
docroot: "/opt/ejabberd/upload"
{%- if env['EJABBERD_HTTPS'] == "true" %}
put_url: "https://@HOST@:5443"
{%- else %}
put_url: "http://@HOST@:5443"
{% endif %}
mod_http_upload_quota:
max_days: 10
### ============
### HOST CONFIG
host_config:
{%- for xmpp_domain in env['XMPP_DOMAIN'].split() %}
"{{ xmpp_domain }}":
domain_certfile: "/opt/ejabberd/ssl/{{ xmpp_domain }}.pem"
{%- endfor %}
{%- if env['EJABBERD_CONFIGURE_ODBC'] == "true" %}
### ====================
### ODBC DATABASE CONFIG
odbc_type: {{ env['EJABBERD_ODBC_TYPE'] }}
odbc_server: {{ env['EJABBERD_ODBC_SERVER'] }}
odbc_database: {{ env['EJABBERD_ODBC_DATABASE'] }}
odbc_username: {{ env['EJABBERD_ODBC_USERNAME'] }}
odbc_password: {{ env['EJABBERD_ODBC_PASSWORD'] }}
odbc_pool_size: {{ env['EJABBERD_ODBC_POOL_SIZE'] }}
{% endif %}
{%- if env['EJABBERD_DEFAULT_DB'] is defined %}
default_db: {{ env['EJABBERD_DEFAULT_DB'] }}
{% endif %}
### =====================
### SESSION MANAGEMENT DB
sm_db_type: {{ env['EJABBERD_SESSION_DB'] or "mnesia" }}
{%- if env['EJABBERD_CONFIGURE_REDIS'] == "true" %}
### ====================
### REDIS DATABASE CONFIG
redis_server: {{ env['EJABBERD_REDIS_SERVER'] or "localhost" }}
redis_port: {{ env['EJABBERD_REDIS_PORT'] or 6379 }}
{%- if env['EJABBERD_REDIS_PASSWORD'] is defined %}
redis_password: {{ env['EJABBERD_REDIS_PASSWORD'] }}
{% endif %}
redis_db: {{ env['EJABBERD_REDIS_DB'] or 0}}
redis_reconnect_timeout: {{ env['EJABBERD_REDIS_RECONNECT_TIMEOUT'] or 1 }}
redis_connect_timeout: {{ env['EJABBERD_REDIS_CONNECT_TIMEOUT'] or 1 }}
{% endif %}

View File

@ -1,199 +0,0 @@
#
# In this file you can configure options that are passed by ejabberdctl
# to the erlang runtime system when starting ejabberd
#
#' POLL: Kernel polling ([true|false])
#
# The kernel polling option requires support in the kernel.
# Additionally, you need to enable this feature while compiling Erlang.
#
# Default: true
#
POLL={{ env['POLL'] or 'true' }}
#.
#' SMP: SMP support ([enable|auto|disable])
#
# Explanation in Erlang/OTP documentation:
# enable: starts the Erlang runtime system with SMP support enabled.
# This may fail if no runtime system with SMP support is available.
# auto: starts the Erlang runtime system with SMP support enabled if it
# is available and more than one logical processor are detected.
# disable: starts a runtime system without SMP support.
#
# Default: auto
#
SMP={{ env['SMP'] or 'auto' }}
#.
#' ERL_MAX_PORTS: Maximum number of simultaneously open Erlang ports
#
# ejabberd consumes two or three ports for every connection, either
# from a client or from another Jabber server. So take this into
# account when setting this limit.
#
# Default: 32000
# Maximum: 268435456
#
ERL_MAX_PORTS={{ env['ERL_MAX_PORTS'] or '32000' }}
#.
#' FIREWALL_WINDOW: Range of allowed ports to pass through a firewall
#
# If Ejabberd is configured to run in cluster, and a firewall is blocking ports,
# it's possible to make Erlang use a defined range of port (instead of dynamic
# ports) for node communication.
#
# Default: not defined
# Example: 4200-4210
#
{%- if env['FIREWALL_WINDOW'] %}
FIREWALL_WINDOW={{ env['FIREWALL_WINDOW'] }}
{%- endif %}
#.
#' INET_DIST_INTERFACE: IP address where this Erlang node listens other nodes
#
# This communication is used by ejabberdctl command line tool,
# and in a cluster of several ejabberd nodes.
#
# Default: 0.0.0.0
#
{%- if env['INET_DIST_INTERFACE'] %}
INET_DIST_INTERFACE={{ env['INET_DIST_INTERFACE'] }}
{%- endif %}
#.
#' ERL_EPMD_ADDRESS: IP addresses where epmd listens for connections
#
# IMPORTANT: This option works only in Erlang/OTP R14B03 and newer.
#
# This environment variable may be set to a comma-separated
# list of IP addresses, in which case the epmd daemon
# will listen only on the specified address(es) and on the
# loopback address (which is implicitly added to the list if it
# has not been specified). The default behaviour is to listen on
# all available IP addresses.
#
# Default: 0.0.0.0
#
{%- if env['ERL_EPMD_ADDRESS'] %}
ERL_EPMD_ADDRESS={{ env['ERL_EPMD_ADDRESS'] }}
{%- endif %}
#.
#' ERL_PROCESSES: Maximum number of Erlang processes
#
# Erlang consumes a lot of lightweight processes. If there is a lot of activity
# on ejabberd so that the maximum number of processes is reached, people will
# experience greater latency times. As these processes are implemented in
# 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
# Maximum: 268435456
#
ERL_PROCESSES={{ env['ERL_PROCESSES'] or '250000' }}
#.
#' ERL_MAX_ETS_TABLES: Maximum number of ETS and Mnesia tables
#
# The number of concurrent ETS and Mnesia tables is limited. When the limit is
# reached, errors will appear in the logs:
# ** Too many db tables **
# You can safely increase this limit when starting ejabberd. It impacts memory
# consumption but the difference will be quite small.
#
# Default: 1400
#
ERL_MAX_ETS_TABLES={{ env['ERL_MAX_ETS_TABLES'] or '1400' }}
#.
#' ERL_OPTIONS: Additional Erlang options
#
# The next variable allows to specify additional options passed to erlang while
# starting ejabberd. Some useful options are -noshell, -detached, -heart. When
# ejabberd is started from an init.d script options -noshell and -detached are
# added implicitly. See erl(1) for more info.
#
# It might be useful to add "-pa /usr/local/lib/ejabberd/ebin" if you
# want to add local modules in this path.
#
# Default: ""
#
ERL_OPTIONS="{{ env['ERL_OPTIONS'] or '-noshell' }}"
#.
#' ERLANG_NODE: Erlang node name
#
# The next variable allows to explicitly specify erlang node for ejabberd
# It can be given in different formats:
# ERLANG_NODE=ejabberd
# Lets erlang add hostname to the node (ejabberd uses short name in this case)
# ERLANG_NODE=ejabberd@hostname
# Erlang uses node name as is (so make sure that hostname is a real
# machine hostname or you'll not be able to control ejabberd)
# ERLANG_NODE=ejabberd@hostname.domainname
# The same as previous, but erlang will use long hostname
# (see erl (1) manual for details)
#
# Default: ejabberd@localhost
#
ERLANG_NODE={{ env['ERLANG_NODE'] or 'ejabberd@localhost' }}
#.
#' EJABBERD_PID_PATH: ejabberd PID file
#
# Indicate the full path to the ejabberd Process identifier (PID) file.
# If this variable is defined, ejabberd writes the PID file when starts,
# and deletes it when stops.
# Remember to create the directory and grant write permission to ejabberd.
#
# Default: don't write PID file
#
#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={{ env['EJABBERD_CONFIG_PATH'] or '/opt/ejabberd/conf/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={{ env['CONTRIB_MODULES_PATH'] or '/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={{ env['CONTRIB_MODULES_CONF_DIR'] or '/opt/ejabberd/modules/conf' }}
#.
#' EJABBERD_BYPASS_WARNINGS: Bypass LIVE warning
#
# Default: don't bypass the warning
#
EJABBERD_BYPASS_WARNINGS=true
#.
#'
# vim: foldmarker=#',#. foldmethod=marker:

View File

@ -1,22 +0,0 @@
readonly HOSTIP=$(hostname -i)
readonly HOSTNAME=$(hostname -f)
readonly DOMAINNAME=$(hostname -d)
readonly DOCKER_LIB="${EJABBERD_HOME}/docker/lib"
readonly ERLANGCOOKIEFILE="${EJABBERD_HOME}/.erlang.cookie"
readonly EJABBERDCTL="/sbin/ejabberdctl"
readonly CONFIGDIR="${EJABBERD_HOME}/conf"
readonly CONFIGTMPDIR="${EJABBERD_HOME}/docker/conf"
readonly SSLCERTDIR="${EJABBERD_HOME}/ssl"
readonly SSLCERTHOST="${SSLCERTDIR}/host.pem"
readonly LOGDIR="/var/log/ejabberd"
readonly FIRST_START_DONE_FILE="${EJABBERD_HOME}/first-start-done"
readonly CLUSTER_NODE_FILE="${EJABBERD_HOME}/cluster-done"
readonly PYTHON_JINJA2="import os;
import sys;
import jinja2;
sys.stdout.write(
jinja2.Template
(sys.stdin.read()
).render(env=os.environ))"

View File

@ -1,72 +0,0 @@
is_set() {
local var=$1
[[ -n $var ]]
}
is_zero() {
local var=$1
[[ -z $var ]]
}
file_exist() {
local file=$1
[[ -e $file ]]
}
is_true() {
local var=${1,,}
local choices=("yes" "1" "y" "true")
for ((i=0;i < ${#choices[@]};i++)) {
[[ "${choices[i]}" == $var ]] && return 0
}
return 1
}
log() {
local message=$1
echo $message
}
# overwrite this function to get hostname from other sources
# like dns or etcd
get_nodename() {
log ${HOSTNAME}
}
join_cluster() {
local cluster_node=$1
is_zero ${cluster_node} \
&& exit 0
log "Join cluster..."
local erlang_node_name=${ERLANG_NODE%@*}
local erlang_cluster_node="${erlang_node_name}@${cluster_node}"
response=$(${EJABBERDCTL} ping ${erlang_cluster_node})
while [ "$response" != "pong" ]; do
log "Waiting for ${erlang_cluster_node}..."
sleep 2
response=$(${EJABBERDCTL} ping ${erlang_cluster_node})
done
log "Join cluster at ${erlang_cluster_node}... "
NO_WARNINGS=true ${EJABBERDCTL} join_cluster $erlang_cluster_node
if [ $? -eq 0 ]; then
touch ${CLUSTER_NODE_FILE}
else
log "cloud not join cluster"
exit 1
fi
}

View File

@ -1 +0,0 @@
# Overridable file

View File

@ -1 +0,0 @@
# Overridable file

View File

@ -1,24 +0,0 @@
#!/bin/bash
set -e
# Updates the known modules as to be found in https://github.com/processone/ejabberd-contrib
source "${EJABBERD_HOME}/docker/lib/base_config.sh"
source "${EJABBERD_HOME}/docker/lib/config.sh"
source "${EJABBERD_HOME}/docker/lib/base_functions.sh"
source "${EJABBERD_HOME}/docker/lib/functions.sh"
run_modules_update_specs() {
log "Updating module specs... "
${EJABBERDCTL} modules_update_specs
}
is_true ${EJABBERD_SKIP_MODULES_UPDATE} \
&& exit 0
run_modules_update_specs
exit 0

View File

@ -1,144 +0,0 @@
#!/bin/bash
set -e
# Installs modules as defined in environment variables
source "${EJABBERD_HOME}/docker/lib/base_config.sh"
source "${EJABBERD_HOME}/docker/lib/config.sh"
source "${EJABBERD_HOME}/docker/lib/base_functions.sh"
source "${EJABBERD_HOME}/docker/lib/functions.sh"
install_module_from_source() {
local module_name=$1
local module_source_path=${EJABBERD_HOME}/module_source/${module_name}
local module_install_folder=${EJABBERD_HOME}/.ejabberd-modules/sources/${module_name}
log "Analyzing module ${module_name} for installation"
# Make sure that the module exists in the source folder before attempting a copy
if [ ! -d ${module_source_path} ]; then
log "Error: Module ${module_name} not found in ${EJABBERD_HOME}/module_source"
log "Please use a shared volume to populate your module in ${EJABBERD_HOME}/module_source"
return 1;
fi
# Check to see if the module is already installed
local install_count=$(${EJABBERDCTL} modules_installed | grep -ce "^${module_name}[[:space:]]")
if [ $install_count -gt 0 ]; then
log "Error: Module already installed: ${module_name}"
return 1;
fi
# Copy the module into the shared folder
log "Copying module to ejabberd folder ${module_install_folder}"
mkdir -p ${module_install_folder}
cp -R ${module_source_path} ${module_install_folder}
# Run the ejabberdctl module_check on the module
log "Running module_check on ${module_name}"
${EJABBERDCTL} module_check ${module_name}
if [ $? -ne 0 ]; then
log "Module check failed for ${module_name}"
return 1;
fi
log "Module check succeeded for ${module_name}"
# Install the module
log "Running module_install on ${module_name}"
${EJABBERDCTL} module_install ${module_name}
if [ $? -ne 0 ]; then
log "Module installation failed for ${module_name}"
return 1;
fi
log "Module installation succeeded for ${module_name}"
return 0;
}
install_module_from_ejabberd_contrib() {
local module_name=$1
# Check to see if the module is already installed
local install_count=$(${EJABBERDCTL} modules_installed | grep -ce "^${module_name}[[:space:]]")
if [ $install_count -gt 0 ]; then
log "Error: Module already installed: ejabberd_contrib ${module_name}"
return 1;
fi
# Install the module
log "Running module_install on ejabberd_contrib ${module_name}"
${EJABBERDCTL} module_install ${module_name}
if [ $? -ne 0 ]; then
log "Module installation failed for ejabberd_contrib ${module_name}"
return 1;
fi
log "Module installation succeeded for ejabberd_contrib ${module_name}"
return 0;
}
enable_custom_auth_module_override() {
module_name=$1;
# When using custom authentication modules, the module name must be
# in the following pattern: ejabberd_auth_foo, where foo is the
# value you will use for your auth_method yml configuration.
required_prefix="ejabberd_auth_"
if [[ "${module_name}" != "${required_prefix}"* ]]; then
log "Error: module_name must begin with ${required_prefix}"
exit 1;
fi
log "Checking custom auth module: ${module_name}"
# Make sure the auth module is installed
local install_count=$(${EJABBERDCTL} modules_installed | grep -ce "^${module_name}[[:space:]]")
if [ $install_count -eq 0 ]; then
log "Error: custom auth_module not installed: ${module_name}"
return 1;
fi
custom_auth_method=${module_name#$required_prefix}
echo -e "\nauth_method: [${custom_auth_method}]" >> ${CONFIGFILE}
log "Custom auth module ${module_name} configuration complete."
}
file_exist ${FIRST_START_DONE_FILE} \
&& exit 0
is_restart_needed=0;
if [ -n "${EJABBERD_SOURCE_MODULES}" ]; then
for module_name in ${EJABBERD_SOURCE_MODULES} ; do
install_module_from_source ${module_name}
done
is_restart_needed=1;
fi
# Check the EJABBERD_CONTRIB_MODULES variable for any ejabberd_contrib modules
if [ -n "${EJABBERD_CONTRIB_MODULES}" ]; then
for module_name in ${EJABBERD_CONTRIB_MODULES} ; do
install_module_from_ejabberd_contrib ${module_name}
done
is_restart_needed=1;
fi
# If a custom module was defined for handling auth, we need to override
# the pre-defined auth methods in the config.
if [ -n "${EJABBERD_CUSTOM_AUTH_MODULE_OVERRIDE}" ]; then
enable_custom_auth_module_override "${EJABBERD_CUSTOM_AUTH_MODULE_OVERRIDE}"
is_restart_needed=1;
fi
# If any modules were installed, restart the server, if the option is enabled
if [ ${is_restart_needed} -eq 1 ]; then
if is_true ${EJABBERD_RESTART_AFTER_MODULE_INSTALL} ; then
log "Restarting ejabberd after successful module installation(s)"
${EJABBERDCTL} restart
child=$!
${EJABBERDCTL} "started"
wait $child
fi
fi
exit 0

View File

@ -1,72 +0,0 @@
#!/bin/bash
set -e
source "${EJABBERD_HOME}/docker/lib/base_config.sh"
source "${EJABBERD_HOME}/docker/lib/config.sh"
source "${EJABBERD_HOME}/docker/lib/base_functions.sh"
source "${EJABBERD_HOME}/docker/lib/functions.sh"
# Do not exit if users already registered
set +e
randpw() {
< /dev/urandom tr -dc A-Z-a-z-0-9 | head -c ${1:-16};
echo;
}
register_user() {
local user=$1
local domain=$2
local password=$3
${EJABBERDCTL} register ${user} ${domain} ${password}
return $?
}
register_all_users() {
# register users from environment $EJABBERD_USERS with given
# password or random password written to stout. Use whitespace
# to seperate users.
#
# sample:
# - add a user with an given password:
# -e "EJABBERD_USERS=admin@example.com:adminSecret"
# - add a user with a random password:
# -e "EJABBERD_USERS=user@example.com"
# - set password for admin and use random for user1:
# -e "EJABBERD_USERS=admin@example.com:adminSecret user@example.com"
for user in ${EJABBERD_USERS} ; do
local jid=${user%%:*}
local password=${user#*:}
local username=${jid%%@*}
local domain=${jid#*@}
[[ "${password}" == "${jid}" ]] \
&& password=$(randpw)
register_user ${username} ${domain} ${password}
local retval=$?
[[ ${retval} -eq 0 ]] \
&& log "Password for user ${username}@${domain} is ${password}"
done
}
file_exist ${FIRST_START_DONE_FILE} \
&& exit 0
file_exist ${CLUSTER_NODE_FILE} \
&& exit 0
is_set ${EJABBERD_USERS} \
&& register_all_users
exit 0

View File

@ -1,17 +0,0 @@
#!/bin/bash
set -e
# Write a first-start-done file
source "${EJABBERD_HOME}/docker/lib/base_config.sh"
source "${EJABBERD_HOME}/docker/lib/config.sh"
source "${EJABBERD_HOME}/docker/lib/base_functions.sh"
source "${EJABBERD_HOME}/docker/lib/functions.sh"
if [ ! -e "${FIRST_START_DONE_FILE}" ]; then
touch ${FIRST_START_DONE_FILE}
fi
exit 0

View File

@ -1,34 +0,0 @@
#!/bin/bash
set -e
source "${EJABBERD_HOME}/docker/lib/base_config.sh"
source "${EJABBERD_HOME}/docker/lib/config.sh"
source "${EJABBERD_HOME}/docker/lib/base_functions.sh"
source "${EJABBERD_HOME}/docker/lib/functions.sh"
# Instead of having to mount a direction, specify the ssl certs
# via environment variables:
# `EJABBERD_SSLCERT_HOST` and `EJABBERD_SSLCERT_{domain_name}`.
# For example: `EJABBERD_SSLCERT_EXAMPLE_COM`.
write_file_from_env() {
log "Writing $1 to $2"
mkdir -p "$(dirname $2)"
log "${!1}" > $2
}
# Write the host certificate
is_set ${EJABBERD_SSLCERT_HOST} \
&& write_file_from_env "EJABBERD_SSLCERT_HOST" ${SSLCERTHOST}
# Write the domain certificates for each XMPP_DOMAIN
for xmpp_domain in ${XMPP_DOMAIN} ; do
var="EJABBERD_SSLCERT_$(echo $xmpp_domain | awk '{print toupper($0)}' | sed 's/\./_/g;s/-/_/g')"
if is_set ${!var} ; then
file_exist "${SSLCERTDIR}/${xmpp_domain}.pem" \
|| write_file_from_env "$var" "${SSLCERTDIR}/${xmpp_domain}.pem"
fi
done
exit 0

View File

@ -1,75 +0,0 @@
#!/bin/bash
set -e
source "${EJABBERD_HOME}/docker/lib/base_config.sh"
source "${EJABBERD_HOME}/docker/lib/config.sh"
source "${EJABBERD_HOME}/docker/lib/base_functions.sh"
source "${EJABBERD_HOME}/docker/lib/functions.sh"
make_snakeoil_certificate() {
local domain=$1
local certfile=$2
openssl req -subj "/CN=${domain}" \
-new \
-newkey rsa:4096 \
-days 365 \
-nodes \
-x509 \
-keyout /tmp/selfsigned.key \
-out /tmp/selfsigned.crt
log "Writing ssl cert and private key to '${certfile}'..."
cat /tmp/selfsigned.crt /tmp/selfsigned.key > ${certfile}
rm /tmp/selfsigned.crt /tmp/selfsigned.key
}
make_host_snakeoil_certificate() {
local IFS=@
local domain='localhost'
local erlang_node=${ERLANG_NODE}
if is_true ${erlang_node} ; then
domain=${HOSTNAME}
elif is_set ${erlang_node} ; then
set ${erlang_node}
local nodehost=$2
if is_zero ${nodehost} ; then
domain=${HOSTNAME}
else
domain=${nodehost}
fi
fi
log "Generating snakeoil ssl cert for ${domain}..."
make_snakeoil_certificate ${domain} ${SSLCERTHOST}
}
make_domain_snakeoil_certificate() {
local domain=$1
local certfile=$2
log "Generating snakeoil ssl cert for ${domain}..."
make_snakeoil_certificate ${domain} ${certfile}
}
# generate host ssl cert if missing
file_exist ${SSLCERTHOST} \
|| make_host_snakeoil_certificate
# generate xmmp domain ssl certificates if missing
for xmpp_domain in ${XMPP_DOMAIN} ; do
domain_certfile="${SSLCERTDIR}/${xmpp_domain}.pem"
file_exist ${domain_certfile} \
|| make_domain_snakeoil_certificate ${xmpp_domain} ${domain_certfile}
done
exit 0

View File

@ -1,22 +0,0 @@
#!/bin/bash
set -e
source "${EJABBERD_HOME}/docker/lib/base_config.sh"
source "${EJABBERD_HOME}/docker/lib/config.sh"
source "${EJABBERD_HOME}/docker/lib/base_functions.sh"
source "${EJABBERD_HOME}/docker/lib/functions.sh"
make_dhparam() {
local dhfile=$1
local bits=$2
log "Writing dh file to '${dhfile}'..."
openssl dhparam -out ${dhfile} ${bits}
}
if is_true ${EJABBERD_DHPARAM} ; then
file_exist ${SSLDHPARAM} \
|| make_dhparam ${SSLDHPARAM} 4096
fi
exit 0

View File

@ -1,26 +0,0 @@
#!/bin/bash
source "${EJABBERD_HOME}/docker/lib/base_config.sh"
source "${EJABBERD_HOME}/docker/lib/config.sh"
source "${EJABBERD_HOME}/docker/lib/base_functions.sh"
source "${EJABBERD_HOME}/docker/lib/functions.sh"
set_erlang_cookie() {
chmod 600 ${ERLANGCOOKIEFILE}
log "Set erlang cookie to ${ERLANG_COOKIE}..."
echo ${ERLANG_COOKIE} > ${ERLANGCOOKIEFILE}
chmod 400 ${ERLANGCOOKIEFILE}
}
file_exist ${FIRST_START_DONE_FILE} \
&& exit 0
# set erlang cookie if ERLANG_COOKIE is set in environemt
is_set ${ERLANG_COOKIE} \
&& set_erlang_cookie
exit 0

View File

@ -1,36 +0,0 @@
#!/bin/bash
set -e
source "${EJABBERD_HOME}/docker/lib/base_config.sh"
source "${EJABBERD_HOME}/docker/lib/config.sh"
source "${EJABBERD_HOME}/docker/lib/base_functions.sh"
source "${EJABBERD_HOME}/docker/lib/functions.sh"
make_config() {
local filename=$1
local template="${CONFIGTMPDIR}/${filename}.tpl"
local configfile="${CONFIGDIR}/${filename}"
file_exist $configfile \
&& return 1
if [ ! -e ${configfile} ]; then
log "Generating ${configfile} config file..."
cat $template \
| python -c "${PYTHON_JINJA2}" \
> $configfile
else
echo "File ${configfile} exists."
fi
}
# /opt/ejabberd/conf/ejabberd.yml
make_config "ejabberd.yml"
# /opt/ejabberd/conf/ejabberdctl.cfg
make_config "ejabberdctl.cfg"
exit 0

View File

@ -1,69 +0,0 @@
#!/bin/bash
set -e
# Environment
export EJABBERD_HTTPS=${EJABBERD_HTTPS:-'true'}
export EJABBERD_STARTTLS=${EJABBERD_STARTTLS:-'true'}
export EJABBERD_S2S_SSL=${EJABBERD_S2S_SSL:-'true'}
source "${EJABBERD_HOME}/docker/lib/base_config.sh"
source "${EJABBERD_HOME}/docker/lib/config.sh"
source "${EJABBERD_HOME}/docker/lib/base_functions.sh"
source "${EJABBERD_HOME}/docker/lib/functions.sh"
# discover hostname
readonly nodename=$(get_nodename)
# set erlang node to node name from get_nodename
if [[ "$ERLANG_NODE" == "nodename" ]]; then
export ERLANG_NODE="ejabberd@${nodename}"
fi
run_scripts() {
local run_script=$1
local run_script_dir="${EJABBERD_HOME}/docker/${run_script}"
log "Run ${run_script} scripts..."
for script in ${run_script_dir}/*.sh ; do
if [ -f ${script} -a -x ${script} ] ; then
${script}
fi
done
}
_trap() {
run_scripts "stop"
log "Stopping ejabberd..."
$EJABBERDCTL stop
$EJABBERDCTL stopped
exit 0
}
# Catch signals and shutdown ejabberd
trap _trap SIGTERM SIGINT
# print logfiles to stdout
tail -F ${LOGDIR}/crash.log \
${LOGDIR}/error.log \
${LOGDIR}/erlang.log \
${LOGDIR}/ejabberd.log &
# start ejabberd
run_scripts "pre"
log "Starting ejabberd..."
$EJABBERDCTL start
$EJABBERDCTL started
log "Ejabberd started."
run_scripts "post"
# run forever
while true; do sleep 1; done
log "Ejabberd stopped."
exit 0

View File

@ -1,21 +0,0 @@
#!/bin/bash
set -e
source "${EJABBERD_HOME}/docker/lib/base_config.sh"
source "${EJABBERD_HOME}/docker/lib/config.sh"
source "${EJABBERD_HOME}/docker/lib/base_functions.sh"
source "${EJABBERD_HOME}/docker/lib/functions.sh"
leave_cluster() {
log "Leave cluster..."
rm ${CLUSTER_NODE_FILE}
NO_WARNINGS=true ${EJABBERDCTL} leave_cluster
}
file_exist ${CLUSTER_NODE_FILE} \
&& leave_cluster
exit 0

822
ejabberd.doap Normal file
View File

@ -0,0 +1,822 @@
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://usefulinc.com/ns/doap#"
xmlns:xmpp="https://linkmauve.fr/ns/xmpp-doap#"
xmlns:schema="https://schema.org/">
<Project>
<name>ejabberd</name>
<shortdesc>XMPP Server with MQTT Broker and SIP Service</shortdesc>
<description>Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP Server, MQTT Broker, SIP Service)</description>
<created>2002-11-16</created>
<os>BSD</os>
<os>Linux</os>
<os>macOS</os>
<os>Windows</os>
<programming-langauge>Erlang</programming-langauge>
<programming-langauge>C</programming-langauge>
<category rdf:resource="https://linkmauve.fr/ns/xmpp-doap#category-jabber"/>
<category rdf:resource="https://linkmauve.fr/ns/xmpp-doap#category-server"/>
<category rdf:resource="https://linkmauve.fr/ns/xmpp-doap#category-xmpp"/>
<homepage rdf:resource="https://www.ejabberd.im"/>
<download-page rdf:resource="https://www.process-one.net/en/ejabberd/downloads/"/>
<download-mirror rdf:resource="https://github.com/processone/ejabberd/tags"/>
<license rdf:resource="https://raw.githubusercontent.com/processone/ejabberd/master/COPYING"/>
<schema:logo rdf:resource="https://docs.ejabberd.im/assets/img/footer_logo_e@2x.png"/>
<bug-database rdf:resource="https://github.com/processone/ejabberd/issues"/>
<support-forum rdf:resource="xmpp:ejabberd@conference.process-one.net?join"/>
<repository>
<GitRepository>
<location rdf:resource="https://github.com/processone/ejabberd.git"/>
<browse rdf:resource="https://github.com/processone/ejabberd"/>
</GitRepository>
</repository>
<implements rdf:resource="https://www.rfc-editor.org/info/rfc3261"/>
<implements rdf:resource="https://www.rfc-editor.org/info/rfc3920"/>
<implements rdf:resource="https://www.rfc-editor.org/info/rfc3921"/>
<implements rdf:resource="https://www.rfc-editor.org/info/rfc5766"/>
<implements rdf:resource="https://www.rfc-editor.org/info/rfc5802"/>
<implements rdf:resource="https://www.rfc-editor.org/info/rfc6120"/>
<implements rdf:resource="https://www.rfc-editor.org/info/rfc6121"/>
<implements rdf:resource="https://www.rfc-editor.org/info/rfc6122"/>
<implements rdf:resource="https://www.rfc-editor.org/info/rfc6455"/>
<implements rdf:resource="https://www.rfc-editor.org/info/rfc7395"/>
<implements rdf:resource="https://www.rfc-editor.org/info/rfc7590"/>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0004.html"/>
<xmpp:version>2.9</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0012.html"/>
<xmpp:version>2.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_last</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0013.html"/>
<xmpp:version>1.2</xmpp:version>
<xmpp:since>16.02</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_offline</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0016.html"/>
<xmpp:version>1.6</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_privacy</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0022.html"/>
<xmpp:version>1.4</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_offline</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0023.html"/>
<xmpp:version>1.3</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_offline</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0030.html"/>
<xmpp:version>2.4</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_disco</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0033.html"/>
<xmpp:version>1.1</xmpp:version>
<xmpp:since>15.04</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_multicast</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0039.html"/>
<xmpp:version>0.6.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_stats</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0045.html"/>
<xmpp:version>1.25</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_muc</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0049.html"/>
<xmpp:version>1.2</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_private</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0050.html"/>
<xmpp:version>1.2</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_adhoc</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0054.html"/>
<xmpp:version>1.2</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_vcard</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0055.html"/>
<xmpp:version>1.3</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_vcard</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0059.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0060.html"/>
<xmpp:version>1.14</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_pubsub</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0065.html"/>
<xmpp:version>1.8</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_proxy65</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0077.html"/>
<xmpp:version>2.4</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_register</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0078.html"/>
<xmpp:version>2.5</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_legacy_auth</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0085.html"/>
<xmpp:version>2.1</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_client_state</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0086.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0092.html"/>
<xmpp:version>1.1</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_version</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0106.html"/>
<xmpp:version>1.1</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0114.html"/>
<xmpp:version>1.6</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>ejabberd_service</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0115.html"/>
<xmpp:version>1.5</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_caps</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0124.html"/>
<xmpp:version>1.11</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>ejabberd_bosh</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0133.html"/>
<xmpp:version>1.3.0</xmpp:version>
<xmpp:since>13.10</xmpp:since>
<xmpp:status>complete</xmpp:status>
<xmpp:note>mod_configure</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0138.html"/>
<xmpp:version>2.1</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>ejabberd_c2s</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0153.html"/>
<xmpp:version>1.1</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_vcard</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0156.html"/>
<xmpp:version>1.4.0</xmpp:version>
<xmpp:since>22.05</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_host_meta</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0157.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_disco</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0158.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>ejabberd_captcha</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0160.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_offline</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0163.html"/>
<xmpp:version>1.2</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_pubsub</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0170.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0175.html"/>
<xmpp:version>1.2</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>ejabberd_auth_anonymous</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0176.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>ejabberd_stun</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0185.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_s2s_dialback</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0191.html"/>
<xmpp:version>1.2</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_blocking</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0198.html"/>
<xmpp:version>1.5.2</xmpp:version>
<xmpp:since>14.05</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_stream_mgmt</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0199.html"/>
<xmpp:version>2.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_ping</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0202.html"/>
<xmpp:version>2.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_time</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0203.html"/>
<xmpp:version>2.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_offline</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0205.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0206.html"/>
<xmpp:version>1.4</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>ejabberd_bosh</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0212.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0215.html"/>
<xmpp:version>0.7</xmpp:version>
<xmpp:since>20.04</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_stun_disco</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0216.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0220.html"/>
<xmpp:version>1.1</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>ejabberd_s2s, mod_s2s_dialback</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0227.html"/>
<xmpp:version>1.1</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>ejabberd_piefxis</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0231.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>ejabberd_captcha</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0237.html"/>
<xmpp:version>1.3</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_roster</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0243.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0248.html"/>
<xmpp:version>0.2</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_pubsub</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0249.html"/>
<xmpp:version>1.2</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_muc</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0270.html"/>
<xmpp:version>1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0279.html"/>
<xmpp:version>0.2</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_sic</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0280.html"/>
<xmpp:version>0.13.2</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_carboncopy</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0288.html"/>
<xmpp:version>1.0.1</xmpp:version>
<xmpp:since>24.10</xmpp:since>
<xmpp:status>complete</xmpp:status>
<xmpp:note>mod_s2s_bidi</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0313.html"/>
<xmpp:version>0.6.1</xmpp:version>
<xmpp:since>15.06</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_mam</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0317.html"/>
<xmpp:version>0.1</xmpp:version>
<xmpp:since>21.12</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_muc_room, conversejs/prosody compatible</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0328.html"/>
<xmpp:version>0.1</xmpp:version>
<xmpp:since>19.09</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_jidprep</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0334.html"/>
<xmpp:version>0.2</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_mam, mod_muc_log, mod_offline</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0352.html"/>
<xmpp:version>0.1</xmpp:version>
<xmpp:since>14.12</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_client_state</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0355.html"/>
<xmpp:version>0.4.1</xmpp:version>
<xmpp:since>16.09</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_delegation</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0356.html"/>
<xmpp:version>0.4.1</xmpp:version>
<xmpp:since>24.10</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_privilege</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0357.html"/>
<xmpp:version>0.2</xmpp:version>
<xmpp:since>17.08</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_push</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0359.html"/>
<xmpp:version>0.5.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_mam</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0363.html"/>
<xmpp:version>0.2</xmpp:version>
<xmpp:since>15.10</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_http_upload</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0368.html"/>
<xmpp:version>1.1.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0369.html"/>
<xmpp:version>0.14.1</xmpp:version>
<xmpp:since>16.03</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_mix</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0386.html"/>
<xmpp:version>0.3.0</xmpp:version>
<xmpp:since>24.02</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0388.html"/>
<xmpp:version>0.4.0</xmpp:version>
<xmpp:since>24.02</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0398.html"/>
<xmpp:version>0.2.0</xmpp:version>
<xmpp:since>18.03</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_avatar</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0402.html"/>
<xmpp:version>1.1.3</xmpp:version>
<xmpp:since>23.10</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_private</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0405.html"/>
<xmpp:version>0.3.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_mix_pam</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0410.html"/>
<xmpp:version>1.1.0</xmpp:version>
<xmpp:since>18.12</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_muc_room</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0411.html"/>
<xmpp:version>0.2.0</xmpp:version>
<xmpp:since>18.12</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_private</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0421.html"/>
<xmpp:version>0.1.0</xmpp:version>
<xmpp:since>23.10</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_muc_occupantid</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0424.html"/>
<xmpp:version>0.4.0</xmpp:version>
<xmpp:since>24.02</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0425.html"/>
<xmpp:version>0.3.0</xmpp:version>
<xmpp:since>24.06</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_mam</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0440.html"/>
<xmpp:version>0.4.0</xmpp:version>
<xmpp:since>24.02</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0441.html"/>
<xmpp:version>0.2.0</xmpp:version>
<xmpp:since></xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>mod_mam</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0474.html"/>
<xmpp:version>0.3.0</xmpp:version>
<xmpp:since>24.02</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note></xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0480.html"/>
<xmpp:version>0.1</xmpp:version>
<xmpp:since>24.10</xmpp:since>
<xmpp:status>complete</xmpp:status>
<xmpp:note>mod_scram_upgrade</xmpp:note>
</xmpp:SupportedXep>
</implements>
<implements>
<xmpp:SupportedXep>
<xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0485.html"/>
<xmpp:version>0.2.0</xmpp:version>
<xmpp:since>24.02</xmpp:since>
<xmpp:status></xmpp:status>
<xmpp:note>, mod_pubsub_serverinfo in ejabberd-contrib.git</xmpp:note>
</xmpp:SupportedXep>
</implements>
</Project>
</rdf:RDF>

View File

@ -6,8 +6,8 @@
# Required-Stop: $remote_fs $network $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts ejabberd jabber server
# Description: Starts ejabberd jabber server, an XMPP
# Short-Description: Starts ejabberd XMPP server
# Description: Starts ejabberd XMPP server, an XMPP
# compliant server written in Erlang.
### END INIT INFO

View File

@ -3,17 +3,20 @@ Description=XMPP Server
After=network.target
[Service]
Type=forking
User=ejabberd
Group=ejabberd
Type=notify
User=@installuser@
Group=@installuser@
LimitNOFILE=65536
Restart=on-failure
RestartSec=5
ExecStart=/bin/sh -c '@ctlscriptpath@/ejabberdctl start && @ctlscriptpath@/ejabberdctl started'
WatchdogSec=30
ExecStart=@ctlscriptpath@/ejabberdctl foreground
ExecStop=/bin/sh -c '@ctlscriptpath@/ejabberdctl stop && @ctlscriptpath@/ejabberdctl stopped'
ExecReload=@ctlscriptpath@/ejabberdctl reload_config
NotifyAccess=all
PrivateDevices=true
ProtectSystem=full
AmbientCapabilities=CAP_NET_BIND_SERVICE
TimeoutSec=300
[Install]
WantedBy=multi-user.target

View File

@ -1,732 +1,244 @@
###
###' ejabberd configuration file
### ejabberd configuration file
###
### The parameters used in this configuration file are explained at
###
### https://docs.ejabberd.im/admin/configuration
###
### 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.
### *******************************************************
### ******* !!! WARNING !!! *******
### ******* YAML IS INDENTATION SENSITIVE *******
### ******* MAKE SURE YOU INDENT SECTIONS CORRECTLY *******
### *******************************************************
### 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"
###. ===============
###' 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"
- 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
loglevel: info
###. ===============
###' LISTENING PORTS
## If you already have certificates, list them here
# certfiles:
# - /etc/letsencrypt/live/domain.tld/fullchain.pem
# - /etc/letsencrypt/live/domain.tld/privkey.pem
##
## 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, 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
max_stanza_size: 262144
shaper: c2s_shaper
access: c2s
starttls_required: true
-
port: 5223
ip: "::"
module: ejabberd_c2s
max_stanza_size: 262144
shaper: c2s_shaper
access: c2s
tls: true
-
port: 5269
ip: "::"
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"
## 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
## module: ejabberd_xmlrpc
## access_commands: {}
max_stanza_size: 524288
shaper: s2s_shaper
-
port: 5443
ip: "::"
module: ejabberd_http
tls: true
request_handlers:
/admin: ejabberd_web_admin
/api: mod_http_api
/bosh: mod_bosh
/captcha: ejabberd_captcha
/upload: mod_http_upload
/ws: ejabberd_http_ws
-
port: 5280
ip: "::"
module: ejabberd_http
request_handlers:
"/websocket": ejabberd_http_ws
## "/pub/archive": mod_http_fileserver
web_admin: true
http_bind: true
## register: true
captcha: true
/admin: ejabberd_web_admin
/.well-known/acme-challenge: ejabberd_acme
-
port: 3478
ip: "::"
transport: udp
module: ejabberd_stun
use_turn: true
## The server's public IPv4 address:
# turn_ipv4_address: "203.0.113.3"
## The server's public IPv6 address:
# turn_ipv6_address: "2001:db8::3"
-
port: 1883
ip: "::"
module: mod_mqtt
backlog: 1000
###. ==================
###' S2S GLOBAL OPTIONS
s2s_use_starttls: optional
##
## 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 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
###. ===============
###' 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"
- 127.0.0.0/8
- ::1/128
##
## Bad XMPP servers
##
## bad_servers:
## server:
## - "xmpp.zombie.org"
## - "xmpp.spam.com"
access_rules:
local:
allow: local
c2s:
deny: blocked
allow: all
announce:
allow: admin
configure:
allow: admin
muc_create:
allow: local
pubsub_createnode:
allow: local
trusted_network:
allow: loopback
##
## Define specific ACLs in a virtual host.
##
## host_config:
## "localhost":
## acl:
## admin:
## user:
## - "bob-local@localhost"
api_permissions:
"console commands":
from: ejabberd_ctl
who: all
what: "*"
"webadmin commands":
from: ejabberd_web_admin
who: admin
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
###. ============
###' SHAPER RULES
shaper:
normal:
rate: 3000
burst_size: 20000
fast: 100000
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
5000: admin
100: all
c2s_shaper:
- none: admin
- normal
## All S2S connections use the "fast" shaper
none: admin
normal: all
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
## 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 to execute all commands except start and stop
## with any available access method (ejabberdctl, http-api, xmlrpc
## depending what is enabled on server).
##
## Remember to not remove "console commands" section when doing modifications
## or ejabberdctl will not be able to execute commands!
##
##
## api_permissions:
## "console commands":
## from:
## - ejabberd_ctl
## who: all
## what: "*"
## "admin access":
## who:
## - admin
## - oauth:
## - scope: "ejabberd:admin"
## - admin
## what:
## - "*"
## - "!stop"
## - "!start"
## 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
###. =======
###' MODULES
##
## Modules enabled in all ejabberd virtual hosts.
##
modules:
mod_adhoc: {}
## mod_admin_extra: {}
mod_announce: # recommends mod_adhoc
mod_admin_extra: {}
mod_announce:
access: announce
mod_blocking: {} # requires mod_privacy
mod_avatar: {}
mod_blocking: {}
mod_bosh: {}
mod_caps: {}
mod_carboncopy: {}
mod_client_state: {}
mod_configure: {} # requires mod_adhoc
##mod_delegation: {} # for xep0356
mod_configure: {}
mod_disco: {}
## mod_echo: {}
mod_irc: {}
mod_http_bind: {}
## mod_http_fileserver:
## docroot: "/var/www"
## accesslog: "/var/log/ejabberd/access.log"
mod_fail2ban: {}
mod_http_api: {}
mod_http_upload:
put_url: https://@HOST@:5443/upload
custom_headers:
"Access-Control-Allow-Origin": "https://@HOST@"
"Access-Control-Allow-Methods": "GET,HEAD,PUT,OPTIONS"
"Access-Control-Allow-Headers": "Content-Type"
mod_last: {}
mod_mam:
## Mnesia is limited to 2GB, better to use an SQL backend
## For small servers SQLite is a good fit and is very easy
## to configure. Uncomment this when you have SQL configured:
## db_type: sql
assume_mam_usage: true
default: always
mod_mqtt: {}
mod_muc:
## host: "conference.@HOST@"
access:
- allow
access_admin:
- allow: admin
access_create: muc_create
access_persistent: muc_create
## mod_muc_log: {}
## mod_multicast: {}
access_mam:
- allow
default_room_options:
mam: true
mod_muc_admin: {}
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_proxy65:
access: local
max_connections: 5
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:
search: false
mod_version: {}
# Since 17.02 S2S Dialback (XEP-0220) and Stream Management (XEP-0198)
# are implemented in modules
- flat
- pep
force_node_config:
## Avoid buggy clients to make their bookmarks public
storage:bookmarks:
access_model: whitelist
mod_push: {}
mod_push_keepalive: {}
mod_register:
## Only accept registration requests from the "trusted"
## network (see access_rules section above).
## Think twice before enabling registration from any
## address. See the Jabber SPAM Manifesto for details:
## https://github.com/ge0rg/jabber-spam-fighting-manifesto
ip_access: trusted_network
mod_roster:
versioning: true
mod_s2s_bidi: {}
mod_s2s_dialback: {}
mod_stream_mgmt: {}
mod_shared_roster: {}
mod_stream_mgmt:
resend_on_timeout: if_offline
mod_stun_disco: {}
mod_vcard: {}
mod_vcard_xupdate: {}
mod_version:
show_os: false
##
## 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:
### vim: set filetype=yaml tabstop=8

View File

@ -12,36 +12,22 @@
#
#POLL=true
#.
#' SMP: SMP support ([enable|auto|disable])
#
# Explanation in Erlang/OTP documentation:
# enable: starts the Erlang runtime system with SMP support enabled.
# This may fail if no runtime system with SMP support is available.
# auto: starts the Erlang runtime system with SMP support enabled if it
# is available and more than one logical processor are detected.
# disable: starts a runtime system without SMP support.
#
# Default: auto
#
#SMP=auto
#.
#' ERL_MAX_PORTS: Maximum number of simultaneously open Erlang ports
#
# ejabberd consumes two or three ports for every connection, either
# from a client or from another Jabber server. So take this into
# from a client or from another XMPP 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
#
# If Ejabberd is configured to run in cluster, and a firewall is blocking ports,
# If ejabberd is configured to run in cluster, and a firewall is blocking ports,
# it's possible to make Erlang use a defined range of port (instead of dynamic
# ports) for node communication.
#
@ -61,12 +47,28 @@
#INET_DIST_INTERFACE=127.0.0.1
#.
#' ERL_EPMD_ADDRESS: IP addresses where epmd listens for connections
#' ERL_DIST_PORT: Port number for Erlang distribution
#
# IMPORTANT: This option works only in Erlang/OTP R14B03 and newer.
# For Erlang distribution, clustering and ejabberdctl usage, the
# Erlang VM listens in a random TCP port number, and the Erlang Port
# Mapper Daemon (EPMD) is spawned and used to determine this port
# number.
#
# ERL_DIST_PORT can define this port number. In that case, EPMD is
# not spawned during ejabberd startup, and ERL_EPMD_ADDRESS is
# ignored. ERL_DIST_PORT must be set to the same port number during
# ejabberd startup and when calling ejabberdctl. This feature
# requires at least Erlang/OTP 23.1.
#
# Default: not defined
#
#ERL_DIST_PORT=5210
#.
#' ERL_EPMD_ADDRESS: IP addresses where EPMD listens for connections
#
# This environment variable may be set to a comma-separated
# list of IP addresses, in which case the epmd daemon
# list of IP addresses, in which case the EPMD daemon
# will listen only on the specified address(es) and on the
# loopback address (which is implicitly added to the list if it
# has not been specified). The default behaviour is to listen on
@ -85,10 +87,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,17 +101,18 @@
# 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
#
# The next variable allows to specify additional options passed to erlang while
# starting ejabberd. Some useful options are -noshell, -detached, -heart. When
# ejabberd is started from an init.d script options -noshell and -detached are
# added implicitly. See erl(1) for more info.
# The next variable allows to specify additional options passed to
# all commands using erlang interpreter. This applies to starting
# ejabberd server itself but also auxiliary commands like for example
# starting debug shell. See erl(1) for list of commands that can be
# used here.
#
# It might be useful to add "-pa /usr/local/lib/ejabberd/ebin" if you
# want to add local modules in this path.
@ -118,6 +121,20 @@
#
#ERL_OPTIONS=""
#.
#' EJABBERD_OPTS: Additional Erlang options to start ejabberd
#
# The next variable allows to specify additional options passed to erlang while
# starting ejabberd. Some useful options are -noshell, -detached, -heart. When
# ejabberd is started from an init.d script options -noshell and -detached are
# added implicitly. See erl(1) for more info.
#
# For example you can use value "-heart -env HEART_BEAT_TIMEOUT 120 -env ERL_CRASH_DUMP_SECONDS 60"
#
# Default: ""
#
#EJABBERD_OPTS=""
#.
#' ERLANG_NODE: Erlang node name
#

View File

@ -1,265 +1,147 @@
#!/bin/bash
#!/bin/sh
# define default configuration
POLL=true
SMP=auto
ERL_MAX_PORTS=32000
ERL_PROCESSES=250000
ERL_MAX_ETS_TABLES=1400
FIREWALL_WINDOW=""
INET_DIST_INTERFACE=""
ERLANG_NODE=ejabberd@localhost
# define default environment variables
SCRIPT_DIR=`cd ${0%/*} && pwd`
ERL={{erl}}
IEX={{bindir}}/iex
EPMD={{epmd}}
INSTALLUSER={{installuser}}
ERL_LIBS={{libdir}}
[ -z "$SCRIPT" ] && SCRIPT=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd -P)"
# shellcheck disable=SC2034
ERTS_VSN="{{erts_vsn}}"
ERL="{{erl}}"
EPMD="{{epmd}}"
IEX="{{iexpath}}"
INSTALLUSER="{{installuser}}"
# 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
INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6)
if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then
mkdir -p "$INSTALLUSER_HOME"
chown "$INSTALLUSER" "$INSTALLUSER_HOME"
fi
EXEC_CMD="su $INSTALLUSER -c"
fi
done
if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
EXEC_CMD="bash -c"
fi
if [ "$EXEC_CMD" = "false" ] ; then
echo "This command can only be run by root or the user $INSTALLUSER" >&2
exit 4
fi
# 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="bash -c"
EXEC_CMD="as_current_user"
echo "WARNING: It is not recommended to run ejabberd as root" >&2
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
declare -a ARGS=()
while [ $# -ne 0 ] ; do
PARAM="$1"
shift
case $PARAM in
--) break ;;
--no-timeout) EJABBERD_NO_TIMEOUT="--no-timeout" ;;
--node) ERLANG_NODE_ARG=$1 ; shift ;;
--config-dir) ETC_DIR="$1" ; shift ;;
--config) EJABBERD_CONFIG_PATH="$1" ; shift ;;
--ctl-config) EJABBERDCTL_CONFIG_PATH="$1" ; shift ;;
--logs) LOGS_DIR="$1" ; shift ;;
--spool) SPOOL_DIR="$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) CONFIG_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 [ "$ETC_DIR" = "" ] ; then
ETC_DIR={{sysconfdir}}/ejabberd
fi
if [ "$EJABBERDCTL_CONFIG_PATH" = "" ] ; then
EJABBERDCTL_CONFIG_PATH=$ETC_DIR/ejabberdctl.cfg
fi
if [ -f "$EJABBERDCTL_CONFIG_PATH" ] ; then
. "$EJABBERDCTL_CONFIG_PATH"
fi
if [ "$EJABBERD_CONFIG_PATH" = "" ] ; then
EJABBERD_CONFIG_PATH=$ETC_DIR/ejabberd.yml
fi
if [ "$LOGS_DIR" = "" ] ; then
LOGS_DIR={{localstatedir}}/log/ejabberd
fi
if [ "$SPOOL_DIR" = "" ] ; then
SPOOL_DIR={{localstatedir}}/lib/ejabberd
fi
if [ "$EJABBERD_DOC_PATH" = "" ] ; then
EJABBERD_DOC_PATH={{docdir}}
fi
if [ "$ERLANG_NODE_ARG" != "" ] ; then
ERLANG_NODE=$ERLANG_NODE_ARG
fi
if [ "{{release}}" != "true" -a "$EJABBERD_BIN_PATH" = "" ] ; then
EJABBERD_BIN_PATH={{libdir}}/ejabberd/priv/bin
fi
EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
DATETIME=`date "+%Y%m%d-%H%M%S"`
ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
ERL_INETRC=$ETC_DIR/inetrc
# define ejabberd variables if not already defined from the command line
: "${CONFIG_DIR:="{{config_dir}}"}"
: "${LOGS_DIR:="{{logs_dir}}"}"
: "${EJABBERD_CONFIG_PATH:="$CONFIG_DIR/ejabberd.yml"}"
: "${EJABBERDCTL_CONFIG_PATH:="$CONFIG_DIR/ejabberdctl.cfg"}"
# Allows passing extra Erlang command-line arguments in vm.args file
: "${VMARGS:="$CONFIG_DIR/vm.args"}"
# shellcheck source=ejabberdctl.cfg.example
[ -f "$EJABBERDCTL_CONFIG_PATH" ] && . "$EJABBERDCTL_CONFIG_PATH"
[ -n "$ERLANG_NODE_ARG" ] && ERLANG_NODE="$ERLANG_NODE_ARG"
[ "$ERLANG_NODE" = "${ERLANG_NODE%@*}" ] && ERLANG_NODE="$ERLANG_NODE@$(hostname -s)"
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && S="-s"
: "${SPOOL_DIR:="{{spool_dir}}"}"
: "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}"
# define mnesia options
MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS"
# 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#*-}"
ERLANG_OPTS="+K $POLL +P $ERL_PROCESSES $ERL_OPTIONS"
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" $ERLANG_OPTS -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
if [ "$(echo "$INET_DIST_INTERFACE2" | grep -o "," | wc -l)" -eq 7 ] ; then
INET_DIST_INTERFACE2="$INET_DIST_INTERFACE2 -proto_dist inet6_tcp"
fi
KERNEL_OPTS="${KERNEL_OPTS} -kernel inet_dist_use_interface \"${INET_DIST_INTERFACE2}\""
ERLANG_OPTS="$ERLANG_OPTS -kernel inet_dist_use_interface $INET_DIST_INTERFACE2"
fi
if [ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] ; then
NAME="-sname"
else
NAME="-name"
fi
IEXNAME="-$NAME"
[ -n "$ERL_DIST_PORT" ] && ERLANG_OPTS="$ERLANG_OPTS -erl_epmd_port $ERL_DIST_PORT -start_epmd false"
# if vm.args file exists in config directory, pass it to Erlang VM
[ -f "$VMARGS" ] && ERLANG_OPTS="$ERLANG_OPTS -args_file $VMARGS"
ERL_LIBS='{{libdir}}'
ERL_CRASH_DUMP="$LOGS_DIR"/erl_crash_$(date "+%Y%m%d-%H%M%S").dump
ERL_INETRC="$CONFIG_DIR"/inetrc
# define ejabberd environment parameters
if [ "$EJABBERD_CONFIG_PATH" != "${EJABBERD_CONFIG_PATH%.yml}" ] ; then
rate=$(sed '/^[ ]*log_rate_limit/!d;s/.*://;s/ *//' $EJABBERD_CONFIG_PATH)
rotate=$(sed '/^[ ]*log_rotate_size/!d;s/.*://;s/ *//' $EJABBERD_CONFIG_PATH)
count=$(sed '/^[ ]*log_rotate_count/!d;s/.*://;s/ *//' $EJABBERD_CONFIG_PATH)
date=$(sed '/^[ ]*log_rotate_date/!d;s/.*://;s/ *//' $EJABBERD_CONFIG_PATH)
else
rate=$(sed '/^[ ]*log_rate_limit/!d;s/.*,//;s/ *//;s/}\.//' $EJABBERD_CONFIG_PATH)
rotate=$(sed '/^[ ]*log_rotate_size/!d;s/.*,//;s/ *//;s/}\.//' $EJABBERD_CONFIG_PATH)
count=$(sed '/^[ ]*log_rotate_count/!d;s/.*,//;s/ *//;s/}\.//' $EJABBERD_CONFIG_PATH)
date=$(sed '/^[ ]*log_rotate_date/!d;s/.*,//;s/ *//;s/}\.//' $EJABBERD_CONFIG_PATH)
fi
[ -z "$rate" ] || EJABBERD_OPTS="log_rate_limit $rate"
[ -z "$rotate" ] || EJABBERD_OPTS="${EJABBERD_OPTS} log_rotate_size $rotate"
[ -z "$count" ] || EJABBERD_OPTS="${EJABBERD_OPTS} log_rotate_count $count"
[ -z "$date" ] || EJABBERD_OPTS="${EJABBERD_OPTS} log_rotate_date '$date'"
[ -z "$EJABBERD_OPTS" ] || EJABBERD_OPTS="-ejabberd ${EJABBERD_OPTS}"
[ -d "$SPOOL_DIR" ] || $EXEC_CMD "mkdir -p $SPOOL_DIR"
cd "$SPOOL_DIR"
# define ejabberd parameters
EJABBERD_OPTS="\
$(sed '/^log_rotate_size/!d;s/:[ \t]*\([0-9]\{1,\}\).*/ \1/;s/:[ \t]*\(infinity\).*/ \1 /;s/^/ /' "$EJABBERD_CONFIG_PATH")\
$(sed '/^log_rotate_count/!d;s/:[ \t]*\([0-9]*\).*/ \1 /;s/^/ /' "$EJABBERD_CONFIG_PATH")\
$(sed '/^log_burst_limit_count/!d;s/:[ \t]*\([0-9]*\).*/ \1 /;s/^/ /' "$EJABBERD_CONFIG_PATH")\
$(sed '/^log_burst_limit_window_time/!d;s/:[ \t]*\([0-9]*[a-z]*\).*/ \1 /;s/^/ /' "$EJABBERD_CONFIG_PATH")\
$EJABBERD_OPTS"
[ -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_LOG_PATH
export EJABBERD_BIN_PATH
export EJABBERD_DOC_PATH
export EJABBERD_PID_PATH
export ERL_CRASH_DUMP
export ERL_EPMD_ADDRESS
export ERL_DIST_PORT
export ERL_INETRC
export ERL_MAX_PORTS
export ERL_MAX_ETS_TABLES
export CONTRIB_MODULES_PATH
export CONTRIB_MODULES_CONF_DIR
export ERL_LIBS
export SCRIPT_DIR
shell_escape_str()
set_dist_client()
{
if test $# -eq 0; then
printf '"" '
else
shell_escape "$@"
fi
[ -n "$ERL_DIST_PORT" ] && ERLANG_OPTS="$ERLANG_OPTS -dist_listen false"
}
shell_escape()
# run command either directly or via su $INSTALLUSER
exec_cmd()
{
local RES=()
for i in "$@"; do
if test -z "$i"; then
printf '"" '
else
printf '%q ' "$i"
fi
done
}
# start server
start()
{
check_start
CMD="`shell_escape \"$ERL\" \"$NAME\" \"$ERLANG_NODE\"` \
-noinput -detached \
$MNESIA_OPTS \
$KERNEL_OPTS \
$EJABBERD_OPTS \
-s ejabberd \
$ERLANG_OPTS \
`shell_escape \"${ARGS[@]}\" \"$@\"`"
$EXEC_CMD "$CMD"
}
# attach to server
debug()
{
debugwarning
NID=$(uid debug)
CMD="`shell_escape \"$ERL\" \"$NAME\" \"$NID\"` \
-remsh $ERLANG_NODE \
-hidden \
$KERNEL_OPTS \
$ERLANG_OPTS \
`shell_escape \"${ARGS[@]}\" \"$@\"`"
$EXEC_CMD "$CMD"
}
# attach to server using Elixir
iexdebug()
{
debugwarning
# Elixir shell is hidden as default
NID=$(uid debug)
CMD="`shell_escape \"$IEX\" \"$IEXNAME\" \"$NID\"` \
-remsh $ERLANG_NODE \
--erl `shell_escape \"$KERNEL_OPTS\"` \
--erl `shell_escape \"$ERLANG_OPTS\"` \
--erl `shell_escape \"${ARGS[@]}\"` \
--erl `shell_escape_str \"$@\"`"
$EXEC_CMD "ERL_PATH=\"$ERL\" $CMD"
}
# start interactive server
live()
{
livewarning
CMD="`shell_escape \"$ERL\" \"$NAME\" \"${ERLANG_NODE}\"` \
$MNESIA_OPTS \
$KERNEL_OPTS \
$EJABBERD_OPTS \
-s ejabberd \
$ERLANG_OPTS \
`shell_escape \"${ARGS[@]}\" \"$@\"`"
$EXEC_CMD "$CMD"
}
# start interactive server with Elixir
iexlive()
{
livewarning
echo $@
CMD="`shell_escape \"$IEX\" \"$IEXNAME\" \"${ERLANG_NODE}\"` \
--erl \"-mnesia dir \\\"$SPOOL_DIR\\\"\" \
--erl \"`shell_escape \"$KERNEL_OPTS\"`\" \
--erl \"`shell_escape \"$EJABBERD_OPTS\"`\" \
--app ejabberd \
--erl `shell_escape \"$ERLANG_OPTS\"` \
--erl `shell_escape \"${ARGS[@]}\"` \
--erl `shell_escape_str \"$@\"`"
$EXEC_CMD "ERL_PATH=\"$ERL\" $CMD"
}
# start server in the foreground
foreground()
{
check_start
CMD="`shell_escape \"$ERL\" \"$NAME\" \"$ERLANG_NODE\"` \
-noinput \
$MNESIA_OPTS \
$KERNEL_OPTS \
$EJABBERD_OPTS \
-s ejabberd \
$ERLANG_OPTS \
`shell_escape \"${ARGS[@]}\" \"$@\"`"
$EXEC_CMD "$CMD"
case $EXEC_CMD in
as_install_user) su -s /bin/sh -c 'exec "$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" "$@"
}
# usage
debugwarning()
{
if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then
@ -272,21 +154,22 @@ debugwarning()
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 "To exit and detach this shell from ejabberd, press:"
echo " control+g and then q"
echo ""
#vt100 echo "Please do NOT use control+c in this debug shell !"
#vt100 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 foo
read -r _
echo ""
fi
}
livewarning()
{
check_start
if [ "$EJABBERD_BYPASS_WARNINGS" != "true" ] ; then
echo "--------------------------------------------------------------------"
echo ""
@ -296,57 +179,70 @@ livewarning()
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 "To exit and detach this shell from ejabberd, press:"
echo " control+g and then q"
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 foo
read -r _
echo ""
fi
}
etop()
check_etop_result()
{
NID=$(uid top)
$EXEC_CMD "$ERL \
$NAME $NID \
-hidden -s etop -s erlang halt -output text -node $ERLANG_NODE"
result=$?
if [ $result -eq 1 ] ; then
echo ""
echo "It seems there was some problem running 'ejabberdctl etop'."
echo "Is the error message something like this?"
echo " Failed to load module 'etop' because it cannot be found..."
echo "Then probably ejabberd was compiled with development tools disabled."
echo "To use 'etop', recompile ejabberd with: ./configure --enable-tools"
echo ""
exit $result
fi
}
ping()
check_iex_result()
{
[ -z "$1" ] && PEER=${ERLANG_NODE} || PEER=$1
if [ "$PEER" = "${PEER%.*}" ] ; then
PING_NAME="-sname"
PING_NODE=$(hostname -s)
else
PING_NAME="-name"
PING_NODE=$(hostname)
result=$?
if [ $result -eq 127 ] ; then
echo ""
echo "It seems there was some problem finding 'iex' binary from Elixir."
echo "Probably ejabberd was compiled with Rebar3 and Elixir disabled, like:"
echo " ./configure"
echo "which is equivalent to:"
echo " ./configure --with-rebar=rebar3 --disable-elixir"
echo "To use 'iex', recompile ejabberd enabling Elixir or using Mix:"
echo " ./configure --enable-elixir"
echo " ./configure --with-rebar=mix"
echo ""
exit $result
fi
NID=$(uid ping ${PING_NODE})
$EXEC_CMD "$ERL \
$PING_NAME $NID \
-hidden $KERNEL_OPTS $ERLANG_OPTS \
-eval 'io:format(\"~p~n\",[net_adm:ping('\"'\"'$PEER'\"'\"')])' \
-s erlang halt -output text -noinput"
}
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 " 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 " start Start in server mode"
echo " foreground Start in server mode (attached)"
echo " foreground-quiet Start in server mode (attached), show only critical messages"
echo " live Start in interactive mode, with Erlang shell"
echo " iexlive Start in interactive mode, with Elixir shell"
echo ""
echo "Commands to interact with a running ejabberd node:"
echo " debug Attach an interactive Erlang shell to a running node"
echo " iexdebug Attach an interactive Elixir shell to a running node"
echo " etop Attach to a running node and start Erlang Top"
echo " ping Send ping to the node, returns pong or pang"
echo " started|stopped Wait for the node to fully start|stop"
echo ""
echo "Optional parameters when starting an ejabberd node:"
echo " --config-dir dir Config ejabberd: $ETC_DIR"
echo " --config-dir dir Config ejabberd: $CONFIG_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"
@ -355,92 +251,164 @@ help()
echo ""
}
# common control function
ctl()
{
NID=$(uid ctl)
CMD="`shell_escape \"$ERL\" \"$NAME\" \"$NID\"` \
-noinput -hidden $KERNEL_OPTS -s ejabberd_ctl \
-extra `shell_escape \"$ERLANG_NODE\"` $EJABBERD_NO_TIMEOUT \
`shell_escape \"$@\"`"
$EXEC_CMD "$CMD"
result=$?
case $result in
2) help;;
3) help;;
*) :;;
# dynamic node name helper
uid() {
ERTSVERSION="$("$ERL" -version 2>&1 | sed 's|.*\([0-9][0-9]\).*|\1|g')"
if [ $ERTSVERSION -lt 11 ] ; then # otp 23.0 includes erts 11.0
# Erlang/OTP lower than 23, which doesn's support dynamic node code
N=1
PF=$(( $$ % 97 ))
while
case $# in
0) NN="${PF}-${N}-${ERLANG_NODE}"
;;
1) NN="${PF}-${N}-${1}-${ERLANG_NODE}"
;;
2) NN="${PF}-${N}-${1}@${2}"
;;
esac
return $result
}
uid()
{
uuid=$(uuidgen 2>/dev/null)
[ -z "$uuid" -a -f /proc/sys/kernel/random/uuid ] && uuid=$(</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}
N=$(( N + 1 + ( $$ % 5 ) ))
"$EPMD" -names 2>/dev/null | grep -q " ${NN%@*} "
do :; done
echo $NN
else
# Erlang/OTP 23 or higher: use native dynamic node code
# https://www.erlang.org/patches/otp-23.0#OTP-13812
if [ "$ERLANG_NODE" != "${ERLANG_NODE%.*}" ]; then
echo "undefined@${ERLANG_NODE#*@}"
else
echo "undefined"
fi
fi
}
# stop epmd if there is no other running node
stop_epmd()
{
[ -n "$ERL_DIST_PORT" ] && return
"$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()
{
[ -n "$ERL_DIST_PORT" ] && return
"$EPMD" -names 2>/dev/null | grep -q " ${ERLANG_NODE%@*} " && {
ps ux | grep -v grep | 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 && {
}
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 \
-eval 'net_kernel:connect_node('"'$ERLANG_NODE'"')' \
-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[0]}" in
'start') start;;
'debug') debug;;
'iexdebug') iexdebug;;
'live') live;;
'iexlive') iexlive;;
'foreground') foreground;;
'ping'*) ping ${ARGS[1]};;
'etop') etop;;
'started') wait_for_status 0 30 2;; # wait 30x2s before timeout
'stopped') wait_for_status 3 30 2 && stop_epmd;; # wait 30x2s 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
;;
foreground-quiet)
check_start
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS -noinput -ejabberd quiet true
;;
live)
livewarning
check_start
exec_erl "$ERLANG_NODE" $EJABBERD_OPTS
;;
debug)
debugwarning
set_dist_client
exec_erl "$(uid debug)" -hidden -remsh "$ERLANG_NODE"
;;
etop)
set_dist_client
exec_erl "$(uid top)" -hidden -remsh "$ERLANG_NODE" -s etop \
-output text
check_etop_result
;;
iexdebug)
debugwarning
set_dist_client
exec_iex "$(uid debug)" --remsh "$ERLANG_NODE"
check_iex_result
;;
iexlive)
livewarning
exec_iex "$ERLANG_NODE" --erl "$EJABBERD_OPTS"
check_iex_result
;;
ping)
PEER=${2:-$ERLANG_NODE}
[ "$PEER" = "${PEER%.*}" ] && PS="-s"
set_dist_client
exec_cmd "$ERL" ${PS:--}name "$(uid ping "$(hostname $PS)")" $ERLANG_OPTS \
-noinput -hidden \
-eval 'net_kernel:connect_node('"'$PEER'"')' \
-eval 'io:format("~p~n",[net_adm:ping('"'$PEER'"')])' \
-s erlang halt -output text
;;
started)
set_dist_client
wait_status 0 30 2 # wait 30x2s before timeout
;;
stopped)
set_dist_client
wait_status 3 30 2 && stop_epmd # wait 30x2s before timeout
;;
*)
set_dist_client
exec_erl "$(uid ctl)" -hidden -noinput \
-eval 'net_kernel:connect_node('"'$ERLANG_NODE'"')' \
-s ejabberd_ctl \
-extra "$ERLANG_NODE" $NO_TIMEOUT "$@"
result=$?
case $result in
2|3) help;;
*) :;;
esac
exit $result
;;
esac

58
elvis.config Normal file
View File

@ -0,0 +1,58 @@
[
{
elvis,
[
{config,
[#{dirs => ["src"],
filter => "*.erl",
ignore => ['ELDAPv3', eldap_filter_yecc],
ruleset => erl_files,
rules => [{elvis_text_style, line_length, #{limit => 1000, skip_comments => false}},
{elvis_text_style, no_tabs, disable},
{elvis_style, atom_naming_convention, disable},
{elvis_style, consistent_variable_casing, disable},
{elvis_style, dont_repeat_yourself, #{min_complexity => 70}},
{elvis_style, export_used_types, disable},
{elvis_style, function_naming_convention, disable},
{elvis_style, god_modules, #{limit => 300}},
{elvis_style, invalid_dynamic_call, disable},
{elvis_style, macro_module_names, disable},
{elvis_style, macro_names, disable},
{elvis_style, max_function_arity, disable}, % #{max_arity => 15}},
{elvis_style, nesting_level, disable},
{elvis_style, no_author, disable},
{elvis_style, no_catch_expressions, disable},
{elvis_style, no_debug_call, disable},
{elvis_style, no_if_expression, disable},
{elvis_style, no_import, disable},
{elvis_style, no_match_in_condition, disable},
{elvis_style, no_nested_try_catch, disable},
{elvis_style, no_single_clause_case, disable},
{elvis_style, no_spec_with_records, disable},
{elvis_style, no_throw, disable},
{elvis_style, operator_spaces, disable},
{elvis_style, param_pattern_matching, disable},
{elvis_style, private_data_types, disable},
{elvis_style, variable_naming_convention, disable}
]
},
%#{dirs => ["include"],
% filter => "*.hrl",
% ruleset => hrl_files},
#{dirs => ["."],
filter => "Makefile.in",
ruleset => makefiles,
rules => [{elvis_text_style, line_length, #{limit => 400,
skip_comments => false}},
{elvis_style, dont_repeat_yourself, #{min_complexity => 20}}
]
}
]
}
]
}
].
%% vim: set filetype=erlang tabstop=8:

32
erlang_ls.config Normal file
View File

@ -0,0 +1,32 @@
#otp_path: "/usr/lib/erlang"
#plt_path: "_build/default/rebar3_24.3.3_plt"
#code_reload:
# node: ejabberd@localhost
apps_dirs:
- "_build/default/lib/*"
deps_dirs:
- "_build/default/lib/*"
include_dirs:
- "_build/default/lib"
- "_build/default/lib/*/include"
- "include"
macros:
- name: DEPRECATED_GET_STACKTRACE
- name: HAVE_ERL_ERROR
- name: HAVE_URI_STRING
- name: OTP_BELOW_27
- name: SIP
- name: STUN
diagnostics:
enabled:
- crossref
disabled:
# - dialyzer
- unused_includes # Otherwise it complains about unused logger.hrl
lenses:
disabled:
- ct-run-test
- function-references
- server-info
- show-behaviour-usages
- suggest-spec

View File

@ -1,66 +0,0 @@
#!/usr/bin/perl
use Unix::Syslog qw(:macros :subs);
my $domain = $ARGV[0] || "example.com";
while(1)
{
# my $rin = '',$rout;
# vec($rin,fileno(STDIN),1) = 1;
# $ein = $rin;
# my $nfound = select($rout=$rin,undef,undef,undef);
my $buf = "";
syslog LOG_INFO,"waiting for packet";
my $nread = sysread STDIN,$buf,2;
do { syslog LOG_INFO,"port closed"; exit; } unless $nread == 2;
my $len = unpack "n",$buf;
my $nread = sysread STDIN,$buf,$len;
my ($op,$user,$host,$password) = split /:/,$buf;
#$user =~ s/\./\//og;
my $jid = "$user\@$domain";
my $result;
syslog(LOG_INFO,"request (%s)", $op);
SWITCH:
{
$op eq 'auth' and do
{
$result = 1;
},last SWITCH;
$op eq 'setpass' and do
{
$result = 1;
},last SWITCH;
$op eq 'isuser' and do
{
# password is null. Return 1 if the user $user\@$domain exitst.
$result = 1;
},last SWITCH;
$op eq 'tryregister' and do
{
$result = 1;
},last SWITCH;
$op eq 'removeuser' and do
{
# password is null. Return 1 if the user $user\@$domain exitst.
$result = 1;
},last SWITCH;
$op eq 'removeuser3' and do
{
$result = 1;
},last SWITCH;
};
my $out = pack "nn",2,$result ? 1 : 0;
syswrite STDOUT,$out;
}
closelog;

View File

@ -1,75 +0,0 @@
#!/bin/sh
#
# PROVIDE: ejabberd
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
HOME=/usr/pkg/jabber D=/usr/pkg/jabber/ejabberd export HOME
name="ejabberd"
rcvar=$name
if [ -r /etc/rc.conf ]
then
. /etc/rc.conf
else
eval ${rcvar}=YES
fi
# $flags from environment overrides ${rcvar}_flags
if [ -n "${flags}" ]
then
eval ${rcvar}_flags="${flags}"
fi
checkyesno()
{
eval _value=\$${1}
case $_value in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) return 0 ;;
[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) return 1 ;;
*)
echo "\$${1} is not set properly."
return 1
;;
esac
}
cmd=${1:-start}
case ${cmd} in
force*)
cmd=${cmd#force}
eval ${rcvar}=YES
;;
esac
if checkyesno ${rcvar}
then
else
exit 0
fi
case ${cmd} in
start)
if [ -x $D/src ]; then
echo "Starting ${name}."
cd $D/src
ERL_MAX_PORTS=32000 export ERL_MAX_PORTS
ulimit -n $ERL_MAX_PORTS
su jabber -c "/usr/pkg/bin/erl -sname ejabberd -s ejabberd -heart -detached -sasl sasl_error_logger '{file, \"ejabberd-sasl.log\"}' &" \
1>/dev/null 2>&1
fi
;;
stop)
echo "rpc:call('ejabberd@`hostname -s`', init, stop, [])." | \
su jabber -c "/usr/pkg/bin/erl -sname ejabberdstop"
;;
restart)
echo "rpc:call('ejabberd@`hostname -s`', init, restart, [])." | \
su jabber -c "/usr/pkg/bin/erl -sname ejabberdrestart"
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

View File

@ -1,81 +0,0 @@
#!/bin/sh
echo '1. fetch, compile, and install erlang'
if [ ! pkg_info erlang 1>/dev/null 2>&1 ]; then
cd /usr/pkgsrc/lang/erlang
make fetch-list|sh
make
make install
fi
if pkg_info erlang | grep -q erlang-9.1nb1; then
else
echo "erlang-9.1nb1 not installed" 1>&2
exit 1
fi
echo '2. install crypt_drv.so'
if [ ! -d /usr/pkg/lib/erlang/lib/crypto-1.1.2.1/priv/lib ] ; then
mkdir -p /usr/pkg/lib/erlang/lib/crypto-1.1.2.1/priv/lib
fi
if [ ! -f /usr/pkg/lib/erlang/lib/crypto-1.1.2.1/priv/lib/crypto_drv.so ]; then
cp work/otp*/lib/crypto/priv/*/*/crypto_drv.so \
/usr/pkg/lib/erlang/lib/crypto-1.1.2.1/priv/lib
fi
echo '3. compile and install elibcrypto.so'
if [ ! -f /usr/pkg/lib/erlang/lib/crypto-1.1.2.1/priv/lib/elibcrypto.so ]; then
cd /usr/pkgsrc/lang/erlang/work/otp_src_R9B-1/lib/crypto/c_src
ld -r -u CRYPTO_set_mem_functions -u MD5 -u MD5_Init -u MD5_Update \
-u MD5_Final -u SHA1 -u SHA1_Init -u SHA1_Update -u SHA1_Final \
-u des_set_key -u des_ncbc_encrypt -u des_ede3_cbc_encrypt \
-L/usr/lib -lcrypto -o ../priv/obj/i386--netbsdelf/elibcrypto.o
cc -shared \
-L/usr/pkgsrc/lang/erlang/work/otp_src_R9B-1/lib/erl_interface/obj/i386--netbsdelf \
-o ../priv/obj/i386--netbsdelf/elibcrypto.so \
../priv/obj/i386--netbsdelf/elibcrypto.o -L/usr/lib -lcrypto
cp ../priv/obj/i386--netbsdelf/elibcrypto.so \
/usr/pkg/lib/erlang/lib/crypto-1.1.2.1/priv/lib
fi
echo '4. compile and install ssl_esock'
if [ ! -f /usr/pkg/lib/erlang/lib/ssl-2.3.5/priv/bin/ssl_esock ]; then
cd /usr/pkg/lib/erlang/lib/ssl-2.3.5/priv/obj/
make
fi
echo '5. initial ejabberd configuration'
cd /usr/pkg/jabber/ejabberd/src
./configure
echo '6. edit ejabberd Makefiles'
for M in Makefile mod_*/Makefile; do
if [ ! -f $M.orig ]; then
mv $M $M.orig
sed -e s%/usr/local%/usr/pkg%g < $M.orig > $M
fi
done
echo '7. compile ejabberd'
gmake
for A in mod_irc mod_muc mod_pubsub; do
(cd $A; gmake)
done
echo ''
echo 'now edit ejabberd.cfg'
echo ''
echo 'to start ejabberd: erl -sname ejabberd -s ejabberd'

View File

@ -1,66 +0,0 @@
% jabber.dbc.mtview.ca.us
override_acls.
{acl, admin, {user, "mrose", "jabber.dbc.mtview.ca.us"}}.
{access, announce, [{allow, admin},
{deny, all}]}.
{access, c2s, [{deny, blocked},
{allow, all}]}.
{access, c2s_shaper, [{none, admin},
{normal, all}]}.
{access, configure, [{allow, admin},
{deny, all}]}.
{access, disco_admin, [{allow, admin},
{deny, all}]}.
{access, muc_admin, [{allow, admin},
{deny, all}]}.
{access, register, [{deny, all}]}.
{access, s2s_shaper, [{fast, all}]}.
{auth_method, internal}.
{host, "jabber.dbc.mtview.ca.us"}.
{outgoing_s2s_port, 5269}.
{shaper, normal, {maxrate, 1000}}.
{shaper, fast, {maxrate, 50000}}.
{welcome_message, none}.
{listen, [{5222, ejabberd_c2s,
[{access, c2s},
{shaper, c2s_shaper}]},
{5223, ejabberd_c2s,
[{access, c2s},
{shaper, c2s_shaper},
{ssl, [{certfile, "/etc/openssl/certs/ejabberd.pem"}]}]},
{5269, ejabberd_s2s_in,
[{shaper, s2s_shaper}]}]}.
{modules, [
{mod_register, []},
{mod_roster, []},
{mod_privacy, []},
{mod_configure, []},
{mod_disco, []},
{mod_stats, []},
{mod_vcard, []},
{mod_offline, []},
{mod_echo, [{host, "echo.jabber.dbc.mtview.ca.us"}]},
{mod_private, []},
% {mod_irc, []},
{mod_muc, []},
{mod_pubsub, []},
{mod_time, []},
{mod_last, []},
{mod_version, []}
]}.
% Local Variables:
% mode: erlang
% End:

View File

@ -1,77 +0,0 @@
<!-- aim-transport.xml -->
<jabber>
<!--
You need to add elogger and rlogger entries when using ejabberd.
In this case the transport will do the logging.
-->
<log id='elogger'>
<host/>
<logtype/>
<format>%d: [%t] (%h): %s</format>
<file>/var/log/jabber/aim-transport-error.log</file>
</log>
<log id='rlogger'>
<host/>
<logtype>record</logtype>
<format>%d %h %s</format>
<file>/var/log/jabber/aim-transport-record.log</file>
</log>
<!--
ejabberd do not provide XDB services.
xdb_file.so is loaded in to handle all XDB requests.
-->
<xdb id="xdb">
<host/>
<load>
<xdb_file>/usr/local/lib/jabber/libjabberdxdbfile.so</xdb_file> <!-- This file is part of jabberd-1.4.x. -->
</load>
<xdb_file xmlns="jabber:config:xdb_file">
<spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
</xdb_file>
</xdb>
<!--
Make sure that all host names here are resolveable via DNS if you
want the transport to be available to the public.
-->
<service id='aim.SERVER.COM'>
<!-- aim-transport configuration. -->
<aimtrans xmlns='jabber:config:aimtrans'>
<vCard>
<FN>AIM/ICQ Transport</FN>
<DESC>This is the AIM/ICQ Transport.</DESC>
<MAIL>EMAIL@ADDRESS.COM</MAIL>
<URL>http://aim-transport.jabberstudio.org/</URL>
</vCard>
<charset>cp1252</charset>
</aimtrans>
<!-- aim-transport module. -->
<load>
<aim_transport>/usr/local/lib/jabber/aim-transport.so</aim_transport>
</load>
</service>
<!--
The settings below have to match the settings you made
in your ejabberd.cfg configuration file.
-->
<service id="icq-linker">
<uplink/>
<connect>
<ip>127.0.0.1</ip>
<port>5233</port>
<secret>SECRET</secret>
</connect>
</service>
<pidfile>/var/run/jabber/aim-transport.pid</pidfile>
</jabber>

View File

@ -1,136 +0,0 @@
<!-- ile.xml -->
<config>
<jabber>
<server>127.0.0.1</server>
<port>5238</port>
<secret>SECRET</secret>
<service>ile.SERVER.COM</service>
<connectsleep>7</connectsleep> <!-- seconds to wait if we get disconnected -->
<language>en</language>
<vCard>
<FN>I Love Email</FN>
<DESC>With this service you can receive email notifications.
Security warning: Be careful when using this. Your password will travel in clear from your client to your jabber server if you don't use SSL and it will probably travel in clear from the jabber server to your email server. Use with care. This shouldn't be an issue in your Intranet, but it is if you use an ILE installed in a foreign jabber server.</DESC>
<MAIL>EMAIL@ADDRESS.COM</MAIL>
<URL>http://ile.jabberstudio.org/</URL>
</vCard>
</jabber>
<debug>
<file>/var/log/jabber/ile.log</file>
<level>1</level> <!-- man Net::Jabber::Debug -->
</debug>
<mail>
<checkinterval>10</checkinterval> <!-- in minutes -->
<timeout>20</timeout> <!-- timeout for IMAP/POP connection, in seconds -->
</mail>
<files>
<users>/var/spool/jabber/ile.SERVER.COM/users.db</users>
<passwords>/var/spool/jabber/ile.SERVER.COM/passwords.db</passwords>
<hosts>/var/spool/jabber/ile.SERVER.COM/hosts.db</hosts>
<types>/var/spool/jabber/ile.SERVER.COM/types.db</types>
<notifyxa>/var/spool/jabber/ile.SERVER.COM/notifyxa.db</notifyxa>
<notifydnd>/var/spool/jabber/ile.SERVER.COM/notifydnd.db</notifydnd>
<urls>/var/spool/jabber/ile.SERVER.COM/urls.db</urls>
</files>
<form>
<en>
<instructions>Please fill in the fields,according to your email account settings and notification preferences</instructions>
<title>ILE: Email notification service</title>
<email_options>Email account settings</email_options>
<user>Username</user>
<pass>Password</pass>
<host>Hostname</host>
<type>Type</type>
<newmail>You have received NUM email messages since last time I checked, which was CHECKINTERVAL minutes ago.</newmail>
<errorcheck>There was an error while trying to check mail for ACCOUNT.</errorcheck>
<notify_options>Notification Options</notify_options>
<notifyxa>Notify even when Xtended Away (XA)</notifyxa>
<notifydnd>Notify even when Do Not Disturb (DND)</notifydnd>
<webmail_url>Webmail URL</webmail_url>
<webmail_login>Login to ACCOUNT</webmail_login>
<iledesc>ILE: an email notifier component: http://ile.jabberstudio.org</iledesc>
</en>
<es>
<instructions>Por favor, rellene los campos del formulario.</instructions>
<title>ILE: Servicio de notificación de correo</title>
<email_options>Configuración de la cuenta de correo</email_options>
<user>Usuario</user>
<pass>Clave</pass>
<host>Host</host>
<type>Tipo</type>
<newmail>Ha recibido NUM email(s) desde la última comprobación que fue hace CHECKINTERVAL minutos</newmail>
<errorcheck>Ha habido un error en la comprobación del correo para la cuenta ACCOUNT.</errorcheck>
<notify_options>Opciones de notificación</notify_options>
<notifyxa>Notificar incluso si muy ausente (XA)</notifyxa>
<notifydnd>Notificar incluso si no molestar (DND)</notifydnd>
<webmail_url>Webmail URL</webmail_url>
<webmail_login>Leer correo de ACCOUNT</webmail_login>
<iledesc>ILE: un notificador de nuevo email - http://ile.jabberstudio.org</iledesc>
</es>
<ca>
<instructions>Ompli els camps del formulari.</instructions>
<title>ILE: Servei de notificació de nou email</title>
<email_options>Dades del compte de mail</email_options>
<user>Usuari</user>
<pass>Clau</pass>
<host>Host</host>
<type>Tipus</type>
<newmail>Ha rebut NUM email(s) des de la última comprobació que va ser fa CHECKINTERVAL minuts.</newmail>
<errorcheck>S'ha produit un error en la comprobació del correu per al compte ACCOUNT.</errorcheck>
<notify_options>Opcions de notificació</notify_options>
<notifyxa>Notificar si molt absent (XA)</notifyxa>
<notifydnd>Notificar si no molestar (DND)</notifydnd>
<webmail_url>Webmail URL</webmail_url>
<webmail_login>Llegir correu de ACCOUNT</webmail_login>
<iledesc>ILE: un notificador de nou email - http://ile.jabberstudio.org</iledesc>
</ca>
<ro>
<!-- Contributed by Adrian Rappa -->
<instructions>Va rog completati urmatoarele campuri</instructions>
<title>I Love Email: new email notification service</title>
<email_options>Email account settings</email_options>
<user>Nume utilizator</user>
<pass>Parola</pass>
<host>Nume gazda</host>
<type>Tip</type>
<newmail>Ati primit NUM mesaj(e) de la ultima verificare, care a fost acum CHECKINTERVAL minute.</newmail>
<errorcheck>A fost eroare in timp ce incercam sa verific posta pentru ACCOUNT.</errorcheck>
<notify_options>Notification Options</notify_options>
<notifyxa>Notify even when Xtended Away (XA)</notifyxa>
<notifydnd>Notify even when Do Not Disturb (DND)</notifydnd>
<webmail_url>Webmail URL</webmail_url>
<webmail_login>Login to ACCOUNT</webmail_login>
<iledesc>ILE: an email notifier component: http://ile.jabberstudio.org</iledesc>
</ro>
<nl>
<!-- Contributed by Sander Devrieze -->
<instructions>Vul volgende velden in.</instructions>
<title>ILE: Dienst voor e-mailnotificaties</title>
<email_options>Instellingen van e-mailaccount</email_options>
<user>Gebruikersnaam</user>
<pass>Wachtwoord</pass>
<host>Inkomende mailserver</host>
<type>Type verbinding</type>
<newmail>U hebt NUM berichten ontvangen sinds CHECKINTERVAL minuten geleden.</newmail>
<errorcheck>Fout tijdens controle op nieuwe e-mails bij ACCOUNT. ILE zal deze account niet meer opnieuw controleren tot u uw registratiegegevens wijzigt of opnieuw aanmeldt.</errorcheck>
<notify_options>Notificatie-instellingen</notify_options>
<notifyxa>Notificeer ook in de status Niet Beschikbaar (XA)</notifyxa>
<notifydnd>Notificeer ook in de status Niet Storen (DND)</notifydnd>
<webmail_url>URL van webmail</webmail_url>
<webmail_login>Aanmelden op ACCOUNT</webmail_login>
<iledesc>ILE: een dienst om e-mailnotificaties te ontvangen: http://ile.jabberstudio.org</iledesc>
</nl>
</form>
</config>

View File

@ -1,149 +0,0 @@
<jggtrans>
<service jid="gg.SERVER.COM"/>
<!-- This connects the jabber-gg-transport process to ejabberd. -->
<connect id="gglinker">
<ip>127.0.0.1</ip>
<port>5237</port>
<secret>SECRET</secret>
</connect>
<register>
<!-- This tag contains the message displayed to users at registration time.
You can use <p/> and/or <br/> to break lines. Multiple spaces and newlines
are converted to just one, so formatting of config file doesn't really matter. -->
<instructions>
Fill in your GG number (after "username")
and password to register on the transport.
<p/>To change your information in the GaduGadu directory you need to fill in the other fields.
<p/>To remove registration you need to leave the form blank.
</instructions>
</register>
<search>
<!-- This tag contains the message displayed to users at search time. -->
<instructions>
To search people:<br/>
First fill in surname or family name, nickname, city, birthyear or range of birthyears (eg. 1950-1960)
and gender (you may fill in more fields at once).<br/>
or<br/>
Fill in phone number<br/>
or<br/>
Fill in the GG number of the person you are searching.
</instructions>
</search>
<gateway>
<!-- This is message, that may be displayed to user when adding gg contact. -->
<desc>Please fill in the GaduGadu number of the person you want to add.</desc>
<!-- And this is the prompt for GG number. -->
<prompt>GG Nummer</prompt>
</gateway>
<vCard>
<FN>Gadu-Gadu Transport</FN>
<DESC>This is the Gadu-Gadu Transport.</DESC>
<EMAIL>EMAIL@ADDRESS.COM</EMAIL>
<URL>http://www.jabberstudio.org/projects/jabber-gg-transport/</URL>
</vCard>
<!-- Default user locale (language).
Empty means system locale setting,
no (or commented-out) <default_locale> tag means no translations. -->
<!-- <default_locale>pl_PL</default_locale> -->
<!-- Logger configuration.
You may configure one logger of type "syslog" and/or one of type "file".
You may also not configure logging at all. -->
<log type="syslog" facility="local0"/>
<log type="file">/var/log/jabber/jabber-gg-transport.log</log>
<!-- Uncomment this, if you want proxy to be used for Gadu-Gadu connection. -->
<!--
<proxy>
<ip>127.0.0.1</ip>
<port>8080</port>
</proxy>
-->
<!-- You can change these values according to your needs. -->
<conn_timeout>60</conn_timeout>
<ping_interval>10</ping_interval>
<!-- Gadu-Gadu server doesn't seem to answer pings anymore :-(
So let's give it 10 year :-) -->
<pong_timeout>315360000</pong_timeout>
<!-- This time after disconnection from Gadu-Gadu server the transport
will try to connect again. -->
<reconnect>300</reconnect>
<!-- How long to wait before restart, after jabber server connection is broken
negative value means, that jggtrans should terminate. -->
<restart_timeout>60</restart_timeout>
<!-- Delay between the unavailable presence is received from user and loggin out
from Gadu-Gadu - for nice <presence type="invisible"/> support. -->
<disconnect_delay>5</disconnect_delay>
<!-- list of Gadu-Gadu servers to use.
<hub/> means "use GG hub to find server"
<server/> tag should contain server address and may contain "port"
attribute with port number. When TLS is available (supported by libgadu)
it will be used unless "tls" attribute is set to "no". Please notice,
that not all servers will accept TLS connections.
Servers (including hub) are tried in order as they appear in <servers/>
element.
A reasonable default server list is hardcoded in jggtrans.
-->
<!--
<servers>
<hub/>
<server port="443">217.17.41.90</server>
<server tls="no">217.17.41.85</server>
<server tls="no">217.17.41.88</server>
</servers>
-->
<!-- Spool directory. This is the place, where user info will be stored. -->
<!-- Be careful about permissions - users' Gadu-Gadu passwords are stored there. -->
<spool>/var/spool/jabber/gg.SERVER.COM/</spool>
<!-- Where to store pid file. This tag is optional. -->
<pidfile>/var/run/jabber/jabber-gg-transport.pid</pidfile>
<!-- jid allowed to do some administrative task (eg. discovering online users).
May be used multiple times. -->
<admin>GG_TRANSPORT_ADMIN@SERVER.COM</admin>
<!-- ACL gives detailed access control to the transport. -->
<acl>
<!-- Example entries: -->
<allow who="admin@SERVER.COM" what="iq/query?xmlns=http://jabber.org/protocol/stats"/>
<!-- will allow statistics gathering to admin@SERVER.COM -->
<deny who="*" what="iq/query?xmlns=http://jabber.org/protocol/stats"/>
<!-- will deny statistics gathering for anybody else -->
<!-- <allow who="*@SERVER.COM"/> -->
<!-- will allow anything else to users from "SERVER.COM" -->
<!-- <deny what="iq/query?xmlns=jabber:x:register"/> -->
<!-- will deny registration for all other users -->
<!-- <allow what="presence"/> -->
<!-- allow presence from anybody -->
<!-- <allow what="iq"/> -->
<!-- allow iq from anybody -->
<!-- <allow what="message"/> -->
<!-- allow message from anybody -->
<!-- <deny/> -->
<!-- will deny anything else -->
</acl>
</jggtrans>

View File

@ -1,128 +0,0 @@
<!-- jit.xml -->
<jabber>
<!--
You need to add elogger and rlogger entries here when using ejabberd.
In this case the transport will do the logging.
-->
<log id='elogger'>
<host/>
<logtype/>
<file>/var/log/jabber/jit-error</file> <!-- WPJabber logs with date. -->
</log>
<log id='rlogger'>
<host/>
<logtype>record</logtype>
<file>/var/log/jabber/jit-record</file> <!-- WPJabber logs with date. -->
</log>
<!--
ejabberd do not provide XDB services.
xdb_file-jit.so (the renamed xdb_file.so from WPJabber) is
loaded in to handle all XDB requests.
Read also the documentation in xdb_file/README from the JIT package.
-->
<xdb id="xdb">
<host/>
<load>
<xdb_file>/usr/local/lib/jabber/xdb_file.so</xdb_file> <!-- The xdb_file.so from WPJabber/JIT. -->
</load>
<xdb_file xmlns="jabber:config:xdb_file">
<spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
</xdb_file>
</xdb>
<!--
Make sure that all host names here are resolveable via DNS if you
want the transport to be available to the public.
-->
<service id="icq.SERVER.COM">
<!--
Replace SERVER.COM with the same as above to enable sms.
-->
<host>sms.icq.SERVER.COM</host>
<!-- JIT configuration. -->
<icqtrans xmlns="jabber:config:icqtrans">
<sms>
<host>sms.icq.SERVER.COM</host>
<!-- Status of virtual "sms-contacts". -->
<show>away</show>
<status/>
</sms>
<instructions>Fill in your UIN and password.</instructions>
<search>Search ICQ users.</search>
<vCard>
<FN>ICQ Transport (JIT)</FN>
<DESC>This is the Jabber ICQ Transport.</DESC>
<MAIL>EMAIL@ADDRESS.COM</MAIL>
<URL>http://jit.jabberstudio.org/</URL>
</vCard>
<!-- Hashtable for users. -->
<prime>3907</prime>
<!-- Send messages from ICQ as chat to Jabber clients. -->
<chat/>
<!-- Enable this for ICQ web presence. -->
<web/>
<!--
If you don't want jabber:x:data forms
in reg and search uncomment this tag
(Not recomended).
-->
<no_xdata/>
<!--
This tag is necessary when using ejabberd.
In this way JIT will have its own contact list.
-->
<own_roster/>
<!--
When present, this tag will tell JIT not to try to
get the user's roster (which will take a bit of time
to fail in scenarios described above).
-->
<no_jabber_roster/>
<!-- File with stats. -->
<user_count_file>/var/spool/jabber/jit-count</user_count_file>
<!--
Interval beetween checking sessions: ping, messages, acks.
-->
<session_check>5</session_check>
<!-- Reconnect retries. -->
<reconnects>5</reconnects>
<!--
Time in sec when session can be inactive, 0=disabled.
-->
<session_timeout>18000</session_timeout>
<charset>windows-1252</charset>
<server>
<host port="5190">login.icq.com</host>
</server>
</icqtrans>
<!-- JIT module. -->
<load>
<icqtrans>/usr/local/lib/jabber/jit.so</icqtrans>
</load>
</service>
<!--
The settings below have to match the settings you made
in your ejabberd.cfg configuration file.
-->
<service id="icq-linker">
<host>SERVER.COM</host>
<uplink/>
<connect>
<ip>127.0.0.1</ip>
<port>5234</port>
<secret>SECRET</secret>
</connect>
</service>
<pidfile>/var/run/jabber/jit.pid</pidfile>
</jabber>

View File

@ -1,118 +0,0 @@
<!-- msn-transport.xml -->
<jabber>
<!--
You need to add elogger and rlogger entries here when using ejabberd.
In this case the transport will do the logging.
-->
<log id='elogger'>
<host/>
<logtype/>
<format>%d: [%t] (%h): %s</format>
<file>/var/log/jabber/msn-transport-error.log</file>
</log>
<log id='rlogger'>
<host/>
<logtype>record</logtype>
<format>%d %h %s</format>
<file>/var/log/jabber/msn-transport-record.log</file>
</log>
<!--
ejabberd do not provide XDB services.
xdb_file.so is loaded in to handle all XDB requests.
-->
<xdb id="xdb">
<host/>
<load>
<xdb_file>/usr/local/lib/jabber/libjabberdxdbfile.so</xdb_file>
</load>
<xdb_file xmlns="jabber:config:xdb_file">
<spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
</xdb_file>
</xdb>
<!--
Make sure that all host names here are resolveable via DNS if you
want the transport to be available to the public.
-->
<service id="msn.SERVER.COM">
<!-- msn-transport configuration. -->
<msntrans xmlns="jabber:config:msntrans">
<instructions>Fill in your MSN account and password (eg: user1@hotmail.com). A nickname is optional.</instructions>
<vCard>
<FN>MSN Transport</FN>
<DESC>This is the MSN Transport.</DESC>
<EMAIL>EMAIL@ADDRESS.COM</EMAIL>
<URL>http://msn-transport.jabberstudio.org/</URL>
</vCard>
<!--
Conference support allows you to create groupchat rooms on the
msn-transport and invite MSN users to join.
-->
<conference id="conference.msn.SERVER.COM">
<!--
This will make MSN transport invite you to a special groupchat
room when more then one user joins a normal one-on-one session.
Joining this room will make MSN transport "switch" the session
into groupchat mode. If you ignore it, MSN transport will
continue to send the messages as one-on-one chats.
-->
<invite>More than one user entered this chat session. Enter this room to switch to groupchat modus.</invite>
<notice>
<join> is available</join>
<leave> has leaved the room</leave>
</notice>
</conference>
<!-- Enable Hotmail inbox notification. -->
<headlines/>
<!--
Enable fancy friendly names
If the user enters a nickname upon registration, and the user has
a status message, their MSN friendly name will be "nickname - status message".
If the user does not enter a nickname on registration, but they do have
a status message, their friendly name will just be their status message.
If the user did enter a nickname on registration, but they have a blank status message,
then their friendly name will just be the registered nickname.
If the user did not enter a nickname on registration, and they have a blank status message,
their nickname will just be the username portion of their JID.
If the above chosen friendly name is too long, then it will be truncated and "..." placed
at the end. MSN only supports friendly names of 128 characters, so this is unavoidable.
If this is disabled, then the registered nick is always sent as the MSN friendly name,
or if that is blank, the username portion of their JID is sent instead.
-->
<fancy_friendly/>
</msntrans>
<!-- msn-transport module. -->
<load>
<msntrans>/usr/local/lib/jabber/msn-transport.so</msntrans>
</load>
</service>
<!--
The settings below have to match the settings you made
in your ejabberd.cfg configuration file.
-->
<service id="msn-linker">
<uplink/>
<connect>
<ip>127.0.0.1</ip>
<port>5235</port>
<secret>SECRET</secret>
</connect>
</service>
<pidfile>/var/run/jabber/msn-transport.pid</pidfile>
</jabber>

View File

@ -1,86 +0,0 @@
<!-- yahoo-transport-2.xml -->
<jabber>
<!--
You need to add the elogger entry here when using ejabberd.
In this case the transport will do the logging.
-->
<log id='elogger'>
<host/>
<logtype/>
<format>%d: [%t] (%h): %s</format>
<file>/var/log/jabber/yahoo-transport-2-error.log</file>
<stderr/>
</log>
<!--
ejabberd do not provide XDB services.
xdb_file.so is loaded in to handle all XDB requests.
-->
<xdb id="xdb">
<host/>
<load>
<xdb_file>/usr/local/lib/jabber/libjabberdxdbfile.so</xdb_file>
</load>
<xdb_file xmlns="jabber:config:xdb_file">
<spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
</xdb_file>
</xdb>
<!--
Make sure that all host names here are resolveable via DNS if you
want the transport to be available to the public.
-->
<service id="yahoo.SERVER.COM">
<!-- yahoo-transport-2 configuration. -->
<config xmlns="jabber:config:yahoo">
<vCard>
<NAME>Yahoo! Transport</NAME>
<FN>vCard not implemented in current version</FN>
<DESC>This is the Yahoo! transport.</DESC>
<MAIL>EMAIL@ADDRESS.COM</MAIL>
<URL>http://yahoo-transport-2.jabberstudio.org/</URL>
</vCard>
<instructions>Fill in your YAHOO! Messenger username and password to register on this transport.</instructions>
<server>scs.msg.yahoo.com</server>
<port>5050</port>
<!--
The character map. This provides character set translation from UTF-8
to the indicated character map. See the man page for 'iconv' for available
character maps on your platform. CP1252 is the standard Windows character
set.
-->
<charmap>CP1252</charmap>
<!--
When this element exists, the transport will send new mail notifications as
well as a count of unread messages when the user initially logs in.
-->
<newmail/>
</config>
<!-- yahoo-transport-2 module. -->
<load>
<yahoo_transport>/usr/local/lib/jabber/yahoo-transport-2.so</yahoo_transport>
</load>
</service>
<!--
The settings below have to match the settings you made
in your ejabberd.cfg configuration file.
-->
<service id="yahoo-linker">
<uplink/>
<connect>
<ip>127.0.0.1</ip>
<port>5236</port>
<secret>SECRET</secret>
</connect>
</service>
<pidfile>/var/run/jabber/yahoo-transport-2.pid</pidfile>
</jabber>

View File

@ -1,45 +0,0 @@
#!/bin/sh
#########################################################
#
# aim-transport -- script to start aim-transport.
#
#########################################################
DAEMON=/usr/local/sbin/jabberd-aim-transport
CONF=/etc/jabber/aim-transport.xml
NAME=jabberd-aim-transport
HOME=/etc/jabber/
USER=ejabberd
#########################################################
if [ "`/usr/bin/whoami`" != "$USER" ]; then
echo "You need to be" $USER "user to run this script."
exit 1
fi
case "$1" in
debug)
test -f $DAEMON -a -f $CONF || exit 0
echo "Starting $NAME in debugging mode."
$DAEMON -D -H $HOME -c $CONF &
;;
start)
test -f $DAEMON -a -f $CONF || exit 0
echo "Starting $NAME."
$DAEMON -H $HOME -c $CONF &
;;
stop)
echo "Stopping $NAME."
killall $NAME &
;;
restart|reload)
$0 stop
sleep 3
$0 start
;;
*)
echo "Usage: $0 {debug|start|stop|restart}"
exit 1
esac

View File

@ -1,43 +0,0 @@
#!/bin/sh
#########################################################
#
# ile -- script to start ILE.
#
#########################################################
DAEMON=/usr/local/sbin/ile.pl
NAME=ile.pl
CONF=/etc/jabber/ile.xml
USER=ejabberd
#########################################################
if [ "`/usr/bin/whoami`" != "$USER" ]; then
echo "You need to be" $USER "user to run this script."
exit 1
fi
case "$1" in
debug)
echo "Not implemented yet. Starting in normal mode"
$0 start
;;
start)
test -f $DAEMON || exit 0
echo "Starting $NAME."
$DAEMON $CONF &
;;
stop)
echo "Stopping $NAME."
killall $NAME &
;;
restart|reload)
$0 stop
sleep 3
$0 start
;;
*)
echo "Usage: $0 {debug|start|stop|status|restart}"
exit 1
esac

View File

@ -1,47 +0,0 @@
#!/bin/sh
#########################################################
#
# jabber-gg-transport -- script to start jabber-gg-transport.
#
#########################################################
DAEMON=/usr/local/sbin/jggtrans
CONF=/etc/jabber/jabber-gg-transport.xml
NAME=jggtrans
HOME=/etc/jabber/
USER=ejabberd
#########################################################
if [ "`/usr/bin/whoami`" != "$USER" ]; then
echo "You need to be" $USER "user to run this script."
exit 1
fi
case "$1" in
debug)
test -f $DAEMON -a -f $CONF || exit 0
echo "Starting $NAME in debugging mode."
$DAEMON -D -H $HOME -c $CONF &
;;
start)
test -f $DAEMON -a -f $CONF || exit 0
echo "Starting $NAME."
$DAEMON $CONF &
;;
stop)
echo "Stopping $NAME."
killall $NAME &
rm /var/run/jabber/jabber-gg-transport.pid
;;
restart|reload)
$0 stop
sleep 3
$0 start
;;
*)
echo "Usage: $0 {debug|start|stop|restart}"
exit 1
esac

View File

@ -1,45 +0,0 @@
#!/bin/sh
#########################################################
#
# jit -- script to start JIT.
#
#########################################################
DAEMON=/usr/local/sbin/wpjabber-jit
CONF=/etc/jabber/jit.xml
NAME=wpjabber-jit
HOME=/etc/jabber/
USER=ejabberd
#########################################################
if [ "`/usr/bin/whoami`" != "$USER" ]; then
echo "You need to be" $USER "user to run this script."
exit 1
fi
case "$1" in
debug)
test -f $DAEMON -a -f $CONF || exit 0
echo "Starting $NAME in debugging mode."
$DAEMON -D -H $HOME -c $CONF &
;;
start)
test -f $DAEMON -a -f $CONF || exit 0
echo "Starting $NAME."
$DAEMON -H $HOME -c $CONF &
;;
stop)
echo "Stopping $NAME."
killall $NAME &
;;
restart|reload)
$0 stop
sleep 3
$0 start
;;
*)
echo "Usage: $0 {debug|start|stop|restart}"
exit 1
esac

View File

@ -1,50 +0,0 @@
#!/bin/sh
#########################################################
#
# msn-transport -- script to start MSN Transport.
#
#########################################################
DAEMON=/usr/local/sbin/jabberd-msn-transport
CONF=/etc/jabber/msn-transport.xml
NAME=jabberd-msn-transport
HOME=/etc/jabber/
USER=ejabberd
#########################################################
if [ "`/usr/bin/whoami`" != "$USER" ]; then
echo "You need to be" $USER "user to run this script."
exit 1
fi
case "$1" in
strace)
test -f $DAEMON -a -f $CONF || exit 0
echo "Starting $NAME in strace mode."
strace -o /opt/ejabberd/var/log/jabber/strace.log $DAEMON -H $HOME -c $CONF &
;;
debug)
test -f $DAEMON -a -f $CONF || exit 0
echo "Starting $NAME in debugging mode."
$DAEMON -D -H $HOME -c $CONF &
;;
start)
test -f $DAEMON -a -f $CONF || exit 0
echo "Starting $NAME."
$DAEMON -H $HOME -c $CONF &
;;
stop)
echo "Stopping $NAME."
killall $NAME &
;;
restart|reload)
$0 stop
sleep 3
$0 start
;;
*)
echo "Usage: $0 {debug|start|stop|restart}"
exit 1
esac

View File

@ -1,45 +0,0 @@
#!/bin/sh
##############################################################
#
# yahoo-transport-2 -- script to start Yahoo-transport-2.
#
#############################################################
DAEMON=/usr/local/sbin/jabberd-yahoo-transport-2
CONF=/etc/jabber/yahoo-transport-2.xml
NAME=jabberd-yahoo-transport-2
HOME=/etc/jabber/
USER=ejabberd
#############################################################
if [ "`/usr/bin/whoami`" != "$USER" ]; then
echo "You need to be" $USER "user to run this script."
exit 1
fi
case "$1" in
debug)
test -f $DAEMON -a -f $CONF || exit 0
echo "Starting $NAME in debugging mode."
$DAEMON -D -H $HOME -c $CONF &
;;
start)
test -f $DAEMON -a -f $CONF || exit 0
echo "Starting $NAME."
$DAEMON -H $HOME -c $CONF &
;;
stop)
echo "Stopping $NAME."
killall $NAME &
;;
restart|reload)
$0 stop
sleep 3
$0 start
;;
*)
echo "Usage: $0 {debug|start|stop|restart}"
exit 1
esac

View File

@ -1,44 +0,0 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2017 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(adhoc_request,
{
lang = <<"">> :: binary(),
node = <<"">> :: binary(),
sessionid = <<"">> :: binary(),
action = <<"">> :: binary(),
xdata = false :: false | xmlel(),
others = [] :: [xmlel()]
}).
-record(adhoc_response,
{
lang = <<"">> :: binary(),
node = <<"">> :: binary(),
sessionid = <<"">> :: binary(),
status :: atom(),
defaultaction = <<"">> :: binary(),
actions = [] :: [binary()],
notes = [] :: [{binary(), binary()}],
elements = [] :: [xmlel()]
}).
-type adhoc_request() :: #adhoc_request{}.
-type adhoc_response() :: #adhoc_response{}.

View File

@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2017 ProcessOne
%%% ejabberd, Copyright (C) 2002-2024 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@ -47,3 +47,5 @@
-define(HEADER(CType),
[CType, ?AC_ALLOW_ORIGIN, ?AC_ALLOW_HEADERS]).
-define(BOSH_CACHE, bosh_cache).

View File

@ -1,72 +0,0 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2017 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_HRL).
-define(EJABBERD_HRL, true).
-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(SQL_DIR, filename:join(["priv", "sql"])).
-define(CONFIG_PATH, <<"ejabberd.cfg">>).
-define(LOG_PATH, <<"ejabberd.log">>).
-define(EJABBERD_URI, <<"http://www.process-one.net/en/ejabberd/">>).
-define(COPYRIGHT, "Copyright (c) 2002-2017 ProcessOne").
%%-define(DBGFSM, true).
-record(scram,
{storedkey = <<"">>,
serverkey = <<"">>,
salt = <<"">>,
iterationcount = 0 :: integer()}).
-type scram() :: #scram{}.
-define(SCRAM_DEFAULT_ITERATION_COUNT, 4096).
-ifdef(ERL_DEPRECATED_TYPES).
-define(TDICT, dict()).
-define(TGB_TREE, gb_tree()).
-define(TGB_SET, gb_set()).
-define(TQUEUE, queue()).
-else.
-define(TDICT, dict:dict()).
-define(TGB_TREE, gb_trees:tree()).
-define(TGB_SET, gb_sets:set()).
-define(TQUEUE, queue:queue()).
-endif.
-endif.

View File

@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2017 ProcessOne
%%% ejabberd, Copyright (C) 2002-2024 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@ -18,5 +18,5 @@
%%%
%%%----------------------------------------------------------------------
-record(vcard_xupdate, {us = {<<>>, <<>>} :: {binary(), binary()},
hash = <<>> :: binary()}).
-record(passwd, {us = {<<"">>, <<"">>} :: {binary(), binary()} | '$1',
password = <<"">> :: binary() | scram() | '_'}).

View File

@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2017 ProcessOne
%%% ejabberd, Copyright (C) 2002-2024 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@ -19,13 +19,30 @@
%%%----------------------------------------------------------------------
-type aterm() :: {atom(), atype()}.
-type atype() :: integer | string | binary |
-type atype() :: integer | string | binary | any | atom |
{tuple, [aterm()]} | {list, aterm()}.
-type rterm() :: {atom(), rtype()}.
-type rtype() :: integer | string | atom |
-type rtype() :: integer | string | atom | any |
{tuple, [rterm()]} | {list, rterm()} |
rescode | restuple.
%% The 'any' and 'atom' argument types and 'any' result type
%% should only be used %% by commands with tag 'internal',
%% which are meant to be used only internally in ejabberd,
%% and not called using external frontends.
%% The purpose of a command can either be:
%% - informative: its purpose is to obtain information
%% - modifier: its purpose is to produce some change in the server
%%
%% A modifier command should be designed just to produce its desired side-effect,
%% and its result term should just be success or failure: rescode or restuple.
%%
%% ejabberd_web_admin:make_command/2 considers that commands
%% with result type different than rescode or restuple
%% are commands that can be safely executed automatically
%% to get information and build the web page.
-type oauth_scope() :: atom().
%% ejabberd_commands OAuth ReST ACL definition:
@ -51,6 +68,7 @@
desc = "" :: string() | '_' | '$3',
longdesc = "" :: string() | '_',
version = 0 :: integer(),
note = "" :: string(),
weight = 1 :: integer(),
module :: atom() | '_',
function :: atom() | '_',
@ -58,48 +76,32 @@
policy = restricted :: open | restricted | admin | user,
%% access is: [accessRuleName] or [{Module, AccessOption, DefaultAccessRuleName}]
access = [] :: [{atom(),atom(),atom()}|atom()],
definer = unknown :: atom(),
result = {res, rescode} :: rterm() | '_' | '$2',
args_rename = [] :: [{atom(),atom()}],
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(),
note :: string(),
weight :: integer(),
module :: atom(),
function :: atom(),
args :: [aterm()],
policy :: open | restricted | admin | user,
access :: [{atom(),atom(),atom()}|atom()],
result :: rterm()}.
definer :: atom(),
result :: rterm(),
args_rename :: [{atom(),atom()}],
args_desc :: none | [string()] | '_',
result_desc :: none | string() | '_',
args_example :: none | [any()] | '_',
result_example :: any()
}.
%% @type ejabberd_commands() = #ejabberd_commands{
%% name = atom(),
%% tags = [atom()],
%% desc = string(),
%% longdesc = string(),
%% module = atom(),
%% function = atom(),
%% args = [aterm()],
%% result = rterm()
%% }.
%% desc: Description of the command
%% args: Describe the accepted arguments.
%% This way the function that calls the command can format the
%% arguments before calling.
%% @type atype() = integer | string | {tuple, [aterm()]} | {list, aterm()}.
%% Allowed types for arguments are integer, string, tuple and list.
%% @type rtype() = integer | string | atom | {tuple, [rterm()]} | {list, rterm()} | rescode | restuple.
%% A rtype is either an atom or a tuple with two elements.
%% @type aterm() = {Name::atom(), Type::atype()}.
%% An argument term is a tuple with the term name and the term type.
%% @type rterm() = {Name::atom(), Type::rtype()}.
%% A result term is a tuple with the term name and the term type.

View File

@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2017 ProcessOne
%%% ejabberd, Copyright (C) 2002-2024 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as

View File

@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2017 ProcessOne
%%% ejabberd, Copyright (C) 2002-2024 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@ -21,9 +21,10 @@
-record(request,
{method :: method(),
path = [] :: [binary()],
raw_path :: binary(),
q = [] :: [{binary() | nokey, binary()}],
us = {<<>>, <<>>} :: {binary(), binary()},
auth :: {binary(), binary()} | {oauth, binary(), []} | undefined,
auth :: {binary(), binary()} | {oauth, binary(), []} | undefined | invalid,
lang = <<"">> :: binary(),
data = <<"">> :: binary(),
ip :: {inet:ip_address(), inet:port_number()},
@ -31,7 +32,10 @@
port = 5280 :: inet:port_number(),
opts = [] :: list(),
tp = http :: protocol(),
headers = [] :: [{atom() | binary(), binary()}]}).
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(),
@ -46,6 +50,6 @@
buf :: binary(),
http_opts = [] :: list()}).
-type method() :: 'GET' | 'HEAD' | 'DELETE' | 'OPTIONS' | 'PUT' | 'POST' | 'TRACE'.
-type method() :: 'GET' | 'HEAD' | 'DELETE' | 'OPTIONS' | 'PUT' | 'POST' | 'TRACE' | 'PATCH'.
-type protocol() :: http | https.
-type http_request() :: #request{}.

View File

@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2017 ProcessOne
%%% ejabberd, Copyright (C) 2002-2024 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@ -24,3 +24,10 @@
scope = [] :: [binary()] | '_',
expire :: integer() | '$1' | '_'
}).
-record(oauth_client, {
client_id = <<"">> :: binary() | '_',
client_name = <<"">> :: binary() | '_',
grant_type :: password | implicit | '_',
options :: [any()] | '_'
}).

View File

@ -1,6 +1,8 @@
-define(ROUTES_CACHE, routes_cache).
-type local_hint() :: integer() | {apply, atom(), atom()}.
-record(route, {domain :: binary() | '_',
server_host :: binary() | '_',
-record(route, {domain :: binary(),
server_host :: binary(),
pid :: undefined | pid(),
local_hint :: local_hint() | undefined | '_'}).
local_hint :: local_hint() | undefined}).

View File

@ -1,6 +1,6 @@
%%%----------------------------------------------------------------------
%%%
%%% ejabberd, Copyright (C) 2002-2017 ProcessOne
%%% ejabberd, Copyright (C) 2002-2024 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public License as
@ -21,6 +21,8 @@
-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()}.
@ -28,7 +30,7 @@
-type info() :: [{conn, atom()} | {ip, ip()} | {node, atom()}
| {oor, boolean()} | {auth_module, atom()}
| {num_stanzas_in, non_neg_integer()}
| offline].
| {atom(), term()}].
-type prio() :: undefined | integer().
-endif.

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