[Pidgin] #9271: jabber_parse_close_stream causes XML parse error with prosody

Pidgin trac at pidgin.im
Fri May 29 18:56:13 EDT 2009


#9271: jabber_parse_close_stream causes XML parse error with prosody
------------------------+---------------------------------------------------
 Reporter:  darkrain42  |        Owner:  deryni
     Type:  defect      |       Status:  new   
Milestone:              |    Component:  XMPP  
  Version:  2.5.6       |   Resolution:        
 Keywords:              |  
------------------------+---------------------------------------------------

Old description:

> `jabber_parse_close_stream` causes a connection to Prosody to fail when
> trying to upgrade to TLS.
>
> {{{
> (00:01:08) jabber: Sending: <?xml version='1.0' ?>
> (00:01:08) jabber: Sending: <stream:stream to='nkoehring.de'
> xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'
> version='1.0'>
> (00:01:08) jabber: Recv (432): <?xml version='1.0'?><stream:stream
> xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'
> id='1551183' from='nkoehring.de'
> version='1.0'><stream:features><mechanisms xmlns='urn:ietf:params:xml:ns
> :xmpp-sasl'><mechanism>DIGEST-
> MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><starttls
> xmlns='urn:ietf:params:xml:ns:xmpp-tls'></starttls><auth
> xmlns='http://jabber.org/features/iq-auth'></auth></stream:features>
> (00:01:08) jabber: Sending: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-
> tls'/>
> (00:01:08) jabber: Recv (59): <proceed xmlns='urn:ietf:params:xml:ns
> :xmpp-tls'></proceed>
> (00:01:08) jabber: XML parser error for JabberStream 0x2104200: Domain 1,
> code 76, level 3: Opening and ending tag mismatch: proceed line 0 and
> stream:stream
> (00:01:08) jabber: xmlParseChunk returned fatal 76
> }}}
>
> The only difference between this and ejabberd and google talk and
> openfire is that prosody sends `<proceed></proceed>`, though that should
> still work.
>
> Changing the `xmlParseChunk` in `jabber_parser_close_stream` to send
> `</stream>` "fixes" it.
>
> I suspect a libxml2 bug, but need to write a test case outside of pidgin
> to test it.

New description:

 `jabber_parse_close_stream` causes a connection to Prosody to fail when
 trying to upgrade to TLS.

 {{{
 (00:01:08) jabber: Sending: <?xml version='1.0' ?>
 (00:01:08) jabber: Sending: <stream:stream to='nkoehring.de'
 xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'
 version='1.0'>
 (00:01:08) jabber: Recv (432): <?xml version='1.0'?><stream:stream
 xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'
 id='1551183' from='nkoehring.de'
 version='1.0'><stream:features><mechanisms xmlns='urn:ietf:params:xml:ns
 :xmpp-sasl'><mechanism>DIGEST-
 MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><starttls
 xmlns='urn:ietf:params:xml:ns:xmpp-tls'></starttls><auth
 xmlns='http://jabber.org/features/iq-auth'></auth></stream:features>
 (00:01:08) jabber: Sending: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-
 tls'/>
 (00:01:08) jabber: Recv (59): <proceed xmlns='urn:ietf:params:xml:ns:xmpp-
 tls'></proceed>
 (00:01:08) jabber: XML parser error for JabberStream 0x2104200: Domain 1,
 code 76, level 3: Opening and ending tag mismatch: proceed line 0 and
 stream:stream
 (00:01:08) jabber: xmlParseChunk returned fatal 76
 }}}

 The only difference between this and ejabberd and google talk and openfire
 is that prosody sends `<proceed></proceed>`, though that should still
 work.

 I suspect a libxml2 bug, but need to write a test case outside of pidgin
 to test it.

--

Comment(by darkrain42):

 That was wrong; I forgot to undo one change when testing another.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/9271#comment:1>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list