]
Tristan Tarrant updated ISPN-9073:
----------------------------------
Sprint: Sprint 9.3.0.Alpha1
NPE with unauthorized CORS preflight request
--------------------------------------------
Key: ISPN-9073
URL:
https://issues.jboss.org/browse/ISPN-9073
Project: Infinispan
Issue Type: Bug
Affects Versions: 9.2.1.Final
Reporter: Gustavo Fernandes
Assignee: Gustavo Fernandes
Fix For: 9.2.2.Final, 9.3.0.Alpha1
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.
{noformat}
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)
{noformat}