* src/ejabberd_c2s.erl: Add resource to the from packet attribute if missing (EJAB-812).
SVN Revision: 1760
This commit is contained in:
parent
3a3a89007a
commit
c0cc236196
|
@ -1,3 +1,8 @@
|
|||
2008-12-28 Mickael Remond <mremond@process-one.net>
|
||||
|
||||
* src/ejabberd_c2s.erl: Add resource to the from packet attribute
|
||||
if missing (EJAB-812).
|
||||
|
||||
2008-12-24 Badlop <badlop@process-one.net>
|
||||
|
||||
* src/aclocal.m4: Fixes in configure script: fix
|
||||
|
|
|
@ -1980,7 +1980,14 @@ check_from(El, FromJID) ->
|
|||
%% Matching JID: The stanza is ok
|
||||
if JIDEl#jid.luser == FromJID#jid.luser andalso
|
||||
JIDEl#jid.lserver == FromJID#jid.lserver ->
|
||||
El;
|
||||
%% We force the resource on the from attribute in the packet.
|
||||
%% This is strictly needed only for IQ (to
|
||||
%% reply to the client), but I do not see
|
||||
%% any good reason for now not to do it on
|
||||
%% all packets.
|
||||
%% Need to be changed to support multiple
|
||||
%% resource binding per connection.
|
||||
jlib:replace_from(FromJID, El);
|
||||
true ->
|
||||
'invalid-from'
|
||||
end;
|
||||
|
|
Loading…
Reference in New Issue