require-starttls option may cause XML parse error (not well-formed (invalid token)) - mcabber and perl Net::Jabber can't connect

Bug #537606 reported by Annihitek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Jabberd
Won't Fix
Undecided
Unassigned

Bug Description

Jabberd versions: 2.2.9 and older

More information about this: http://forum.jabberpl.org/index.php?showtopic=7391

My simple solution:

in c2s.xml:

add require-starttls='true'

in line:

<id pemfile='/path/to/servercert.pem' require-starttls='true' register-enable='true' password-change='true'>servername.tld</id>

If require-starttls='true', jabberd2 also bind to 5223 port, then (line <ssl-port>5223</ssl-port> must be uncommented of course) mcabber xmpp client and perl script with Net::Jabber module can connect to server.

Setting require-starttls to 'false' require standard port to connect (default 5222), and cause this bug. But other clients (ex: Psi) works fine.

Revision history for this message
Tomasz Sterna (smoku) wrote :

require-starttls option has nothing to do with legacy SSL port 5223. This option enforces STARTTLS encrypted communication on 5222 port. If this option is set the first thing client must do after establishing stream is to begin STARTTLS negotiation (this is signalled by <required/> element of starttls stream feature). No other packets are allowed before STARTTLS negotiation. Unfortunately current implementation has no way of signaling unwanted packets and just drops them. This may trigger the XML parsing error.

The other aspect is that <id ... /> options are triggered by its mere presence, so setting require-starttls='false' does not mean what it looks like and the option is on. I know it is confusing, but this is the way the jabberd2 config parser works.

summary: - error: XML parse error (not well-formed (invalid token)) - mcabber and
- perl Net::Jabber can't connect
+ require-starttls option may cause XML parse error (not well-formed
+ (invalid token)) - mcabber and perl Net::Jabber can't connect
Revision history for this message
Tomasz Sterna (smoku) wrote :

This is how it currently works.
If you have any suggestion how to fix it, feel free to reopen the bug.

Changed in jabberd2:
status: New → Won't Fix
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.