I believe Openfire 3.6.0 broke support for XMLSocket Flash clients which append a NULL byte at the end of messages. There is currently a line in XMLLightweightParser which throws an exception if a NULL byte is parsed. To work around this issue, an exception for NULL bytes needs to be added around line 207:
ch = buf[i];
if (ch < 0x20 && ch != 0x9 && ch != 0xA && ch != 0xD && ch != 0x0) {
//Unicode characters in the range 0x0000-0x001F other than 9, A, and D are not allowed in XML
//We need to allow the NULL character, however, for Flash XMLSocket clients to work.
throw new Exception("Disallowed character");
}
I’m not sure if there is a better way to do this, as the isFlash() method doesn’t work on a connection until the first stanza has been received. Previously, the connection was being terminated when the Flash movie sends the initial .
It would be nice if this (or something similar to it) could be merged into the main branch. I don’t have enough knowledge to know if anything depends on NULL bytes throwing an exception or not, but it definitely sucks to have Flash clients broken.
Edit: Previous patch was throwing an exception in some cases, sorry about that This new one works for me, please try it out.