Interface SaferSlingPostValidator
public interface SaferSlingPostValidator
Service to check Sling Post requests for unsafe constructs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanACCEPT returned when a request may be accepted.static final StringAttribute set on the request to indicate the depth under the target request which :applyTo should be allowed to reference.static final booleanREJECT returned when a request should be rejected. -
Method Summary
Modifier and TypeMethodDescriptionbooleanreject(SlingHttpServletRequest request, String... whitelistPatterns) Reject any unsafe post requests.
-
Field Details
-
REJECT
static final boolean REJECTREJECT returned when a request should be rejected.- See Also:
-
ACCEPT
static final boolean ACCEPTACCEPT returned when a request may be accepted.- See Also:
-
POST_DEPTH_ATTRIBUTE
Attribute set on the request to indicate the depth under the target request which :applyTo should be allowed to reference.
-
-
Method Details
-
reject
Reject any unsafe post requests.- Parameters:
request- the request to checkwhitelistPatterns- additional whitelist patterns- Returns:
- REJECT if the request should be rejected, otherwise return ACCEPT.
-