Skip to content

Keep configuration values and raw handles out of log messages - #416

Merged
mraible merged 2 commits into
masterfrom
config-logging-values
Dec 3, 2026
Merged

mraible merged 2 commits into
masterfrom
config-logging-values

Conversation

@mraible

@mraible mraible commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

With DEBUG logging on for WebloggerConfig, Roller logs every startup property as key=value at startup, including the database password, OIDC client secrets and the remember-me key. It also logs each value it looks up.

  • It now logs the number of properties loaded and the names of the ones looked up, without values.
  • JPAPersistenceStrategy logs JPA properties (jakarta.persistence, eclipselink, hibernate, openjpa) from roller-custom.properties by name only at INFO, instead of name and value.
  • The "Invalid handle" error and the UI's weblog lookup error escape the handle, so line breaks in a request can't add lines to the log.
  • The WebloggerConfig and handle changes match 6.1.8 (ae8bf7d). WebloggerConfigLoggingTest, the UIActionInterceptorTest case and their LogCapture helper come from 6.1.x.

With DEBUG logging on for WebloggerConfig, Roller logged every startup property as key=value, including the database password, OIDC client secrets and the remember-me key, and logged each looked-up value too. It now logs the number of properties loaded and the names of the ones looked up. The "Invalid handle" error escapes the handle, so line breaks in a request can't add lines to the log.

This matches 6.1.8 (ae8bf7d). WebloggerConfigLoggingTest and its LogCapture helper come from 6.1.x.
@mraible mraible added the 7.0.0 label Dec 3, 2026
…kups

JPAPersistenceStrategy logged each jakarta.persistence, eclipselink, hibernate or openjpa property from roller-custom.properties with its value at INFO, so a credential an operator put there reached the log. It now logs only the name.

UIActionInterceptor logged the weblog request parameter as is when the weblog lookup failed. It now escapes it, as 6.1.8 does, and UIActionInterceptorTest gets 6.1.x's test for it.

@snoopdave snoopdave 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.

LGTM — keeps configuration values out of WebloggerConfig and JPAPersistenceStrategy logs and escapes invalid weblog handles in log messages, with clean Log4j2 capture tests.

@mraible
mraible merged commit adeea65 into master Dec 3, 2026
9 checks passed
@mraible
mraible deleted the config-logging-values branch December 3, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants