-
Notifications
You must be signed in to change notification settings - Fork 38.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HttpHeaders.writeableHttpHeaders(new HttpHeaders(readOnlyHttpHeaders)) is not writeable #33789
Comments
Maybe our issue has the same cause: After update Spring Boot 3.3.4 to 3.3.5 the tokenRelay .filters(GatewayFilterSpec::tokenRelay).uri("lb://calc-service")) in out Spring Cloud gateway fails with:
After rolled back to Spring Boot 3.3.4 everthying is working fine. |
@sven-tsi yes it is. See workaround here: spring-projects/spring-security#15989 (comment) |
@rwinch any chance to backport this fix to Spring Framework 5.3.x? |
@ilgrosso Spring Framework 5.3.x is out of open source support so we won't be releasing new OSS versions. We have already cut several commercial releases. |
Workaround spring-projects/spring-security#15989 (comment)
HttpHeaders.writeableHttpHeaders
does not create writeableHttpHeaders
ifnew HttpHeaders(readOnlyHttpHeaders)
is passed in. This is required by Spring Security'sStrictServerWebExchangeFirewall
to perform lazy validation of theHttpHeaders
name/value pairs.Here is a complete, minimal test with no external dependencies that fails:
This test demonstrates the issue with a little more context as to what is happening in
StrictServerWebExchangeFirewall
:Please make it so that
HttpHeaders.writableHttpHeaders
returnsHttpHeaders
that are writeable so Spring Cloud and Spring Security'sStrictServerWebExchangeFirewall
work together.The text was updated successfully, but these errors were encountered: