You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:58:09 UTC
[sling-org-apache-sling-resourceaccesssecurity] 06/13: SLING-3918 -
If a resource does not have a path a NPE occurrs
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.resourceaccesssecurity-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceaccesssecurity.git
commit f5cad96a27c39607b6fd50a76ac36907841abd97
Author: Mike Müller <my...@apache.org>
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/bundles/resourceaccesssecurity/core@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
"commits@sling.apache.org" <co...@sling.apache.org>.