Commit Graph

5161 Commits

Author SHA1 Message Date
Evgeniy Khramtsov 132033d01a Remove unused header file 2016-11-13 10:57:53 +03:00
Evgeniy Khramtsov 21d78ed7f4 Don't use jlib.hrl outside of jlib.erl 2016-11-13 10:56:36 +03:00
Evgeniy Khramtsov b8f22ff538 Deprecate most of the functions from jlib.erl 2016-11-13 10:44:53 +03:00
Evgeniy Khramtsov 534e73f732 Uncomment forgotten block of code 2016-11-12 14:51:43 +03:00
Evgeniy Khramtsov de81c50199 Revert "Support to provide password when subscribing to a room (#1306)"
This reverts commit 566ac872fe.
2016-11-12 14:47:29 +03:00
Evgeniy Khramtsov 5d552c8463 Merge branch 'master' into xml-ng 2016-11-12 14:41:37 +03:00
Evgeniy Khramtsov 78a44e0176 Merge branch 'master' into xml-ng
Conflicts:
	src/adhoc.erl
	src/cyrsasl_oauth.erl
	src/ejabberd_c2s.erl
	src/ejabberd_config.erl
	src/ejabberd_service.erl
	src/gen_mod.erl
	src/mod_admin_extra.erl
	src/mod_announce.erl
	src/mod_carboncopy.erl
	src/mod_client_state.erl
	src/mod_configure.erl
	src/mod_echo.erl
	src/mod_mam.erl
	src/mod_muc.erl
	src/mod_muc_room.erl
	src/mod_offline.erl
	src/mod_pubsub.erl
	src/mod_stats.erl
	src/node_flat_sql.erl
	src/randoms.erl
2016-11-12 13:27:15 +03:00
Badlop 566ac872fe Support to provide password when subscribing to a room (#1306) 2016-11-10 20:48:43 +01:00
Mickael Remond 42bede77a1
Merge branch 'master' of github.com:processone/ejabberd 2016-11-09 09:04:58 +01:00
Mickael Remond 35506f5470
Expose unregister API command 2016-11-09 09:04:52 +01:00
Evgeniy Khramtsov e841a6ec34 Add more tests for offline storage 2016-11-08 15:15:19 +03:00
Evgeniy Khramtsov e9dd3ffe9c Merge branch 'xml-ng' of github.com:processone/ejabberd into xml-ng 2016-11-07 10:11:40 +03:00
Evgeniy Khramtsov 56c91d3c58 Add roster tests 2016-11-07 10:10:57 +03:00
Badlop bd060bc1bb Support several groups separated by ; in add_rosteritem command 2016-11-04 18:45:27 +01:00
Badlop 49d3b7ec1d Throw error if room name or host has invalid characters (#1360) 2016-11-04 17:28:28 +01:00
Badlop 5e723bc90e Fix reading room jids from file for create and destroy_rooms_file commands 2016-11-04 16:54:31 +01:00
Badlop bab71f0832 Replace ctlscriptpath and produce ejabberd.service file (#434) 2016-11-04 16:35:59 +01:00
Paweł Chmielowski 62db030942 Merge mod_opt_type from db sub-modules to main module mod_opt_type 2016-11-04 12:58:08 +01:00
Holger Weiss 2a63d0e95a mod_mam: Use user JID for stanza ID 'by' attribute
Use the user (or room) JID instead of the server JID for the 'by'
attribute of <stanza-id/> and <archived/> tags.  That's what the
examples in XEP-0313 v0.2 and XEP-0359 v0.3.0 suggest.
2016-11-01 08:47:08 +01:00
Badlop 149cc9654f Append ; to privacy_list_data exporting lines (thanks to Marcio Luciano Donada) 2016-10-24 13:42:33 +02:00
Evgeniy Khramtsov 9d977e484a Use base64:mime_decode/1 for SASL packets
It will be now possible to accept SASL packets with only
single '=' character set as required by RFC6120
2016-10-22 13:09:11 +03:00
Evgeniy Khramtsov f6236d456d Add more tests for privacy lists and blocking command 2016-10-22 13:01:45 +03:00
badlop ed6bc9081b Merge pull request #1349 from prasadvaidya/master
Fix: Replace erlang function with fail-safe jlib function.
2016-10-21 13:32:29 +02:00
Prasad Vaidya cdafd3254b Rollback minor change, to avoid redundant use of fail-safe function 2016-10-21 15:02:39 +05:30
Prasad Vaidya 509776a0d1 Fix: Replace erlang function with fail-safe jlib function. 2016-10-21 13:57:47 +05:30
Badlop 2ab72bcd00 Nidx may be integer or binary, so use jlib:i2l instead
As reported in
https://www.ejabberd.im/forum/28580/erlang-function-integertobinary1-throwing-badargs-exception
2016-10-20 21:56:19 +02:00
Badlop 0212559ca7 If a participant can change subject, let asubscriber too (#1345) 2016-10-20 20:35:00 +02:00
Holger Weiss 1bdbe54442 Let systemd stop ejabberd gracefully
Make sure the "ExecStop" command line blocks until ejabberd is actually
stopped.  This prevents systemd from killing the ejabberd process(es)
immediately.

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

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

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

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

where

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

Apart from that, this number is now also reported when using a
non-default session management backend.
2016-10-11 22:20:22 +02:00
Christophe Romain 0f67a8f98b Update riakc to support r19 2016-10-10 10:57:04 +03:00
Evgeniy Khramtsov a915fd161e Create room on configuration request as per XEP-0045, 10.1.3 2016-10-10 10:51:39 +03:00