View | Details | Raw Unified | Return to bug 34805
Collapse All | Expand All

(-)RealmBase.java.orig (-2 / +14 lines)
Lines 32-37 Link Here
32
import javax.management.MBeanRegistration;
32
import javax.management.MBeanRegistration;
33
import javax.management.MBeanServer;
33
import javax.management.MBeanServer;
34
import javax.management.ObjectName;
34
import javax.management.ObjectName;
35
import javax.servlet.ServletException;
35
import javax.servlet.http.HttpServletResponse;
36
import javax.servlet.http.HttpServletResponse;
36
37
37
import org.apache.catalina.Container;
38
import org.apache.catalina.Container;
Lines 431-437 Link Here
431
     * @param context Context the Request is mapped to
432
     * @param context Context the Request is mapped to
432
     */
433
     */
433
    public SecurityConstraint [] findSecurityConstraints(Request request,
434
    public SecurityConstraint [] findSecurityConstraints(Request request,
434
                                                         Context context) {
435
                                                         Context context) 
436
    throws  ServletException{
435
437
436
        ArrayList results = null;
438
        ArrayList results = null;
437
        // Are there any defined security constraints?
439
        // Are there any defined security constraints?
Lines 645-650 Link Here
645
                    if(pattern.equals("/")){
647
                    if(pattern.equals("/")){
646
                        matched = true;
648
                        matched = true;
647
                    }
649
                    }
650
                    if(pattern.endsWith("*")){
651
                        if (pattern.charAt(pattern.length()-1) != '/') {
652
                            //as per http://issues.apache.org/bugzilla/show_bug.cgi?id=34805
653
                            if (log.isDebugEnabled()) {
654
                                log.debug("  invalid url pattern: \"" + pattern + "\"" +
655
                                		" - see http://java.sun.com/aboutJava/communityprocess/first/jsr053/servlet23_PFD.pdf" +
656
                                		"  section 11.2" );}
657
                            throw new ServletException("  invalid url pattern: \"" + pattern + "\"");
658
                        }
659
                    }
648
                }
660
                }
649
                if(matched) {
661
                if(matched) {
650
                    if(results == null) {
662
                    if(results == null) {
Lines 654-660 Link Here
654
                }
666
                }
655
            }
667
            }
656
        }
668
        }
657
669
        
658
        if(results == null) {
670
        if(results == null) {
659
            // No applicable security constraint was found
671
            // No applicable security constraint was found
660
            if (log.isDebugEnabled())
672
            if (log.isDebugEnabled())

Return to bug 34805