Skip to content

NPE was occurred at WebUtils.isSameOrigin [SPR-14305] #18877

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

Referenced from: commits 9a41774, 6807bcb

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions