While working on AEM 6.2 SP1 with a Servlet Filter
I came across issues with the Parameter Support
as they interfere with the Servlet Filters or at least
with Servlet Filters that are handled before entering
the “Sling domain”.

1) Because of the SlingHttpContext.handleSecurity()
the Parameter Support is created as one of the first
Servlet Filters. 
2) That Parameter Support reads the parameters from the
Servlet Input stream

3) The Parameter Support Request Wrapper is ditched later

4) Any later filter will not have access to the parameters
from the request

5) Any Filter that wraps the Servlet Request to change
either the Query String or Parameter(s) will do that in vein
as the stored Parameter Support in 1) will provide the
parameters for anything in Sling

In my current project I am storing the Query String
which can be quite long in a Session and re-hydrate
that in a Filter. This worked in AEM 6.0 but now fails
due to the issues from above.

I don’t mind the Parameter Support but it should
check in the getInstance() method if the request was wrapped
and if then update the parameters from it.

I think this issue is related to this ticket:

https://issues.apache.org/jira/browse/SLING-3439?jql=text%20~%20%22ParameterSupport%22
 
<https://issues.apache.org/jira/browse/SLING-3439?jql=text%20~%20%22ParameterSupport%22>

Cheers - Andy Schaefer

Reply via email to