]> granicus.if.org Git - ejabberd/commitdiff
Correct privacy check direction in mod_last (EJAB-1339)
authorAndreas Köhler <andreas.koehler@1und1.de>
Fri, 5 Nov 2010 10:42:32 +0000 (11:42 +0100)
committerBadlop <badlop@process-one.net>
Tue, 9 Nov 2010 12:57:57 +0000 (13:57 +0100)
The change for EJAB-1271 to change the direction of the privacy check
from out to in violates the idea that the check should imitate a
subscription state check of from. Rather correct the order of the From
and To parameters.

src/mod_last.erl
src/mod_last_odbc.erl

index d3b561f602107a895555b5ec36db47fb81e00bd1..c2a79fb2a0ee7ec71107b09f36208b35509397f6 100644 (file)
@@ -125,9 +125,9 @@ process_sm_iq(From, To, #iq{type = Type, sub_el = SubEl} = IQ) ->
                           privacy_check_packet, Server,
                           allow,
                           [User, Server, UserListRecord,
-                           {From, To,
+                           {To, From,
                             {xmlelement, "presence", [], []}},
-                           in]) of
+                           out]) of
                        allow ->
                            get_last(IQ, SubEl, User, Server);
                        deny ->
index 7616c50205bc113849145f7440931b5e2d51b30e..b22da5ffd1a97bccb3f415c178731cb4d4df705d 100644 (file)
@@ -117,9 +117,9 @@ process_sm_iq(From, To, #iq{type = Type, sub_el = SubEl} = IQ) ->
                           privacy_check_packet, Server,
                                            allow,
                           [User, Server, UserListRecord,
-                           {From, To,
+                           {To, From,
                             {xmlelement, "presence", [], []}},
-                           in]) of
+                           out]) of
                        allow ->
                            get_last(IQ, SubEl, User, Server);
                        deny ->