Merge pull request #300 from apache/jdk16-builds-jenkins

(build) update latest GA'd JDKs to 16.
diff --git a/.asf.yaml b/.asf.yaml
index ce3ebb5..ab5ec76 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -29,4 +29,5 @@
 notifications:
   pullrequests: commits@shiro.apache.org
   commits: commits@shiro.apache.org
+  issues:  issues@shiro.apache.org
   jira_options: link label worklog
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 18c7bf6..fa73c39 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,3 +1,8 @@
+<!--
+For Security Vulnerabilities, please email: security@shiro.apache.org
+For more details on how to report a vulnerablity see: https://www.apache.org/security/
+-->
+
 Following this checklist to help us incorporate your contribution quickly and easily:
 
  - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SHIRO) filed 
diff --git a/cache/pom.xml b/cache/pom.xml
index 6672317..6d866c0 100644
--- a/cache/pom.xml
+++ b/cache/pom.xml
@@ -45,6 +45,8 @@
                             org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/config/core/pom.xml b/config/core/pom.xml
index 078e393..464d47f 100644
--- a/config/core/pom.xml
+++ b/config/core/pom.xml
@@ -46,6 +46,8 @@
                             org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/config/ogdl/pom.xml b/config/ogdl/pom.xml
index 843a568..a1199df 100644
--- a/config/ogdl/pom.xml
+++ b/config/ogdl/pom.xml
@@ -61,6 +61,8 @@
                             org.apache.shiro.event*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/core/pom.xml b/core/pom.xml
index 5de40a9..9ff13d6 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -82,6 +82,8 @@
                         <DynamicImport-Package>
                             org.apache.shiro.*
                         </DynamicImport-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/crypto/cipher/pom.xml b/crypto/cipher/pom.xml
index 2b03bfd..9178947 100644
--- a/crypto/cipher/pom.xml
+++ b/crypto/cipher/pom.xml
@@ -46,6 +46,8 @@
                             org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/crypto/core/pom.xml b/crypto/core/pom.xml
index 2733ceb..bb15685 100644
--- a/crypto/core/pom.xml
+++ b/crypto/core/pom.xml
@@ -45,6 +45,8 @@
                             org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/crypto/hash/pom.xml b/crypto/hash/pom.xml
index e5503af..4b1052a 100644
--- a/crypto/hash/pom.xml
+++ b/crypto/hash/pom.xml
@@ -46,6 +46,8 @@
                             org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/crypto/support/hashes/argon2/pom.xml b/crypto/support/hashes/argon2/pom.xml
index b278be5..237322e 100644
--- a/crypto/support/hashes/argon2/pom.xml
+++ b/crypto/support/hashes/argon2/pom.xml
@@ -58,6 +58,8 @@
                             com.google.inject*;version="1.3",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/crypto/support/hashes/bcrypt/pom.xml b/crypto/support/hashes/bcrypt/pom.xml
index ae9022c..9590c81 100644
--- a/crypto/support/hashes/bcrypt/pom.xml
+++ b/crypto/support/hashes/bcrypt/pom.xml
@@ -58,6 +58,8 @@
                             com.google.inject*;version="1.3",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/event/pom.xml b/event/pom.xml
index a105866..7e7d57b 100644
--- a/event/pom.xml
+++ b/event/pom.xml
@@ -45,6 +45,8 @@
                             org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/lang/pom.xml b/lang/pom.xml
index 434c68e..09892e9 100644
--- a/lang/pom.xml
+++ b/lang/pom.xml
@@ -68,6 +68,8 @@
                             javax.servlet.jsp*;resolution:=optional,
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/pom.xml b/pom.xml
index 2c3c6da..ac96652 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache</groupId>
         <artifactId>apache</artifactId>
-        <version>23</version>
+        <version>24</version>
     </parent>
 
     <groupId>org.apache.shiro</groupId>
@@ -69,6 +69,7 @@
         <shiro.previousVersion>1.7.1</shiro.previousVersion>
         <!-- Replaced by the build number plugin at build time: -->
         <buildNumber>${user.name}-${maven.build.timestamp}</buildNumber>
+        <project.build.outputTimestamp>2021-07-16T23:08:15Z</project.build.outputTimestamp>
         <jacoco.skip>true</jacoco.skip>
         <!--suppress CheckTagEmptyBody -->
         <surefire.argLine></surefire.argLine>
@@ -550,18 +551,13 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
-                <version>3.1.1</version>
+                <version>3.2.0</version>
                 <configuration>
                     <archive>
                         <manifest>
                             <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                             <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                         </manifest>
-                        <manifestEntries>
-                            <!--suppress MavenModelInspection -->
-                            <SCM-Revision>${buildNumber}</SCM-Revision>
-                            <SCM-url>${project.scm.url}</SCM-url>
-                        </manifestEntries>
                     </archive>
                 </configuration>
             </plugin>
diff --git a/support/aspectj/pom.xml b/support/aspectj/pom.xml
index 1b3e2dc..46190c4 100644
--- a/support/aspectj/pom.xml
+++ b/support/aspectj/pom.xml
@@ -82,6 +82,8 @@
                             org.aspectj*;version="[1.6.0, 2.0.0)",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/support/ehcache/pom.xml b/support/ehcache/pom.xml
index a1e06f3..4a4af98 100644
--- a/support/ehcache/pom.xml
+++ b/support/ehcache/pom.xml
@@ -70,6 +70,8 @@
                             net.sf.ehcache*;version="[2.5, 3)",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/support/guice/pom.xml b/support/guice/pom.xml
index a1f866b..26d332c 100644
--- a/support/guice/pom.xml
+++ b/support/guice/pom.xml
@@ -104,6 +104,8 @@
                             com.google.inject*;version="1.3",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/support/hazelcast/pom.xml b/support/hazelcast/pom.xml
index 955e9a9..c557f74 100644
--- a/support/hazelcast/pom.xml
+++ b/support/hazelcast/pom.xml
@@ -74,6 +74,8 @@
                             com.hazelcast*;version="${hazelcast.osgi.importRange}",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/support/jaxrs/pom.xml b/support/jaxrs/pom.xml
index eb97308..52106ae 100644
--- a/support/jaxrs/pom.xml
+++ b/support/jaxrs/pom.xml
@@ -115,6 +115,8 @@
                             org.apache.shiro*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/support/quartz/pom.xml b/support/quartz/pom.xml
index 190659f..5d78a46 100644
--- a/support/quartz/pom.xml
+++ b/support/quartz/pom.xml
@@ -70,6 +70,8 @@
                             org.quartz*;version="[1.7.2, 3)",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/support/spring/pom.xml b/support/spring/pom.xml
index 78d8b65..c2677b3 100644
--- a/support/spring/pom.xml
+++ b/support/spring/pom.xml
@@ -104,6 +104,8 @@
                             org.springframework*;version="[4.0.0, 6.0.0)",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/tools/hasher/pom.xml b/tools/hasher/pom.xml
index 94da7d9..ba6da45 100644
--- a/tools/hasher/pom.xml
+++ b/tools/hasher/pom.xml
@@ -75,7 +75,7 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>2.1.12.RELEASE</version>
+                <version>2.3.12.RELEASE</version>
                 <executions>
                     <execution>
                         <goals>
@@ -102,6 +102,8 @@
                             org.apache.shiro*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/web/pom.xml b/web/pom.xml
index 7de72ac..9166b36 100644
--- a/web/pom.xml
+++ b/web/pom.xml
@@ -100,6 +100,8 @@
                             javax.servlet.jsp*;resolution:=optional,
                             *
                         </Import-Package>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_reproducible>true</_reproducible>
                     </instructions>
                 </configuration>
             </plugin>
diff --git a/web/src/main/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolver.java b/web/src/main/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolver.java
index 6d81e02..e216108 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolver.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolver.java
@@ -125,7 +125,7 @@
                         log.trace("Matched path pattern [{}] for requestURI [{}].  " +
                                   "Utilizing corresponding filter chain...", pathPattern, Encode.forHtml(requestURINoTrailingSlash));
                     }
-                    return filterChainManager.proxy(originalChain, requestURINoTrailingSlash);
+                    return filterChainManager.proxy(originalChain, pathPattern);
                 }
             }
         }
diff --git a/web/src/test/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolverTest.java b/web/src/test/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolverTest.java
index db4de61..76bff55 100644
--- a/web/src/test/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolverTest.java
+++ b/web/src/test/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolverTest.java
@@ -255,4 +255,44 @@
         FilterChain resolved = resolver.getChain(request, response, chain);
         assertThat(resolved, notNullValue());
     }
+
+    /**
+     * Test asserting <a href="https://issues.apache.org/jira/browse/SHIRO-825">SHIRO-825<a/>.
+     */
+    @Test
+    public void testGetChainWhenPathEndsWithSlash() {
+        HttpServletRequest request = mock(HttpServletRequest.class);
+        HttpServletResponse response = mock(HttpServletResponse.class);
+        FilterChain chain = mock(FilterChain.class);
+
+        //ensure at least one chain is defined:
+        resolver.getFilterChainManager().addToChain("/resource/*/book", "authcBasic");
+
+        when(request.getServletPath()).thenReturn("");
+        when(request.getPathInfo()).thenReturn("/resource/123/book/");
+
+        FilterChain resolved = resolver.getChain(request, response, chain);
+        assertNotNull(resolved);
+        verify(request).getServletPath();
+    }
+
+    /**
+     * Test asserting <a href="https://issues.apache.org/jira/browse/SHIRO-825">SHIRO-825<a/>.
+     */
+    @Test
+    public void testGetChainWhenPathDoesNotEndWithSlash() {
+        HttpServletRequest request = mock(HttpServletRequest.class);
+        HttpServletResponse response = mock(HttpServletResponse.class);
+        FilterChain chain = mock(FilterChain.class);
+
+        //ensure at least one chain is defined:
+        resolver.getFilterChainManager().addToChain("/resource/*/book", "authcBasic");
+
+        when(request.getServletPath()).thenReturn("");
+        when(request.getPathInfo()).thenReturn("/resource/123/book");
+
+        FilterChain resolved = resolver.getChain(request, response, chain);
+        assertNotNull(resolved);
+        verify(request).getServletPath();
+    }
 }