Commit Graph

3329 Commits

Author SHA1 Message Date
Nathan Bruning 80fc34fb0c Fix presence-based delivery 2016-02-02 14:06:07 +01:00
Paweł Chmielowski fa55ac5c8f More strict checking for MUC initial presence 2016-02-01 12:09:58 +01:00
Paweł Chmielowski dc52ec904c Send presence with code 170 only in initial presence from MUC 2016-02-01 11:30:49 +01:00
Evgeniy Khramtsov d3ee2a9c18 Add 'import_prosody' command 2016-01-29 14:30:50 +03:00
Evgeniy Khramtsov 54dc2f56c6 Import privacy lists from Prosody 2016-01-29 14:14:08 +03:00
Evgeniy Khramtsov b20db3b736 Initial version of migration script from Prosody to ejabberd 2016-01-28 14:23:51 +03:00
Paweł Chmielowski aaa84dc118 Need extra line before ## in markdown 2016-01-27 11:42:13 +01:00
Paweł Chmielowski 239b1c6f74 Always use lagger 2016-01-26 14:34:58 +01:00
Christophe Romain b2c6e397fc Set set utf8mb4 charset on mysql connection 2016-01-26 13:47:24 +01:00
Paweł Chmielowski 621dff7307 Add header to generated markdown file 2016-01-26 10:46:38 +01:00
Paweł Chmielowski bdeb4a7e32 Add a way to get all ejabberd_commands, not only those that was registered
This is part of (TECH-1828).
2016-01-26 10:00:28 +01:00
Paweł Chmielowski 22696e8388 Geenarte markdown that is acceptable by docs.ejabberd.org processor 2016-01-25 16:51:54 +01:00
Paweł Chmielowski a2a692d081 Merge pull request #919 from hamano/rename_timestamp_function
rename timestamp function #917
2016-01-24 07:51:25 +01:00
Mickael Remond a3931e6b73 lager is the default logger, we need to reverse the define flag 2016-01-23 18:43:06 +01:00
HAMANO Tsukasa 5a85b0fb52 rename timestamp function #917 2016-01-23 17:58:10 +09:00
Christophe Romain 2ddbd032ee Add error handling to send_stanza 2016-01-19 16:16:04 +01:00
Holger Weiss 5e4ed4266d mod_mam: Strip existing JID tags from MUC messages
Strip any pre-existing <x/> tags which have an <item/> child with a
'jid' attribute from MUC MAM messages.  This way, if such a tag exists,
clients can be sure it was added by mod_mam.
2016-01-19 00:39:10 +01:00
Alexey Shchepin a150bf8fdc Make C2S session establishment optional (ECS-11) 2016-01-18 16:33:57 +03:00
Holger Weiss bd383fb8c1 mod_mam: Remove unused code
This mod_mam version doesn't store groupchat messages in user archives,
and it also doesn't support the "store_body_only" option.
2016-01-18 13:27:29 +01:00
Holger Weiss 63777f830d Use maps instead of dicts in HTTP upload modules
ejabberd currently depends on Erlang/OTP 17.1 or higher, so we can now
use maps.
2016-01-16 01:30:22 +01:00
badlop 6ac839dd76 Merge pull request #906 from hamano/stats_processes
add stats processes command
2016-01-15 19:26:23 +01:00
Evgeniy Khramtsov a83c5a8f3a Do not redefine records 2016-01-15 15:44:50 +03:00
Evgeniy Khramtsov 1d452c98c1 Describe option type of 'domain_balancing' 2016-01-15 14:32:10 +03:00
Holger Weiss ddaa409ee2 XEP-0198: Let MAM take care of pending messages
If a stream management session times out for a user who appears to be
using MAM, drop any unacknowledged messages rather than resending or
bouncing them.  This avoids duplicates or bogus error messages.

However, this is only done if the new mod_mam option "assume_mam_usage"
is set to 'if_enabled' or 'on_request'.  In the former case, a user is
assumed to be using MAM if archiving is enabled for his account.  In the
latter case, MAM usage is assumed only if archiving was explicitly
requested by the client, or if archiving was enabled by means of
mod_mam's "request_activates_archiving" option.
2016-01-15 01:08:22 +01:00
HAMANO Tsukasa 6cb1905f7c add stats processes command 2016-01-15 00:27:15 +09:00
Holger Weiss db04cdf2ca mod_mam: Sort messages returned by Mnesia
Sort the messages retrieved from an Mnesia archive before selecting the
subset limited by the <max/> value.  This makes sure the desired subset
of messages is sent to the client.
2016-01-14 02:27:02 +01:00
Holger Weiss 58c8fc5770 mod_mam: Limit result set page size
If the client doesn't specify a maximum number of messages to retrieve
per page, set a limit of 50 messages.  If the client specifies a limit
larger than 250, cap the number to 250 messages.

These limits aren't enforced for MAM v0.2 requests though, as that
version of the XEP doesn't require clients to support RSM.  The newer
revisions say that "a server MAY place a reasonable limit on how many
stanzas may be pushed to a client in one request.  Whether or not the
client query included a <set/> element, the server MAY simply return its
limited results, modifying the <set/> element it returns appropriately."
2016-01-14 02:12:28 +01:00
Holger Weiss 35ec0d58a4 mod_mam: Reject <index/>-based paging
If an <index/> is specified in the MAM request, reject the request
rather than ignoring the desired index and returning wrong results.
XEP-0059 says that the server "MAY return a <feature-not-implemented/>
error."
2016-01-14 01:39:19 +01:00
Holger Weiss 11afa45646 mod_mam: Remove unused variable 2016-01-14 01:15:11 +01:00
Holger Weiss 89f63a4fdf mod_mam: Check whether MUC message is desired 2016-01-14 01:13:16 +01:00
Holger Weiss 85f4f90b45 mod_mam: Support XEP-0313 v0.2 MUC archive queries 2016-01-14 00:58:48 +01:00
Holger Weiss 8117092e6a mod_mam: Respond to form requests
If the client requests a data form with the supported filters, return it
as per XEP-0313 v0.3 and newer.
2016-01-13 23:56:05 +01:00
Holger Weiss 89b1700279 mod_mam: Add 'from' attribute to <delay/> tag 2016-01-13 23:17:23 +01:00
Holger Weiss 9cd048c442 mod_mam: Improve binary comparison of message UIDs
Make sure the binary comparison performed when clients use message UIDs
to page through Mnesia archives yields correct results even if the
specified UIDs don't have the same number of digits as the UIDs of the
stored messages.  This way, MAM will continue to work as expected after
migrating from mod_mam_mnesia to mod_mam.
2016-01-13 23:01:51 +01:00
Holger Weiss 3dccc20d8b mod_mam: Add "delete_old_mam_messages" command
The new "delete_old_mam_messages" command allows for purging all MAM
messages of the specified type older than the specified number of days.
(Currently only implemented for Mnesia archives.)
2016-01-13 22:46:30 +01:00
Holger Weiss a61b0c303d mod_mam: Add "request_activates_archiving" option
Enabling "request_activates_archiving" tells mod_mam not to store any
messages for a user until his client issued a MAM request, regardless of
mod_mam's "default" option.  Once a MAM request is issued, messages are
archived as usual.
2016-01-13 21:38:08 +01:00
Holger Weiss 0183b2487e Advertise MUC MAM v0.4.1 in room JID's disco#info 2016-01-13 20:30:44 +01:00
Badlop f448ff608a Update copyright to 2016 (#901) 2016-01-13 12:29:14 +01:00
Evgeniy Khramtsov fd3e3a99c5 Log failed SQL requests 2016-01-13 14:13:32 +03:00
Evgeniy Khramtsov 776fe8b32a Fix MAM MUC for v0.4.1 2016-01-13 11:45:08 +03:00
Holger Wei 64d96778b4 Don't return error for blocked MUC messages
If a message stanza is blocked as per XEP-0016 or XEP-0191, return an
error only if the type of the blocked message is "normal" or "chat".
This makes sure users won't be kicked from MUC rooms when blocking other
participants.

Closes #897.
2016-01-12 10:20:35 +01:00
Holger Weiss 3e1425b905 Merge remote-tracking branch 'processone/pr/899'
* processone/pr/899:
  mod_http_upload: Use application/octet-stream instead of text/html for security reasons
2016-01-11 12:38:51 +01:00
Evgeniy Khramtsov 65e6dfb9dd Do not fail on incorrect data coming from SQL (898) 2016-01-11 14:35:11 +03:00
Evgeniy Khramtsov c7931b4a4f CVE-2016-1232: Add Dialback Key Generation and Validation support (XEP-0185) 2016-01-11 14:22:17 +03:00
Matthias Rieber 0ad0fd2187 mod_http_upload: Use application/octet-stream instead of text/html for security reasons 2016-01-11 12:13:19 +01:00
Badlop c7b67ff00b Clarify a little more room error string (thanks to Genghis Khan) 2016-01-08 13:14:40 +01:00
Holger Weiss e1539a11be mod_http_upload: Use full PUT URL for process name
Don't just use the "put_url" domain name, but also any path components
of the specified URL, to generate a mod_http_upload process name.  This
way, a single domain name can be used for multiple virtual hosts by
specifying a "put_url" such as "https://example.com/@HOST@/".
2016-01-06 00:12:36 +01:00
Holger Weiss 3f5a20c90a mod_http_upload: Rename variable for clarity 2016-01-05 22:06:34 +01:00
Badlop c01e3f24a5 Error converting times in mod_fail2ban (#889) 2016-01-05 12:29:21 +01:00
Paweł Chmielowski da45a064a8 Fix handling of some options in old style configs
This fixes issue #893.
2016-01-04 22:06:19 +01:00