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

3310 Commits

Author SHA1 Message Date
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
Alexey Shchepin
fb8a511365 Use crypto:rand_uniform instead of random:uniform 2016-01-04 13:59:37 +03:00
Holger Weiss
94c620cc27 mod_http_upload: Fix logging of file size mismatch 2016-01-04 01:01:14 +01:00
Holger Weiss
5deb6a91f7 mod_admin_extra: Replace deprecated function calls 2016-01-02 21:27:48 +01:00
Holger Weiss
b73678992b mod_muc_admin: Allow for setting MAM option
Fixes #890.
2016-01-02 20:57:01 +01:00
Badlop
91d205715e New send_stanza command (ejabberd_contrib#142) 2015-12-30 12:53:40 +01:00
Holger Weiss
1d2dc6cdc1 mod_muc_room: Replace deprecated function call 2015-12-29 11:11:50 +01:00
Holger Weiss
4cdb30d59e mod_mam: Use <stanza-id/> tags for deduplication
Use <stanza-id/> elements instead of <delay/> tags to check for messages
resent by the stream management code.  The <stanza-id/> element is
preferable, as it is added by mod_mam itself.
2015-12-29 09:54:48 +01:00
Badlop
0df6d7ae39 Improve explanation in registration page (#876) 2015-12-28 15:08:59 +01:00
Paweł Chmielowski
a18a3dfbb1 Add commands for generating html or markdown documentation for commands 2015-12-28 12:20:06 +01:00
Evgeniy Khramtsov
babb484cfc Restrict access to MAM archives for members-only rooms 2015-12-24 15:04:06 +03:00
Badlop
c42e026f9c Degenderise room error message (#747) 2015-12-23 19:34:23 +01:00
Holger Weiss
8cf0d31ee9 Revert "mod_mam: Keep 'to' attribute for MUC MAM messages"
This reverts commit 0e330da2a6.  XEP-0313
says: "When sending out the archives to a requesting client, the 'to' of
the forwarded stanza MUST be empty".
2015-12-22 13:20:23 +01:00
Paweł Chmielowski
cfe0aea219 Use built-in nif for integer_to_binary/binary_to_integer 2015-12-22 11:49:12 +01:00
Badlop
88c9991f90 Adding WEBIRC, custom realname & ident, ISO-8859-15 (thanks to iwalkalone69)(#877) 2015-12-21 16:20:20 +01:00
Alexey Shchepin
d88d5d6807 Support presence_broadcast in default_room_options mod_muc option 2015-12-21 02:25:31 +03:00
Holger Weiss
2d22507636 ejabberd_http: Cope with large POST/PUT requests
gen_tcp returns 'enomem' if we try to receive more than 64 MiB.
2015-12-20 23:30:11 +01:00
Holger Weiss
d039b9b72b ejabberd_http: Log debug message on receive errors 2015-12-20 23:26:57 +01:00
Christophe Romain
bb5a8a42c3 Fix pubsub virtual nodetree plugin 2015-12-17 10:16:17 +01:00
Christophe Romain
6957e892dd Fix last item message type as message attribute 2015-12-16 17:04:45 +01:00