Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-14305

NPE was occurred at WebUtils.isSameOrigin

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 4.2.6
    • Fix Version/s: 4.2.7
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rstoya05-aop Rossen Stoyanchev
                Reporter:
                kazuki43zoo Kazuki Shimizu
                Last updater:
                Spring Issuemaster
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 6 weeks ago