This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceaccesssecurity.git

commit 7a989bae7cc3b5d568b85bdb52a061abb89b0bde
Author: Mike Müller <[email protected]>
AuthorDate: Tue Sep 9 06:41:16 2014 +0000

    SLING-3918 - If a resource does not have a path a NPE occurrs
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1623668 
13f79535-47bb-0310-9956-ffa450edef68
---
 .../resourceaccesssecurity/impl/ResourceAccessGateHandler.java | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateHandler.java
 
b/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateHandler.java
index 7cb94d6..b064910 100644
--- 
a/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateHandler.java
+++ 
b/src/main/java/org/apache/sling/resourceaccesssecurity/impl/ResourceAccessGateHandler.java
@@ -87,8 +87,14 @@ public class ResourceAccessGateHandler implements 
Comparable<ResourceAccessGateH
         boolean returnValue = false;
 
         if ( operations.contains( operation ) ) {
-            final Matcher match = pathPattern.matcher(path);
-            returnValue = match.matches();
+            if (path != null) {
+                final Matcher match = pathPattern.matcher(path);
+                returnValue = match.matches();
+            } else {
+                // if no path is given just add every ResourceAccessGate for
+                // security reason
+                return true;
+            }
         }
 
         return returnValue;

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to