]> granicus.if.org Git - ejabberd/commitdiff
Fix bug on s2s shaper when TLS is used
authorPablo Polvorin <pablo.polvorin@process-one.net>
Thu, 1 Dec 2011 15:55:20 +0000 (12:55 -0300)
committerPablo Polvorin <pablo.polvorin@process-one.net>
Thu, 1 Dec 2011 16:16:21 +0000 (13:16 -0300)
The shaper was not enabled if the remote server authenticates
using a certificate instead of dialback.

src/ejabberd_s2s_in.erl

index 848e58c955371c46d2f3cb6cbfa499e8cf2e64f8..590b560bd76db6290d4d85f2e73c76e81bfd1194 100644 (file)
@@ -356,6 +356,12 @@ wait_for_feature_request({xmlstreamelement, El}, StateData) ->
                                          [{"xmlns", ?NS_SASL}], []}),
                            ?DEBUG("(~w) Accepted s2s authentication for ~s",
                                      [StateData#state.socket, AuthDomain]),
+
+                               %% acess rules are first checked against the globally defined ones, that have precedence over
+                               %% domain-specific ones.. http://www.process-one.net/docs/ejabberd/guide_en.html#AccessRights
+                               %% since there is allways a shaper defined globally for s2s, it doesn't matter the actual
+                               %% local host, since the globall one will be used, even if this domain has a special rule
+                           change_shaper(StateData, "", jlib:make_jid("", AuthDomain, "")),
                            {next_state, wait_for_stream,
                             StateData#state{streamid = new_id(),
                                             authenticated = true,