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 10:25:43 UTC
[sling-org-apache-sling-xss] 02/05: SLING-6507 Remove (sub) service
user from XSSFilterImpl
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.xss-1.0.18
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-xss.git
commit af55c7bcf37632923837557ffaf63d395fe76fb6
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Mon Feb 6 10:08:05 2017 +0000
SLING-6507 Remove (sub) service user from XSSFilterImpl
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/xss@1781858 13f79535-47bb-0310-9956-ffa450edef68
---
src/main/java/org/apache/sling/xss/impl/XSSFilterImpl.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/sling/xss/impl/XSSFilterImpl.java b/src/main/java/org/apache/sling/xss/impl/XSSFilterImpl.java
index 098bbad..68ee465 100644
--- a/src/main/java/org/apache/sling/xss/impl/XSSFilterImpl.java
+++ b/src/main/java/org/apache/sling/xss/impl/XSSFilterImpl.java
@@ -72,7 +72,6 @@ public class XSSFilterImpl implements XSSFilter, ResourceChangeListener, Externa
public static final String DEFAULT_POLICY_PATH = "sling/xss/config.xml";
private static final String EMBEDDED_POLICY_PATH = "SLING-INF/content/config.xml";
- private static final String SLING_XSS_USER = "sling-xss";
private static final int DEFAULT_POLICY_CACHE_SIZE = 128;
private PolicyHandler defaultHandler;
private Attribute hrefAttribute;
@@ -123,10 +122,7 @@ public class XSSFilterImpl implements XSSFilter, ResourceChangeListener, Externa
this.defaultHandler = null;
ResourceResolver xssResourceResolver = null;
try {
- Map<String, Object> authenticationInfo = new HashMap<String, Object>() {{
- put(ResourceResolverFactory.SUBSERVICE, SLING_XSS_USER);
- }};
- xssResourceResolver = resourceResolverFactory.getServiceResourceResolver(authenticationInfo);
+ xssResourceResolver = resourceResolverFactory.getServiceResourceResolver(null);
Resource policyResource = xssResourceResolver.getResource(DEFAULT_POLICY_PATH);
if (policyResource != null) {
try (InputStream policyStream = policyResource.adaptTo(InputStream.class)) {
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.