Skip to content

Instantly share code, notes, and snippets.

@yan-kisen
yan-kisen / DefaultSelectorOverrideDefinition.groovy
Created November 25, 2019 18:51 — forked from joshdurbin/DefaultSelectorOverrideDefinition.groovy
The Excessive Selector Removal Filter is aimed at increasing security for sling/CQ/AEM instances with specific focus on selector-based denial-of-service attacks. The filter examines incoming, resource-based requests, looking for servlets that are registered for said resource. The filter will then build a list of the potential selectors and compa…
package com.citytechinc.services.selectorverification
import org.apache.felix.scr.annotations.Activate
import org.apache.felix.scr.annotations.Component
import org.apache.felix.scr.annotations.ConfigurationPolicy
import org.apache.felix.scr.annotations.Modified
import org.apache.felix.scr.annotations.Property
import org.apache.felix.scr.annotations.Service
import org.apache.sling.commons.osgi.OsgiUtil