Skip to content

Commit

Permalink
FIX: #11
Browse files Browse the repository at this point in the history
Noted by @chead in [Bug 11](#11). `PyYAML` v6.0 requires `yaml.load` to have a second argument. Switched to using `safe_load` to fix the argument issue as well as a potential security issue.
  • Loading branch information
zaberaki committed Feb 7, 2023
1 parent c8fe725 commit 0267c89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions VERSIONS.md
Expand Up @@ -102,3 +102,7 @@ Update `pyproject.toml` to be a bit more strict about what python versions are b
AttributeError: 'NoneType' object has no attribute 'name'
```

## 30.0.20230207

1. Noted by @chead in [Bug 11](https://github.com/zabertech/python-izaber/issues/11). `PyYAML` v6.0 requires `yaml.load` to have a second argument. Switched to using `safe_load` to fix the argument issue as well as a potential security issue.

4 changes: 2 additions & 2 deletions izaber/zconfig.py
Expand Up @@ -91,7 +91,7 @@ def load_config( self,

if config_buffer:
self._config_full_filname = None
self._cfg = yaml.load(config_buffer)
self._cfg = yaml.safe_load(config_buffer)
else:
self.config_fpath = self.config_find() \
or os.path.join(self._config_dirs[0], \
Expand Down Expand Up @@ -373,7 +373,7 @@ def config_update_(self,config_amend):
"""
if not isinstance(config_amend,dict):
config_amend = yaml.load(config_amend)
config_amend = yaml.safe_load(config_amend)

def merge_dicts(source,target,breadcrumbs=None):
"""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
@@ -1,7 +1,7 @@
[tool.poetry]
name = "izaber"
description = "Base load point for iZaber code"
version = '3.0.20221124'
version = '3.0.20230207'
authors = ["Aki Mimoto <aki@zaber.com>"]

[build-system]
Expand Down

0 comments on commit 0267c89

Please sign in to comment.