Possible bug in In-Band Registration code

Bug #195499 reported by sander
2
Affects Status Importance Assigned to Milestone
Coccinella
Fix Released
Medium
Mats

Bug Description

There may be a bug in the In-Band Registration code. However, it also may be a bug in Openfire.

This is the XML code:

SEND: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en' to='localhost'>
RECV: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="computer-van-sander-devrieze.local" id="afe4d2e5" xml:lang="en">
SEND: <iq type='get' id='1051' to='localhost'><query xmlns='jabber:iq:register'/></iq>
RECV: <iq type="error" id="1051" from="localhost" to="computer-van-sander-devrieze.local/afe4d2e5"><query xmlns="jabber:iq:register"/><error code="400" type="modify"><bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

URL: http://coccinella.im/node/188

sander (s-devrieze)
Changed in coccinella:
assignee: nobody → matsben
importance: Undecided → Medium
Revision history for this message
Mats (matsben) wrote :

The xml I/O looks perfectly OK, see http://www.xmpp.org/extensions/xep-0077.html#usecases-register
What I think is the cause of the error is that the server does not allow in band registration, but it has a strange way of saying that. You could try switching on SASL(and TLS) in the login panel and see what happens.

Changed in coccinella:
status: New → Invalid
Revision history for this message
sander (s-devrieze) wrote :

I asked the same to the Openfire devel: http://www.igniterealtime.org/community/message/165721

Possibly this reply is interesting:
"In your Coccinella forums I see that the client is sending the stream header to localhost but the server is responding as computer-van-sander-devrieze.local. After that Coccinella should use the real XMPP domain and not what the client thought was the XMPP domain of the server."

Is he right about this?

Revision history for this message
Mats (matsben) wrote :

Yes he probably is. I removed the to attribute all together since http://www.xmpp.org/extensions/xep-0077.html hasn't one. I actually do the right thing, mostly. I already had:

    # The streams 'from' attribute has the "last word" on the servers name.
    if {[info exists locals(streamattr,from)]} {
 set locals(server) $locals(streamattr,from)
    }

But failed to use it, or not to use it, during IBR. Otherwise I think I do the right thing while Login(.tcl):

proc ::Login::SetLoginStateRunHook {} {
...
    # Ourself. Do JIDPREP? So far only on the domain name.
    # MUST handle situations with redirection (server alias)!

    set jid [$jlib myjid]
    jlib::splitjidex $jid username server resource

    set server [jlib::jidmap [$jlib getserver]]
    set jstate(mejid) [jlib::joinjid $username $server ""]

where:

proc jlib::getserver {jlibname} {

    upvar ${jlibname}::locals locals

    return $locals(server)
}

Changed in coccinella:
status: Invalid → Fix Committed
sander (s-devrieze)
Changed in coccinella:
milestone: none → 0.96.6
sander (s-devrieze)
Changed in coccinella:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.