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 @@ -550,9 +550,9 @@ public void backgroundProcess() {
550
550
551
551
// Check each defined security constraint
552
552
String uri = request .getRequestPathMB ().toString ();
553
- // Bug47080 - in rare cases this may be null
553
+ // Bug47080 - in rare cases this may be null or ""
554
554
// Mapper treats as '/' do the same to prevent NPE
555
- if (uri == null ) {
555
+ if (uri == null || uri . length () == 0 ) {
556
556
uri = "/" ;
557
557
}
558
558
@@ -584,7 +584,8 @@ public void backgroundProcess() {
584
584
}
585
585
586
586
for (int k =0 ; k < patterns .length ; k ++) {
587
- if (uri .equals (patterns [k ])) {
587
+ // Exact match including special case for the context root.
588
+ if (uri .equals (patterns [k ]) || patterns [k ].length () == 0 && uri .equals ("/" )) {
588
589
found = true ;
589
590
if (collection [j ].findMethod (method )) {
590
591
if (results == null ) {
Original file line number Diff line number Diff line change 69
69
Avoid NPE in ThreadLocalLeakPreventionListener if there is no Engine.
70
70
(remm)
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 =" Coyote" >
You can’t perform that action at this time.
0 commit comments