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

setFilterChainDefinitionMap accepts Map interface objects, whose implementations are mostly unordered

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Configuration
    • None

    Description

      org.apache.shiro.spring.web.ShiroFilterFactoryBean has a method, setFilterChainDefinitionMap which accepts Map interface objects. Most Map interface objects have no guaranteed order, but the filter chain definitions rely heavily on specific ordering for the application of rules.

      For example,

          Map<String, String> filterChainDefs = new HashMap<String, String>();
          filterChainDefs.put("/s/test", "authc");
          filterChainDefs.put("/s/**", "anon");
          shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefs);
      

      In this example, this structure is acceptable to the setter on shiroFilterFactoryBean, but will non-deterministically allow or deny access to /s/test between server restarts.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            sanimalp Jon Steege

            Dates

              Created:
              Updated:

              Slack

                Issue deployment