This repository was archived by the owner on Dec 4, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
java/org/apache/catalina/realm Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -757,9 +757,9 @@ public void backgroundProcess() {
757
757
758
758
// Check each defined security constraint
759
759
String uri = request .getRequestPathMB ().toString ();
760
- // Bug47080 - in rare cases this may be null
760
+ // Bug47080 - in rare cases this may be null or ""
761
761
// Mapper treats as '/' do the same to prevent NPE
762
- if (uri == null ) {
762
+ if (uri == null || uri . length () == 0 ) {
763
763
uri = "/" ;
764
764
}
765
765
@@ -791,7 +791,8 @@ public void backgroundProcess() {
791
791
}
792
792
793
793
for (int k =0 ; k < patterns .length ; k ++) {
794
- if (uri .equals (patterns [k ])) {
794
+ // Exact match including special case for the context root.
795
+ if (uri .equals (patterns [k ]) || patterns [k ].length () == 0 && uri .equals ("/" )) {
795
796
found = true ;
796
797
if (collection [j ].findMethod (method )) {
797
798
if (results == null ) {
Original file line number Diff line number Diff line change 69
69
rather than the user facing Principal object as Tomcat requires the
70
70
internal object to correctly process later authorization checks. (markt)
71
71
</fix >
72
+ <fix >
73
+ <bug >62067</bug >: Correctly apply security constraints mapped to the
74
+ context root using a URL pattern of <code >"" </code >. (markt)
75
+ </fix >
72
76
</changelog >
73
77
</subsection >
74
78
<subsection name =" Other" >
You can’t perform that action at this time.
0 commit comments