Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-9073

NPE with unauthorized CORS preflight request

    Details

      Description

      This could happen if the browser does a pre-flight request with an "Origin" header which is not part of the authorized list of origins.

      2:16:19,514 ERROR [org.infinispan.rest.Http20RequestHandler] (REST-ServerWorker-5-12) ISPN012006: Uncaught exception in the pipeline: java.lang.NullPointerException
      	at org.infinispan.rest.cors.CorsHandler.setOrigin(CorsHandler.java:126)
      	at org.infinispan.rest.cors.CorsHandler.handlePreflight(CorsHandler.java:80)
      	at org.infinispan.rest.cors.CorsHandler.channelRead(CorsHandler.java:67)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
      	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
      	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
      	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
      	at org.infinispan.server.core.transport.StatsChannelHandler.channelRead(StatsChannelHandler.java:26)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                gustavonalle Gustavo Fernandes
                Reporter:
                gustavonalle Gustavo Fernandes
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: