Skip to content
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

Handle special case of xssProtection #625

Merged
merged 11 commits into from
Nov 15, 2024
Merged

Conversation

SiBorea
Copy link
Contributor

@SiBorea SiBorea commented Nov 14, 2024

What's changed?

When it comes to xssProtection, the recipe will generate code like protection ->protection.xssProtectionEnabled(true). However, xssProtectionEnabled() is removed in spring-security-config-6+. xssProtection is set enabled as default and disabled on demand.

Checklist

  • [✅] I've added unit tests to cover both positive and negative cases
  • [✅] I've read and applied the recipe conventions and best practices
  • [✅] I've used the IntelliJ IDEA auto-formatter on affected files

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions could not be made:

  • src/main/java/org/openrewrite/java/spring/boot2/ConvertToSecurityDslVisitor.java
    • lines 18-19
    • lines 33-32

Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the improved handling here @SiBorea , and your continued involvement throughout. Much appreciated!

@timtebeek timtebeek added bug Something isn't working spring-security labels Nov 15, 2024
timtebeek and others added 2 commits November 15, 2024 21:08
…ot2/HeadersConfigurerLambdaDslTest.java

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions could not be made:

  • src/testWithSpringBoot_2_4/java/org/openrewrite/java/spring/boot2/HeadersConfigurerLambdaDslTest.java
    • lines 20-20

@timtebeek timtebeek merged commit f487605 into openrewrite:main Nov 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working spring-security
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants