24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-02 21:17:12 +02:00
Commit Graph

5730 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Christoph Scholz
00ccb119ea allow storage of emojis in archive on mssql 2019-12-27 13:06:06 +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
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
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
925998c360 Preserve order of grouped duplicates 2019-11-08 10:20:18 +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
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
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
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
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
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
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
Paweł Chmielowski
9822535e70 Convert oauth_expire option to accept timeout values 2019-10-15 11:28:47 +02: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
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
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
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
Evgeny Khramtsov
aefe2fd640 Rename to p1_acme 2019-09-25 13:10:47 +03: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
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
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
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