[Pidgin] #5910: Jabber - protocol connection for server broken while sending too long buffer over SASL-encrypted channel

Pidgin trac at pidgin.im
Sat May 24 03:44:27 EDT 2008


#5910: Jabber - protocol connection for server broken while sending too long
buffer over SASL-encrypted channel
--------------------+-------------------------------------------------------
Reporter:  geekkoo  |       Owner:  nwalp                                   
    Type:  patch    |      Status:  new                                     
Priority:  minor    |   Component:  XMPP                                    
 Version:  2.4.1    |    Keywords:  XMPP, Jabber, encryption, security layer
 Pending:  0        |  
--------------------+-------------------------------------------------------
 Hi!

 The problem is with sending long message over SASL encrypted XMPP channel
 when the message length is larger than the negotiated SASL_MAXOUTBUF
 length. In that case the message is split into chunks of SASL_MAXOUTBUF
 length, each chunk is encrypted with sasl_encode and send to the server.
 The problem arises when the jabber_do_send function couldn't send the
 chunk at once so it is split in two and remaining part is appended by
 purple_circ_buffer_append function to circular buffer to be send later.
 But the server can not decode that  splitted parts.

 Wouldn't it be better just repeat the message which the client failed to
 send over and over again instead of queueing the remains into
 js->write_buffer when SASL is used and sasl security layer is negotiated?
 The code in question is in jabber.c  file around the line 325 in
 pidgin-2.4.1 (in HAVE_CYRUS_SASL  conditions) . I get the better result
 while using jabberd2-2.1.24.1 with gssapi security layer when I have
 changed the code to:
 {{{
 ret=0;
 while (ret < olen) {
  ret =jabber_do_send(js, out, olen);
 }
 }}}
 The idea behind that server can not decode client reply if it was
 truncated during send, so it is useless to send the tail of the message.
 Instead you should repeat it.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/5910>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list