fix getInputStream

This commit is contained in:
Michael Hoennig 2025-03-17 11:49:35 +01:00
parent 123f1dc10f
commit 7a4dadea73

View File

@ -21,13 +21,10 @@ public class CasAuthenticationFilter extends OncePerRequestFilter {
protected void doFilterInternal( protected void doFilterInternal(
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) { HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) {
request.getInputStream();
if (request.getHeader("authorization") != null) { if (request.getHeader("authorization") != null) {
final var authenticatedRequest = new AuthenticatedHttpServletRequestWrapper(request); final var authenticatedRequest = new AuthenticatedHttpServletRequestWrapper(request);
final var currentSubject = authenticator.authenticate(request); final var currentSubject = authenticator.authenticate(request);
authenticatedRequest.addHeader("current-subject", currentSubject); authenticatedRequest.addHeader("current-subject", currentSubject);
authenticatedRequest.getInputStream();
filterChain.doFilter(authenticatedRequest, response); filterChain.doFilter(authenticatedRequest, response);
} else { } else {
filterChain.doFilter(request, response); filterChain.doFilter(request, response);