-
Notifications
You must be signed in to change notification settings - Fork 468
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
Fix yaml warning #1165
base: develop
Are you sure you want to change the base?
Fix yaml warning #1165
Conversation
Rebasing.
owtf/managers/config.py
Outdated
@@ -32,7 +32,7 @@ def load_config_file(file_path, fallback_file_path): | |||
# check if the config file exists | |||
abort_framework("Config file not found at: {}".format(file_path)) | |||
try: | |||
config_map = yaml.load(FileOperations.open(file_path, "r")) | |||
config_map = yaml.load(FileOperations.open(file_path, "r"), Loader=yaml.FullLoader) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is actually very insecure - can you use safe_load
function provided by the PyYAML? it would be great if you can also fix this anywhere we load YAML files 🙀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure will do that.
@EXTREMOPHILARUM can you actually go over the entire codebase and change it to |
Sure will go through it |
Yaml library deprecated the yaml.load function without the Loader parameter. This led to the framework showing a yaml.load warning on every start when configuration YAML files are being loaded.
Description
This PR fixes the warning popup.
Before
After
Reviewers
@viyatb
Types of changes
Checklist: