-1

I've recently upgraded to the spring boot version 2.6.3 while using camunda 7.17.0. The login camunda page, sends a post request, but the form-data parameters are sent in the body, causing the getParameter method to return null.

I am implementing the class Filter for camunda login:

@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
 throws IOException, ServletException {
    HttpServletRequest servletRequest = (HttpServletRequest) request;
    var param = servletRequest.getParameter(PARAMETER_KEY);
    //other things
}

but the parameter is returned as null.

Anyone knows how to solve it?

shorse
  • 1
  • what are you trying to achieve? – rob2universe May 06 '22 at 09:02
  • well, I want to be able to apply the various login filters I've created to the specific user trying to login. But when I try to get the parameter thorugh servletRequest.getParameter("username") the method returns null, even though the parameter is sent. I finally solved this the property spring.mvc.hiddenmethod.filter.enabled=true – shorse May 09 '22 at 08:31
  • Maybe add the answer to your question then – rob2universe May 09 '22 at 22:13

1 Answers1

0

Adding the property spring.mvc.hiddenmethod.filter.enabled=true in the application.properties file solved the issue.

shorse
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 12 '22 at 01:17