Uploaded image for project: 'Openfire'
  1. Openfire
  2. OF-1845

NPE in S2S tester

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4.2
    • Component/s: None
    • Labels:
      None

      Description

      The S2S tester uses an interceptor, that has this line:

      if (!processed
              && (ping.getTo().getDomain().equals(packet.getFrom().getDomain()) || ping.getTo().getDomain().equals(packet.getTo().getDomain()))) { 

      The interceptor could intercept stanzas that ahve no 'to' attribute (such as presence updates). This causes a NPE.

      The exception that was logged:

      2019.08.30 11:06:05 ERROR [socket_c2s-thread-3]: org.jivesoftware.openfire.interceptor.InterceptorManager - Error in interceptor: <iq type="get" id="465-2" from="example.org" to="example.com"><ping xmlns="urn:xmpp:ping"/></iq>
      <iq type="get" id="465-2" from="example.org" to="example.com"><ping xmlns="urn:xmpp:ping"/></iq>
       while intercepting: 
      <presence from="alexisg@example.org/Conversations.ztXX">
        <status>I'm alive</status>
        <c xmlns="http://jabber.org/protocol/caps" ver="oiBCDHblXXJOceEIfz3f8wrzM8w=" node="http://conversations.im" hash="sha-1"></c>
      </presence>
      java.lang.NullPointerException: null
              at org.jivesoftware.util.S2STestService$S2SInterceptor.interceptPacket(S2STestService.java:235) ~[xmppserver-4.3.2.jar:4.3.2]
              at org.jivesoftware.openfire.interceptor.InterceptorManager.invokeInterceptors(InterceptorManager.java:268) [xmppserver-4.3.2.jar:4.3.2]
              at org.jivesoftware.openfire.interceptor.InterceptorManager.invokeInterceptors(InterceptorManager.java:230) [xmppserver-4.3.2.jar:4.3.2]
              at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:74) [xmppserver-4.3.2.jar:4.3.2]
              at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:84) [xmppserver-4.3.2.jar:4.3.2]
              at org.jivesoftware.openfire.net.StanzaHandler.processPresence(StanzaHandler.java:366) [xmppserver-4.3.2.jar:4.3.2]
              at org.jivesoftware.openfire.net.ClientStanzaHandler.processPresence(ClientStanzaHandler.java:102) [xmppserver-4.3.2.jar:4.3.2]
              at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:283) [xmppserver-4.3.2.jar:4.3.2]
              at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:201) [xmppserver-4.3.2.jar:4.3.2]
              at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:177) [xmppserver-4.3.2.jar:4.3.2]
              at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690) [mina-core-2.0.7.jar:?]
              at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417) [mina-core-2.0.7.jar:?]
              at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47) [mina-core-2.0.7.jar:?]
              at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765) [mina-core-2.0.7.jar:?]
              at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109) [mina-core-2.0.7.jar:?]
              at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417) [mina-core-2.0.7.jar:?]
              at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47) [mina-core-2.0.7.jar:?]
              at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765) [mina-core-2.0.7.jar:?]
              at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:407) [mina-core-2.0.7.jar:?]
              at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:236) [mina-core-2.0.7.jar:?]
              at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417) [mina-core-2.0.7.jar:?]
              at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47) [mina-core-2.0.7.jar:?]
              at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765) [mina-core-2.0.7.jar:?]
              at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:74) [mina-core-2.0.7.jar:?]
              at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63) [mina-core-2.0.7.jar:?]
              at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:769) [mina-core-2.0.7.jar:?]
              at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:761) [mina-core-2.0.7.jar:?]
              at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:703) [mina-core-2.0.7.jar:?]
              at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
       

        Attachments

          Activity

            People

            Assignee:
            eric-ampire Eric Ampire
            Reporter:
            guus Guus der Kinderen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: