This is an automated email from the ASF dual-hosted git repository.

lprimak pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/shiro.git

commit 196ac3d6c919f9e3e261c51329f4b3c4910fdebd
Merge: dab015331 3b9638b95
Author: lprimak <[email protected]>
AuthorDate: Sat Jan 31 14:21:59 2026 -0600

    Merge branch 'main' into 3.x

 .github/workflows/pre-commit.yml                   |   2 +-
 .pre-commit-config.yaml                            |  10 +-
 .../authc/credential/DefaultPasswordService.java   |  33 ++++++-
 .../java/org/apache/shiro/util/AntPathMatcher.java |  47 ++++++----
 .../java/org/apache/shiro/util/PatternMatcher.java |  15 +++
 .../org/apache/shiro/util/RegExPatternMatcher.java |   2 +
 .../credential/DefaultPasswordServiceTest.groovy   |  17 ++++
 .../org/apache/shiro/util/AntPathMatcherTests.java |   8 ++
 .../shiro/crypto/hash/ConfigurableHashService.java |   1 -
 .../shiro/crypto/hash/DefaultHashService.java      |  11 +++
 .../org/apache/shiro/crypto/hash/HashService.java  |  36 +++++++
 pom.xml                                            |   7 ++
 src/suppressions.xml                               |  29 +++---
 .../shiro/spring/web/ShiroFilterFactoryBean.java   |  19 +++-
 .../AbstractShiroWebFilterConfiguration.java       |   4 +
 .../config/ShiroWebFilterConfigurationTest.groovy  |  50 +++++++++-
 .../web/config/IniFilterChainResolverFactory.java  |  14 ++-
 .../shiro/web/filter/InvalidRequestFilter.java     |  89 +++++++++---------
 .../shiro/web/filter/PathConfigProcessor.java      |   6 ++
 .../shiro/web/filter/PathMatchingFilter.java       |   7 ++
 .../web/filter/mgt/DefaultFilterChainManager.java  |   8 ++
 .../shiro/web/filter/mgt/FilterChainManager.java   |   6 ++
 .../mgt/PathMatchingFilterChainResolver.java       |  18 ++++
 .../web/filter/InvalidRequestFilterTest.groovy     | 103 +++++++++------------
 24 files changed, 392 insertions(+), 150 deletions(-)

diff --cc core/src/test/java/org/apache/shiro/util/AntPathMatcherTests.java
index c24908a12,d682343f8..8eeb2c769
--- a/core/src/test/java/org/apache/shiro/util/AntPathMatcherTests.java
+++ b/core/src/test/java/org/apache/shiro/util/AntPathMatcherTests.java
@@@ -346,6 -330,14 +346,14 @@@ public class AntPathMatcherTests 
  
      @Test
      void isPatternWithNullPath() {
 -        assertFalse(pathMatcher.isPattern(null));
 +        assertThat(pathMatcher.isPattern(null)).isFalse();
      }
+ 
+     @Test
+     void caseInsensitiveMatch() {
+         pathMatcher.setCaseInsensitive(true);
+         assertTrue(pathMatcher.match("/Test/Path", "/test/path"));
+         assertTrue(pathMatcher.match("/TEST/PATH/*", "/test/path/extra"));
+         assertFalse(pathMatcher.match("/TEST/PATH", "/different/path"));
+     }
  }
diff --cc 
web/src/main/java/org/apache/shiro/web/config/IniFilterChainResolverFactory.java
index 6f19bee8e,c57fec54d..15dc3bbd9
--- 
a/web/src/main/java/org/apache/shiro/web/config/IniFilterChainResolverFactory.java
+++ 
b/web/src/main/java/org/apache/shiro/web/config/IniFilterChainResolverFactory.java
@@@ -90,9 -92,18 +92,17 @@@ public class IniFilterChainResolverFact
          this.globalFilters = globalFilters;
      }
  
+     public boolean isCaseInsensitive() {
+         return caseInsensitive;
+     }
+ 
+     public void setCaseInsensitive(boolean caseInsensitive) {
+         this.caseInsensitive = caseInsensitive;
+     }
+ 
      protected FilterChainResolver createInstance(Ini ini) {
          FilterChainResolver filterChainResolver = createDefaultInstance();
 -        if (filterChainResolver instanceof PathMatchingFilterChainResolver) {
 -            PathMatchingFilterChainResolver resolver = 
(PathMatchingFilterChainResolver) filterChainResolver;
 +        if (filterChainResolver instanceof PathMatchingFilterChainResolver 
resolver) {
              FilterChainManager manager = resolver.getFilterChainManager();
              buildChains(manager, ini);
          }
diff --cc 
web/src/main/java/org/apache/shiro/web/filter/mgt/DefaultFilterChainManager.java
index cdc16e206,00443da6b..6c9572f17
--- 
a/web/src/main/java/org/apache/shiro/web/filter/mgt/DefaultFilterChainManager.java
+++ 
b/web/src/main/java/org/apache/shiro/web/filter/mgt/DefaultFilterChainManager.java
@@@ -325,8 -332,9 +332,9 @@@ public class DefaultFilterChainManager 
              LOGGER.debug("Attempting to apply path [" + chainName + "] to 
filter [" + filter + "] "
                      + "with config [" + chainSpecificFilterConfig + "]");
          }
 -        if (filter instanceof PathConfigProcessor) {
 -            ((PathConfigProcessor) filter).processPathConfig(chainName, 
chainSpecificFilterConfig);
 -            ((PathConfigProcessor) 
filter).setCaseInsensitive(caseInsensitive);
 +        if (filter instanceof PathConfigProcessor processor) {
 +            processor.processPathConfig(chainName, chainSpecificFilterConfig);
++            processor.setCaseInsensitive(caseInsensitive);
          } else {
              if (StringUtils.hasText(chainSpecificFilterConfig)) {
                  //they specified a filter configuration, but the Filter 
doesn't implement PathConfigProcessor

Reply via email to