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

394 Commits

Author SHA1 Message Date
Evgeniy Khramtsov
4ff8d7918a Change code to reflect recent changes in fxml_gen 2016-08-05 08:41:08 +03:00
Evgeniy Khramtsov
c409ed2f2c Rewrite S2S and ejabberd_service code to use XML generator 2016-07-27 10:45:08 +03:00
Evgeniy Khramtsov
9a8e197d7e Initial version based on XML generator 2016-07-18 15:01:32 +03:00
Holger Weiss
749033598d Omit [info] message with number of queued stanzas
Just log a debug message if a stream management session times out and
some stanzas weren't acknowledged.
2016-07-10 22:21:57 +02:00
Paweł Chmielowski
3446aba753 Include correct version in stream:stream when reporting errors
This fixes issue #1174
2016-06-27 16:40:57 +02:00
Holger Weiss
c928956d73 XEP-0198: Apply cosmetic changes 2016-06-21 23:17:17 +02:00
Holger Weiss
7ddeac38b6 XEP-0198: Also count stanzas when socket is closed
Don't forget to count stanzas received from the stream management client
that are processed right after the connection was lost.
2016-06-21 22:54:41 +02:00
Paweł Chmielowski
3a8da27d86 Use {access,shaper}_rules_validator in other places where access rules are used 2016-06-21 13:18:24 +02:00
Holger Weiss
c91c5aa352 Fix handling of queued stanzas on session timeout
Don't fail to resend or bounce unacknowledged stanzas if the stream
management session timed out.

Closes #1160.
2016-06-19 23:32:15 +02:00
Paweł Chmielowski
fffae97940 Use acl:access_matches in c2s 2016-05-26 11:08:53 +02:00
Holger Weiss
30e814dd4b XEP-0198: Add 'h' attribute to <failed/> element
If a resume request is rejected because the session timed out, indicate
the number of handled stanzas as per version 1.5 of XEP-0198.
2016-05-24 22:20:58 +02:00
Holger Weiss
ba74c1c367 Move CSI queue handling into mod_client_state
Let mod_client_state handle the queueing of stanzas, not just their
classification.  This simplifies the ejabberd_c2s code and gives
(custom) CSI modules more flexibility.
2016-05-17 19:27:18 +02:00
Evgeniy Khramtsov
be2a9e35ae Fix C2S session data leak (#1078) 2016-05-09 14:18:47 +03:00
Holger Weiss
ff4a0e1808 XEP-0198: Use different error message for bounces
When stanzas are bounced from the stream management queue (because the
session timed out or was closed for some other reason), use a different
error message so that this situation can be distinguished from other
cases.
2016-05-06 14:12:22 +02:00
Holger Weiss
36164d9446 Return error when blocking last activity request
As per XEP-0016 and XEP-0191, return a service-unavailable error when an
incoming last activity query was blocked by a privacy list (just as we
do for other IQ requests).
2016-04-25 09:33:47 +02:00
Holger Weiss
58478e52bf Don't omit bounces for messages of type "result" 2016-04-24 22:47:53 +02:00
Paweł Chmielowski
86dfbe6ece Make sure that ejabberd_sm sid are unique 2016-04-08 10:52:29 +02:00
Evgeniy Khramtsov
b83ec483e9 Send stream trailer at the very end 2016-04-08 11:49:50 +03:00
Evgeniy Khramtsov
fced8dc3d9 Replace some ?ERR_* macros with ?ERRT_* 2016-03-31 11:00:29 +03:00
Evgeniy Khramtsov
46568fb959 Merge commit 'refs/pull/524/head' of github.com:processone/ejabberd into sasl-api-change 2016-03-25 18:16:50 +03:00
Paweł Chmielowski
ef02053a9d Fix issue #1015 2016-03-17 18:41:39 +01:00
Paweł Chmielowski
efbaba5d04 Make auto generated resources shorter 2016-03-16 11:30:45 +01:00
Balázs Galambosi
83accedded fix syntax highlighting by keeping "~s" together 2016-03-07 16:06:18 +01:00
Holger Weiss
5b4aefbacd Accept stream compression request after SASL
This is an updated version of the patch submitted to EJAB-1382 by
Alexey (thanks!).
2016-02-19 18:53:28 +01:00
Evgeniy Khramtsov
4839ba5ae4 XEP-0013: Flexible Offline Message Retrieval support 2016-02-09 17:59:54 +03:00
Holger Weiss
a31f59ea31 XEP-0198: Fix session timeout corner case
If the "resend_on_timeout" option is set to 'if_offline' and a pending
stream management session is terminated because a new session is opened
by the same resource (while no other resource is online), resend
unacknowledged messages rather than bouncing error messages.
2016-02-06 22:28:55 +01:00
Pablo Polvorin
942072cf9d Make hibernate timeouts configurable
Two *global* options added:
c2s_hibernate and receiver_hibernate.

Default if not specified is 90000, the previous hardcoded value.
2016-02-04 15:45:29 -03:00
Mickael Remond
dfc29ea03c Switch to Fast XML module 2016-02-03 19:03:17 +01:00
Mickael Remond
71ee0d56fa Switch to fast_tls and update app names 2016-02-03 16:13:16 +01:00
Alexey Shchepin
a150bf8fdc Make C2S session establishment optional (ECS-11) 2016-01-18 16:33:57 +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
Badlop
f448ff608a Update copyright to 2016 (#901) 2016-01-13 12:29:14 +01: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
Paweł Chmielowski
29db302808 More now() replacements 2015-12-07 16:09:48 +01:00
Holger Weiss
ba916c3162 XEP-0198: Fix stanza counting corner case issue
Don't forget to count outgoing stanzas that are processed while the
ejabberd_c2s process is already waiting for stream resumption.
2015-12-02 19:25:10 +01:00
Evgeniy Khramtsov
95265dd3ad Move JID related functions to jid.erl (#847) 2015-11-24 18:44:13 +03:00
Christophe Romain
341be9b682 Remove supervisor option, disable it for c2s and muc 2015-11-04 16:24:35 +01:00
Holger Weiss
5e467b96a1 ejabberd_c2s: Let stop/1 close XEP-0198 sessions
The stop/1 function now terminates stream management sessions
immediately, just as it does for other sessions.  The new
ejabberd_c2s:close/1 function can be used to close the socket without
terminating the stream management session, like stop/1 did before.
2015-10-17 23:15:31 +02:00
Holger Weiss
53bd0ee818 ejabberd_c2s: Close socket when waiting for resume
Make sure the socket is closed when mod_ping calls ejabberd_c2s:stop/1
for an XEP-0198 session.
2015-10-17 22:07:29 +02:00
Christophe Romain
6aeb9dcb38 cosmetic cleanup 2015-10-07 14:18:38 +02:00
Evgeniy Khramtsov
c7750689e8 Fix force_update_presence 2015-10-02 16:06:47 +02:00
Holger Weiss
59321ac56e XEP-0198: Improve handling of non-message stanzas
When an XEP-0198 session times out, always return an error for
unacknowledged IQ stanzas, and always drop presence stanzas.  That is,
the "resend_on_timeout" option no longer applies to those stanzas types,
but only to messages.
2015-09-15 22:42:22 +02:00
Holger Weiss
5095fdb6b0 New XEP-0198 option: "max_resume_timeout"
In the past, the "resume_timeout" option defined both the default resume
timeout and the maximum resume timeout clients are permitted to request.
Admins might want to allow clients to request a timeout value that's
larger than the default, though.  This can now be done by specifying the
"max_resume_timeout" option.
2015-09-03 21:20:15 +02:00
Holger Weiss
1048e21643 XEP-0198: Don't add <delay/> tags to IQ stanzas 2015-07-28 21:00:12 +02:00
Paweł Chmielowski
8df134e025 Don't crash web admin when displaying info about websocket using users 2015-07-22 11:54:11 +02:00
Holger Weiss
b7d7dc5201 XEP-0198: Increase timeout during resumption
Give gen_fsm:sync_send_all_state_event/3 a little more time to transfer
the (possibly somewhat large) c2s #state during session resumption.
2015-07-03 11:35:22 +02:00
Holger Weiss
5856f6d06a XEP-0198: Increase default "max_ack_queue" value
During login, clients might receive a relatively large number of stanzas
in one go.  For some users, the default value of the "max_ack_queue"
option turned out to be too small in that situation.
2015-07-03 11:35:22 +02:00
Evgeniy Khramtsov
83cce468a5 Add MAM (XEP-0313) support 2015-06-22 16:56:08 +03: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
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