Commit Graph

3141 Commits

Author SHA1 Message Date
Badlop 72f35a6dc6 Add xep definition to mod_mam 2015-06-24 11:58:37 +02:00
Evgeniy Khramtsov 83cce468a5 Add MAM (XEP-0313) support 2015-06-22 16:56:08 +03:00
Badlop 6631078884 Document a few more supported protocols 2015-06-22 13:11:37 +02:00
Holger Weiss fc0754c609 Add s2s_dhfile to list of known options 2015-06-20 00:14:54 +02:00
Holger Weiss 73a0fb418c Update comment that explains how to set up node_mb
Specify settings that make sense with current ejabberd versions, and use
the YAML configuration format.  Also, specify the "urn:xmpp:microblog:0"
namespace, as that's the microblogging node name currently defined by
XEP-0277.
2015-06-19 23:13:36 +02:00
Holger Weiss 04038c01f7 PubSub: Check for node subscription of bare JID
Don't just check whether the full JID is subscribed when a node
subscription is required to list or publish items.  If the bare JID is
subscribed, these requests are now also accepted.
2015-06-19 00:50:08 +02:00
Badlop 36a96ae3f5 change_room_option misses handling some room options #604 2015-06-18 13:13:49 +02:00
Christophe Romain d528457ba5 Don't force persistence if cache enabled (fix previous commit) 2015-06-18 12:54:46 +02:00
Christophe Romain e5a98b100d Fix max_items and don't let PEP depends on item cache 2015-06-18 12:06:29 +02:00
Badlop 1cf2dfe63a New hide_sensitive_log_data option to hide client IP in log (#452 #471) 2015-06-17 11:32:42 +02:00
Holger Weiss e608274243 Add s2s_dhfile option to configuration validator 2015-06-16 15:18:34 +02:00
Alexey Shchepin 2110b929bc Merge pull request #581 from weiss/dh-param-file
New options: dhfile and s2s_dhfile
2015-06-16 11:59:06 +03:00
Paweł Chmielowski dcf5aefea0 Add option to set net_ticktime (EJAB-1742) 2015-06-15 14:57:07 +02:00
Badlop 357ff6c8f7 Fix bug introduced in commit b88fa6f617 2015-06-04 15:47:02 +02:00
Badlop fe10c6f6f2 Pick first local multicast service, otherwise remote (ejabberd-contrib#105) 2015-06-04 12:13:10 +02:00
Holger Weiss 6c712b6caa Don't add body element to MUC subject messages 2015-06-04 09:55:38 +02:00
jpegger 6f48f22c71 Authmodule using old style XML:get_attr_s() 2015-06-03 18:11:35 +02:00
Evgeniy Khramtsov 9a9633dbc5 Do not ignore unknown options so far 2015-06-03 16:21:22 +03:00
Evgeniy Khramtsov c1119b1f39 Remove unused validation code 2015-06-03 16:05:17 +03:00
Evgeniy Khramtsov ab196b4b02 Move opt_type/1 function out of if-else block 2015-06-03 15:52:19 +03:00
Evgeniy Khramtsov 730fd55ec9 Fix typo 2015-06-03 15:45:15 +03:00
Evgeniy Khramtsov 0ae9ef2b41 Add missing options of ejabberd_logger to validator 2015-06-03 15:25:20 +03:00
Evgeniy Khramtsov 83faff37e5 Add missing options of mod_muc to validator 2015-06-03 15:18:09 +03:00
Badlop 4ed6a3d78f Fix commands export2odbc, connected_users_vhost and push_alltoall (#586) 2015-06-02 12:52:15 +02:00
badlop 0de7864880 Merge pull request #585 from CorCornelisse/master
push_roster* not updated on binarification
2015-06-02 12:24:46 +02:00
Evgeniy Khramtsov 157ff4d093 Merge branch 'master' of github.com:processone/ejabberd 2015-06-01 15:38:37 +03:00
Evgeniy Khramtsov fb6267f38e Add config validation at startup 2015-06-01 15:38:27 +03:00
Badlop 9a802185ad Fix anonymous user login, it wasn't stored in anonymous mnesia table 2015-06-01 14:34:49 +02:00
Evgeniy Khramtsov a9f7d9481f Do not try to fetch module options via eldap_utils 2015-06-01 15:22:31 +03:00
Evgeniy Khramtsov ea7de2097f Reorganize get_opt() code in some modules 2015-06-01 15:20:49 +03:00
Evgeniy Khramtsov 48213b09ce Get rid of some fuzzy macros as it makes syntax tools getting mad 2015-06-01 15:19:56 +03:00
Cor Cornelisse 22d9011c0c These arguments should be binary instead of strings, otherwise it won't work properly 2015-06-01 13:30:26 +02:00
Badlop 100827ec6e In xmlrpc use process_unicode_codepoints instead of list_to_binary 2015-05-29 15:49:12 +02:00
Evgeniy Khramtsov a291e7d4e6 Fix MUC room options vaildation 2015-05-29 12:08:36 +03:00
Evgeniy Khramtsov e8ffbbb0b4 Validate MUC room options from the configuration file 2015-05-28 11:42:17 +03:00
Badlop d0443bb714 An auth external module requires ext_mod to be started first (#578) 2015-05-27 13:10:15 +02:00
Holger Weiss 5585fb1ecf New options: dhfile and s2s_dhfile
Let admins specify a file that contains custom parameters for
Diffie-Hellman key exchange.
2015-05-26 21:06:04 +02:00
Christophe Romain b83c07251c Fix pubsub/odbc crash on remote user unsubscribe (EJAB-1483) 2015-05-26 19:19:57 +02:00
Alexey Shchepin b2f98099bb Merge pull request #569 from weiss/send-element-error-checking
Update send_element error checking (EJAB-1739)
2015-05-26 15:59:50 +03:00
Mickael Remond 9574e71e8d Include session record from header file instead of duplicating it 2015-05-26 10:08:46 +02:00
Paweł Chmielowski 3af507cc43 Fix merging of not yaml config files 2015-05-25 15:37:46 +02:00
Christophe Romain e54e556e01 Fix use of publish_only affiliation with odbc backend 2015-05-22 18:47:17 +02:00
Badlop b07cb1ed84 Use namespace definitions when possible 2015-05-21 17:04:14 +02:00
Badlop 0c725b5fac Document protocol support (EJABS-1620) 2015-05-21 17:04:05 +02:00
badlop b04f3a4c93 Merge pull request #573 from sezuan/fix_odbc
Fix some string/binary issues with non-native ODBC drivers
2015-05-21 11:31:47 +02:00
Holger Weiss 889459b45c Fix function specification 2015-05-20 12:13:15 +02:00
Evgeniy Khramtsov 3b267eaa61 Do not bounce normal messages sent to unavailable resource 2015-05-19 10:58:36 +03:00
Holger Weiss fba13a0b93 Simplify XEP-0203 (Delayed Delivery) code a bit
Now that XEP-0091 support is removed, the XEP-0203 code can be
simplified a little further.  This doesn't change the behavior.
2015-05-18 21:26:51 +02:00
Christophe Romain 8bb994dbca Call integer_to_binary using jlib (#554) 2015-05-18 17:30:25 +02:00
Badlop 2af659b737 Remove deprecated XEP-0090 Entity Time and 91 Delayed Delivery (EJAB-849) 2015-05-18 12:38:25 +02:00
Matthias Rieber 16532dd643 Fixed some string()/binary() issues in ejabberd_odbc 2015-05-18 12:14:56 +02:00
Matthias Rieber f5c9dfbc93 fixed erl_prettypr in encode_term 2015-05-17 19:37:49 +02:00
Badlop 084d0c4efe New command get_room_options (#567) 2015-05-15 17:47:10 +02:00
Holger Weiss 61afd668c2 Fix indentation 2015-05-15 15:50:43 +02:00
Paweł Chmielowski de7ff536b2 Load config snippets for modules installed with ext_mod (EJAB-1741) 2015-05-15 12:30:15 +02:00
Paweł Chmielowski 5dbe7a3c6c Export modules_dir/0 2015-05-15 12:27:59 +02:00
Holger Weiss 6efce7f706 Cosmetic change: Simplify error checking
Let send_stanza_and_ack_req/2 update the #state instead of propagating
the value returned by send_element/2.  This doesn't change the behavior.
2015-05-14 01:04:23 +02:00
Holger Weiss 42c7205739 Don't assume send_element/2 returns ok or error
Let send_text/2 and (therefore) send_element/2 return {error, Reason}
instead of error for consistency, and let send_stanza_and_ack_req/2
interpret any non-ok value as an error.  (EJAB-1739)
2015-05-14 00:58:36 +02:00
Badlop d885435552 Fix setting 'description' with change_room_option command (#567) 2015-05-12 17:37:39 +02:00
Badlop f817762cc4 New max_users_presence mod_muc option (thanks to anhcoi123)(#562) 2015-05-08 13:09:25 +02:00
Badlop 25beb46391 Fix check_password_hash argument parsing (#559) 2015-05-08 12:04:04 +02:00
Badlop 7ab6c4b4fd Try to support access_commands in YAML (ejabberd-contrib#45) 2015-05-07 18:34:05 +02:00
Badlop b0b004b26e Revert "Add private and roster local handlers (EJAB-682)" due to #556
This reverts commit 2e194bd997.
2015-05-07 17:07:49 +02:00
Badlop f7d9bb7ce4 Don't announce register feature once user is authenticated (#41) 2015-05-07 11:41:59 +02:00
Holger Weiss 7297b23508 Tag private MUC messages with muc#user namespace
Make it possible for clients to identify private MUC messages.  One use
case would be to filter out undesired carbon copies of those.
2015-05-05 22:00:05 +02:00
Badlop fa99519f8b Simplify internal code of get_last and set_last commands 2015-05-05 12:54:20 +02:00
Badlop 96c62acb1b Improve get_last command to provide also last activity status 2015-05-05 12:46:21 +02:00
Badlop 77e57afae1 Fix set_last command to work with recent ejabberd (#555) 2015-05-05 12:45:53 +02:00
Evgeniy Khramtsov 60fe008268 Remove duplicated code 2015-04-29 14:51:45 +03:00
Christophe Romain 6987e85602 Improve module install code, allows better error checking 2015-04-29 13:30:03 +02:00
Badlop 7492ecae52 New command get_user_rooms 2015-04-29 13:22:49 +02:00
Christophe Romain 4440b03b89 Fix fetching from git@github url and allow compilation from ejabberd sources 2015-04-29 10:19:15 +02:00
badlop 6f99775115 Merge pull request #547 from weiss/fix-account-jid-disco
Fix service discovery handling for account JIDs
2015-04-27 19:39:32 +02:00
Badlop 987e337c66 Rely on core routine for handling affiliation changes (thanks to Ben Langfeld)
This ensures that all of the usual stanzas and such go out
2015-04-27 17:00:22 +02:00
Holger Weiss dc449687a0 mod_disco: Apply minor readability improvements 2015-04-26 16:36:17 +02:00
Holger Weiss 0edba763fb mod_disco: Omit 'roster_get' call if possible
As a small optimization, avoid running the 'roster_get' hook in the
(common) case where a client requests service discovery information for
its own bare JID.
2015-04-26 16:32:03 +02:00
Holger Weiss 50f35f1b07 Fix service disco handling for bare account JIDs
Don't swap the sending and receiving JIDs while checking whether the
client that requested service discovery information for a bare account
JID is a subscribed contact.
2015-04-26 16:22:09 +02:00
Evgeniy Khramtsov 9c85cb5f25 Fix validating function for iqdisc 2015-04-23 14:59:18 +03:00
Christophe Romain 38dd44e18f Improve purge_offline filter and speed (#543) 2015-04-22 18:11:39 +02:00
Badlop 2e194bd997 Add private and roster local handlers to get listed in disco#info (EJAB-682) 2015-04-22 13:27:25 +02:00
Badlop e280de8452 Allow to modify host when registering account in web (#291) 2015-04-22 11:01:47 +02:00
Christophe Romain 6e4d6caebf Add support for publish-only (#30) 2015-04-21 17:23:59 +02:00
Christophe Romain cf37f3977a Fix typo, oups... 2015-04-21 16:13:23 +02:00
Christophe Romain 61f80396da remove deferred Collection shim header 2015-04-21 16:11:00 +02:00
Christophe Romain cbd45974e2 Owner can subscribe to its node (#454) 2015-04-21 15:24:31 +02:00
Christophe Romain 747d25b4ad Fixed node type (thanks to saczawap) (#435) 2015-04-21 15:24:24 +02:00
Christophe Romain e0563e3918 PubSub improvements
This commit contains
- code cleanup
- use of db_type instead of old mod_pubsub_odbc
- some minor optimizations
- some minor bugfixes
2015-04-21 15:24:16 +02:00
Christophe Romain 28090a3958 Merge pull request #540 from weiss/queue-error-stanza
Add privacy error stanza to XEP-0198 queue
2015-04-21 11:19:49 +02:00
Evgeniy Khramtsov ed79a61752 Fix LDAP substrings filter (EJAB-1715) 2015-04-21 11:49:41 +03:00
Holger Weiss 94936b261e Add privacy error stanza to XEP-0198 queue 2015-04-20 22:03:18 +02:00
Alexey Shchepin fd54181435 Fixed error replying on blocked messages 2015-04-20 17:19:09 +03:00
Badlop c2e6ce0f04 Remove load_config command because is superseded by reload_config (#532) 2015-04-20 15:57:44 +02:00
Evgeny Khramtsov 837706e9d9 Merge pull request #536 from weiss/fail2ban-whitelist
Add mod_fail2ban option to whitelist IP addresses
2015-04-18 12:28:36 +03:00
Holger Weiss aa36742a40 mod_fail2ban: Add 'access' option for whitelisting
Closes #535.
2015-04-18 11:08:05 +02:00
Holger Weiss c01940f33c cyrsasl_scram: Return user name with error message
Let ejabberd_c2s run the 'c2s_auth_result' hook (which needs the user
name) on SCRAM authentication failure.
2015-04-17 20:21:11 +02:00
Holger Weiss afdc269825 ejabberd_s2s_out: Remove Erlang/OTP version check
The version check won't work for Erlang/OTP >= 17; and it's no longer
needed, as we don't support versions older than R16 anyway.
2015-04-16 23:51:16 +02:00
Badlop d624753410 Update get_password_s description with SCRAM return values 2015-04-15 11:51:34 +02:00
Badlop a5adaf5798 Revert "Hook on group message"
This reverts commit b81250d667.
2015-04-15 11:51:29 +02:00
badlop 31c5775025 Merge pull request #426 from hairyhum/master
Migration of scram passwords with piefxis (riak and internal only)
2015-04-15 11:04:29 +02:00
Paweł Chmielowski ba69c469b5 Remove http_poll module
For couple years browsers did limit ability to change cookies from js
for different domains, this made http_poll connections practically not
usuable. I don't think this module is used at all so it's time to put it
to rest.
2015-04-15 10:47:10 +02:00
Holger Weiss e408276283 Don't forget gen_tcp:listen/2 options
Fixes #530.
2015-04-14 20:22:34 +02:00
Badlop b67af5e036 Fix nick logging in mod_muc_log plaintext (#522) 2015-04-14 15:46:59 +02:00
Badlop 25449a076f Clean multicast routing code detected by xref 2015-04-10 16:02:45 +02:00
Paweł Chmielowski 8732817c3c Fix problem with pushing bufferend #xmlel-s to receiver in websocket code 2015-04-09 13:35:37 +02:00
Badlop f129c6530c Fix bug when sorting the list of rooms in WebAdmin 2015-04-08 15:34:08 +02:00
Evgeniy Khramtsov 32b60d4250 Remove hack with binary to integer conversion 2015-04-08 16:11:06 +03:00
Evgeniy Khramtsov 7a89dda816 Merge branch 'master' of github.com:processone/ejabberd 2015-04-08 15:31:41 +03:00
Evgeniy Khramtsov 9b4942890d Add virtual host support for SQLite 2015-04-08 15:31:28 +03:00
Badlop 0cf8d1fa6e Copy multicast code from ejabberd-contrib to provide XEP-0033 (#521) 2015-04-08 14:01:16 +02:00
Evgeniy Khramtsov 675c428f21 Disable awkward trap_exit flag 2015-04-08 14:40:28 +03:00
Evgeniy Khramtsov bdedcf8d8a Enable FOREIGN KEYS by default 2015-04-08 14:39:47 +03:00
Evgeniy Khramtsov 2a3a2d9804 Make sure SQLite always returns binaries 2015-04-08 14:38:04 +03:00
Evgeny Khramtsov 5a820aca40 Merge pull request #486 from saa/sqlite_support
Add SQLite support
2015-04-08 14:34:56 +03:00
Jerome Sautret c3280e9dad Add mod_muc_admin contrib. 2015-04-07 17:05:43 +02:00
Holger Weiss 0fd4984c23 ejabberd_listener: Remove Erlang/OTP version check
We don't support Erlang/OTP versions older than R16 anyway.
2015-04-07 09:47:05 +02:00
Evgeny Khramtsov b81b0d0be9 Merge pull request #518 from liudanking/master
fix otp version check in ejabberd_listener.erl listen_tcp/5
2015-04-07 10:34:18 +03:00
Mickael Remond c140f98276 Explicitly start crypto with start
This is to please Elixir / Phoenix enviroment
2015-04-07 09:03:37 +02:00
liudan f981a53f9a fix otp version check in listen_tcp/5 2015-04-07 09:28:35 +08:00
Holger Weiss 2a94c68724 Don't call send_element/2 if previous call failed
Be sure not to try sending data over a TCP socket that is no longer
usable.
2015-04-06 22:34:48 +02:00
Paweł Chmielowski 81b0643036 Fix problem with c2s buffering on old style websocket connections
Old style websocket do use binaries for transferring data to C2S, so when
we buffer that data we need to handle it different than list of #xml structs
used by new style connections.

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

Closes #510.
2015-04-05 14:48:08 +02:00
Mickael Remond ea8db9967f ejabberd can be embedded in an Elixir application 2015-04-04 17:42:12 +02:00
Badlop 7d3b2cad26 Replace crypto calls that will be removed in a future release 2015-04-04 14:09:58 +02:00
Badlop cf40daf663 Replace undefined value with empty one (processone/ejabberd-contrib#92) 2015-04-04 13:48:17 +02:00
Holger Weiss 1fa73fd33f Remove unused case clauses to make dialyzer happy 2015-04-03 20:37:42 +02:00
Badlop 94761ff31e Improve srg_get_info result format (processone/ejabberd-contrib#92) 2015-04-03 12:16:11 +02:00
Paweł Chmielowski 088c5c4672 Fix output formatting in srg_get_info commend from mod_admin_extra 2015-04-02 16:55:51 +02:00
Paweł Chmielowski b580da3547 Fix problems with get_vcard* functions from mod_admin_extra 2015-04-01 16:32:34 +02:00
Paweł Chmielowski cf3b4dbc7b Drop exmpp usage from mod_admin_extra 2015-04-01 15:44:49 +02:00
Evgeny Khramtsov 305b281c15 Merge pull request #493 from weiss/rfc-6121-routing
Update ejabberd_sm's routing rules as per RFC 6121
2015-04-01 11:41:05 +03:00
Evgeniy Khramtsov 821039b7d5 Swap 'mnesia' and 'internal' types correctly 2015-03-30 12:25:25 +03:00
Evgeniy Khramtsov fb1fd50df5 The 'default_db' option should impact ejabberd_auth as well 2015-03-30 12:18:18 +03:00
Evgeniy Khramtsov 4af15df546 Add new 'default_db' option 2015-03-30 12:15:29 +03:00
Sergey Abramyan 15af88a09a Fix lite.sql and convert binary to integer 2015-03-27 22:14:29 +03:00
Badlop 176114d28e Try to fix more Dialyzer warnings 2015-03-27 15:55:57 +01:00
Badlop 9c96d30719 Ensure set_presence changes are kept in state (thanks to Davide Colombo)(EJAB-1184) 2015-03-27 15:03:14 +01:00
Badlop 30dc82a98a Fix even more dialyzer warnings 2015-03-27 12:28:24 +01:00
Badlop 8707c0b045 Fix set_presence command (ejabberd-contrib#61) 2015-03-27 11:43:56 +01:00
Badlop 10dfd182f6 Fix more mod_admin_extra commands 2015-03-26 20:41:16 +01:00
Badlop 9b3dda105d Fix problems in process_rosteritems command 2015-03-26 16:18:39 +01:00
Badlop fbb6b65192 Detect correctly when vCard does not exist (#21) 2015-03-26 14:00:58 +01:00
Badlop 0c30beb93d Fix return error when requesting non-existing vcard value (#21) 2015-03-26 14:00:54 +01:00
Mickaël Rémond c9393bc4f4 Ignore errors when retrieving status if the users just got offline
Fix possible race condition.
2015-03-26 14:00:50 +01:00
Holger Weiss 5103ed1c3b mod_admin_extra: Let send_message omit subject
Let the send_message command omit the subject if the user either
specified an empty subject or a message type of "chat".
2015-03-26 14:00:48 +01:00
Badlop 88cd8c7b12 Update FSF address (solves #73) 2015-03-26 14:00:46 +01:00
HAMANO Tsukasa 00fe68ed06 fix connected_users_info in mod_admin_extra 2015-03-26 14:00:44 +01:00