Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

[-] fix warning about yaml.load() is deprecated, closes #738 #739

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

AndrewJackson2020
Copy link
Contributor

This is a fix for deprecated use of the yaml.load function. Apparently yaml.load carries some security concerns with how it de-serializes data from the yaml file, (arbitrary python code could be executed if embedded in the yaml file). As a result the library maintainers want users to be more explicit about what loader they are using to load the yaml.

The current usage of yaml.load in pgwatch2 is equivalent to the yaml.full_load function used in this PR. A safer choice might be the yaml.safe_load function but I would be concerned about regression issues.

Let me know if this change makes sense to you or if you want to drop down to using the safe_load function. Also let me know if you would like me to include some unit tests to prevent regressions/deprecation issues going forward.

@pashagolub pashagolub self-assigned this Feb 6, 2024
@pashagolub pashagolub changed the title Fixed yaml warning [-] fix warning about yaml.load() is deprecated, closes #738 Feb 6, 2024
@pashagolub pashagolub merged commit 1018a5c into cybertec-postgresql:master Feb 6, 2024
2 checks passed
@pashagolub
Copy link
Collaborator

Thanks for your help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants