From 85cea580673b3bb056fee88326b3f1ba1677e23e Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 30 Oct 2023 13:02:24 +0100 Subject: [PATCH] build: Change yaml.load to safe_load MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s safer. PyYAML also changed the load method so it requires a loader parameter. --- examples/test_client.py | 2 +- examples/test_server.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/test_client.py b/examples/test_client.py index 1fbdff5..f2699c4 100644 --- a/examples/test_client.py +++ b/examples/test_client.py @@ -8,7 +8,7 @@ from nacl.signing import SigningKey from secret_handshake import SHSClient with open(os.path.expanduser('~/.ssb/secret')) as f: - config = yaml.load(f) + config = yaml.safe_load(f) async def main(): diff --git a/examples/test_server.py b/examples/test_server.py index cc9c616..edbbf6d 100644 --- a/examples/test_server.py +++ b/examples/test_server.py @@ -8,7 +8,7 @@ from nacl.signing import SigningKey from secret_handshake import SHSServer with open(os.path.expanduser('~/.ssb/secret')) as f: - config = yaml.load(f) + config = yaml.safe_load(f) async def _on_connect(conn):