Closed
Description
Kazuki Shimizu opened SPR-14305 and commented
NPE was occurred at the WebUtils.isSameOrigin when i access to a host (name) that supported by RFC 3986. In actually, i tried a host name include with "_
". (e.g. http://spring_app/)
...
Caused by: java.lang.NullPointerException
at org.springframework.web.util.WebUtils.isSameOrigin(WebUtils.java:816)
at org.springframework.web.cors.DefaultCorsProcessor.processRequest(DefaultCorsProcessor.java:76)
at org.springframework.web.servlet.handler.AbstractHandlerMapping$CorsInterceptor.preHandle(AbstractHandlerMapping.java:503)
at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:134)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:956)
I will submit repro project on https://github.com/spring-projects/spring-framework-issues.
Affects: 4.2.6
Issue Links:
- DefaultCorsProcessor's origin comparison is restrictive and inefficient [SPR-14080] #18652 DefaultCorsProcessor's origin comparison is restrictive and inefficient