You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2014/04/04 16:16:29 UTC

svn commit: r1584705 - /sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java

Author: olli
Date: Fri Apr  4 14:16:28 2014
New Revision: 1584705

URL: http://svn.apache.org/r1584705
Log:
SLING-3492 use / as default when path is empty

Modified:
    sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java

Modified: sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java?rev=1584705&r1=1584704&r2=1584705&view=diff
==============================================================================
--- sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java (original)
+++ sling/trunk/bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java Fri Apr  4 14:16:28 2014
@@ -680,13 +680,11 @@ public class SlingAuthenticator implemen
     private AuthenticationInfo getAuthenticationInfo(HttpServletRequest request, HttpServletResponse response) {
 
         // Get the path used to select the authenticator, if the SlingServlet
-        // itself has been requested without any more info, this will be null
+        // itself has been requested without any more info, this will be empty
         // and we assume the root (SLING-722)
-        final String path = getPath(request);
+        String path = getPath(request);
         if (path.length() == 0) {
-            // should not happen, be safe an return anonymous credentials
-            log.warn("get authentication info: request path is empty; assuming anonymous");
-            return getAnonymousCredentials();
+            path = "/";
         }
 
         final List<AbstractAuthenticationHandlerHolder>[] localArray = this.authHandlerCache.findApplicableHolder(request);