Check for closing stream tag's namespace

This commit is contained in:
Florian Schmaus 2015-06-11 18:56:10 +02:00
parent de29871120
commit 3875664128
1 changed files with 4 additions and 0 deletions

View File

@ -1097,6 +1097,10 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
break;
case XmlPullParser.END_TAG:
if (parser.getName().equals("stream")) {
if (!parser.getNamespace().equals("http://etherx.jabber.org/streams")) {
LOGGER.warning(XMPPTCPConnection.this + " </stream> but different namespace " + parser.getNamespace());
break;
}
closingStreamReceived.reportSuccess();
if (packetWriter.queue.isShutdown()) {
// We received a closing stream element *after* we initiated the