Skip to content
This repository was archived by the owner on May 9, 2020. It is now read-only.

Commit 336cb9e

Browse files
committed
verify rsa.Key object to prevent segfault
1 parent bf23399 commit 336cb9e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

chef/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ def __init__(self, url, key, client, version='0.10.8', headers={}):
7575
self.parsed_url = urlparse.urlparse(self.url)
7676
if not isinstance(key, Key):
7777
key = Key(key)
78+
if not key.key:
79+
raise ValueError("ChefAPI attribute 'key' was invalid.")
7880
self.key = key
7981
self.client = client
8082
self.version = version

0 commit comments

Comments
 (0)