Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-742

fix throw exception when request uri is /

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Resolved
    • 1.5.0
    • 1.5.1
    • Web
    • None

    Description

      this bug due to my pr[SHIRO-682|https://github.com/apache/shiro/pull/127] in 1.5, sorry 

      as the @jaynlau [comment|https://github.com/apache/shiro/pull/181]

      {{}}under is @jaynlau report

      Can not get the NamedFilterList when request uri is "/".

      {{java.lang.IllegalArgumentException: There is no configured chain under the name/key [].
      at org.apache.shiro.web.filter.mgt.DefaultFilterChainManager.proxy(DefaultFilterChainManager.java:322) ~[shiro-web-1.5.0.jar:1.5.0]
      at org.apache.shiro.web.filter.mgt.PathMatchingFilterChainResolver.getChain(PathMatchingFilterChainResolver.java:126) ~[shiro-web-1.5.0.jar:1.5.0]
      at org.apache.shiro.web.servlet.AbstractShiroFilter.getExecutionChain(AbstractShiroFilter.java:415) ~[shiro-web-1.5.0.jar:1.5.0]
      at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:448) ~[shiro-web-1.5.0.jar:1.5.0]
      at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) ~[shiro-web-1.5.0.jar:1.5.0]
      at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) ~[shiro-core-1.5.0.jar:1.5.0]
      at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) ~[shiro-core-1.5.0.jar:1.5.0]
      at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387) ~[shiro-core-1.5.0.jar:1.5.0]
      at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) ~[shiro-web-1.5.0.jar:1.5.0]}}

      The value of pathPattern is changed from "/" to "" , matching path definition / = user failed.
      Because chainName is "/", not "".

      {{}}

      Attachments

        Issue Links

          Activity

            People

              fpapon Francois Papon
              tomsun28 tomsun28
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m