java.lang.IllegalArgumentException: Invalid character '+' for QUERY_PARAM in "User+denied+access"

Spring JIRA | Alexander Kharitonov | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    This commit https://jira.springsource.org/browse/SECOAUTH-365 produces bug. I clicked "Deny" button on oauth2 confirm page. My browser redirected to http://***.com/login?error=access_denied&error_description=User+denied+access&state=wuhu2t And I got this exception: java.lang.IllegalArgumentException: Invalid character '+' for QUERY_PARAM in "User+denied+access" at org.springframework.web.util.HierarchicalUriComponents.verifyUriComponent(HierarchicalUriComponents.java:298) at org.springframework.web.util.HierarchicalUriComponents.verify(HierarchicalUriComponents.java:267) at org.springframework.web.util.HierarchicalUriComponents.(HierarchicalUriComponents.java:85) at org.springframework.web.util.UriComponentsBuilder.build(UriComponentsBuilder.java:280) at org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter.calculateCurrentUri(OAuth2ClientContextFilter.java:126) at org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter.doFilter(OAuth2ClientContextFilter.java:57) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com... ServletUriComponentsBuilder cannot properly parse "+" plus sign in query string.

    Spring JIRA | 4 years ago | Alexander Kharitonov
    java.lang.IllegalArgumentException: Invalid character '+' for QUERY_PARAM in "User+denied+access"
  2. 0

    This commit https://jira.springsource.org/browse/SECOAUTH-365 produces bug. I clicked "Deny" button on oauth2 confirm page. My browser redirected to http://***.com/login?error=access_denied&error_description=User+denied+access&state=wuhu2t And I got this exception: java.lang.IllegalArgumentException: Invalid character '+' for QUERY_PARAM in "User+denied+access" at org.springframework.web.util.HierarchicalUriComponents.verifyUriComponent(HierarchicalUriComponents.java:298) at org.springframework.web.util.HierarchicalUriComponents.verify(HierarchicalUriComponents.java:267) at org.springframework.web.util.HierarchicalUriComponents.(HierarchicalUriComponents.java:85) at org.springframework.web.util.UriComponentsBuilder.build(UriComponentsBuilder.java:280) at org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter.calculateCurrentUri(OAuth2ClientContextFilter.java:126) at org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter.doFilter(OAuth2ClientContextFilter.java:57) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com... ServletUriComponentsBuilder cannot properly parse "+" plus sign in query string.

    Spring JIRA | 4 years ago | Alexander Kharitonov
    java.lang.IllegalArgumentException: Invalid character '+' for QUERY_PARAM in "User+denied+access"
  3. 0

    [SPR-10172] UriComponents.Type.QUERY_PARAM does not match spec - Spring JIRA

    spring.io | 1 year ago
    java.lang.IllegalArgumentException: Invalid character '+' for QUERY_PARAM in "this+is+error+text"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 957#262615470

    GitHub | 5 months ago | hackeys
    java.lang.IllegalArgumentException: Invalid character ':' for HOST_IPV4 in "10.14.34.73:8181"
  6. 0

    Gitlab collector error

    GitHub | 5 months ago | vetrivelan25
    java.lang.IllegalArgumentException: Invalid character ':' for HOST_IPV4 in "http://66.228.26.201:8282/"

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Invalid character '+' for QUERY_PARAM in "User+denied+access"

      at org.springframework.web.util.HierarchicalUriComponents.verifyUriComponent()
    2. Spring
      UriComponentsBuilder.build
      1. org.springframework.web.util.HierarchicalUriComponents.verifyUriComponent(HierarchicalUriComponents.java:298)
      2. org.springframework.web.util.HierarchicalUriComponents.verify(HierarchicalUriComponents.java:267)
      3. org.springframework.web.util.HierarchicalUriComponents.<init>(HierarchicalUriComponents.java:85)
      4. org.springframework.web.util.UriComponentsBuilder.build(UriComponentsBuilder.java:280)
      4 frames
    3. OAuth2 for Spring Security
      OAuth2ClientContextFilter.doFilter
      1. org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter.calculateCurrentUri(OAuth2ClientContextFilter.java:126)
      2. org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter.doFilter(OAuth2ClientContextFilter.java:57)
      2 frames
    4. Spring Security
      FilterChainProxy.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      2. org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      3. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      4. org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
      5. org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
      5 frames
    5. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
      2 frames
    6. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames