[ 
https://issues.apache.org/jira/browse/SHIRO-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francois Papon updated SHIRO-825:
---------------------------------
    Fix Version/s: 1.8.0
                   2.0.0

> Trailing slash in URI results in "IllegalArgumentException: There is no 
> configured chain under the name/key"
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: SHIRO-825
>                 URL: https://issues.apache.org/jira/browse/SHIRO-825
>             Project: Shiro
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>            Reporter: Albert Choi
>            Priority: Major
>             Fix For: 2.0.0, 1.8.0
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> We recently attempted to upgrade our Dropwizard-based project to 1.7.1 from 
> 1.7.0. We immediately hit a failure in our end-to-end test suite.
> The case is when the client sends a request URI with *trailing slash* and it 
> matches one of the patterns we defined in shiro.ini (the pattern does not 
> have a trailing slash).
> The pattern is:
> {code:java}
> /api/models/*/etl/templates
> {code}
> The client URI is {{/api/models/1024831678847123456/etl/templates/}}
> The error and stack trace in Shiro 1.7.1:
> {noformat}
> javax.servlet.ServletException: Filtered request failed.
>       at 
> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:384)
>       at 
> ...
> ...
> Caused by: java.lang.IllegalArgumentException: There is no configured chain 
> under the name/key [/api/models/1024831678847123456/etl/templates].
>       at 
> org.apache.shiro.web.filter.mgt.DefaultFilterChainManager.proxy(DefaultFilterChainManager.java:357)
>       at 
> org.apache.shiro.web.filter.mgt.PathMatchingFilterChainResolver.getChain(PathMatchingFilterChainResolver.java:129)
>       at 
> org.apache.shiro.web.servlet.AbstractShiroFilter.getExecutionChain(AbstractShiroFilter.java:416)
>       at 
> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
>       at 
> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
>       at 
> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
>       at 
> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
>       at 
> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
>       at 
> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
>       ... 54 common frames omitted
> {noformat}
> There is no error if the client does not send the trailing slash in the URI. 
> There is also no error with Shiro 1.7.0.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to