Skip to content

Conversation

@Le-onardo
Copy link

If drop_privileges is set to false (default is true), the trusted_path function does check if the path is trusted or not and returns false if this isn't the case. If this conditional path is not hit, there is no return true, which leaves the state of the function 'nil', thus being false.

This change should account for the true case.

@Le-onardo Le-onardo requested a review from a team as a code owner January 22, 2024 10:55
@CLAassistant
Copy link

CLAassistant commented Jan 22, 2024

CLA assistant check
All committers have signed the CLA.

path = path.dirname
end
Puppet.debug('Path trusted, writing the file as the current user')
return true
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks! There should be a test to verify this behavior. Do you know if one exists already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants