tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1493927 - /tomcat/trunk/java/org/apache/catalina/deploy/SecurityConstraint.java
Date Mon, 17 Jun 2013 20:37:33 GMT
Author: markt
Date: Mon Jun 17 20:37:33 2013
New Revision: 1493927

URL: http://svn.apache.org/r1493927
Log:
Make addAuthRole() and removeAuthRole() consistent

Modified:
    tomcat/trunk/java/org/apache/catalina/deploy/SecurityConstraint.java

Modified: tomcat/trunk/java/org/apache/catalina/deploy/SecurityConstraint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/SecurityConstraint.java?rev=1493927&r1=1493926&r2=1493927&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/deploy/SecurityConstraint.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/SecurityConstraint.java Mon Jun 17 20:37:33
2013
@@ -201,10 +201,12 @@ public class SecurityConstraint implemen
 
         if (authRole == null)
             return;
+
         if ("*".equals(authRole)) {
             allRoles = true;
             return;
         }
+
         String results[] = new String[authRoles.length + 1];
         for (int i = 0; i < authRoles.length; i++)
             results[i] = authRoles[i];
@@ -338,6 +340,12 @@ public class SecurityConstraint implemen
 
         if (authRole == null)
             return;
+
+        if ("*".equals(authRole)) {
+            allRoles = false;
+            return;
+        }
+
         int n = -1;
         for (int i = 0; i < authRoles.length; i++) {
             if (authRoles[i].equals(authRole)) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message