Skip to content

fix(user_ldap): Harmonize parameter obfuscation and serialization accross logging methods #53250

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

Merged
merged 1 commit into from
Jun 5, 2025

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Jun 2, 2025

Summary

Debug log, profiler and ldap debug log had a different logic for
sanitizing of parameters, aligning them.

Checklist

…ross logging methods

Debug log, profiler and ldap debug log had a different logic for
 sanitizing of parameters, aligning them.

Signed-off-by: Côme Chilliet <[email protected]>
@come-nc come-nc added this to the Nextcloud 32 milestone Jun 2, 2025
@come-nc come-nc self-assigned this Jun 2, 2025
@come-nc come-nc added the 3. to review Waiting for reviews label Jun 2, 2025
@come-nc come-nc requested a review from a team as a code owner June 2, 2025 09:49
@come-nc come-nc requested review from ArtificialOwl, icewind1991 and sorbaugh and removed request for a team June 2, 2025 09:49
@come-nc
Copy link
Contributor Author

come-nc commented Jun 2, 2025

/backport to stable31

@come-nc
Copy link
Contributor Author

come-nc commented Jun 2, 2025

/backport to stable30

@come-nc
Copy link
Contributor Author

come-nc commented Jun 2, 2025

/backport to stable29

@come-nc come-nc requested review from blizzz and susnux June 3, 2025 13:01
Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

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

Fine beside one question

'func' => $functionName,
'args' => json_encode($args),
]);
if ($this->config->getSystemValue('loglevel') === ILogger::DEBUG) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed if we then call logger->debug()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sanitizeFunctionParameters felt a bit expensive to run for nothing, so I wanted to only use the computing time if the log is actually gonna happen.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually the comment says just that on the line below: /* Only running this if debug loglevel is on, to avoid processing parameters on production */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants