baiwyc119 / lxmppd

Automatically exported from code.google.com/p/lxmppd
0 stars 0 forks source link

<stream:stream> "from" attribute missing on some connection errors #468

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
While working on mod_xmpp I discovered that Prosody does not comply with RFC 
6120 in response stream headers. See 
https://tools.ietf.org/html/rfc6120#page-37 :

For response stream headers in both client-to-server and server-to-server 
communication, the receiving entity MUST include the 'from' attribute and MUST 
set its value to one of the receiving entity's FQDNs (which MAY be an FQDN 
other than that specified in the 'to' attribute of the initial stream header, 
as described under Section 4.9.1.3 and Section 4.9.3.6).

When connecting to Prosody 0.9.4:

c: <stream:stream xmlns='jabber:client' 
xmlns:stream='http://etherx.jabber.org/streams' to='nope' version='1.0'>

s: <?xml version='1.0'?><stream:stream 
xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' 
version='1.0' id=''><stream:error><host-unknown 
xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text 
xmlns='urn:ietf:params:xml:ns:xmpp-streams'>This server does not serve 
nope</text></stream:error></stream:stream>

Note that the server's response does not include the required from attribute.

Original issue reported on code.google.com by ArcRi...@gmail.com on 10 Feb 2015 at 4:05

GoogleCodeExporter commented 9 years ago
Hi, thanks for the report!

Looks like we can set it to the empty string: 
https://tools.ietf.org/html/rfc6120#section-4.9.1.3

Original comment by MWild1 on 22 Feb 2015 at 10:57

GoogleCodeExporter commented 9 years ago
Fixed in b1c84d220c40 for release in 0.9.8 shortly.

Original comment by MWild1 on 24 Mar 2015 at 4:12