Uploaded image for project: 'VYSPER'
  1. VYSPER
  2. VYSPER-252

Not well formed XML does not terminate XMPP stream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 0.6
    • None
    • core protocol
    • None

    Description

      When the server receives a stanza which contains not well-formed (NWF) XML, the XMPP stream must be closed immediately.
      Vysper detects, but currently doesn't close on NWF XML:
      <item> miltjackson Map<String, String> zappa </item>

      DefaultNonBlockingXMLReader returns FatalError, but the XMPP stream isn't closed.
      (I tried to set up a case, but didn't find any boilerplate code).
      Subsequently, "org.apache.mina.filter.codec.ProtocolDecoderException: org.xml.sax.SAXException: Parser is closed" is thrown.

      22:49:12,879 | DEBUG | org.apache.vysper.xml.sax.impl.XMLParser | Fatal error: Invalid element name: item
      22:49:12,879 | WARN | org.apache.vysper.mina.XmppIoHandlerAdapter | error caught on transportation layer: {}
      org.apache.mina.filter.codec.ProtocolDecoderException: org.xml.sax.SAXParseException: Invalid element name: item (Hexdump: [SNIP])
      at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:235)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
      at org.apache.mina.filter.ssl.SslHandler.flushScheduledEvents(SslHandler.java:278)
      at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:444)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
      at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
      at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
      at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:637)
      Caused by: org.xml.sax.SAXParseException: Invalid element name: item
      at org.apache.vysper.xml.sax.impl.XMLParser.fatalError(XMLParser.java:494)
      at org.apache.vysper.xml.sax.impl.XMLParser.token(XMLParser.java:162)
      at org.apache.vysper.xml.sax.impl.XMLTokenizer.emit(XMLTokenizer.java:153)
      at org.apache.vysper.xml.sax.impl.XMLTokenizer.parse(XMLTokenizer.java:109)
      at org.apache.vysper.xml.sax.impl.XMLParser.parse(XMLParser.java:121)
      at org.apache.vysper.xml.sax.impl.DefaultNonBlockingXMLReader.parse(DefaultNonBlockingXMLReader.java:185)
      at org.apache.vysper.xml.decoder.XMPPDecoder.doDecode(XMPPDecoder.java:96)
      at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:178)
      at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:225)
      ... 20 more
      22:49:12,881 | WARN | org.apache.vysper.mina.XmppIoHandlerAdapter | error caught on transportation layer: {}
      org.apache.mina.filter.codec.ProtocolDecoderException: org.xml.sax.SAXException: Parser is closed (Hexdump:

      Attachments

        Activity

          People

            Unassigned Unassigned
            brainlounge Bernd Fondermann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: