25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00
Commit Graph

4212 Commits

Author SHA1 Message Date
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
719b4d1183 Don't perform useless resourceprep 2017-02-27 13:58:57 +03: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
Evgeniy Khramtsov
0db99ccb4b Improve config reloading support by ejabberd_auth 2017-02-24 14:06:47 +03:00
Paweł Chmielowski
6aab450c16 Make sure that addr_re is always initialized when creating http state 2017-02-24 11:30:36 +01:00
Evgeniy Khramtsov
c15d230a57 Return ejabberd_sm:stop/0 back 2017-02-24 12:39:44 +03:00
Paweł Chmielowski
f310d7bb12 Make host header parser work correctly with ipv6 literal addresses 2017-02-24 10:25:26 +01:00
Evgeniy Khramtsov
67d6ca9f10 Improve startup procedure 2017-02-24 12:05:47 +03:00
Evgeniy Khramtsov
5b112c86bf Fix a case clause and run c2s_filter_send on send_error/3 2017-02-24 07:57:57 +03:00
Badlop
57181c0a76 get_last now always returns tuple with UTC XEP-0082 and status (#1565) 2017-02-23 23:27:57 +01:00
Badlop
6314a96b05 Protect users from delete_old_users command using a fixed access rule (#1462) 2017-02-23 19:38:17 +01:00
Badlop
4294ba6b52 Separate list of strings with \n for srg_get_info in mod_http_api (#1500) 2017-02-23 19:23:24 +01:00
Evgeny Khramtsov
33e82de475 Merge pull request #1499 from weiss/offline-stanza-id
Include stanza ID with archived offline messages
2017-02-23 20:36:05 +04:00
Holger Weiss
b475df2250 Include stanza ID with archived offline messages
Fixes #1480.
2017-02-23 16:55:35 +01:00
Christophe Romain
720741b725 Avoid orphan_item leak on affiliation/subscription removal (#1563) 2017-02-23 16:43:22 +01:00
Evgeniy Khramtsov
6cdead166b Start/stop auth modules when host is added/deleted 2017-02-23 16:19:22 +03:00
Evgeniy Khramtsov
0542c65a07 Stop all s2s connections via supervisor calls 2017-02-23 16:18:29 +03:00
Evgeniy Khramtsov
a3ea6e7723 Improve reload_config admin command 2017-02-23 11:14:49 +03:00
Evgeniy Khramtsov
7d68112265 Start/stop virtual hosts when reloading configuration file 2017-02-23 10:12:19 +03:00
Evgeniy Khramtsov
ed34b04e9b Remove unused macro 2017-02-22 20:48:51 +03:00
Evgeniy Khramtsov
96a690f607 Merge branch 'master' of github.com:processone/ejabberd 2017-02-22 19:47:00 +03:00
Evgeniy Khramtsov
3c4057ff55 Reload modules when reloading configuration file 2017-02-22 19:46:47 +03:00
Evgeniy Khramtsov
ff67860cdb Make sure all hooks are called with proper host 2017-02-22 19:45:12 +03:00
Christophe Romain
87b5e2500b Fix match of itemid on get_cached_item, fixes 14e771d8 2017-02-22 17:44:47 +01:00
Evgeniy Khramtsov
6ffd5ffd0c Test stream management queue overload 2017-02-21 12:38:03 +03:00
Evgeniy Khramtsov
adbd174959 Rename mod_sm -> mod_stream_mgmt 2017-02-21 09:18:58 +03:00
Evgeniy Khramtsov
bbfd089b7e Don't count resent stanzas
Thanks to Holger Weiß for an advise
2017-02-21 08:44:39 +03:00
Holger Weiss
61cdee97fc ejabberd_c2s: Don't drop 'user_send_packet' result
When handling a <session/> IQ, use the stanza returned by the
'user_send_packet' hook.

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

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2017-02-17 19:20:44 +03:00
Badlop
a1e8d3c3dc Commands documentation lack arguments when policy=user (#1514) 2017-02-17 12:37:42 +01:00
Peter Lemenkov
009a5007ff Use ejabberd_config:add_option/2 instead of ejabberd_config:add_local_option/2
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2017-02-16 20:47:47 +03:00
Peter Lemenkov
cb30f7733d Use ejabberd_config:get_option/2 instead of ejabberd_config:get_local_option/2
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2017-02-16 20:41:57 +03:00
Paweł Chmielowski
eec63dbefe Correct access_matches spec 2017-02-16 15:38:44 +01:00
Evgeniy Khramtsov
218eeae797 Fix some dialyzer warnings 2017-02-16 14:18:36 +03:00
Evgeniy Khramtsov
8b2d308498 Change routing API
Now 'From' and 'To' arguments must be omitted in functions
and structures related to routing.
The commit deprecates the following functions:
     ejabberd_router:route/3 in favor of ejabberd_router:route/1
     ejabberd_router:route_error/4 in favor of ejabberd_router:route_error/2
     ejabberd_local:route_iq/4 in favor of ejabberd_local:route_iq/2
     ejabberd_local:route_iq/5 in favor of ejabberd_local:route_iq/3
The format of {route, From, To, Packet} is changed in favor of {route, Packet}
2017-02-16 11:10:24 +03:00
Evgeniy Khramtsov
0d4e1abbd1 Remove relict mod_service_log 2017-02-16 00:22:48 +03:00
Evgeniy Khramtsov
f2b5153a8c Report password change in the log 2017-02-14 17:10:16 +03:00
Evgeniy Khramtsov
6fd89f5fe0 Attach IP metadata to every stanza received from stream 2017-02-14 17:09:25 +03:00
Evgeniy Khramtsov
f61c933a7a Only use GEN_SERVER macro where appropriate 2017-02-14 15:39:57 +03:00
Evgeniy Khramtsov
28f66ddd7c Attach modules to gen_mod's supervisor 2017-02-14 12:39:26 +03:00
Evgeny Khramtsov
a1e45ab56c Merge pull request #1539 from lemenkov/use_crypto_sha
RFE: Use crypto:hash/2 function
2017-02-14 11:38:05 +04:00
Evgeniy Khramtsov
f664e39374 Improve modules start/stop procedures 2017-02-14 10:25:08 +03:00
Peter Lemenkov
e7733ce7d9 Use crypto:hash/2 function
Use crypto:hash/2 function instead of ones from p1_sha.

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

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

Signed-off-by: Peter Lemenkov <lemenkov@redhat.com>
2017-01-30 14:52:04 +01:00
Paweł Chmielowski
44a9ceac0b More changes that are required from p1_pam -> epam 2017-01-29 14:35:22 +01:00
Evgeniy Khramtsov
9d144bd495 Do not drop default TLS options
Fixes #1484
2017-01-26 10:58:26 +03:00
Evgeniy Khramtsov
99fd621aed Speedup features list when a lot of virtual hosts configured 2017-01-24 10:38:29 +03:00
Evgeniy Khramtsov
0c57044c59 Make mod_disco handle features of mod_ping 2017-01-23 22:33:46 +03:00
Evgeniy Khramtsov
0ce3a3665a Make sure only {exit, normal} is not catched when executing a hook 2017-01-23 21:52:25 +03:00
Alexey Shchepin
8b5e6e4a13 Compatibility with R17 in mod_block_strangers 2017-01-23 19:04:22 +03:00
Alexey Shchepin
43bfa0efbc Check message subject in mod_block_strangers 2017-01-23 17:10:28 +03:00
Evgeniy Khramtsov
48d8498dbb Avoid using maps:get/2 to keep compatibility with OTP 17.5 2017-01-23 16:30:16 +03:00
Evgeniy Khramtsov
19bec62eb5 Fix calling to mod_offline:store_packet 2017-01-23 15:00:46 +03:00
Paweł Chmielowski
5e5a8bbdcf Don't use maps:take it available in R19 only 2017-01-23 12:56:08 +01:00
Evgeniy Khramtsov
435e5e6263 Make test suite working again 2017-01-23 13:51:05 +03:00
Evgeniy Khramtsov
e564f9ae31 Make a message is not bounced if it's archived 2017-01-21 13:47:47 +03:00
Evgeniy Khramtsov
68cf45a8b9 Archive message before delivering it to offline storage (#1348) 2017-01-21 11:47:04 +03:00
Evgeniy Khramtsov
94b23482a9 Send <compressed/> in correct order 2017-01-21 10:47:55 +03:00
Holger Weiss
14e771d871 mod_pubsub: Fix last item cache for multiple hosts
Don't let the last item cache intermix PubSub items of different virtual
domains.
2017-01-21 00:14:56 +01:00
Evgeniy Khramtsov
56ef607904 Add stanza-id to every archived message (#1477) 2017-01-20 23:21:06 +03:00
Evgeniy Khramtsov
17fe272dc5 Update copyright headers in new files 2017-01-20 19:56:19 +03:00
Evgeniy Khramtsov
d5d906184f Merge branch 'new_stream'
Conflicts:
	src/cyrsasl.erl
	src/ejabberd_c2s.erl
	src/ejabberd_cluster.erl
	src/ejabberd_frontend_socket.erl
	src/ejabberd_node_groups.erl
	src/ejabberd_router.erl
	src/mod_bosh.erl
	src/mod_ip_blacklist.erl
	src/mod_muc_mnesia.erl
	src/mod_offline.erl
	src/mod_proxy65_sm.erl
2017-01-20 19:35:46 +03:00
Paweł Chmielowski
1f02567507 Make shim for mod_http_api admin_ip_access more robust 2017-01-20 10:19:09 +01:00
Christophe Romain
4f5d54f062 Try db migration only when mnesia is configured (#1458) 2017-01-20 09:26:13 +01:00
Evgeniy Khramtsov
fc2b71a04e Restore muc_invite_hook (#1467) 2017-01-19 18:24:29 +03:00
Evgeniy Khramtsov
87b964a7f6 Make sure 'jabber:client' namespace is added to forwarded messages (#1474) 2017-01-19 18:03:07 +03:00
Evgeniy Khramtsov
4cf83ca3a7 Restore multiple invitations support (#1468) 2017-01-19 17:26:08 +03:00
Evgeniy Khramtsov
3d9997288d Don't forget to convert muc#roomconfig_mam 2017-01-19 16:42:04 +03:00
Evgeniy Khramtsov
527472f18c Support legacy muc#roomconfig values (#1469) 2017-01-19 11:12:27 +03:00
Christophe Romain
d2b8569452 Fix typo 2017-01-18 17:11:08 +01:00
Christophe Romain
3482ee5c75 Reset table only if new def change from runtime 2017-01-18 17:02:03 +01:00
Christophe Romain
3029e84faf Improve check of mnesia schema opearations 2017-01-18 16:53:36 +01:00
Evgeniy Khramtsov
044e55b98e Fix reporting dialback failures 2017-01-18 18:26:31 +03:00
Evgeniy Khramtsov
60a09285b7 Don't attempt to resolve _jabber._tcp SRV record 2017-01-18 17:54:42 +03:00
Evgeniy Khramtsov
ba47fd4649 Improve <delay/> tag insertion 2017-01-18 14:09:39 +03:00
Evgeniy Khramtsov
2de2d00f14 Cope with malformed values in 'rosterusers' SQL table (#1466) 2017-01-18 11:59:46 +03:00
Evgeniy Khramtsov
7b8c01da12 Better log bytestream termination 2017-01-17 23:06:55 +03:00
Evgeniy Khramtsov
9021ba01ac Use crypto:exor/2 instead of hand-crafted bxor 2017-01-17 22:37:44 +03:00
Evgeniy Khramtsov
b8db0a8ed6 Reset XML stream before sending SASL <success/> 2017-01-17 22:06:26 +03:00
Christophe Romain
2a68591181 Remove wrong index setting 2017-01-17 16:23:45 +01:00
Christophe Romain
94ac777f93 Let ejabberd_mnesia handles copy_type 2017-01-17 15:05:14 +01:00
Christophe Romain
0ea6c1dcf6 Fix index processing (#1461) 2017-01-17 14:53:41 +01:00
Christophe Romain
2ce6d49a40 Speedup table setup, no io if EJABBERD_SCHEMA_PATH not set (#1461) 2017-01-17 14:22:12 +01:00
Evgeniy Khramtsov
c7476875e6 Avoid stopping mod_offline before supervisor termination (#1464) 2017-01-17 14:31:00 +03:00
Evgeniy Khramtsov
22ee16fd9d Get rid of ejabberd_frontend_socket 2017-01-17 14:00:01 +03:00
Evgeniy Khramtsov
c68ac1d5eb Improve error reporting for forbidden servers 2017-01-17 13:38:05 +03:00
Alexey Shchepin
a23c76fb82 Drop only messages with <body/> in mod_block_strangers 2017-01-17 01:34:40 +03:00
Alexey Shchepin
fd4f5c0996 Stop hook on message drop in mod_block_strangers 2017-01-16 18:45:26 +03:00
Alexey Shchepin
b080b8f54d Use user_receive_packet hook in mod_block_strangers 2017-01-16 18:40:30 +03:00
Alexey Shchepin
5a8dea1591 Remove stub in mob_block_strangers 2017-01-16 18:21:36 +03:00
Alexey Shchepin
fedfe5427c Add mod_block_strangers 2017-01-16 18:14:14 +03:00
Evgeniy Khramtsov
22c25e4413 Don't allow raw elements in process_iq/3 2017-01-16 16:40:11 +03:00
Evgeniy Khramtsov
557820707b Implement database backend interface for mod_proxy65 2017-01-16 15:28:11 +03:00
Evgeniy Khramtsov
0078a3b904 Correctly set gen_server's name 2017-01-16 11:43:35 +03:00
Evgeniy Khramtsov
65d352d5de Remove handle_event/1 callback 2017-01-16 11:34:49 +03:00
Paweł Chmielowski
ce42b6be01 Add example api_permisions: definition to config template
Also expand default config to have rule for admin oauth
2017-01-13 16:53:48 +01:00
Evgeniy Khramtsov
7606be93d5 Decode message before checking for expiration (#1458) 2017-01-13 14:20:25 +03:00
Badlop
e2665c5da9 Usable size for Shared rosters members textarea (EJAB-1753) 2017-01-13 12:16:23 +01:00
Evgeniy Khramtsov
32d548d99b Fix configuration commands (#1432) 2017-01-13 13:36:28 +03:00
Evgeniy Khramtsov
25ddb6c69d Add forgotten -include_lib() 2017-01-13 13:28:55 +03:00
Evgeniy Khramtsov
0baaad30b1 Implement database backend interface for MUC, BOSH and auth_anonyous 2017-01-13 12:03:39 +03:00
Evgeniy Khramtsov
31491ebe16 Fix some corner cases while re-reading RFC6120 2017-01-13 11:35:47 +03:00
Evgeniy Khramtsov
b10e10efae Ignore unexpected events 2017-01-11 16:50:11 +03:00
Evgeniy Khramtsov
02f96d0f41 Implement database backend interface for ejabberd_router 2017-01-11 16:25:43 +03:00
Evgeniy Khramtsov
2129a33077 Fix attaching ejabberd_s2s_out process to a supervisor 2017-01-11 11:09:56 +03:00
Evgeniy Khramtsov
5cfe57ece5 Add 'supervisor' listening option
If set to 'true' (this is the default), new processes spawned by
ejabberd_listener will be attached to the corresponding supervisor.
No such processes will be attached to a supervisor otherwise.
Setting this to 'false' will improve performance of high loaded
systems where new C2S/S2S processes are spawned very rapidly.
2017-01-11 10:56:04 +03:00
Evgeniy Khramtsov
03667d0c73 Add SSL support for SQL connections
Currently only PostgreSQL is supported.
This requires p1_pgsql-1.1.2 and higher.
2017-01-10 17:40:38 +03:00
Christophe Romain
efccee55e3 pubsub_subscription may is not used (migration is optional) 2017-01-10 13:53:23 +01:00
Christophe Romain
6ff81946cf Fix migration of old pubsub database (#1409) 2017-01-10 12:10:11 +01:00
Evgeniy Khramtsov
08d482b064 Allow old-stype mod_vcard_ldap in the config (#1410) 2017-01-10 11:29:01 +03:00
Evgeniy Khramtsov
dd5389df23 Don't forget to advertise disco features 2017-01-10 11:25:12 +03:00
Evgeniy Khramtsov
e01bece552 Make stream related calls module independent 2017-01-09 22:03:42 +03:00