From e0cc6ba0cae1843ce32de5cfd61bfc21334b08a9 Mon Sep 17 00:00:00 2001 From: Alexander Tikhonov Date: Sun, 20 Jan 2019 12:33:49 +0300 Subject: [PATCH] Security fix for pyyaml See https://github.com/yaml/pyyaml/issues/243 --- mashumaro/serializer/yaml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mashumaro/serializer/yaml.py b/mashumaro/serializer/yaml.py index 32543ad2..fbf8d258 100644 --- a/mashumaro/serializer/yaml.py +++ b/mashumaro/serializer/yaml.py @@ -9,4 +9,4 @@ def to_yaml(self): @classmethod def from_yaml(cls, data: bytes): - return cls.from_dict(yaml.load(data), use_bytes=False) + return cls.from_dict(yaml.safe_load(data), use_bytes=False)