8000 Use versioned FreeMarker Configuration defaults by MdTanwer · Pull Request #50099 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Use versioned FreeMarker Configuration defaults - #50099

Merged
rmartinc merged 1 commit into
keycloak:mainfrom
MdTanwer:fix/freemarker-versioned-config
Jun 24, 2026
Merged

rmartinc merged 1 commit into
keycloak:mainfrom
MdTanwer:fix/freemarker-versioned-config

Conversation

@MdTanwer
@MdTanwer MdTanwer commented Jun 18, 2026 •
Copy link
Copy Markdown
Contributor

Summary

  • Replace deprecated new Configuration() with new Configuration(Configuration.VERSION_2_3_32) in DefaultFreeMarkerProvider.
  • Avoid legacy FreeMarker 2.3.0 defaults and opt into the bundled FreeMarker version’s security/correctness improvements.

Fix #49922

@MdTanwer
MdTanwer marked this pull request as ready for review June 18, 2026 06:38
@MdTanwer
MdTanwer requested a review from a team as a code owner June 18, 2026 06:38
Copilot AI review requested due to automatic review settings June 18, 2026 06:38
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Keycloak’s FreeMarker configuration initialization to use a versioned Configuration constructor, ensuring FreeMarker runs with defaults aligned to the bundled engine version rather than legacy 2.3.0 “incompatible improvements” behavior.

Changes:

  • Replaced deprecated new Configuration() with new Configuration(Configuration.VERSION_2_3_32) in DefaultFreeMarkerProvider.
  • Ensures FreeMarker defaults match the project’s bundled FreeMarker version (<freemarker.version>2.3.32</freemarker.version> in the root pom.xml), aligning with security/correctness improvements gated by version flags.

@ahus1
ahus1 commented Jun 19, 2026
Copy link
Copy Markdown
Member

As of CONTRIBUTING.md, "new contributors may have at most 2 open pull requests at a time". Closing this one due to that.

@ahus1 ahus1 closed this Jun 19, 2026
@MdTanwer
Copy link
Copy Markdown
Contributor Author

Hi @ahus1 ,

Thanks for the clarification regarding the CONTRIBUTING.md rule for new contributors! I completely understand the need to keep review workloads manageable.

I would like to keep contributing regularly to Keycloak. Could you clarify what the typical milestone or criteria is for a contributor to no longer be restricted by the 2-PR limit?

Thank you for your time and guidance!

@rmartinc
Copy link
Copy Markdown
Contributor

@MdTanwer I'm re-opening this once I merged your other requests. Initially I don't see any harm in this change and it fixes the scanner issue.

@rmartinc rmartinc reopened this Jun 23, 2026
@rmartinc
Copy link
Copy Markdown
Contributor

Can you please sign the commit git commit -s --amend? It's needed for the DCO check.

Initialize FreeMarker with the bundled VERSION_2_3_32 to avoid legacy 2.3.0 defaults and opt into current security and correctness improvements.

Signed-off-by: MdTanwer <tanw9004167@gmail.com>
@MdTanwer
MdTanwer force-pushed the fix/freemarker-versioned-config branch from 0eaf9a5 to 708dea3 Compare June 23, 2026 17:12
@MdTanwer
Copy link
Copy Markdown
Contributor Author

Can you please sign the commit git commit -s --amend? It's needed for the DCO check.

done

@rmartinc rmartinc left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @MdTanwer! LGTM!

@rmartinc
rmartinc merged commit 468d569 into keycloak:main Jun 24, 2026
88 checks passed
sashyo pushed a commit to tide-foundation/keycloak-IGA that referenced this pull request Jul 20, 2026
Initialize FreeMarker with the bundled VERSION_2_3_32 to avoid legacy 2.3.0 defaults and opt into current security and correctness improvements.

Signed-off-by: MdTanwer <tanw9004167@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FreeMarker: deprecated no-arg Configuration constructor pins engine to legacy 2.3.0 defaults

5 participants

0